From 8c60628115528975933fc71c9883147542c311e1 Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Wed, 12 Oct 2022 01:39:46 +0000 Subject: [PATCH] CodeGen from PR 20873 in Azure/azure-rest-api-specs add AVS 2022-05-01 API (#20873) * copy 2021-12-01 * replace api-version and replace subscription-id in examples * allow specifying a sku in Locations_CheckTrialAvailability * add Clusters_ListZones * add WorkloadNetworks_Get & WorkloadNetworks_List * Arc Addons * add readOnly nsxPublicIpQuotaRaised flag to PrivateCloudProperties * add readonly autoDetectedKeyVersion to EncryptionKeyVaultProperties * definition of WorkloadNetwork & WorkloadNetworkList * add affinityStrength and azureHybridBenefitType to VmHostPlacementPolicyProperties * add affinityStrength and azureHybridBenefitType to PlacementPolicyUpdateProperties * add definitions for ClusterZone and ClusterZoneList * add company and uri to ScriptPackageProperties * add to readme * add x-ms-identifiers * suppress ParametersOrder * fix #20902. add Canceled to all provisioningState * fix trial spelling * add workloadNetworkName param to WorkloadNetworks_Get * use v3/types in new operations Clusters_ListZones, WorkloadNetworks_Get, WorkloadNetworks_List * fix response type for WorkloadNetworks_List * remove empty property bags * add workloadNetworkName to WorkloadNetworks_Get example * use suppressions * restore AutoRest v2 Suppressions * fix ConsistentPatchProperties by using PlacePolicy resource directly in PlacementPolicies_Update * Revert "fix ConsistentPatchProperties by using PlacePolicy resource directly in PlacementPolicies_Update" This reverts commit b88a2c064b31198844432c06142212ab8cd92d7d. * suppress ConsistentPatchProperties * suppress DefinitionsPropertiesNamesCamelCase & ArmResourcePropertiesBag * suppress DeleteOperationAsyncResponseValidation * add 202 responses to PrivateClouds_Update & Clusters_Update * just warnings * suppress PatchSkuProperty * Revert "add 202 responses to PrivateClouds_Update & Clusters_Update" This reverts commit 9d6abb129a92a5d018aef9997212ced1055d5352. * suppress LroPatch202 * suppress UnSupportedPatchProperties `name` & `type` * suppress XmsLongRunningOperationOptions --- .../azure-resourcemanager-avs/CHANGELOG.md | 4 +- sdk/avs/azure-resourcemanager-avs/README.md | 4 +- sdk/avs/azure-resourcemanager-avs/SAMPLE.md | 357 +++-- sdk/avs/azure-resourcemanager-avs/pom.xml | 2 +- .../azure/resourcemanager/avs/AvsManager.java | 144 +- .../avs/fluent/AddonsClient.java | 22 +- .../avs/fluent/AuthorizationsClient.java | 22 +- .../avs/fluent/CloudLinksClient.java | 22 +- .../avs/fluent/ClustersClient.java | 57 +- .../avs/fluent/DatastoresClient.java | 22 +- .../fluent/GlobalReachConnectionsClient.java | 22 +- .../avs/fluent/HcxEnterpriseSitesClient.java | 38 +- .../avs/fluent/LocationsClient.java | 18 +- .../avs/fluent/OperationsClient.java | 4 +- .../avs/fluent/PlacementPoliciesClient.java | 36 +- .../avs/fluent/PrivateCloudsClient.java | 48 +- .../avs/fluent/ScriptCmdletsClient.java | 24 +- .../avs/fluent/ScriptExecutionsClient.java | 46 +- .../avs/fluent/ScriptPackagesClient.java | 14 +- .../avs/fluent/VirtualMachinesClient.java | 28 +- .../avs/fluent/WorkloadNetworksClient.java | 272 ++-- .../avs/fluent/models/AddonInner.java | 8 +- .../fluent/models/AdminCredentialsInner.java | 8 +- .../avs/fluent/models/CloudLinkInner.java | 8 +- .../fluent/models/CloudLinkProperties.java | 8 +- .../avs/fluent/models/ClusterInner.java | 11 +- .../avs/fluent/models/ClusterProperties.java | 6 +- .../models/ClusterUpdateProperties.java | 8 +- .../fluent/models/ClusterZoneListInner.java | 55 + .../avs/fluent/models/DatastoreInner.java | 8 +- .../fluent/models/DatastoreProperties.java | 8 +- .../ExpressRouteAuthorizationInner.java | 8 +- .../ExpressRouteAuthorizationProperties.java | 8 +- .../models/GlobalReachConnectionInner.java | 8 +- .../GlobalReachConnectionProperties.java | 20 +- .../fluent/models/HcxEnterpriseSiteInner.java | 8 +- .../models/HcxEnterpriseSiteProperties.java | 8 +- .../avs/fluent/models/OperationInner.java | 11 +- .../fluent/models/PlacementPolicyInner.java | 8 +- .../PlacementPolicyUpdateProperties.java | 62 +- .../avs/fluent/models/PrivateCloudInner.java | 22 +- .../fluent/models/PrivateCloudProperties.java | 44 +- .../models/PrivateCloudUpdateProperties.java | 11 +- .../avs/fluent/models/QuotaInner.java | 8 +- .../avs/fluent/models/ScriptCmdletInner.java | 12 +- .../fluent/models/ScriptCmdletProperties.java | 8 +- .../fluent/models/ScriptExecutionInner.java | 8 +- .../models/ScriptExecutionProperties.java | 24 +- .../avs/fluent/models/ScriptPackageInner.java | 30 +- .../models/ScriptPackageProperties.java | 38 +- .../avs/fluent/models/TrialInner.java | 8 +- .../fluent/models/VirtualMachineInner.java | 12 +- .../models/VirtualMachineProperties.java | 11 +- .../models/WorkloadNetworkDhcpInner.java | 8 +- .../WorkloadNetworkDnsServiceInner.java | 8 +- .../WorkloadNetworkDnsServiceProperties.java | 8 +- .../models/WorkloadNetworkDnsZoneInner.java | 8 +- .../WorkloadNetworkDnsZoneProperties.java | 8 +- .../models/WorkloadNetworkGatewayInner.java | 8 +- .../WorkloadNetworkGatewayProperties.java | 8 +- .../fluent/models/WorkloadNetworkInner.java | 24 + .../WorkloadNetworkPortMirroringInner.java | 8 +- ...orkloadNetworkPortMirroringProperties.java | 8 +- .../models/WorkloadNetworkPublicIpInner.java | 8 +- .../WorkloadNetworkPublicIpProperties.java | 8 +- .../models/WorkloadNetworkSegmentInner.java | 8 +- .../WorkloadNetworkSegmentProperties.java | 8 +- .../models/WorkloadNetworkVMGroupInner.java | 8 +- .../WorkloadNetworkVMGroupProperties.java | 8 +- .../WorkloadNetworkVirtualMachineInner.java | 8 +- ...rkloadNetworkVirtualMachineProperties.java | 8 +- .../avs/implementation/AddonImpl.java | 4 + .../avs/implementation/AddonsClientImpl.java | 91 +- .../avs/implementation/AddonsImpl.java | 45 +- .../AuthorizationsClientImpl.java | 100 +- .../implementation/AuthorizationsImpl.java | 47 +- .../avs/implementation/AvsClientBuilder.java | 63 +- .../avs/implementation/AvsClientImpl.java | 15 +- .../avs/implementation/CloudLinkImpl.java | 4 + .../implementation/CloudLinksClientImpl.java | 97 +- .../avs/implementation/CloudLinksImpl.java | 45 +- .../avs/implementation/ClusterImpl.java | 16 + .../implementation/ClusterZoneListImpl.java | 39 + .../implementation/ClustersClientImpl.java | 289 +++- .../avs/implementation/ClustersImpl.java | 71 +- .../avs/implementation/DatastoreImpl.java | 4 + .../implementation/DatastoresClientImpl.java | 100 +- .../avs/implementation/DatastoresImpl.java | 55 +- .../ExpressRouteAuthorizationImpl.java | 4 + .../GlobalReachConnectionImpl.java | 4 + .../GlobalReachConnectionsClientImpl.java | 99 +- .../GlobalReachConnectionsImpl.java | 49 +- .../implementation/HcxEnterpriseSiteImpl.java | 4 + .../HcxEnterpriseSitesClientImpl.java | 120 +- .../HcxEnterpriseSitesImpl.java | 51 +- .../implementation/LocationsClientImpl.java | 80 +- .../avs/implementation/LocationsImpl.java | 32 +- .../implementation/OperationsClientImpl.java | 25 +- .../avs/implementation/OperationsImpl.java | 3 +- .../PlacementPoliciesClientImpl.java | 132 +- .../implementation/PlacementPoliciesImpl.java | 57 +- .../implementation/PlacementPolicyImpl.java | 16 + .../avs/implementation/PrivateCloudImpl.java | 26 +- .../PrivateCloudsClientImpl.java | 208 +-- .../avs/implementation/PrivateCloudsImpl.java | 55 +- .../ScriptCmdletsClientImpl.java | 73 +- .../avs/implementation/ScriptCmdletsImpl.java | 25 +- .../implementation/ScriptExecutionImpl.java | 16 +- .../ScriptExecutionsClientImpl.java | 180 +-- .../implementation/ScriptExecutionsImpl.java | 67 +- .../avs/implementation/ScriptPackageImpl.java | 8 + .../ScriptPackagesClientImpl.java | 60 +- .../implementation/ScriptPackagesImpl.java | 21 +- .../VirtualMachinesClientImpl.java | 88 +- .../implementation/VirtualMachinesImpl.java | 25 +- .../WorkloadNetworkDhcpImpl.java | 4 + .../WorkloadNetworkDnsServiceImpl.java | 4 + .../WorkloadNetworkDnsZoneImpl.java | 4 + .../implementation/WorkloadNetworkImpl.java | 39 + .../WorkloadNetworkPortMirroringImpl.java | 4 + .../WorkloadNetworkSegmentImpl.java | 4 + .../WorkloadNetworkVMGroupImpl.java | 4 + .../WorkloadNetworksClientImpl.java | 1320 +++++++++++------ .../implementation/WorkloadNetworksImpl.java | 394 ++--- .../resourcemanager/avs/models/Addon.java | 7 + .../avs/models/AddonArcProperties.java | 56 + .../avs/models/AddonHcxProperties.java | 11 +- .../resourcemanager/avs/models/AddonList.java | 8 +- .../avs/models/AddonProperties.java | 11 +- .../avs/models/AddonProvisioningState.java | 11 +- .../avs/models/AddonSrmProperties.java | 8 +- .../resourcemanager/avs/models/AddonType.java | 11 +- .../avs/models/AddonVrProperties.java | 8 +- .../resourcemanager/avs/models/Addons.java | 18 +- .../avs/models/AffinityStrength.java | 38 + .../avs/models/AffinityType.java | 8 +- .../avs/models/Authorizations.java | 18 +- .../avs/models/AvailabilityProperties.java | 8 +- .../avs/models/AvailabilityStrategy.java | 8 +- .../avs/models/AzureHybridBenefitType.java | 38 + .../resourcemanager/avs/models/Circuit.java | 8 +- .../resourcemanager/avs/models/CloudLink.java | 7 + .../avs/models/CloudLinkList.java | 8 +- .../avs/models/CloudLinkStatus.java | 8 +- .../avs/models/CloudLinks.java | 18 +- .../resourcemanager/avs/models/Cluster.java | 28 + .../avs/models/ClusterList.java | 8 +- .../avs/models/ClusterProvisioningState.java | 11 +- .../avs/models/ClusterUpdate.java | 8 +- .../avs/models/ClusterZone.java | 55 + .../avs/models/ClusterZoneList.java | 25 + .../resourcemanager/avs/models/Clusters.java | 46 +- .../avs/models/CommonClusterProperties.java | 8 +- .../resourcemanager/avs/models/Datastore.java | 7 + .../avs/models/DatastoreList.java | 8 +- .../models/DatastoreProvisioningState.java | 11 +- .../avs/models/DatastoreStatus.java | 8 +- .../avs/models/Datastores.java | 18 +- .../avs/models/DhcpTypeEnum.java | 8 +- .../avs/models/DiskPoolVolume.java | 16 +- .../avs/models/DnsServiceLogLevelEnum.java | 8 +- .../avs/models/DnsServiceStatusEnum.java | 8 +- .../avs/models/Encryption.java | 8 +- .../avs/models/EncryptionKeyStatus.java | 8 +- .../models/EncryptionKeyVaultProperties.java | 23 +- .../avs/models/EncryptionState.java | 8 +- .../avs/models/EncryptionVersionType.java | 8 +- .../resourcemanager/avs/models/Endpoints.java | 8 +- .../avs/models/ExpressRouteAuthorization.java | 7 + .../models/ExpressRouteAuthorizationList.java | 8 +- ...ssRouteAuthorizationProvisioningState.java | 11 +- .../avs/models/GlobalReachConnection.java | 7 + .../avs/models/GlobalReachConnectionList.java | 8 +- ...lobalReachConnectionProvisioningState.java | 11 +- .../models/GlobalReachConnectionStatus.java | 8 +- .../avs/models/GlobalReachConnections.java | 18 +- .../avs/models/HcxEnterpriseSite.java | 7 + .../avs/models/HcxEnterpriseSiteList.java | 8 +- .../avs/models/HcxEnterpriseSiteStatus.java | 8 +- .../avs/models/HcxEnterpriseSites.java | 30 +- .../avs/models/IdentitySource.java | 14 +- .../avs/models/InternetEnum.java | 8 +- .../resourcemanager/avs/models/Locations.java | 17 +- .../avs/models/LogSpecification.java | 8 +- .../avs/models/ManagementCluster.java | 6 +- .../avs/models/MetricDimension.java | 11 +- .../avs/models/MetricSpecification.java | 17 +- .../avs/models/MountOptionEnum.java | 8 +- .../avs/models/NetAppVolume.java | 11 +- .../models/NsxPublicIpQuotaRaisedEnum.java | 40 + .../avs/models/OperationDisplay.java | 8 +- .../avs/models/OperationList.java | 8 +- .../avs/models/OperationProperties.java | 8 +- .../avs/models/Operations.java | 4 +- .../avs/models/OptionalParamEnum.java | 8 +- .../PSCredentialExecutionParameter.java | 8 +- .../avs/models/PlacementPolicies.java | 28 +- .../avs/models/PlacementPoliciesList.java | 8 +- .../avs/models/PlacementPolicy.java | 34 +- .../avs/models/PlacementPolicyProperties.java | 8 +- .../PlacementPolicyProvisioningState.java | 11 +- .../avs/models/PlacementPolicyState.java | 8 +- .../avs/models/PlacementPolicyType.java | 8 +- .../avs/models/PlacementPolicyUpdate.java | 54 +- .../models/PortMirroringDirectionEnum.java | 8 +- .../avs/models/PortMirroringStatusEnum.java | 8 +- .../avs/models/PrivateCloud.java | 37 +- .../avs/models/PrivateCloudIdentity.java | 20 +- .../avs/models/PrivateCloudList.java | 8 +- .../models/PrivateCloudProvisioningState.java | 11 +- .../avs/models/PrivateCloudUpdate.java | 8 +- .../avs/models/PrivateClouds.java | 32 +- .../avs/models/QuotaEnabled.java | 8 +- .../avs/models/ResourceIdentityType.java | 11 +- .../avs/models/ScriptCmdlets.java | 24 +- .../avs/models/ScriptCmdletsList.java | 8 +- .../avs/models/ScriptExecution.java | 23 +- .../avs/models/ScriptExecutionParameter.java | 11 +- .../models/ScriptExecutionParameterType.java | 8 +- .../ScriptExecutionProvisioningState.java | 11 +- .../avs/models/ScriptExecutions.java | 40 +- .../avs/models/ScriptExecutionsList.java | 8 +- .../avs/models/ScriptOutputStreamType.java | 6 +- .../avs/models/ScriptPackage.java | 14 + .../avs/models/ScriptPackages.java | 14 +- .../avs/models/ScriptPackagesList.java | 8 +- .../avs/models/ScriptParameter.java | 14 +- .../avs/models/ScriptParameterTypes.java | 8 +- .../ScriptSecureStringExecutionParameter.java | 8 +- .../ScriptStringExecutionParameter.java | 8 +- .../avs/models/SegmentStatusEnum.java | 8 +- .../avs/models/ServiceSpecification.java | 8 +- .../azure/resourcemanager/avs/models/Sku.java | 11 +- .../resourcemanager/avs/models/SslEnum.java | 8 +- .../avs/models/TrialStatus.java | 8 +- .../avs/models/VMGroupStatusEnum.java | 8 +- .../avs/models/VMTypeEnum.java | 8 +- .../VirtualMachineRestrictMovement.java | 8 +- .../VirtualMachineRestrictMovementState.java | 8 +- .../avs/models/VirtualMachines.java | 22 +- .../avs/models/VirtualMachinesList.java | 8 +- .../avs/models/VisibilityParameterEnum.java | 8 +- .../VmHostPlacementPolicyProperties.java | 67 +- .../models/VmPlacementPolicyProperties.java | 13 +- .../avs/models/WorkloadNetwork.java | 38 + .../avs/models/WorkloadNetworkDhcp.java | 7 + .../avs/models/WorkloadNetworkDhcpEntity.java | 8 +- .../avs/models/WorkloadNetworkDhcpList.java | 8 +- .../WorkloadNetworkDhcpProvisioningState.java | 11 +- .../avs/models/WorkloadNetworkDhcpRelay.java | 8 +- .../avs/models/WorkloadNetworkDhcpServer.java | 8 +- .../avs/models/WorkloadNetworkDnsService.java | 7 + ...oadNetworkDnsServiceProvisioningState.java | 11 +- .../WorkloadNetworkDnsServicesList.java | 8 +- .../avs/models/WorkloadNetworkDnsZone.java | 7 + ...rkloadNetworkDnsZoneProvisioningState.java | 11 +- .../models/WorkloadNetworkDnsZonesList.java | 8 +- .../models/WorkloadNetworkGatewayList.java | 8 +- .../avs/models/WorkloadNetworkList.java | 59 + .../avs/models/WorkloadNetworkName.java | 35 + .../models/WorkloadNetworkPortMirroring.java | 7 + .../WorkloadNetworkPortMirroringList.java | 8 +- ...NetworkPortMirroringProvisioningState.java | 11 +- .../models/WorkloadNetworkPublicIPsList.java | 8 +- ...kloadNetworkPublicIpProvisioningState.java | 11 +- .../avs/models/WorkloadNetworkSegment.java | 7 + .../models/WorkloadNetworkSegmentPortVif.java | 8 +- ...rkloadNetworkSegmentProvisioningState.java | 11 +- .../models/WorkloadNetworkSegmentSubnet.java | 8 +- .../models/WorkloadNetworkSegmentsList.java | 8 +- .../avs/models/WorkloadNetworkVMGroup.java | 7 + ...rkloadNetworkVMGroupProvisioningState.java | 11 +- .../models/WorkloadNetworkVMGroupsList.java | 8 +- .../WorkloadNetworkVirtualMachinesList.java | 8 +- .../avs/models/WorkloadNetworks.java | 211 ++- .../AddonsCreateOrUpdateSamples.java | 27 +- .../avs/generated/AddonsDeleteSamples.java | 2 +- .../avs/generated/AddonsGetSamples.java | 18 +- .../avs/generated/AddonsListSamples.java | 2 +- .../AuthorizationsCreateOrUpdateSamples.java | 2 +- .../AuthorizationsDeleteSamples.java | 2 +- .../generated/AuthorizationsGetSamples.java | 2 +- .../generated/AuthorizationsListSamples.java | 2 +- .../CloudLinksCreateOrUpdateSamples.java | 2 +- .../generated/CloudLinksDeleteSamples.java | 2 +- .../avs/generated/CloudLinksGetSamples.java | 2 +- .../avs/generated/CloudLinksListSamples.java | 2 +- .../ClustersCreateOrUpdateSamples.java | 2 +- .../avs/generated/ClustersDeleteSamples.java | 2 +- .../avs/generated/ClustersGetSamples.java | 2 +- .../avs/generated/ClustersListSamples.java | 2 +- .../generated/ClustersListZonesSamples.java | 34 + .../avs/generated/ClustersUpdateSamples.java | 2 +- .../DatastoresCreateOrUpdateSamples.java | 2 +- .../generated/DatastoresDeleteSamples.java | 2 +- .../avs/generated/DatastoresGetSamples.java | 2 +- .../avs/generated/DatastoresListSamples.java | 2 +- ...ReachConnectionsCreateOrUpdateSamples.java | 2 +- .../GlobalReachConnectionsDeleteSamples.java | 2 +- .../GlobalReachConnectionsGetSamples.java | 2 +- .../GlobalReachConnectionsListSamples.java | 2 +- ...xEnterpriseSitesCreateOrUpdateSamples.java | 2 +- .../HcxEnterpriseSitesDeleteSamples.java | 2 +- .../HcxEnterpriseSitesGetSamples.java | 2 +- .../HcxEnterpriseSitesListSamples.java | 2 +- ...ocationsCheckQuotaAvailabilitySamples.java | 2 +- ...ocationsCheckTrialAvailabilitySamples.java | 17 +- .../avs/generated/OperationsListSamples.java | 2 +- ...lacementPoliciesCreateOrUpdateSamples.java | 12 +- .../PlacementPoliciesDeleteSamples.java | 2 +- .../PlacementPoliciesGetSamples.java | 2 +- .../PlacementPoliciesListSamples.java | 2 +- .../PlacementPoliciesUpdateSamples.java | 10 +- .../PrivateCloudsCreateOrUpdateSamples.java | 4 +- .../generated/PrivateCloudsDeleteSamples.java | 2 +- ...rivateCloudsGetByResourceGroupSamples.java | 4 +- ...vateCloudsListAdminCredentialsSamples.java | 2 +- ...ivateCloudsListByResourceGroupSamples.java | 4 +- .../generated/PrivateCloudsListSamples.java | 4 +- ...rivateCloudsRotateNsxtPasswordSamples.java | 2 +- ...ateCloudsRotateVcenterPasswordSamples.java | 2 +- .../generated/PrivateCloudsUpdateSamples.java | 4 +- .../generated/ScriptCmdletsGetSamples.java | 2 +- .../generated/ScriptCmdletsListSamples.java | 2 +- ...ScriptExecutionsCreateOrUpdateSamples.java | 4 +- .../ScriptExecutionsDeleteSamples.java | 2 +- ...riptExecutionsGetExecutionLogsSamples.java | 2 +- .../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 | 2 +- .../WorkloadNetworksCreateDhcpSamples.java | 2 +- ...rkloadNetworksCreateDnsServiceSamples.java | 2 +- .../WorkloadNetworksCreateDnsZoneSamples.java | 2 +- ...oadNetworksCreatePortMirroringSamples.java | 2 +- ...WorkloadNetworksCreatePublicIpSamples.java | 2 +- ...WorkloadNetworksCreateSegmentsSamples.java | 2 +- .../WorkloadNetworksCreateVMGroupSamples.java | 2 +- .../WorkloadNetworksDeleteDhcpSamples.java | 2 +- ...rkloadNetworksDeleteDnsServiceSamples.java | 2 +- .../WorkloadNetworksDeleteDnsZoneSamples.java | 2 +- ...oadNetworksDeletePortMirroringSamples.java | 2 +- ...WorkloadNetworksDeletePublicIpSamples.java | 2 +- .../WorkloadNetworksDeleteSegmentSamples.java | 2 +- .../WorkloadNetworksDeleteVMGroupSamples.java | 2 +- .../WorkloadNetworksGetDhcpSamples.java | 2 +- .../WorkloadNetworksGetDnsServiceSamples.java | 2 +- .../WorkloadNetworksGetDnsZoneSamples.java | 2 +- .../WorkloadNetworksGetGatewaySamples.java | 2 +- ...rkloadNetworksGetPortMirroringSamples.java | 2 +- .../WorkloadNetworksGetPublicIpSamples.java | 2 +- .../generated/WorkloadNetworksGetSamples.java | 23 + .../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 +- .../WorkloadNetworksListSamples.java | 22 + .../WorkloadNetworksListSegmentsSamples.java | 2 +- .../WorkloadNetworksListVMGroupsSamples.java | 2 +- ...oadNetworksListVirtualMachinesSamples.java | 2 +- .../WorkloadNetworksUpdateDhcpSamples.java | 2 +- ...rkloadNetworksUpdateDnsServiceSamples.java | 2 +- .../WorkloadNetworksUpdateDnsZoneSamples.java | 2 +- ...oadNetworksUpdatePortMirroringSamples.java | 2 +- ...WorkloadNetworksUpdateSegmentsSamples.java | 2 +- .../WorkloadNetworksUpdateVMGroupSamples.java | 2 +- 374 files changed, 5663 insertions(+), 3220 deletions(-) create mode 100644 sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/ClusterZoneListInner.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/WorkloadNetworkInner.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/ClusterZoneListImpl.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworkImpl.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/AddonArcProperties.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/AffinityStrength.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/AzureHybridBenefitType.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ClusterZone.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ClusterZoneList.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/NsxPublicIpQuotaRaisedEnum.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetwork.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkList.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkName.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/WorkloadNetworksGetSamples.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksListSamples.java diff --git a/sdk/avs/azure-resourcemanager-avs/CHANGELOG.md b/sdk/avs/azure-resourcemanager-avs/CHANGELOG.md index ee6934facf30..beb5385be1d7 100644 --- a/sdk/avs/azure-resourcemanager-avs/CHANGELOG.md +++ b/sdk/avs/azure-resourcemanager-avs/CHANGELOG.md @@ -1,6 +1,8 @@ # Release History -## 1.0.0-beta.4 (Unreleased) +## 1.0.0-beta.1 (2022-10-12) + +- 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-2022-05-01. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). ### Features Added diff --git a/sdk/avs/azure-resourcemanager-avs/README.md b/sdk/avs/azure-resourcemanager-avs/README.md index 0670dcc95ac6..79e4795c387a 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-2021-12-01. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). +This package contains Microsoft Azure SDK for Avs Management SDK. Azure VMware Solution API. Package tag package-2022-05-01. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). ## We'd love to hear your feedback @@ -32,7 +32,7 @@ Various documentation is available to help you get started com.azure.resourcemanager azure-resourcemanager-avs - 1.0.0-beta.3 + 1.0.0-beta.4 ``` [//]: # ({x-version-update-end}) diff --git a/sdk/avs/azure-resourcemanager-avs/SAMPLE.md b/sdk/avs/azure-resourcemanager-avs/SAMPLE.md index 88afa81ca98d..879ed4dc2dbd 100644 --- a/sdk/avs/azure-resourcemanager-avs/SAMPLE.md +++ b/sdk/avs/azure-resourcemanager-avs/SAMPLE.md @@ -28,6 +28,7 @@ - [Delete](#clusters_delete) - [Get](#clusters_get) - [List](#clusters_list) +- [ListZones](#clusters_listzones) - [Update](#clusters_update) ## Datastores @@ -120,6 +121,7 @@ - [DeletePublicIp](#workloadnetworks_deletepublicip) - [DeleteSegment](#workloadnetworks_deletesegment) - [DeleteVMGroup](#workloadnetworks_deletevmgroup) +- [Get](#workloadnetworks_get) - [GetDhcp](#workloadnetworks_getdhcp) - [GetDnsService](#workloadnetworks_getdnsservice) - [GetDnsZone](#workloadnetworks_getdnszone) @@ -129,6 +131,7 @@ - [GetSegment](#workloadnetworks_getsegment) - [GetVMGroup](#workloadnetworks_getvmgroup) - [GetVirtualMachine](#workloadnetworks_getvirtualmachine) +- [List](#workloadnetworks_list) - [ListDhcp](#workloadnetworks_listdhcp) - [ListDnsServices](#workloadnetworks_listdnsservices) - [ListDnsZones](#workloadnetworks_listdnszones) @@ -147,6 +150,7 @@ ### 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; @@ -154,7 +158,7 @@ import com.azure.resourcemanager.avs.models.AddonVrProperties; /** Samples for Addons CreateOrUpdate. */ public final class AddonsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2021-12-01/examples/Addons_CreateOrUpdate_HCX.json + * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2022-05-01/examples/Addons_CreateOrUpdate_HCX.json */ /** * Sample code: Addons_CreateOrUpdate_HCX. @@ -171,7 +175,7 @@ public final class AddonsCreateOrUpdateSamples { } /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2021-12-01/examples/Addons_CreateOrUpdate_SRM.json + * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2022-05-01/examples/Addons_CreateOrUpdate_SRM.json */ /** * Sample code: Addons_CreateOrUpdate_SRM. @@ -188,7 +192,27 @@ public final class AddonsCreateOrUpdateSamples { } /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2021-12-01/examples/Addons_CreateOrUpdate_VR.json + * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2022-05-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() + .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/2022-05-01/examples/Addons_CreateOrUpdate_VR.json */ /** * Sample code: Addons_CreateOrUpdate_VR. @@ -214,7 +238,7 @@ import com.azure.core.util.Context; /** Samples for Addons Delete. */ public final class AddonsDeleteSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2021-12-01/examples/Addons_Delete.json + * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2022-05-01/examples/Addons_Delete.json */ /** * Sample code: Addons_Delete. @@ -235,7 +259,7 @@ import com.azure.core.util.Context; /** Samples for Addons Get. */ public final class AddonsGetSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2021-12-01/examples/Addons_Get_SRM.json + * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2022-05-01/examples/Addons_Get_SRM.json */ /** * Sample code: Addons_Get_SRM. @@ -247,7 +271,7 @@ public final class AddonsGetSamples { } /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2021-12-01/examples/Addons_Get_VR.json + * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2022-05-01/examples/Addons_Get_VR.json */ /** * Sample code: Addons_Get_VR. @@ -259,7 +283,7 @@ public final class AddonsGetSamples { } /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2021-12-01/examples/Addons_Get_HCX.json + * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2022-05-01/examples/Addons_Get_HCX.json */ /** * Sample code: Addons_Get_HCX. @@ -269,6 +293,18 @@ public final class AddonsGetSamples { public static void addonsGetHCX(com.azure.resourcemanager.avs.AvsManager manager) { manager.addons().getWithResponse("group1", "cloud1", "hcx", Context.NONE); } + + /* + * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2022-05-01/examples/Addons_Get_ArcReg.json + */ + /** + * Sample code: Addons_Get_ArcReg. + * + * @param manager Entry point to AvsManager. + */ + public static void addonsGetArcReg(com.azure.resourcemanager.avs.AvsManager manager) { + manager.addons().getWithResponse("group1", "cloud1", "arc", Context.NONE); + } } ``` @@ -280,7 +316,7 @@ import com.azure.core.util.Context; /** Samples for Addons List. */ public final class AddonsListSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2021-12-01/examples/Addons_List.json + * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2022-05-01/examples/Addons_List.json */ /** * Sample code: Addons_List. @@ -299,7 +335,7 @@ public final class AddonsListSamples { /** Samples for Authorizations CreateOrUpdate. */ public final class AuthorizationsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2021-12-01/examples/Authorizations_CreateOrUpdate.json + * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2022-05-01/examples/Authorizations_CreateOrUpdate.json */ /** * Sample code: Authorizations_CreateOrUpdate. @@ -320,7 +356,7 @@ import com.azure.core.util.Context; /** Samples for Authorizations Delete. */ public final class AuthorizationsDeleteSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2021-12-01/examples/Authorizations_Delete.json + * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2022-05-01/examples/Authorizations_Delete.json */ /** * Sample code: Authorizations_Delete. @@ -341,7 +377,7 @@ import com.azure.core.util.Context; /** Samples for Authorizations Get. */ public final class AuthorizationsGetSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2021-12-01/examples/Authorizations_Get.json + * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2022-05-01/examples/Authorizations_Get.json */ /** * Sample code: Authorizations_Get. @@ -362,7 +398,7 @@ import com.azure.core.util.Context; /** Samples for Authorizations List. */ public final class AuthorizationsListSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2021-12-01/examples/Authorizations_List.json + * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2022-05-01/examples/Authorizations_List.json */ /** * Sample code: Authorizations_List. @@ -381,7 +417,7 @@ public final class AuthorizationsListSamples { /** Samples for CloudLinks CreateOrUpdate. */ public final class CloudLinksCreateOrUpdateSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2021-12-01/examples/CloudLinks_CreateOrUpdate.json + * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2022-05-01/examples/CloudLinks_CreateOrUpdate.json */ /** * Sample code: CloudLinks_CreateOrUpdate. @@ -408,7 +444,7 @@ import com.azure.core.util.Context; /** Samples for CloudLinks Delete. */ public final class CloudLinksDeleteSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2021-12-01/examples/CloudLinks_Delete.json + * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2022-05-01/examples/CloudLinks_Delete.json */ /** * Sample code: CloudLinks_Delete. @@ -429,7 +465,7 @@ import com.azure.core.util.Context; /** Samples for CloudLinks Get. */ public final class CloudLinksGetSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2021-12-01/examples/CloudLinks_Get.json + * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2022-05-01/examples/CloudLinks_Get.json */ /** * Sample code: CloudLinks_Get. @@ -450,7 +486,7 @@ import com.azure.core.util.Context; /** Samples for CloudLinks List. */ public final class CloudLinksListSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2021-12-01/examples/CloudLinks_List.json + * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2022-05-01/examples/CloudLinks_List.json */ /** * Sample code: CloudLinks_List. @@ -471,7 +507,7 @@ import com.azure.resourcemanager.avs.models.Sku; /** Samples for Clusters CreateOrUpdate. */ public final class ClustersCreateOrUpdateSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2021-12-01/examples/Clusters_CreateOrUpdate.json + * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2022-05-01/examples/Clusters_CreateOrUpdate.json */ /** * Sample code: Clusters_CreateOrUpdate. @@ -497,7 +533,7 @@ import com.azure.core.util.Context; /** Samples for Clusters Delete. */ public final class ClustersDeleteSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2021-12-01/examples/Clusters_Delete.json + * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2022-05-01/examples/Clusters_Delete.json */ /** * Sample code: Clusters_Delete. @@ -518,7 +554,7 @@ import com.azure.core.util.Context; /** Samples for Clusters Get. */ public final class ClustersGetSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2021-12-01/examples/Clusters_Get.json + * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2022-05-01/examples/Clusters_Get.json */ /** * Sample code: Clusters_Get. @@ -539,7 +575,7 @@ import com.azure.core.util.Context; /** Samples for Clusters List. */ public final class ClustersListSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2021-12-01/examples/Clusters_List.json + * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2022-05-01/examples/Clusters_List.json */ /** * Sample code: Clusters_List. @@ -552,6 +588,39 @@ public final class ClustersListSamples { } ``` +### Clusters_ListZones + +```java +import com.azure.core.util.Context; + +/** Samples for Clusters ListZones. */ +public final class ClustersListZonesSamples { + /* + * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2022-05-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", Context.NONE); + } + + /* + * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2022-05-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) { + manager.clusters().listZonesWithResponse("group1", "cloud1", "cluster1", Context.NONE); + } +} +``` + ### Clusters_Update ```java @@ -561,7 +630,7 @@ import com.azure.resourcemanager.avs.models.Cluster; /** Samples for Clusters Update. */ public final class ClustersUpdateSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2021-12-01/examples/Clusters_Update.json + * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2022-05-01/examples/Clusters_Update.json */ /** * Sample code: Clusters_Update. @@ -583,7 +652,7 @@ import com.azure.resourcemanager.avs.models.NetAppVolume; /** Samples for Datastores CreateOrUpdate. */ public final class DatastoresCreateOrUpdateSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2021-12-01/examples/Datastores_CreateOrUpdate.json + * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2022-05-01/examples/Datastores_CreateOrUpdate.json */ /** * Sample code: Datastores_CreateOrUpdate. @@ -612,7 +681,7 @@ import com.azure.core.util.Context; /** Samples for Datastores Delete. */ public final class DatastoresDeleteSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2021-12-01/examples/Datastores_Delete.json + * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2022-05-01/examples/Datastores_Delete.json */ /** * Sample code: Datastores_Delete. @@ -633,7 +702,7 @@ import com.azure.core.util.Context; /** Samples for Datastores Get. */ public final class DatastoresGetSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2021-12-01/examples/Datastores_Get.json + * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2022-05-01/examples/Datastores_Get.json */ /** * Sample code: Datastores_Get. @@ -654,7 +723,7 @@ import com.azure.core.util.Context; /** Samples for Datastores List. */ public final class DatastoresListSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2021-12-01/examples/Datastores_List.json + * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2022-05-01/examples/Datastores_List.json */ /** * Sample code: Datastores_List. @@ -673,7 +742,7 @@ public final class DatastoresListSamples { /** Samples for GlobalReachConnections CreateOrUpdate. */ public final class GlobalReachConnectionsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2021-12-01/examples/GlobalReachConnections_CreateOrUpdate.json + * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2022-05-01/examples/GlobalReachConnections_CreateOrUpdate.json */ /** * Sample code: GlobalReachConnections_CreateOrUpdate. @@ -701,7 +770,7 @@ import com.azure.core.util.Context; /** Samples for GlobalReachConnections Delete. */ public final class GlobalReachConnectionsDeleteSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2021-12-01/examples/GlobalReachConnections_Delete.json + * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2022-05-01/examples/GlobalReachConnections_Delete.json */ /** * Sample code: GlobalReachConnections_Delete. @@ -722,7 +791,7 @@ import com.azure.core.util.Context; /** Samples for GlobalReachConnections Get. */ public final class GlobalReachConnectionsGetSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2021-12-01/examples/GlobalReachConnections_Get.json + * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2022-05-01/examples/GlobalReachConnections_Get.json */ /** * Sample code: GlobalReachConnections_Get. @@ -743,7 +812,7 @@ import com.azure.core.util.Context; /** Samples for GlobalReachConnections List. */ public final class GlobalReachConnectionsListSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2021-12-01/examples/GlobalReachConnections_List.json + * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2022-05-01/examples/GlobalReachConnections_List.json */ /** * Sample code: GlobalReachConnections_List. @@ -762,7 +831,7 @@ public final class GlobalReachConnectionsListSamples { /** Samples for HcxEnterpriseSites CreateOrUpdate. */ public final class HcxEnterpriseSitesCreateOrUpdateSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2021-12-01/examples/HcxEnterpriseSites_CreateOrUpdate.json + * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2022-05-01/examples/HcxEnterpriseSites_CreateOrUpdate.json */ /** * Sample code: HcxEnterpriseSites_CreateOrUpdate. @@ -783,7 +852,7 @@ import com.azure.core.util.Context; /** Samples for HcxEnterpriseSites Delete. */ public final class HcxEnterpriseSitesDeleteSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2021-12-01/examples/HcxEnterpriseSites_Delete.json + * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2022-05-01/examples/HcxEnterpriseSites_Delete.json */ /** * Sample code: HcxEnterpriseSites_Delete. @@ -804,7 +873,7 @@ import com.azure.core.util.Context; /** Samples for HcxEnterpriseSites Get. */ public final class HcxEnterpriseSitesGetSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2021-12-01/examples/HcxEnterpriseSites_Get.json + * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2022-05-01/examples/HcxEnterpriseSites_Get.json */ /** * Sample code: HcxEnterpriseSites_Get. @@ -825,7 +894,7 @@ import com.azure.core.util.Context; /** Samples for HcxEnterpriseSites List. */ public final class HcxEnterpriseSitesListSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2021-12-01/examples/HcxEnterpriseSites_List.json + * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2022-05-01/examples/HcxEnterpriseSites_List.json */ /** * Sample code: HcxEnterpriseSites_List. @@ -846,7 +915,7 @@ import com.azure.core.util.Context; /** Samples for Locations CheckQuotaAvailability. */ public final class LocationsCheckQuotaAvailabilitySamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2021-12-01/examples/Locations_CheckQuotaAvailability.json + * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2022-05-01/examples/Locations_CheckQuotaAvailability.json */ /** * Sample code: Locations_CheckQuotaAvailability. @@ -863,11 +932,12 @@ public final class LocationsCheckQuotaAvailabilitySamples { ```java import com.azure.core.util.Context; +import com.azure.resourcemanager.avs.models.Sku; /** Samples for Locations CheckTrialAvailability. */ public final class LocationsCheckTrialAvailabilitySamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2021-12-01/examples/Locations_CheckTrialAvailability.json + * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2022-05-01/examples/Locations_CheckTrialAvailability.json */ /** * Sample code: Locations_CheckTrialAvailability. @@ -875,7 +945,19 @@ public final class LocationsCheckTrialAvailabilitySamples { * @param manager Entry point to AvsManager. */ public static void locationsCheckTrialAvailability(com.azure.resourcemanager.avs.AvsManager manager) { - manager.locations().checkTrialAvailabilityWithResponse("eastus", Context.NONE); + manager.locations().checkTrialAvailabilityWithResponse("eastus", null, Context.NONE); + } + + /* + * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2022-05-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"), Context.NONE); } } ``` @@ -888,7 +970,7 @@ import com.azure.core.util.Context; /** Samples for Operations List. */ public final class OperationsListSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2021-12-01/examples/Operations_List.json + * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2022-05-01/examples/Operations_List.json */ /** * Sample code: Operations_List. @@ -904,14 +986,16 @@ public final class OperationsListSamples { ### 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/resource-manager/Microsoft.AVS/stable/2021-12-01/examples/PlacementPolicies_CreateOrUpdate.json + * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2022-05-01/examples/PlacementPolicies_CreateOrUpdate.json */ /** * Sample code: PlacementPolicies_CreateOrUpdate. @@ -928,15 +1012,17 @@ public final class PlacementPoliciesCreateOrUpdateSamples { .withVmMembers( Arrays .asList( - "/subscriptions/{subscription-id}/resourceGroups/group1/providers/Microsoft.AVS/privateClouds/cloud1/clusters/cluster1/virtualMachines/vm-128", - "/subscriptions/{subscription-id}/resourceGroups/group1/providers/Microsoft.AVS/privateClouds/cloud1/clusters/cluster1/virtualMachines/vm-256")) + "/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)) + .withAffinityType(AffinityType.ANTI_AFFINITY) + .withAffinityStrength(AffinityStrength.MUST) + .withAzureHybridBenefitType(AzureHybridBenefitType.SQL_HOST)) .create(); } } @@ -950,7 +1036,7 @@ import com.azure.core.util.Context; /** Samples for PlacementPolicies Delete. */ public final class PlacementPoliciesDeleteSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2021-12-01/examples/PlacementPolicies_Delete.json + * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2022-05-01/examples/PlacementPolicies_Delete.json */ /** * Sample code: PlacementPolicies_Delete. @@ -971,7 +1057,7 @@ import com.azure.core.util.Context; /** Samples for PlacementPolicies Get. */ public final class PlacementPoliciesGetSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2021-12-01/examples/PlacementPolicies_Get.json + * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2022-05-01/examples/PlacementPolicies_Get.json */ /** * Sample code: PlacementPolicies_Get. @@ -992,7 +1078,7 @@ import com.azure.core.util.Context; /** Samples for PlacementPolicies List. */ public final class PlacementPoliciesListSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2021-12-01/examples/PlacementPolicies_List.json + * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2022-05-01/examples/PlacementPolicies_List.json */ /** * Sample code: PlacementPolicies_List. @@ -1009,6 +1095,8 @@ public final class PlacementPoliciesListSamples { ```java import com.azure.core.util.Context; +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; @@ -1016,7 +1104,7 @@ import java.util.Arrays; /** Samples for PlacementPolicies Update. */ public final class PlacementPoliciesUpdateSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2021-12-01/examples/PlacementPolicies_Update.json + * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2022-05-01/examples/PlacementPolicies_Update.json */ /** * Sample code: PlacementPolicies_Update. @@ -1035,14 +1123,16 @@ public final class PlacementPoliciesUpdateSamples { .withVmMembers( Arrays .asList( - "/subscriptions/{subscription-id}/resourceGroups/group1/providers/Microsoft.AVS/privateClouds/cloud1/clusters/cluster1/virtualMachines/vm-128", - "/subscriptions/{subscription-id}/resourceGroups/group1/providers/Microsoft.AVS/privateClouds/cloud1/clusters/cluster1/virtualMachines/vm-256")) + "/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(); } } @@ -1063,7 +1153,7 @@ import java.util.Map; /** Samples for PrivateClouds CreateOrUpdate. */ public final class PrivateCloudsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2021-12-01/examples/PrivateClouds_CreateOrUpdate.json + * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2022-05-01/examples/PrivateClouds_CreateOrUpdate.json */ /** * Sample code: PrivateClouds_CreateOrUpdate. @@ -1085,7 +1175,7 @@ public final class PrivateCloudsCreateOrUpdateSamples { } /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2021-12-01/examples/PrivateClouds_CreateOrUpdate_Stretched.json + * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2022-05-01/examples/PrivateClouds_CreateOrUpdate_Stretched.json */ /** * Sample code: PrivateClouds_CreateOrUpdate_Stretched. @@ -1131,7 +1221,7 @@ import com.azure.core.util.Context; /** Samples for PrivateClouds Delete. */ public final class PrivateCloudsDeleteSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2021-12-01/examples/PrivateClouds_Delete.json + * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2022-05-01/examples/PrivateClouds_Delete.json */ /** * Sample code: PrivateClouds_Delete. @@ -1152,7 +1242,7 @@ import com.azure.core.util.Context; /** Samples for PrivateClouds GetByResourceGroup. */ public final class PrivateCloudsGetByResourceGroupSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2021-12-01/examples/PrivateClouds_Get.json + * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2022-05-01/examples/PrivateClouds_Get.json */ /** * Sample code: PrivateClouds_Get. @@ -1164,7 +1254,7 @@ public final class PrivateCloudsGetByResourceGroupSamples { } /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2021-12-01/examples/PrivateClouds_Get_Stretched.json + * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2022-05-01/examples/PrivateClouds_Get_Stretched.json */ /** * Sample code: PrivateClouds_Get_Stretched. @@ -1185,7 +1275,7 @@ import com.azure.core.util.Context; /** Samples for PrivateClouds List. */ public final class PrivateCloudsListSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2021-12-01/examples/PrivateClouds_ListInSubscription.json + * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2022-05-01/examples/PrivateClouds_ListInSubscription.json */ /** * Sample code: PrivateClouds_ListInSubscription. @@ -1197,7 +1287,7 @@ public final class PrivateCloudsListSamples { } /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2021-12-01/examples/PrivateClouds_ListInSubscription_Stretched.json + * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2022-05-01/examples/PrivateClouds_ListInSubscription_Stretched.json */ /** * Sample code: PrivateClouds_ListInSubscription_Stretched. @@ -1218,7 +1308,7 @@ import com.azure.core.util.Context; /** Samples for PrivateClouds ListAdminCredentials. */ public final class PrivateCloudsListAdminCredentialsSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2021-12-01/examples/PrivateClouds_ListAdminCredentials.json + * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2022-05-01/examples/PrivateClouds_ListAdminCredentials.json */ /** * Sample code: PrivateClouds_ListAdminCredentials. @@ -1239,7 +1329,7 @@ import com.azure.core.util.Context; /** Samples for PrivateClouds ListByResourceGroup. */ public final class PrivateCloudsListByResourceGroupSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2021-12-01/examples/PrivateClouds_List.json + * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2022-05-01/examples/PrivateClouds_List.json */ /** * Sample code: PrivateClouds_List. @@ -1251,7 +1341,7 @@ public final class PrivateCloudsListByResourceGroupSamples { } /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2021-12-01/examples/PrivateClouds_List_Stretched.json + * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2022-05-01/examples/PrivateClouds_List_Stretched.json */ /** * Sample code: PrivateClouds_List_Stretched. @@ -1272,7 +1362,7 @@ import com.azure.core.util.Context; /** Samples for PrivateClouds RotateNsxtPassword. */ public final class PrivateCloudsRotateNsxtPasswordSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2021-12-01/examples/PrivateClouds_RotateNsxtPassword.json + * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2022-05-01/examples/PrivateClouds_RotateNsxtPassword.json */ /** * Sample code: PrivateClouds_RotateNsxtPassword. @@ -1293,7 +1383,7 @@ import com.azure.core.util.Context; /** Samples for PrivateClouds RotateVcenterPassword. */ public final class PrivateCloudsRotateVcenterPasswordSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2021-12-01/examples/PrivateClouds_RotateVcenterPassword.json + * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2022-05-01/examples/PrivateClouds_RotateVcenterPassword.json */ /** * Sample code: PrivateClouds_RotateVcenterPassword. @@ -1321,7 +1411,7 @@ import com.azure.resourcemanager.avs.models.ResourceIdentityType; /** Samples for PrivateClouds Update. */ public final class PrivateCloudsUpdateSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2021-12-01/examples/PrivateClouds_Update.json + * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2022-05-01/examples/PrivateClouds_Update.json */ /** * Sample code: PrivateClouds_Update. @@ -1347,7 +1437,7 @@ public final class PrivateCloudsUpdateSamples { } /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2021-12-01/examples/PrivateClouds_Update_Stretched.json + * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2022-05-01/examples/PrivateClouds_Update_Stretched.json */ /** * Sample code: PrivateClouds_Update_Stretched. @@ -1370,7 +1460,7 @@ import com.azure.core.util.Context; /** Samples for ScriptCmdlets Get. */ public final class ScriptCmdletsGetSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2021-12-01/examples/ScriptCmdlets_Get.json + * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2022-05-01/examples/ScriptCmdlets_Get.json */ /** * Sample code: ScriptCmdlets_Get. @@ -1394,7 +1484,7 @@ import com.azure.core.util.Context; /** Samples for ScriptCmdlets List. */ public final class ScriptCmdletsListSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2021-12-01/examples/ScriptCmdlets_List.json + * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2022-05-01/examples/ScriptCmdlets_List.json */ /** * Sample code: ScriptCmdlets_List. @@ -1417,7 +1507,7 @@ import java.util.Arrays; /** Samples for ScriptExecutions CreateOrUpdate. */ public final class ScriptExecutionsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2021-12-01/examples/ScriptExecutions_CreateOrUpdate.json + * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2022-05-01/examples/ScriptExecutions_CreateOrUpdate.json */ /** * Sample code: ScriptExecutions_CreateOrUpdate. @@ -1430,7 +1520,7 @@ public final class ScriptExecutionsCreateOrUpdateSamples { .define("addSsoServer") .withExistingPrivateCloud("group1", "cloud1") .withScriptCmdletId( - "/subscriptions/{subscription-id}/resourceGroups/group1/providers/Microsoft.AVS/privateClouds/cloud1/scriptPackages/AVS.PowerCommands@1.0.0/scriptCmdlets/New-SsoExternalIdentitySource") + "/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( @@ -1461,7 +1551,7 @@ import com.azure.core.util.Context; /** Samples for ScriptExecutions Delete. */ public final class ScriptExecutionsDeleteSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2021-12-01/examples/ScriptExecutions_Delete.json + * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2022-05-01/examples/ScriptExecutions_Delete.json */ /** * Sample code: ScriptExecutions_Delete. @@ -1482,7 +1572,7 @@ import com.azure.core.util.Context; /** Samples for ScriptExecutions Get. */ public final class ScriptExecutionsGetSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2021-12-01/examples/ScriptExecutions_Get.json + * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2022-05-01/examples/ScriptExecutions_Get.json */ /** * Sample code: ScriptExecutions_Get. @@ -1505,7 +1595,7 @@ import java.util.Arrays; /** Samples for ScriptExecutions GetExecutionLogs. */ public final class ScriptExecutionsGetExecutionLogsSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2021-12-01/examples/ScriptExecutions_GetExecutionLogs.json + * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2022-05-01/examples/ScriptExecutions_GetExecutionLogs.json */ /** * Sample code: ScriptExecutions_GetExecutionLogs. @@ -1538,7 +1628,7 @@ import com.azure.core.util.Context; /** Samples for ScriptExecutions List. */ public final class ScriptExecutionsListSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2021-12-01/examples/ScriptExecutions_List.json + * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2022-05-01/examples/ScriptExecutions_List.json */ /** * Sample code: ScriptExecutions_List. @@ -1559,7 +1649,7 @@ import com.azure.core.util.Context; /** Samples for ScriptPackages Get. */ public final class ScriptPackagesGetSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2021-12-01/examples/ScriptPackages_Get.json + * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2022-05-01/examples/ScriptPackages_Get.json */ /** * Sample code: ScriptPackages_Get. @@ -1580,7 +1670,7 @@ import com.azure.core.util.Context; /** Samples for ScriptPackages List. */ public final class ScriptPackagesListSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2021-12-01/examples/ScriptPackages_List.json + * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2022-05-01/examples/ScriptPackages_List.json */ /** * Sample code: ScriptPackages_List. @@ -1601,7 +1691,7 @@ import com.azure.core.util.Context; /** Samples for VirtualMachines Get. */ public final class VirtualMachinesGetSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2021-12-01/examples/VirtualMachines_Get.json + * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2022-05-01/examples/VirtualMachines_Get.json */ /** * Sample code: GetVirtualMachine. @@ -1622,7 +1712,7 @@ import com.azure.core.util.Context; /** Samples for VirtualMachines List. */ public final class VirtualMachinesListSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2021-12-01/examples/VirtualMachines_List.json + * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2022-05-01/examples/VirtualMachines_List.json */ /** * Sample code: ListClusterVirtualMachines. @@ -1645,7 +1735,7 @@ import com.azure.resourcemanager.avs.models.VirtualMachineRestrictMovementState; /** Samples for VirtualMachines RestrictMovement. */ public final class VirtualMachinesRestrictMovementSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2021-12-01/examples/VirtualMachines_RestrictMovement.json + * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2022-05-01/examples/VirtualMachines_RestrictMovement.json */ /** * Sample code: VirtualMachine_RestrictMovement. @@ -1674,7 +1764,7 @@ 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/2021-12-01/examples/WorkloadNetworks_CreateDhcpConfigurations.json + * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2022-05-01/examples/WorkloadNetworks_CreateDhcpConfigurations.json */ /** * Sample code: WorkloadNetworks_CreateDhcp. @@ -1706,7 +1796,7 @@ import java.util.Arrays; /** Samples for WorkloadNetworks CreateDnsService. */ public final class WorkloadNetworksCreateDnsServiceSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2021-12-01/examples/WorkloadNetworks_CreateDnsServices.json + * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2022-05-01/examples/WorkloadNetworks_CreateDnsServices.json */ /** * Sample code: WorkloadNetworks_CreateDnsService. @@ -1737,7 +1827,7 @@ import java.util.Arrays; /** Samples for WorkloadNetworks CreateDnsZone. */ public final class WorkloadNetworksCreateDnsZoneSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2021-12-01/examples/WorkloadNetworks_CreateDnsZones.json + * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2022-05-01/examples/WorkloadNetworks_CreateDnsZones.json */ /** * Sample code: WorkloadNetworks_CreateDnsZone. @@ -1767,7 +1857,7 @@ import com.azure.resourcemanager.avs.models.PortMirroringDirectionEnum; /** Samples for WorkloadNetworks CreatePortMirroring. */ public final class WorkloadNetworksCreatePortMirroringSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2021-12-01/examples/WorkloadNetworks_CreatePortMirroringProfiles.json + * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2022-05-01/examples/WorkloadNetworks_CreatePortMirroringProfiles.json */ /** * Sample code: WorkloadNetworks_CreatePortMirroring. @@ -1795,7 +1885,7 @@ public final class WorkloadNetworksCreatePortMirroringSamples { /** Samples for WorkloadNetworks CreatePublicIp. */ public final class WorkloadNetworksCreatePublicIpSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2021-12-01/examples/WorkloadNetworks_CreatePublicIPs.json + * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2022-05-01/examples/WorkloadNetworks_CreatePublicIPs.json */ /** * Sample code: WorkloadNetworks_CreatePublicIP. @@ -1823,7 +1913,7 @@ import java.util.Arrays; /** Samples for WorkloadNetworks CreateSegments. */ public final class WorkloadNetworksCreateSegmentsSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2021-12-01/examples/WorkloadNetworks_CreateSegments.json + * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2022-05-01/examples/WorkloadNetworks_CreateSegments.json */ /** * Sample code: WorkloadNetworks_CreateSegments. @@ -1855,7 +1945,7 @@ import java.util.Arrays; /** Samples for WorkloadNetworks CreateVMGroup. */ public final class WorkloadNetworksCreateVMGroupSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2021-12-01/examples/WorkloadNetworks_CreateVMGroups.json + * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2022-05-01/examples/WorkloadNetworks_CreateVMGroups.json */ /** * Sample code: WorkloadNetworks_CreateVMGroup. @@ -1883,7 +1973,7 @@ import com.azure.core.util.Context; /** Samples for WorkloadNetworks DeleteDhcp. */ public final class WorkloadNetworksDeleteDhcpSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2021-12-01/examples/WorkloadNetworks_DeleteDhcpConfigurations.json + * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2022-05-01/examples/WorkloadNetworks_DeleteDhcpConfigurations.json */ /** * Sample code: WorkloadNetworks_DeleteDhcp. @@ -1904,7 +1994,7 @@ import com.azure.core.util.Context; /** Samples for WorkloadNetworks DeleteDnsService. */ public final class WorkloadNetworksDeleteDnsServiceSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2021-12-01/examples/WorkloadNetworks_DeleteDnsServices.json + * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2022-05-01/examples/WorkloadNetworks_DeleteDnsServices.json */ /** * Sample code: WorkloadNetworks_DeleteDnsService. @@ -1925,7 +2015,7 @@ import com.azure.core.util.Context; /** Samples for WorkloadNetworks DeleteDnsZone. */ public final class WorkloadNetworksDeleteDnsZoneSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2021-12-01/examples/WorkloadNetworks_DeleteDnsZones.json + * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2022-05-01/examples/WorkloadNetworks_DeleteDnsZones.json */ /** * Sample code: WorkloadNetworks_DeleteDnsZone. @@ -1946,7 +2036,7 @@ import com.azure.core.util.Context; /** Samples for WorkloadNetworks DeletePortMirroring. */ public final class WorkloadNetworksDeletePortMirroringSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2021-12-01/examples/WorkloadNetworks_DeletePortMirroringProfiles.json + * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2022-05-01/examples/WorkloadNetworks_DeletePortMirroringProfiles.json */ /** * Sample code: WorkloadNetworks_DeletePortMirroring. @@ -1967,7 +2057,7 @@ import com.azure.core.util.Context; /** Samples for WorkloadNetworks DeletePublicIp. */ public final class WorkloadNetworksDeletePublicIpSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2021-12-01/examples/WorkloadNetworks_DeletePublicIPs.json + * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2022-05-01/examples/WorkloadNetworks_DeletePublicIPs.json */ /** * Sample code: WorkloadNetworks_DeletePublicIP. @@ -1988,7 +2078,7 @@ import com.azure.core.util.Context; /** Samples for WorkloadNetworks DeleteSegment. */ public final class WorkloadNetworksDeleteSegmentSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2021-12-01/examples/WorkloadNetworks_DeleteSegments.json + * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2022-05-01/examples/WorkloadNetworks_DeleteSegments.json */ /** * Sample code: WorkloadNetworks_DeleteSegment. @@ -2009,7 +2099,7 @@ import com.azure.core.util.Context; /** Samples for WorkloadNetworks DeleteVMGroup. */ public final class WorkloadNetworksDeleteVMGroupSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2021-12-01/examples/WorkloadNetworks_DeleteVMGroups.json + * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2022-05-01/examples/WorkloadNetworks_DeleteVMGroups.json */ /** * Sample code: WorkloadNetworks_DeleteVMGroup. @@ -2022,6 +2112,28 @@ public final class WorkloadNetworksDeleteVMGroupSamples { } ``` +### WorkloadNetworks_Get + +```java +import com.azure.core.util.Context; +import com.azure.resourcemanager.avs.models.WorkloadNetworkName; + +/** Samples for WorkloadNetworks Get. */ +public final class WorkloadNetworksGetSamples { + /* + * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2022-05-01/examples/WorkloadNetworks_Get.json + */ + /** + * Sample code: WorkloadNetworks_Get. + * + * @param manager Entry point to AvsManager. + */ + public static void workloadNetworksGet(com.azure.resourcemanager.avs.AvsManager manager) { + manager.workloadNetworks().getWithResponse("group1", "cloud1", WorkloadNetworkName.DEFAULT, Context.NONE); + } +} +``` + ### WorkloadNetworks_GetDhcp ```java @@ -2030,7 +2142,7 @@ import com.azure.core.util.Context; /** Samples for WorkloadNetworks GetDhcp. */ public final class WorkloadNetworksGetDhcpSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2021-12-01/examples/WorkloadNetworks_GetDhcpConfigurations.json + * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2022-05-01/examples/WorkloadNetworks_GetDhcpConfigurations.json */ /** * Sample code: WorkloadNetworks_GetDhcp. @@ -2051,7 +2163,7 @@ import com.azure.core.util.Context; /** Samples for WorkloadNetworks GetDnsService. */ public final class WorkloadNetworksGetDnsServiceSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2021-12-01/examples/WorkloadNetworks_GetDnsServices.json + * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2022-05-01/examples/WorkloadNetworks_GetDnsServices.json */ /** * Sample code: WorkloadNetworks_GetDnsService. @@ -2072,7 +2184,7 @@ import com.azure.core.util.Context; /** Samples for WorkloadNetworks GetDnsZone. */ public final class WorkloadNetworksGetDnsZoneSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2021-12-01/examples/WorkloadNetworks_GetDnsZones.json + * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2022-05-01/examples/WorkloadNetworks_GetDnsZones.json */ /** * Sample code: WorkloadNetworks_GetDnsZone. @@ -2093,7 +2205,7 @@ import com.azure.core.util.Context; /** Samples for WorkloadNetworks GetGateway. */ public final class WorkloadNetworksGetGatewaySamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2021-12-01/examples/WorkloadNetworks_GetGateway.json + * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2022-05-01/examples/WorkloadNetworks_GetGateway.json */ /** * Sample code: WorkloadNetworks_GetGateway. @@ -2114,7 +2226,7 @@ import com.azure.core.util.Context; /** Samples for WorkloadNetworks GetPortMirroring. */ public final class WorkloadNetworksGetPortMirroringSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2021-12-01/examples/WorkloadNetworks_GetPortMirroringProfiles.json + * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2022-05-01/examples/WorkloadNetworks_GetPortMirroringProfiles.json */ /** * Sample code: WorkloadNetworks_GetPortMirroring. @@ -2135,7 +2247,7 @@ import com.azure.core.util.Context; /** Samples for WorkloadNetworks GetPublicIp. */ public final class WorkloadNetworksGetPublicIpSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2021-12-01/examples/WorkloadNetworks_GetPublicIPs.json + * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2022-05-01/examples/WorkloadNetworks_GetPublicIPs.json */ /** * Sample code: WorkloadNetworks_GetPublicIP. @@ -2156,7 +2268,7 @@ import com.azure.core.util.Context; /** Samples for WorkloadNetworks GetSegment. */ public final class WorkloadNetworksGetSegmentSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2021-12-01/examples/WorkloadNetworks_GetSegments.json + * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2022-05-01/examples/WorkloadNetworks_GetSegments.json */ /** * Sample code: WorkloadNetworks_GetSegment. @@ -2177,7 +2289,7 @@ import com.azure.core.util.Context; /** Samples for WorkloadNetworks GetVMGroup. */ public final class WorkloadNetworksGetVMGroupSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2021-12-01/examples/WorkloadNetworks_GetVMGroups.json + * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2022-05-01/examples/WorkloadNetworks_GetVMGroups.json */ /** * Sample code: WorkloadNetworks_GetVMGroup. @@ -2198,7 +2310,7 @@ import com.azure.core.util.Context; /** Samples for WorkloadNetworks GetVirtualMachine. */ public final class WorkloadNetworksGetVirtualMachineSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2021-12-01/examples/WorkloadNetworks_GetVirtualMachine.json + * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2022-05-01/examples/WorkloadNetworks_GetVirtualMachine.json */ /** * Sample code: WorkloadNetworks_GetVirtualMachine. @@ -2211,6 +2323,27 @@ public final class WorkloadNetworksGetVirtualMachineSamples { } ``` +### WorkloadNetworks_List + +```java +import com.azure.core.util.Context; + +/** Samples for WorkloadNetworks List. */ +public final class WorkloadNetworksListSamples { + /* + * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2022-05-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", Context.NONE); + } +} +``` + ### WorkloadNetworks_ListDhcp ```java @@ -2219,7 +2352,7 @@ import com.azure.core.util.Context; /** Samples for WorkloadNetworks ListDhcp. */ public final class WorkloadNetworksListDhcpSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2021-12-01/examples/WorkloadNetworks_ListDhcpConfigurations.json + * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2022-05-01/examples/WorkloadNetworks_ListDhcpConfigurations.json */ /** * Sample code: WorkloadNetworks_ListDhcp. @@ -2240,7 +2373,7 @@ import com.azure.core.util.Context; /** Samples for WorkloadNetworks ListDnsServices. */ public final class WorkloadNetworksListDnsServicesSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2021-12-01/examples/WorkloadNetworks_ListDnsServices.json + * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2022-05-01/examples/WorkloadNetworks_ListDnsServices.json */ /** * Sample code: WorkloadNetworks_ListDnsServices. @@ -2261,7 +2394,7 @@ import com.azure.core.util.Context; /** Samples for WorkloadNetworks ListDnsZones. */ public final class WorkloadNetworksListDnsZonesSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2021-12-01/examples/WorkloadNetworks_ListDnsZones.json + * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2022-05-01/examples/WorkloadNetworks_ListDnsZones.json */ /** * Sample code: WorkloadNetworks_ListDnsZones. @@ -2282,7 +2415,7 @@ import com.azure.core.util.Context; /** Samples for WorkloadNetworks ListGateways. */ public final class WorkloadNetworksListGatewaysSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2021-12-01/examples/WorkloadNetworks_ListGateways.json + * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2022-05-01/examples/WorkloadNetworks_ListGateways.json */ /** * Sample code: WorkloadNetworks_ListGateways. @@ -2303,7 +2436,7 @@ import com.azure.core.util.Context; /** Samples for WorkloadNetworks ListPortMirroring. */ public final class WorkloadNetworksListPortMirroringSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2021-12-01/examples/WorkloadNetworks_ListPortMirroringProfiles.json + * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2022-05-01/examples/WorkloadNetworks_ListPortMirroringProfiles.json */ /** * Sample code: WorkloadNetworks_ListPortMirroring. @@ -2324,7 +2457,7 @@ import com.azure.core.util.Context; /** Samples for WorkloadNetworks ListPublicIPs. */ public final class WorkloadNetworksListPublicIPsSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2021-12-01/examples/WorkloadNetworks_ListPublicIPs.json + * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2022-05-01/examples/WorkloadNetworks_ListPublicIPs.json */ /** * Sample code: WorkloadNetworks_ListPublicIPs. @@ -2345,7 +2478,7 @@ import com.azure.core.util.Context; /** Samples for WorkloadNetworks ListSegments. */ public final class WorkloadNetworksListSegmentsSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2021-12-01/examples/WorkloadNetworks_ListSegments.json + * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2022-05-01/examples/WorkloadNetworks_ListSegments.json */ /** * Sample code: WorkloadNetworks_ListSegments. @@ -2366,7 +2499,7 @@ import com.azure.core.util.Context; /** Samples for WorkloadNetworks ListVMGroups. */ public final class WorkloadNetworksListVMGroupsSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2021-12-01/examples/WorkloadNetworks_ListVMGroups.json + * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2022-05-01/examples/WorkloadNetworks_ListVMGroups.json */ /** * Sample code: WorkloadNetworks_ListVMGroups. @@ -2387,7 +2520,7 @@ import com.azure.core.util.Context; /** Samples for WorkloadNetworks ListVirtualMachines. */ public final class WorkloadNetworksListVirtualMachinesSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2021-12-01/examples/WorkloadNetworks_ListVirtualMachines.json + * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2022-05-01/examples/WorkloadNetworks_ListVirtualMachines.json */ /** * Sample code: WorkloadNetworks_ListVirtualMachines. @@ -2410,7 +2543,7 @@ 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/2021-12-01/examples/WorkloadNetworks_UpdateDhcpConfigurations.json + * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2022-05-01/examples/WorkloadNetworks_UpdateDhcpConfigurations.json */ /** * Sample code: WorkloadNetworks_UpdateDhcp. @@ -2440,7 +2573,7 @@ import java.util.Arrays; /** Samples for WorkloadNetworks UpdateDnsService. */ public final class WorkloadNetworksUpdateDnsServiceSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2021-12-01/examples/WorkloadNetworks_UpdateDnsServices.json + * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2022-05-01/examples/WorkloadNetworks_UpdateDnsServices.json */ /** * Sample code: WorkloadNetworks_UpdateDnsService. @@ -2476,7 +2609,7 @@ import java.util.Arrays; /** Samples for WorkloadNetworks UpdateDnsZone. */ public final class WorkloadNetworksUpdateDnsZoneSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2021-12-01/examples/WorkloadNetworks_UpdateDnsZones.json + * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2022-05-01/examples/WorkloadNetworks_UpdateDnsZones.json */ /** * Sample code: WorkloadNetworks_UpdateDnsZone. @@ -2508,7 +2641,7 @@ import com.azure.resourcemanager.avs.models.WorkloadNetworkPortMirroring; /** Samples for WorkloadNetworks UpdatePortMirroring. */ public final class WorkloadNetworksUpdatePortMirroringSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2021-12-01/examples/WorkloadNetworks_UpdatePortMirroringProfiles.json + * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2022-05-01/examples/WorkloadNetworks_UpdatePortMirroringProfiles.json */ /** * Sample code: WorkloadNetworks_UpdatePortMirroring. @@ -2543,7 +2676,7 @@ import java.util.Arrays; /** Samples for WorkloadNetworks UpdateSegments. */ public final class WorkloadNetworksUpdateSegmentsSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2021-12-01/examples/WorkloadNetworks_UpdateSegments.json + * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2022-05-01/examples/WorkloadNetworks_UpdateSegments.json */ /** * Sample code: WorkloadNetworks_UpdateSegments. @@ -2576,7 +2709,7 @@ import java.util.Arrays; /** Samples for WorkloadNetworks UpdateVMGroup. */ public final class WorkloadNetworksUpdateVMGroupSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2021-12-01/examples/WorkloadNetworks_UpdateVMGroups.json + * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2022-05-01/examples/WorkloadNetworks_UpdateVMGroups.json */ /** * Sample code: WorkloadNetworks_UpdateVMGroup. diff --git a/sdk/avs/azure-resourcemanager-avs/pom.xml b/sdk/avs/azure-resourcemanager-avs/pom.xml index 139a6139693d..15210bace674 100644 --- a/sdk/avs/azure-resourcemanager-avs/pom.xml +++ b/sdk/avs/azure-resourcemanager-avs/pom.xml @@ -13,7 +13,7 @@ jar Microsoft Azure SDK for Avs Management - This package contains Microsoft Azure SDK for Avs Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. Azure VMware Solution API. Package tag package-2021-12-01. + This package contains Microsoft Azure SDK for Avs Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. Azure VMware Solution API. Package tag package-2022-05-01. https://github.com/Azure/azure-sdk-for-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 4cd8b07e472d..24f2da18f362 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 @@ -10,11 +10,13 @@ import com.azure.core.http.HttpPipelineBuilder; import com.azure.core.http.HttpPipelinePosition; import com.azure.core.http.policy.AddDatePolicy; +import com.azure.core.http.policy.AddHeadersFromContextPolicy; import com.azure.core.http.policy.HttpLogOptions; import com.azure.core.http.policy.HttpLoggingPolicy; import com.azure.core.http.policy.HttpPipelinePolicy; import com.azure.core.http.policy.HttpPolicyProviders; import com.azure.core.http.policy.RequestIdPolicy; +import com.azure.core.http.policy.RetryOptions; import com.azure.core.http.policy.RetryPolicy; import com.azure.core.http.policy.UserAgentPolicy; import com.azure.core.management.http.policy.ArmChallengeAuthenticationPolicy; @@ -123,6 +125,19 @@ public static AvsManager authenticate(TokenCredential credential, AzureProfile p return configure().authenticate(credential, profile); } + /** + * 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. + */ + public static AvsManager authenticate(HttpPipeline httpPipeline, AzureProfile profile) { + Objects.requireNonNull(httpPipeline, "'httpPipeline' cannot be null."); + Objects.requireNonNull(profile, "'profile' cannot be null."); + return new AvsManager(httpPipeline, profile, null); + } + /** * Gets a Configurable instance that can be used to create AvsManager with optional configuration. * @@ -134,13 +149,14 @@ public static Configurable configure() { /** The Configurable allowing configurations to be set. */ public static final class Configurable { - private final ClientLogger logger = new ClientLogger(Configurable.class); + private static final ClientLogger LOGGER = new ClientLogger(Configurable.class); private HttpClient httpClient; private HttpLogOptions httpLogOptions; private final List policies = new ArrayList<>(); private final List scopes = new ArrayList<>(); private RetryPolicy retryPolicy; + private RetryOptions retryOptions; private Duration defaultPollInterval; private Configurable() { @@ -201,6 +217,19 @@ public Configurable withRetryPolicy(RetryPolicy retryPolicy) { return this; } + /** + * Sets the retry options for the HTTP pipeline retry policy. + * + *

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. + */ + public Configurable withRetryOptions(RetryOptions retryOptions) { + this.retryOptions = Objects.requireNonNull(retryOptions, "'retryOptions' cannot be null."); + return this; + } + /** * Sets the default poll interval, used when service does not provide "Retry-After" header. * @@ -208,9 +237,11 @@ public Configurable withRetryPolicy(RetryPolicy retryPolicy) { * @return the configurable object itself. */ public Configurable withDefaultPollInterval(Duration defaultPollInterval) { - this.defaultPollInterval = Objects.requireNonNull(defaultPollInterval, "'retryPolicy' cannot be null."); + this.defaultPollInterval = + Objects.requireNonNull(defaultPollInterval, "'defaultPollInterval' cannot be null."); if (this.defaultPollInterval.isNegative()) { - throw logger.logExceptionAsError(new IllegalArgumentException("'httpPipeline' cannot be negative")); + throw LOGGER + .logExceptionAsError(new IllegalArgumentException("'defaultPollInterval' cannot be negative")); } return this; } @@ -232,7 +263,7 @@ public AvsManager authenticate(TokenCredential credential, AzureProfile profile) .append("-") .append("com.azure.resourcemanager.avs") .append("/") - .append("1.0.0-beta.3"); + .append("1.0.0-beta.1"); if (!Configuration.getGlobalConfiguration().get("AZURE_TELEMETRY_DISABLED", false)) { userAgentBuilder .append(" (") @@ -250,10 +281,15 @@ public AvsManager authenticate(TokenCredential credential, AzureProfile profile) scopes.add(profile.getEnvironment().getManagementEndpoint() + "/.default"); } if (retryPolicy == null) { - retryPolicy = new RetryPolicy("Retry-After", ChronoUnit.SECONDS); + if (retryOptions != null) { + retryPolicy = new RetryPolicy(retryOptions); + } else { + retryPolicy = new RetryPolicy("Retry-After", ChronoUnit.SECONDS); + } } List policies = new ArrayList<>(); policies.add(new UserAgentPolicy(userAgentBuilder.toString())); + policies.add(new AddHeadersFromContextPolicy()); policies.add(new RequestIdPolicy()); policies .addAll( @@ -284,7 +320,11 @@ public AvsManager authenticate(TokenCredential credential, AzureProfile profile) } } - /** @return Resource collection API of Operations. */ + /** + * Gets the resource collection API of Operations. + * + * @return Resource collection API of Operations. + */ public Operations operations() { if (this.operations == null) { this.operations = new OperationsImpl(clientObject.getOperations(), this); @@ -292,7 +332,11 @@ public Operations operations() { return operations; } - /** @return Resource collection API of Locations. */ + /** + * Gets the resource collection API of Locations. + * + * @return Resource collection API of Locations. + */ public Locations locations() { if (this.locations == null) { this.locations = new LocationsImpl(clientObject.getLocations(), this); @@ -300,7 +344,11 @@ public Locations locations() { return locations; } - /** @return Resource collection API of PrivateClouds. */ + /** + * Gets the resource collection API of PrivateClouds. It manages PrivateCloud. + * + * @return Resource collection API of PrivateClouds. + */ public PrivateClouds privateClouds() { if (this.privateClouds == null) { this.privateClouds = new PrivateCloudsImpl(clientObject.getPrivateClouds(), this); @@ -308,7 +356,11 @@ public PrivateClouds privateClouds() { return privateClouds; } - /** @return Resource collection API of Clusters. */ + /** + * Gets the resource collection API of Clusters. It manages Cluster. + * + * @return Resource collection API of Clusters. + */ public Clusters clusters() { if (this.clusters == null) { this.clusters = new ClustersImpl(clientObject.getClusters(), this); @@ -316,7 +368,11 @@ public Clusters clusters() { return clusters; } - /** @return Resource collection API of Datastores. */ + /** + * Gets the resource collection API of Datastores. It manages Datastore. + * + * @return Resource collection API of Datastores. + */ public Datastores datastores() { if (this.datastores == null) { this.datastores = new DatastoresImpl(clientObject.getDatastores(), this); @@ -324,7 +380,11 @@ public Datastores datastores() { return datastores; } - /** @return Resource collection API of HcxEnterpriseSites. */ + /** + * Gets the resource collection API of HcxEnterpriseSites. It manages HcxEnterpriseSite. + * + * @return Resource collection API of HcxEnterpriseSites. + */ public HcxEnterpriseSites hcxEnterpriseSites() { if (this.hcxEnterpriseSites == null) { this.hcxEnterpriseSites = new HcxEnterpriseSitesImpl(clientObject.getHcxEnterpriseSites(), this); @@ -332,7 +392,11 @@ public HcxEnterpriseSites hcxEnterpriseSites() { return hcxEnterpriseSites; } - /** @return Resource collection API of Authorizations. */ + /** + * Gets the resource collection API of Authorizations. It manages ExpressRouteAuthorization. + * + * @return Resource collection API of Authorizations. + */ public Authorizations authorizations() { if (this.authorizations == null) { this.authorizations = new AuthorizationsImpl(clientObject.getAuthorizations(), this); @@ -340,7 +404,11 @@ public Authorizations authorizations() { return authorizations; } - /** @return Resource collection API of GlobalReachConnections. */ + /** + * 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 = @@ -349,7 +417,13 @@ public GlobalReachConnections globalReachConnections() { return globalReachConnections; } - /** @return Resource collection API of WorkloadNetworks. */ + /** + * 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); @@ -357,7 +431,11 @@ public WorkloadNetworks workloadNetworks() { return workloadNetworks; } - /** @return Resource collection API of CloudLinks. */ + /** + * Gets the resource collection API of CloudLinks. It manages CloudLink. + * + * @return Resource collection API of CloudLinks. + */ public CloudLinks cloudLinks() { if (this.cloudLinks == null) { this.cloudLinks = new CloudLinksImpl(clientObject.getCloudLinks(), this); @@ -365,7 +443,11 @@ public CloudLinks cloudLinks() { return cloudLinks; } - /** @return Resource collection API of Addons. */ + /** + * Gets the resource collection API of Addons. It manages Addon. + * + * @return Resource collection API of Addons. + */ public Addons addons() { if (this.addons == null) { this.addons = new AddonsImpl(clientObject.getAddons(), this); @@ -373,7 +455,11 @@ public Addons addons() { return addons; } - /** @return Resource collection API of VirtualMachines. */ + /** + * Gets the resource collection API of VirtualMachines. + * + * @return Resource collection API of VirtualMachines. + */ public VirtualMachines virtualMachines() { if (this.virtualMachines == null) { this.virtualMachines = new VirtualMachinesImpl(clientObject.getVirtualMachines(), this); @@ -381,7 +467,11 @@ public VirtualMachines virtualMachines() { return virtualMachines; } - /** @return Resource collection API of PlacementPolicies. */ + /** + * Gets the resource collection API of PlacementPolicies. It manages PlacementPolicy. + * + * @return Resource collection API of PlacementPolicies. + */ public PlacementPolicies placementPolicies() { if (this.placementPolicies == null) { this.placementPolicies = new PlacementPoliciesImpl(clientObject.getPlacementPolicies(), this); @@ -389,7 +479,11 @@ public PlacementPolicies placementPolicies() { return placementPolicies; } - /** @return Resource collection API of ScriptPackages. */ + /** + * Gets the resource collection API of ScriptPackages. + * + * @return Resource collection API of ScriptPackages. + */ public ScriptPackages scriptPackages() { if (this.scriptPackages == null) { this.scriptPackages = new ScriptPackagesImpl(clientObject.getScriptPackages(), this); @@ -397,7 +491,11 @@ public ScriptPackages scriptPackages() { return scriptPackages; } - /** @return Resource collection API of ScriptCmdlets. */ + /** + * Gets the resource collection API of ScriptCmdlets. + * + * @return Resource collection API of ScriptCmdlets. + */ public ScriptCmdlets scriptCmdlets() { if (this.scriptCmdlets == null) { this.scriptCmdlets = new ScriptCmdletsImpl(clientObject.getScriptCmdlets(), this); @@ -405,7 +503,11 @@ public ScriptCmdlets scriptCmdlets() { return scriptCmdlets; } - /** @return Resource collection API of ScriptExecutions. */ + /** + * 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); 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 6c3bcee6dcbb..56fcc5e42d49 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 @@ -23,7 +23,7 @@ public interface AddonsClient { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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. + * @return a paged list of addons as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(String resourceGroupName, String privateCloudName); @@ -37,7 +37,7 @@ public interface AddonsClient { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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. + * @return a paged list of addons as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(String resourceGroupName, String privateCloudName, Context context); @@ -48,13 +48,15 @@ public interface AddonsClient { * @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 context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.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 an addon by name in a private cloud along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - AddonInner get(String resourceGroupName, String privateCloudName, String addonName); + Response getWithResponse( + String resourceGroupName, String privateCloudName, String addonName, Context context); /** * Get an addon by name in a private cloud. @@ -62,15 +64,13 @@ public interface AddonsClient { * @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 context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.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. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String resourceGroupName, String privateCloudName, String addonName, Context context); + AddonInner get(String resourceGroupName, String privateCloudName, String addonName); /** * Create or update a addon in a private cloud. @@ -82,7 +82,7 @@ Response getWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.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. + * @return the {@link SyncPoller} for polling of an addon resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, AddonInner> beginCreateOrUpdate( @@ -99,7 +99,7 @@ SyncPoller, AddonInner> beginCreateOrUpdate( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.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. + * @return the {@link SyncPoller} for polling of an addon resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, AddonInner> beginCreateOrUpdate( @@ -146,7 +146,7 @@ AddonInner createOrUpdate( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @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); @@ -161,7 +161,7 @@ AddonInner createOrUpdate( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, Void> beginDelete( 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 9136a9b1aa51..9e2932349aa1 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 @@ -23,7 +23,7 @@ public interface AuthorizationsClient { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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. + * @return a paged list of ExpressRoute Circuit Authorizations as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(String resourceGroupName, String privateCloudName); @@ -37,7 +37,7 @@ public interface AuthorizationsClient { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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. + * @return a paged list of ExpressRoute Circuit Authorizations as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list( @@ -49,13 +49,15 @@ PagedIterable list( * @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 context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.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 an ExpressRoute Circuit Authorization by name in a private cloud along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - ExpressRouteAuthorizationInner get(String resourceGroupName, String privateCloudName, String authorizationName); + Response getWithResponse( + String resourceGroupName, String privateCloudName, String authorizationName, Context context); /** * Get an ExpressRoute Circuit Authorization by name in a private cloud. @@ -63,15 +65,13 @@ PagedIterable list( * @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 context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.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. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String resourceGroupName, String privateCloudName, String authorizationName, Context context); + ExpressRouteAuthorizationInner get(String resourceGroupName, String privateCloudName, String authorizationName); /** * Create or update an ExpressRoute Circuit Authorization in a private cloud. @@ -83,7 +83,7 @@ Response getWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.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. + * @return the {@link SyncPoller} for polling of expressRoute Circuit Authorization. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, ExpressRouteAuthorizationInner> beginCreateOrUpdate( @@ -103,7 +103,7 @@ SyncPoller, ExpressRouteAuthorization * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.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. + * @return the {@link SyncPoller} for polling of expressRoute Circuit Authorization. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, ExpressRouteAuthorizationInner> beginCreateOrUpdate( @@ -162,7 +162,7 @@ ExpressRouteAuthorizationInner createOrUpdate( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, Void> beginDelete( @@ -178,7 +178,7 @@ SyncPoller, Void> beginDelete( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, Void> beginDelete( 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 5a218fbf79b8..026c015c4d45 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 @@ -23,7 +23,7 @@ public interface CloudLinksClient { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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. + * @return a paged list of cloud links as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(String resourceGroupName, String privateCloudName); @@ -37,7 +37,7 @@ public interface CloudLinksClient { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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. + * @return a paged list of cloud links as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(String resourceGroupName, String privateCloudName, Context context); @@ -48,13 +48,15 @@ public interface CloudLinksClient { * @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 context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.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 an cloud link by name in a private cloud along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - CloudLinkInner get(String resourceGroupName, String privateCloudName, String cloudLinkName); + Response getWithResponse( + String resourceGroupName, String privateCloudName, String cloudLinkName, Context context); /** * Get an cloud link by name in a private cloud. @@ -62,15 +64,13 @@ public interface CloudLinksClient { * @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 context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.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. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String resourceGroupName, String privateCloudName, String cloudLinkName, Context context); + CloudLinkInner get(String resourceGroupName, String privateCloudName, String cloudLinkName); /** * Create or update a cloud link in a private cloud. @@ -82,7 +82,7 @@ Response getWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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. + * @return the {@link SyncPoller} for polling of a cloud link resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, CloudLinkInner> beginCreateOrUpdate( @@ -99,7 +99,7 @@ SyncPoller, CloudLinkInner> beginCreateOrUpdate( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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. + * @return the {@link SyncPoller} for polling of a cloud link resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, CloudLinkInner> beginCreateOrUpdate( @@ -155,7 +155,7 @@ CloudLinkInner createOrUpdate( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, Void> beginDelete( @@ -171,7 +171,7 @@ SyncPoller, Void> beginDelete( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, Void> beginDelete( 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 c2aa79632746..83152c1de1ef 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 @@ -12,6 +12,7 @@ import com.azure.core.util.Context; 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.ClusterUpdate; /** An instance of this class provides access to all the operations defined in ClustersClient. */ @@ -24,7 +25,7 @@ public interface ClustersClient { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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. + * @return a paged list of clusters as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(String resourceGroupName, String privateCloudName); @@ -38,7 +39,7 @@ public interface ClustersClient { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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. + * @return a paged list of clusters as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(String resourceGroupName, String privateCloudName, Context context); @@ -49,13 +50,15 @@ public interface ClustersClient { * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. * @param clusterName Name of the cluster 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 cluster by name in a private cloud. + * @return a cluster by name in a private cloud along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - ClusterInner get(String resourceGroupName, String privateCloudName, String clusterName); + Response getWithResponse( + String resourceGroupName, String privateCloudName, String clusterName, Context context); /** * Get a cluster by name in a private cloud. @@ -63,15 +66,13 @@ public interface ClustersClient { * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. * @param clusterName Name of the cluster 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 cluster by name in a private cloud. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String resourceGroupName, String privateCloudName, String clusterName, Context context); + ClusterInner get(String resourceGroupName, String privateCloudName, String clusterName); /** * Create or update a cluster in a private cloud. @@ -83,7 +84,7 @@ Response getWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 the {@link SyncPoller} for polling of a cluster resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, ClusterInner> beginCreateOrUpdate( @@ -100,7 +101,7 @@ SyncPoller, ClusterInner> beginCreateOrUpdate( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 the {@link SyncPoller} for polling of a cluster resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, ClusterInner> beginCreateOrUpdate( @@ -149,7 +150,7 @@ ClusterInner createOrUpdate( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 the {@link SyncPoller} for polling of a cluster resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, ClusterInner> beginUpdate( @@ -166,7 +167,7 @@ SyncPoller, ClusterInner> 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 a cluster resource. + * @return the {@link SyncPoller} for polling of a cluster resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, ClusterInner> beginUpdate( @@ -222,7 +223,7 @@ ClusterInner update( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, Void> beginDelete( @@ -238,7 +239,7 @@ SyncPoller, Void> beginDelete( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, Void> beginDelete( @@ -270,4 +271,34 @@ SyncPoller, Void> beginDelete( */ @ServiceMethod(returns = ReturnType.SINGLE) void delete(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 context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.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}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + 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. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ClusterZoneListInner listZones(String resourceGroupName, String privateCloudName, String clusterName); } 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 3d1cc0b234e7..e295cc467074 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 @@ -24,7 +24,7 @@ public interface DatastoresClient { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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. + * @return a paged list of datastores as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(String resourceGroupName, String privateCloudName, String clusterName); @@ -39,7 +39,7 @@ public interface DatastoresClient { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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. + * @return a paged list of datastores as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list( @@ -52,13 +52,15 @@ PagedIterable list( * @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 context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 in a private cloud cluster along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - DatastoreInner get(String resourceGroupName, String privateCloudName, String clusterName, String datastoreName); + Response getWithResponse( + String resourceGroupName, String privateCloudName, String clusterName, String datastoreName, Context context); /** * Get a datastore in a private cloud cluster. @@ -67,15 +69,13 @@ PagedIterable list( * @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 context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String resourceGroupName, String privateCloudName, String clusterName, String datastoreName, Context context); + DatastoreInner get(String resourceGroupName, String privateCloudName, String clusterName, String datastoreName); /** * Create or update a datastore in a private cloud cluster. @@ -88,7 +88,7 @@ Response getWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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. + * @return the {@link SyncPoller} for polling of a datastore resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, DatastoreInner> beginCreateOrUpdate( @@ -110,7 +110,7 @@ SyncPoller, DatastoreInner> beginCreateOrUpdate( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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. + * @return the {@link SyncPoller} for polling of a datastore resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, DatastoreInner> beginCreateOrUpdate( @@ -175,7 +175,7 @@ DatastoreInner createOrUpdate( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, Void> beginDelete( @@ -192,7 +192,7 @@ SyncPoller, Void> beginDelete( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, Void> beginDelete( 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 5f3d70b53608..96c635ed10c7 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 @@ -23,7 +23,7 @@ public interface GlobalReachConnectionsClient { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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. + * @return a paged list of global reach connections as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(String resourceGroupName, String privateCloudName); @@ -37,7 +37,7 @@ public interface GlobalReachConnectionsClient { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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. + * @return a paged list of global reach connections as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(String resourceGroupName, String privateCloudName, Context context); @@ -48,13 +48,15 @@ public interface GlobalReachConnectionsClient { * @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 context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 global reach connection by name in a private cloud along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - GlobalReachConnectionInner get(String resourceGroupName, String privateCloudName, String globalReachConnectionName); + Response getWithResponse( + String resourceGroupName, String privateCloudName, String globalReachConnectionName, Context context); /** * Get a global reach connection by name in a private cloud. @@ -62,15 +64,13 @@ public interface GlobalReachConnectionsClient { * @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 context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String resourceGroupName, String privateCloudName, String globalReachConnectionName, Context context); + GlobalReachConnectionInner get(String resourceGroupName, String privateCloudName, String globalReachConnectionName); /** * Create or update a global reach connection in a private cloud. @@ -82,7 +82,7 @@ Response getWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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. + * @return the {@link SyncPoller} for polling of a global reach connection resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, GlobalReachConnectionInner> beginCreateOrUpdate( @@ -102,7 +102,7 @@ SyncPoller, GlobalReachConnectionInner> b * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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. + * @return the {@link SyncPoller} for polling of a global reach connection resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, GlobalReachConnectionInner> beginCreateOrUpdate( @@ -161,7 +161,7 @@ GlobalReachConnectionInner createOrUpdate( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, Void> beginDelete( @@ -177,7 +177,7 @@ SyncPoller, Void> beginDelete( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, Void> beginDelete( 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 34f3d77449ed..9fc4c3c23e02 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 @@ -21,7 +21,7 @@ public interface HcxEnterpriseSitesClient { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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. + * @return a paged list of HCX Enterprise Sites as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(String resourceGroupName, String privateCloudName); @@ -35,7 +35,7 @@ public interface HcxEnterpriseSitesClient { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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. + * @return a paged list of HCX Enterprise Sites as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(String resourceGroupName, String privateCloudName, Context context); @@ -46,13 +46,15 @@ public interface HcxEnterpriseSitesClient { * @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 context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.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 by name in a private cloud. + * @return an HCX Enterprise Site by name in a private cloud along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - HcxEnterpriseSiteInner get(String resourceGroupName, String privateCloudName, String hcxEnterpriseSiteName); + Response getWithResponse( + String resourceGroupName, String privateCloudName, String hcxEnterpriseSiteName, Context context); /** * Get an HCX Enterprise Site by name in a private cloud. @@ -60,15 +62,13 @@ public interface HcxEnterpriseSitesClient { * @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 context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.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 by name in a private cloud. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String resourceGroupName, String privateCloudName, String hcxEnterpriseSiteName, Context context); + HcxEnterpriseSiteInner get(String resourceGroupName, String privateCloudName, String hcxEnterpriseSiteName); /** * Create or update an HCX Enterprise Site in a private cloud. @@ -77,17 +77,19 @@ Response getWithResponse( * @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 context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.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. + * @return an HCX Enterprise Site resource along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - HcxEnterpriseSiteInner createOrUpdate( + Response createOrUpdateWithResponse( String resourceGroupName, String privateCloudName, String hcxEnterpriseSiteName, - HcxEnterpriseSiteInner hcxEnterpriseSite); + HcxEnterpriseSiteInner hcxEnterpriseSite, + Context context); /** * Create or update an HCX Enterprise Site in a private cloud. @@ -96,19 +98,17 @@ HcxEnterpriseSiteInner createOrUpdate( * @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 context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.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) - Response createOrUpdateWithResponse( + HcxEnterpriseSiteInner createOrUpdate( String resourceGroupName, String privateCloudName, String hcxEnterpriseSiteName, - HcxEnterpriseSiteInner hcxEnterpriseSite, - Context context); + HcxEnterpriseSiteInner hcxEnterpriseSite); /** * Delete an HCX Enterprise Site in a private cloud. @@ -116,12 +116,15 @@ Response createOrUpdateWithResponse( * @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 context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String privateCloudName, String hcxEnterpriseSiteName); + Response deleteWithResponse( + String resourceGroupName, String privateCloudName, String hcxEnterpriseSiteName, Context context); /** * Delete an HCX Enterprise Site in a private cloud. @@ -129,13 +132,10 @@ Response createOrUpdateWithResponse( * @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 context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response deleteWithResponse( - String resourceGroupName, String privateCloudName, String hcxEnterpriseSiteName, Context context); + void delete(String resourceGroupName, String privateCloudName, String hcxEnterpriseSiteName); } 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 94c7fab6eb3d..949b1697d0c7 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 @@ -10,6 +10,7 @@ import com.azure.core.util.Context; import com.azure.resourcemanager.avs.fluent.models.QuotaInner; 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. */ public interface LocationsClient { @@ -17,49 +18,50 @@ public interface LocationsClient { * Return trial status for subscription by region. * * @param location Azure region. + * @param sku The sku to check for trial availability. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return subscription trial availability. + * @return subscription trial availability along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - TrialInner checkTrialAvailability(String location); + Response checkTrialAvailabilityWithResponse(String location, Sku sku, Context context); /** * Return trial status for subscription by region. * * @param location Azure region. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return subscription trial availability. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response checkTrialAvailabilityWithResponse(String location, Context context); + TrialInner checkTrialAvailability(String location); /** * Return quota for subscription by region. * * @param location Azure region. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return subscription quotas. + * @return subscription quotas along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - QuotaInner checkQuotaAvailability(String location); + Response checkQuotaAvailabilityWithResponse(String location, Context context); /** * Return quota for subscription by region. * * @param location Azure region. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return subscription quotas. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response checkQuotaAvailabilityWithResponse(String location, Context context); + QuotaInner checkQuotaAvailability(String location); } diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/OperationsClient.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/OperationsClient.java index 090e5625b134..9161726093af 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 @@ -17,7 +17,7 @@ public interface OperationsClient { * * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return pageable list of operations. + * @return pageable list of operations as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(); @@ -29,7 +29,7 @@ public interface OperationsClient { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return pageable list of operations. + * @return pageable list of operations 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 aa6d77bfb09e..906606c62608 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 @@ -25,7 +25,7 @@ public interface PlacementPoliciesClient { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.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. + * @return represents list of placement policies as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(String resourceGroupName, String privateCloudName, String clusterName); @@ -40,7 +40,7 @@ public interface PlacementPoliciesClient { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.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. + * @return represents list of placement policies as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list( @@ -53,14 +53,19 @@ PagedIterable list( * @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 context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 placement policy by name in a private cloud cluster along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - PlacementPolicyInner get( - String resourceGroupName, String privateCloudName, String clusterName, String placementPolicyName); + Response getWithResponse( + String resourceGroupName, + String privateCloudName, + String clusterName, + String placementPolicyName, + Context context); /** * Get a placement policy by name in a private cloud cluster. @@ -69,19 +74,14 @@ PlacementPolicyInner get( * @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 context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String resourceGroupName, - String privateCloudName, - String clusterName, - String placementPolicyName, - Context context); + PlacementPolicyInner get( + String resourceGroupName, String privateCloudName, String clusterName, String placementPolicyName); /** * Create or update a placement policy in a private cloud cluster. @@ -94,7 +94,7 @@ Response getWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 the {@link SyncPoller} for polling of a vSphere Distributed Resource Scheduler (DRS) placement policy. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, PlacementPolicyInner> beginCreateOrUpdate( @@ -116,7 +116,7 @@ SyncPoller, PlacementPolicyInner> beginCreateOr * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 the {@link SyncPoller} for polling of a vSphere Distributed Resource Scheduler (DRS) placement policy. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, PlacementPolicyInner> beginCreateOrUpdate( @@ -182,7 +182,7 @@ PlacementPolicyInner createOrUpdate( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 the {@link SyncPoller} for polling of a vSphere Distributed Resource Scheduler (DRS) placement policy. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, PlacementPolicyInner> beginUpdate( @@ -204,7 +204,7 @@ SyncPoller, PlacementPolicyInner> 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 a vSphere Distributed Resource Scheduler (DRS) placement policy. + * @return the {@link SyncPoller} for polling of a vSphere Distributed Resource Scheduler (DRS) placement policy. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, PlacementPolicyInner> beginUpdate( @@ -269,7 +269,7 @@ PlacementPolicyInner update( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, Void> beginDelete( @@ -286,7 +286,7 @@ SyncPoller, Void> beginDelete( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, Void> beginDelete( 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 cee4bf38b4e1..35bb4483977c 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 @@ -24,7 +24,7 @@ public interface PrivateCloudsClient { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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. + * @return a paged list of private clouds as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listByResourceGroup(String resourceGroupName); @@ -37,7 +37,7 @@ public interface PrivateCloudsClient { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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. + * @return a paged list of private clouds as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listByResourceGroup(String resourceGroupName, Context context); @@ -47,7 +47,7 @@ public interface PrivateCloudsClient { * * @throws com.azure.core.management.exception.ManagementException 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. + * @return a paged list of private clouds as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(); @@ -59,7 +59,7 @@ public interface PrivateCloudsClient { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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. + * @return a paged list of private clouds as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(Context context); @@ -69,28 +69,28 @@ public interface PrivateCloudsClient { * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param 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. + * @return a private cloud along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - PrivateCloudInner getByResourceGroup(String resourceGroupName, String privateCloudName); + Response getByResourceGroupWithResponse( + String resourceGroupName, String privateCloudName, Context context); /** * Get a private cloud. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a private cloud. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getByResourceGroupWithResponse( - String resourceGroupName, String privateCloudName, Context context); + PrivateCloudInner getByResourceGroup(String resourceGroupName, String privateCloudName); /** * Create or update a private cloud. @@ -101,7 +101,7 @@ Response getByResourceGroupWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 the {@link SyncPoller} for polling of a private cloud resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, PrivateCloudInner> beginCreateOrUpdate( @@ -117,7 +117,7 @@ SyncPoller, PrivateCloudInner> beginCreateOrUpdate * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 the {@link SyncPoller} for polling of a private cloud resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, PrivateCloudInner> beginCreateOrUpdate( @@ -162,7 +162,7 @@ PrivateCloudInner createOrUpdate( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 the {@link SyncPoller} for polling of a private cloud resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, PrivateCloudInner> beginUpdate( @@ -178,7 +178,7 @@ 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 a private cloud resource. + * @return the {@link SyncPoller} for polling of a private cloud resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, PrivateCloudInner> beginUpdate( @@ -222,7 +222,7 @@ PrivateCloudInner update( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, Void> beginDelete(String resourceGroupName, String privateCloudName); @@ -236,7 +236,7 @@ PrivateCloudInner update( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @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); @@ -274,7 +274,7 @@ PrivateCloudInner update( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, Void> beginRotateVcenterPassword(String resourceGroupName, String privateCloudName); @@ -288,7 +288,7 @@ PrivateCloudInner update( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, Void> beginRotateVcenterPassword( @@ -327,7 +327,7 @@ SyncPoller, Void> beginRotateVcenterPassword( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, Void> beginRotateNsxtPassword(String resourceGroupName, String privateCloudName); @@ -341,7 +341,7 @@ SyncPoller, Void> beginRotateVcenterPassword( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, Void> beginRotateNsxtPassword( @@ -377,26 +377,26 @@ SyncPoller, Void> beginRotateNsxtPassword( * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return administrative credentials for accessing vCenter and NSX-T. + * @return administrative credentials for accessing vCenter and NSX-T along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - AdminCredentialsInner listAdminCredentials(String resourceGroupName, String privateCloudName); + 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. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return administrative credentials for accessing vCenter and NSX-T. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response listAdminCredentialsWithResponse( - String resourceGroupName, String privateCloudName, Context context); + AdminCredentialsInner listAdminCredentials(String resourceGroupName, String privateCloudName); } 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 8d1070a7d7b8..dcd10a29ff64 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 @@ -23,7 +23,7 @@ public interface ScriptCmdletsClient { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.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. + * @return pageable list of scripts/cmdlets as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(String resourceGroupName, String privateCloudName, String scriptPackageName); @@ -39,7 +39,7 @@ public interface ScriptCmdletsClient { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.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. + * @return pageable list of scripts/cmdlets as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list( @@ -52,14 +52,19 @@ PagedIterable list( * @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 context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 cmdlet available for script execution along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - ScriptCmdletInner get( - String resourceGroupName, String privateCloudName, String scriptPackageName, String scriptCmdletName); + 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. @@ -68,17 +73,12 @@ ScriptCmdletInner get( * @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 context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String resourceGroupName, - String privateCloudName, - String scriptPackageName, - String scriptCmdletName, - Context context); + 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 35405c52a6f7..3771d9787c94 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 @@ -25,7 +25,7 @@ public interface ScriptExecutionsClient { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.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. + * @return pageable list of script executions as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(String resourceGroupName, String privateCloudName); @@ -39,7 +39,7 @@ public interface ScriptExecutionsClient { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.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. + * @return pageable list of script executions as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(String resourceGroupName, String privateCloudName, Context context); @@ -50,13 +50,15 @@ public interface ScriptExecutionsClient { * @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 context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.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 an script execution by name in a private cloud along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - ScriptExecutionInner get(String resourceGroupName, String privateCloudName, String scriptExecutionName); + Response getWithResponse( + String resourceGroupName, String privateCloudName, String scriptExecutionName, Context context); /** * Get an script execution by name in a private cloud. @@ -64,15 +66,13 @@ public interface ScriptExecutionsClient { * @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 context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.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. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String resourceGroupName, String privateCloudName, String scriptExecutionName, Context context); + ScriptExecutionInner get(String resourceGroupName, String privateCloudName, String scriptExecutionName); /** * Create or update a script execution in a private cloud. @@ -84,7 +84,7 @@ Response getWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.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. + * @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( @@ -104,7 +104,7 @@ SyncPoller, ScriptExecutionInner> beginCreateOr * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.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. + * @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( @@ -163,7 +163,7 @@ ScriptExecutionInner createOrUpdate( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, Void> beginDelete( @@ -179,7 +179,7 @@ SyncPoller, Void> beginDelete( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, Void> beginDelete( @@ -218,14 +218,21 @@ SyncPoller, Void> beginDelete( * @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 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. + * @return an instance of a script executed by a user - custom or AVS along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - ScriptExecutionInner getExecutionLogs( - String resourceGroupName, String privateCloudName, String scriptExecutionName); + Response getExecutionLogsWithResponse( + String resourceGroupName, + String privateCloudName, + String scriptExecutionName, + List scriptOutputStreamType, + Context context); /** * Return the logs for a script execution resource. @@ -233,19 +240,12 @@ ScriptExecutionInner getExecutionLogs( * @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 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. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getExecutionLogsWithResponse( - String resourceGroupName, - String privateCloudName, - String scriptExecutionName, - List scriptOutputStreamType, - Context context); + 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 dbb509267233..fc101fbe0aee 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 @@ -21,7 +21,7 @@ public interface ScriptPackagesClient { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if 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. + * @return a list of the available script packages as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(String resourceGroupName, String privateCloudName); @@ -35,7 +35,7 @@ public interface ScriptPackagesClient { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if 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. + * @return a list of the available script packages as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(String resourceGroupName, String privateCloudName, Context context); @@ -46,13 +46,15 @@ public interface ScriptPackagesClient { * @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 context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 script package available to run on a private cloud along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - ScriptPackageInner get(String resourceGroupName, String privateCloudName, String scriptPackageName); + Response getWithResponse( + String resourceGroupName, String privateCloudName, String scriptPackageName, Context context); /** * Get a script package available to run on a private cloud. @@ -60,13 +62,11 @@ public interface ScriptPackagesClient { * @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 context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String resourceGroupName, String privateCloudName, String scriptPackageName, Context context); + 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 b3c9a9c85b86..fc52260fdcee 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 @@ -25,7 +25,7 @@ public interface VirtualMachinesClient { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if 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. + * @return a list of Virtual Machines as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(String resourceGroupName, String privateCloudName, String clusterName); @@ -40,7 +40,7 @@ public interface VirtualMachinesClient { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if 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. + * @return a list of Virtual Machines as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list( @@ -53,14 +53,19 @@ PagedIterable list( * @param privateCloudName Name of the private cloud. * @param clusterName Name of the cluster in 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 cluster. + * @return a virtual machine by id in a private cloud cluster along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - VirtualMachineInner get( - String resourceGroupName, String privateCloudName, String clusterName, String virtualMachineId); + Response getWithResponse( + String resourceGroupName, + String privateCloudName, + String clusterName, + String virtualMachineId, + Context context); /** * Get a virtual machine by id in a private cloud cluster. @@ -69,19 +74,14 @@ VirtualMachineInner get( * @param privateCloudName Name of the private cloud. * @param clusterName Name of the cluster in 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 cluster. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String resourceGroupName, - String privateCloudName, - String clusterName, - String virtualMachineId, - Context context); + VirtualMachineInner get( + String resourceGroupName, String privateCloudName, String clusterName, String virtualMachineId); /** * Enable or disable DRS-driven VM movement restriction. @@ -94,7 +94,7 @@ Response getWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, Void> beginRestrictMovement( @@ -116,7 +116,7 @@ SyncPoller, Void> beginRestrictMovement( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, Void> beginRestrictMovement( 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 f8ec201ad949..51ede42b52bc 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 @@ -15,14 +15,74 @@ 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. */ public interface WorkloadNetworksClient { + /** + * Get a private cloud workload network. + * + * @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}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse( + String resourceGroupName, String privateCloudName, WorkloadNetworkName workloadNetworkName, Context context); + + /** + * Get a private cloud workload network. + * + * @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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + WorkloadNetworkInner get( + String resourceGroupName, String privateCloudName, WorkloadNetworkName workloadNetworkName); + + /** + * List of workload networks in a private cloud. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if 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}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, String privateCloudName); + + /** + * List of workload networks in a private cloud. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if 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}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, String privateCloudName, Context context); + /** * List of segments in a private cloud workload network. * @@ -31,7 +91,7 @@ public interface WorkloadNetworksClient { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if 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. + * @return a list of NSX Segments as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listSegments(String resourceGroupName, String privateCloudName); @@ -45,7 +105,7 @@ public interface WorkloadNetworksClient { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if 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. + * @return a list of NSX Segments as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listSegments( @@ -57,13 +117,15 @@ PagedIterable listSegments( * @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. + * @return a segment by id in a private cloud workload network along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - WorkloadNetworkSegmentInner getSegment(String resourceGroupName, String privateCloudName, String segmentId); + Response getSegmentWithResponse( + String resourceGroupName, String privateCloudName, String segmentId, Context context); /** * Get a segment by id in a private cloud workload network. @@ -71,15 +133,13 @@ PagedIterable listSegments( * @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. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getSegmentWithResponse( - String resourceGroupName, String privateCloudName, String segmentId, Context context); + WorkloadNetworkSegmentInner getSegment(String resourceGroupName, String privateCloudName, String segmentId); /** * Create a segment by id in a private cloud workload network. @@ -91,7 +151,7 @@ Response getSegmentWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return nSX Segment. + * @return the {@link SyncPoller} for polling of nSX Segment. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, WorkloadNetworkSegmentInner> beginCreateSegments( @@ -111,7 +171,7 @@ SyncPoller, WorkloadNetworkSegmentInner> * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return nSX Segment. + * @return the {@link SyncPoller} for polling of nSX Segment. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, WorkloadNetworkSegmentInner> beginCreateSegments( @@ -171,7 +231,7 @@ WorkloadNetworkSegmentInner createSegments( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return nSX Segment. + * @return the {@link SyncPoller} for polling of nSX Segment. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, WorkloadNetworkSegmentInner> beginUpdateSegments( @@ -191,7 +251,7 @@ SyncPoller, WorkloadNetworkSegmentInner> * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return nSX Segment. + * @return the {@link SyncPoller} for polling of nSX Segment. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, WorkloadNetworkSegmentInner> beginUpdateSegments( @@ -250,7 +310,7 @@ WorkloadNetworkSegmentInner updateSegments( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, Void> beginDeleteSegment( @@ -266,7 +326,7 @@ SyncPoller, Void> beginDeleteSegment( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, Void> beginDeleteSegment( @@ -307,7 +367,7 @@ SyncPoller, Void> beginDeleteSegment( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if 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. + * @return a list of NSX dhcp entities as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listDhcp(String resourceGroupName, String privateCloudName); @@ -321,7 +381,7 @@ SyncPoller, Void> beginDeleteSegment( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if 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. + * @return a list of NSX dhcp entities as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listDhcp( @@ -333,13 +393,15 @@ PagedIterable listDhcp( * @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. + * @return dhcp by id in a private cloud workload network along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - WorkloadNetworkDhcpInner getDhcp(String resourceGroupName, String dhcpId, String privateCloudName); + Response getDhcpWithResponse( + String resourceGroupName, String dhcpId, String privateCloudName, Context context); /** * Get dhcp by id in a private cloud workload network. @@ -347,15 +409,13 @@ PagedIterable listDhcp( * @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. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getDhcpWithResponse( - String resourceGroupName, String dhcpId, String privateCloudName, Context context); + WorkloadNetworkDhcpInner getDhcp(String resourceGroupName, String dhcpId, String privateCloudName); /** * Create dhcp by id in a private cloud workload network. @@ -367,7 +427,7 @@ Response getDhcpWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return nSX DHCP. + * @return the {@link SyncPoller} for polling of nSX DHCP. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, WorkloadNetworkDhcpInner> beginCreateDhcp( @@ -384,7 +444,7 @@ SyncPoller, WorkloadNetworkDhcpInner> begin * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return nSX DHCP. + * @return the {@link SyncPoller} for polling of nSX DHCP. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, WorkloadNetworkDhcpInner> beginCreateDhcp( @@ -441,7 +501,7 @@ WorkloadNetworkDhcpInner createDhcp( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return nSX DHCP. + * @return the {@link SyncPoller} for polling of nSX DHCP. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, WorkloadNetworkDhcpInner> beginUpdateDhcp( @@ -458,7 +518,7 @@ SyncPoller, WorkloadNetworkDhcpInner> begin * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return nSX DHCP. + * @return the {@link SyncPoller} for polling of nSX DHCP. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, WorkloadNetworkDhcpInner> beginUpdateDhcp( @@ -514,7 +574,7 @@ WorkloadNetworkDhcpInner updateDhcp( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, Void> beginDeleteDhcp( @@ -530,7 +590,7 @@ SyncPoller, Void> beginDeleteDhcp( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, Void> beginDeleteDhcp( @@ -571,7 +631,7 @@ SyncPoller, Void> beginDeleteDhcp( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if 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. + * @return a list of NSX Gateways as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listGateways(String resourceGroupName, String privateCloudName); @@ -585,7 +645,7 @@ SyncPoller, Void> beginDeleteDhcp( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if 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. + * @return a list of NSX Gateways as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listGateways( @@ -597,13 +657,15 @@ PagedIterable listGateways( * @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. + * @return a gateway by id in a private cloud workload network along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - WorkloadNetworkGatewayInner getGateway(String resourceGroupName, String privateCloudName, String gatewayId); + Response getGatewayWithResponse( + String resourceGroupName, String privateCloudName, String gatewayId, Context context); /** * Get a gateway by id in a private cloud workload network. @@ -611,15 +673,13 @@ PagedIterable listGateways( * @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. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getGatewayWithResponse( - String resourceGroupName, String privateCloudName, String gatewayId, Context context); + WorkloadNetworkGatewayInner getGateway(String resourceGroupName, String privateCloudName, String gatewayId); /** * List of port mirroring profiles in a private cloud workload network. @@ -629,7 +689,7 @@ Response getGatewayWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if 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. + * @return a list of NSX Port Mirroring as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listPortMirroring( @@ -644,7 +704,7 @@ PagedIterable listPortMirroring( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if 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. + * @return a list of NSX Port Mirroring as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listPortMirroring( @@ -656,14 +716,15 @@ PagedIterable listPortMirroring( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. * @param portMirroringId NSX Port Mirroring identifier. Generally the same as the Port Mirroring display name. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a port mirroring profile by id in a private cloud workload network. + * @return a port mirroring profile by id in a private cloud workload network along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - WorkloadNetworkPortMirroringInner getPortMirroring( - String resourceGroupName, String privateCloudName, String portMirroringId); + Response getPortMirroringWithResponse( + String resourceGroupName, String privateCloudName, String portMirroringId, Context context); /** * Get a port mirroring profile by id in a private cloud workload network. @@ -671,15 +732,14 @@ WorkloadNetworkPortMirroringInner getPortMirroring( * @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. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getPortMirroringWithResponse( - String resourceGroupName, String privateCloudName, String portMirroringId, Context context); + WorkloadNetworkPortMirroringInner getPortMirroring( + String resourceGroupName, String privateCloudName, String portMirroringId); /** * Create a port mirroring profile by id in a private cloud workload network. @@ -691,7 +751,7 @@ Response getPortMirroringWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return nSX Port Mirroring. + * @return the {@link SyncPoller} for polling of nSX Port Mirroring. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, WorkloadNetworkPortMirroringInner> @@ -712,7 +772,7 @@ Response getPortMirroringWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return nSX Port Mirroring. + * @return the {@link SyncPoller} for polling of nSX Port Mirroring. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, WorkloadNetworkPortMirroringInner> @@ -773,7 +833,7 @@ WorkloadNetworkPortMirroringInner createPortMirroring( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return nSX Port Mirroring. + * @return the {@link SyncPoller} for polling of nSX Port Mirroring. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, WorkloadNetworkPortMirroringInner> @@ -794,7 +854,7 @@ WorkloadNetworkPortMirroringInner createPortMirroring( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return nSX Port Mirroring. + * @return the {@link SyncPoller} for polling of nSX Port Mirroring. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, WorkloadNetworkPortMirroringInner> @@ -854,7 +914,7 @@ WorkloadNetworkPortMirroringInner updatePortMirroring( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, Void> beginDeletePortMirroring( @@ -870,7 +930,7 @@ SyncPoller, Void> beginDeletePortMirroring( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, Void> beginDeletePortMirroring( @@ -912,7 +972,7 @@ void deletePortMirroring( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if 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. + * @return a list of NSX VM Groups as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listVMGroups(String resourceGroupName, String privateCloudName); @@ -926,7 +986,7 @@ void deletePortMirroring( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if 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. + * @return a list of NSX VM Groups as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listVMGroups( @@ -938,13 +998,15 @@ PagedIterable listVMGroups( * @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. + * @return a vm group by id in a private cloud workload network along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - WorkloadNetworkVMGroupInner getVMGroup(String resourceGroupName, String privateCloudName, String vmGroupId); + Response getVMGroupWithResponse( + String resourceGroupName, String privateCloudName, String vmGroupId, Context context); /** * Get a vm group by id in a private cloud workload network. @@ -952,15 +1014,13 @@ PagedIterable listVMGroups( * @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. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getVMGroupWithResponse( - String resourceGroupName, String privateCloudName, String vmGroupId, Context context); + WorkloadNetworkVMGroupInner getVMGroup(String resourceGroupName, String privateCloudName, String vmGroupId); /** * Create a vm group by id in a private cloud workload network. @@ -972,7 +1032,7 @@ Response getVMGroupWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return nSX VM Group. + * @return the {@link SyncPoller} for polling of nSX VM Group. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, WorkloadNetworkVMGroupInner> beginCreateVMGroup( @@ -992,7 +1052,7 @@ SyncPoller, WorkloadNetworkVMGroupInner> * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return nSX VM Group. + * @return the {@link SyncPoller} for polling of nSX VM Group. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, WorkloadNetworkVMGroupInner> beginCreateVMGroup( @@ -1052,7 +1112,7 @@ WorkloadNetworkVMGroupInner createVMGroup( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return nSX VM Group. + * @return the {@link SyncPoller} for polling of nSX VM Group. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, WorkloadNetworkVMGroupInner> beginUpdateVMGroup( @@ -1072,7 +1132,7 @@ SyncPoller, WorkloadNetworkVMGroupInner> * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return nSX VM Group. + * @return the {@link SyncPoller} for polling of nSX VM Group. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, WorkloadNetworkVMGroupInner> beginUpdateVMGroup( @@ -1131,7 +1191,7 @@ WorkloadNetworkVMGroupInner updateVMGroup( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, Void> beginDeleteVMGroup( @@ -1147,7 +1207,7 @@ SyncPoller, Void> beginDeleteVMGroup( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, Void> beginDeleteVMGroup( @@ -1188,7 +1248,7 @@ SyncPoller, Void> beginDeleteVMGroup( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if 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. + * @return a list of NSX Virtual Machines as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listVirtualMachines( @@ -1203,7 +1263,7 @@ PagedIterable listVirtualMachines( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if 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. + * @return a list of NSX Virtual Machines as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listVirtualMachines( @@ -1215,14 +1275,15 @@ PagedIterable listVirtualMachines( * @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. + * @return a virtual machine by id in a private cloud workload network along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - WorkloadNetworkVirtualMachineInner getVirtualMachine( - String resourceGroupName, String privateCloudName, String virtualMachineId); + Response getVirtualMachineWithResponse( + String resourceGroupName, String privateCloudName, String virtualMachineId, Context context); /** * Get a virtual machine by id in a private cloud workload network. @@ -1230,15 +1291,14 @@ WorkloadNetworkVirtualMachineInner getVirtualMachine( * @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. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getVirtualMachineWithResponse( - String resourceGroupName, String privateCloudName, String virtualMachineId, Context context); + WorkloadNetworkVirtualMachineInner getVirtualMachine( + String resourceGroupName, String privateCloudName, String virtualMachineId); /** * List of DNS services in a private cloud workload network. @@ -1248,7 +1308,7 @@ Response getVirtualMachineWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if 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. + * @return a list of NSX DNS Services as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listDnsServices(String resourceGroupName, String privateCloudName); @@ -1262,7 +1322,7 @@ Response getVirtualMachineWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if 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. + * @return a list of NSX DNS Services as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listDnsServices( @@ -1274,14 +1334,15 @@ PagedIterable listDnsServices( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. * @param dnsServiceId NSX DNS Service identifier. Generally the same as the DNS Service's display name. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a DNS service by id in a private cloud workload network. + * @return a DNS service by id in a private cloud workload network along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - WorkloadNetworkDnsServiceInner getDnsService( - String resourceGroupName, String privateCloudName, String dnsServiceId); + Response getDnsServiceWithResponse( + String resourceGroupName, String privateCloudName, String dnsServiceId, Context context); /** * Get a DNS service by id in a private cloud workload network. @@ -1289,15 +1350,14 @@ WorkloadNetworkDnsServiceInner getDnsService( * @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. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getDnsServiceWithResponse( - String resourceGroupName, String privateCloudName, String dnsServiceId, Context context); + WorkloadNetworkDnsServiceInner getDnsService( + String resourceGroupName, String privateCloudName, String dnsServiceId); /** * Create a DNS service by id in a private cloud workload network. @@ -1309,7 +1369,7 @@ Response getDnsServiceWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return nSX DNS Service. + * @return the {@link SyncPoller} for polling of nSX DNS Service. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, WorkloadNetworkDnsServiceInner> beginCreateDnsService( @@ -1329,7 +1389,7 @@ SyncPoller, WorkloadNetworkDnsService * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return nSX DNS Service. + * @return the {@link SyncPoller} for polling of nSX DNS Service. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, WorkloadNetworkDnsServiceInner> beginCreateDnsService( @@ -1389,7 +1449,7 @@ WorkloadNetworkDnsServiceInner createDnsService( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return nSX DNS Service. + * @return the {@link SyncPoller} for polling of nSX DNS Service. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, WorkloadNetworkDnsServiceInner> beginUpdateDnsService( @@ -1409,7 +1469,7 @@ SyncPoller, WorkloadNetworkDnsService * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return nSX DNS Service. + * @return the {@link SyncPoller} for polling of nSX DNS Service. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, WorkloadNetworkDnsServiceInner> beginUpdateDnsService( @@ -1468,7 +1528,7 @@ WorkloadNetworkDnsServiceInner updateDnsService( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, Void> beginDeleteDnsService( @@ -1484,7 +1544,7 @@ SyncPoller, Void> beginDeleteDnsService( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, Void> beginDeleteDnsService( @@ -1525,7 +1585,7 @@ SyncPoller, Void> beginDeleteDnsService( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if 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. + * @return a list of NSX DNS Zones as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listDnsZones(String resourceGroupName, String privateCloudName); @@ -1539,7 +1599,7 @@ SyncPoller, Void> beginDeleteDnsService( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if 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. + * @return a list of NSX DNS Zones as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listDnsZones( @@ -1551,13 +1611,15 @@ PagedIterable listDnsZones( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. * @param dnsZoneId NSX DNS Zone identifier. Generally the same as the DNS Zone's display name. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a DNS zone by id in a private cloud workload network. + * @return a DNS zone by id in a private cloud workload network along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - WorkloadNetworkDnsZoneInner getDnsZone(String resourceGroupName, String privateCloudName, String dnsZoneId); + Response getDnsZoneWithResponse( + String resourceGroupName, String privateCloudName, String dnsZoneId, Context context); /** * Get a DNS zone by id in a private cloud workload network. @@ -1565,15 +1627,13 @@ PagedIterable listDnsZones( * @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. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getDnsZoneWithResponse( - String resourceGroupName, String privateCloudName, String dnsZoneId, Context context); + WorkloadNetworkDnsZoneInner getDnsZone(String resourceGroupName, String privateCloudName, String dnsZoneId); /** * Create a DNS zone by id in a private cloud workload network. @@ -1585,7 +1645,7 @@ Response getDnsZoneWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return nSX DNS Zone. + * @return the {@link SyncPoller} for polling of nSX DNS Zone. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, WorkloadNetworkDnsZoneInner> beginCreateDnsZone( @@ -1605,7 +1665,7 @@ SyncPoller, WorkloadNetworkDnsZoneInner> * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return nSX DNS Zone. + * @return the {@link SyncPoller} for polling of nSX DNS Zone. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, WorkloadNetworkDnsZoneInner> beginCreateDnsZone( @@ -1665,7 +1725,7 @@ WorkloadNetworkDnsZoneInner createDnsZone( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return nSX DNS Zone. + * @return the {@link SyncPoller} for polling of nSX DNS Zone. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, WorkloadNetworkDnsZoneInner> beginUpdateDnsZone( @@ -1685,7 +1745,7 @@ SyncPoller, WorkloadNetworkDnsZoneInner> * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return nSX DNS Zone. + * @return the {@link SyncPoller} for polling of nSX DNS Zone. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, WorkloadNetworkDnsZoneInner> beginUpdateDnsZone( @@ -1744,7 +1804,7 @@ WorkloadNetworkDnsZoneInner updateDnsZone( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, Void> beginDeleteDnsZone( @@ -1760,7 +1820,7 @@ SyncPoller, Void> beginDeleteDnsZone( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, Void> beginDeleteDnsZone( @@ -1801,7 +1861,7 @@ SyncPoller, Void> beginDeleteDnsZone( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if 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. + * @return a list of NSX Public IP Blocks as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listPublicIPs(String resourceGroupName, String privateCloudName); @@ -1815,7 +1875,7 @@ SyncPoller, Void> beginDeleteDnsZone( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if 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. + * @return a list of NSX Public IP Blocks as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listPublicIPs( @@ -1827,13 +1887,15 @@ PagedIterable listPublicIPs( * @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. + * @return a Public IP Block by id in a private cloud workload network along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - WorkloadNetworkPublicIpInner getPublicIp(String resourceGroupName, String privateCloudName, String publicIpId); + Response getPublicIpWithResponse( + String resourceGroupName, String privateCloudName, String publicIpId, Context context); /** * Get a Public IP Block by id in a private cloud workload network. @@ -1841,15 +1903,13 @@ PagedIterable listPublicIPs( * @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. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getPublicIpWithResponse( - String resourceGroupName, String privateCloudName, String publicIpId, Context context); + WorkloadNetworkPublicIpInner getPublicIp(String resourceGroupName, String privateCloudName, String publicIpId); /** * Create a Public IP Block by id in a private cloud workload network. @@ -1861,7 +1921,7 @@ Response getPublicIpWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return nSX Public IP Block. + * @return the {@link SyncPoller} for polling of nSX Public IP Block. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, WorkloadNetworkPublicIpInner> beginCreatePublicIp( @@ -1881,7 +1941,7 @@ SyncPoller, WorkloadNetworkPublicIpInne * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return nSX Public IP Block. + * @return the {@link SyncPoller} for polling of nSX Public IP Block. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, WorkloadNetworkPublicIpInner> beginCreatePublicIp( @@ -1940,7 +2000,7 @@ WorkloadNetworkPublicIpInner createPublicIp( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, Void> beginDeletePublicIp( @@ -1956,7 +2016,7 @@ SyncPoller, Void> beginDeletePublicIp( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, Void> beginDeletePublicIp( 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 a52acdcab5d1..2d3bd1b34ce8 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/AddonInner.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/AddonInner.java @@ -6,22 +6,22 @@ import com.azure.core.annotation.Fluent; import com.azure.core.management.ProxyResource; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.avs.models.AddonProperties; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** An addon resource. */ @Fluent public final class AddonInner extends ProxyResource { - @JsonIgnore private final ClientLogger logger = new ClientLogger(AddonInner.class); - /* * The properties of an addon resource */ @JsonProperty(value = "properties") private AddonProperties properties; + /** Creates an instance of AddonInner class. */ + public AddonInner() { + } + /** * Get the properties property: The properties of an addon resource. * 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 376dc6d0bd13..f08bbd7362a6 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,15 +5,11 @@ package com.azure.resourcemanager.avs.fluent.models; import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** Administrative credentials for accessing vCenter and NSX-T. */ @Immutable public final class AdminCredentialsInner { - @JsonIgnore private final ClientLogger logger = new ClientLogger(AdminCredentialsInner.class); - /* * NSX-T Manager username */ @@ -38,6 +34,10 @@ public final class AdminCredentialsInner { @JsonProperty(value = "vcenterPassword", access = JsonProperty.Access.WRITE_ONLY) private String vcenterPassword; + /** Creates an instance of AdminCredentialsInner class. */ + public AdminCredentialsInner() { + } + /** * Get the nsxtUsername property: NSX-T Manager username. * 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 d97da6293b02..9375349cf036 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/CloudLinkInner.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/CloudLinkInner.java @@ -6,22 +6,22 @@ import com.azure.core.annotation.Fluent; import com.azure.core.management.ProxyResource; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.avs.models.CloudLinkStatus; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** A cloud link resource. */ @Fluent public final class CloudLinkInner extends ProxyResource { - @JsonIgnore private final ClientLogger logger = new ClientLogger(CloudLinkInner.class); - /* * The properties of a cloud link. */ @JsonProperty(value = "properties") private CloudLinkProperties innerProperties; + /** Creates an instance of CloudLinkInner class. */ + public CloudLinkInner() { + } + /** * Get the innerProperties property: The properties of a cloud link. * 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 2651a4a55e82..7fe8859f78a7 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,16 +5,12 @@ 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.CloudLinkStatus; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** The properties of a cloud link. */ @Fluent public final class CloudLinkProperties { - @JsonIgnore private final ClientLogger logger = new ClientLogger(CloudLinkProperties.class); - /* * The state of the cloud link. */ @@ -27,6 +23,10 @@ public final class CloudLinkProperties { @JsonProperty(value = "linkedCloud") private String linkedCloud; + /** Creates an instance of CloudLinkProperties class. */ + public CloudLinkProperties() { + } + /** * Get the status property: The state of the cloud link. * 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 71dbb3c6b694..cbaec91bb31b 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,14 +8,11 @@ import com.azure.core.management.ProxyResource; import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.avs.models.Sku; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** A cluster resource. */ @Fluent public final class ClusterInner extends ProxyResource { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ClusterInner.class); - /* * The cluster SKU */ @@ -28,6 +25,10 @@ public final class ClusterInner extends ProxyResource { @JsonProperty(value = "properties") private ClusterProperties innerProperties; + /** Creates an instance of ClusterInner class. */ + public ClusterInner() { + } + /** * Get the sku property: The cluster SKU. * @@ -64,7 +65,7 @@ private ClusterProperties innerProperties() { */ public void validate() { if (sku() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException("Missing required property sku in model ClusterInner")); } else { @@ -74,4 +75,6 @@ public void validate() { 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 c7cfc88adfc1..4d8593001660 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,15 +5,15 @@ 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.CommonClusterProperties; -import com.fasterxml.jackson.annotation.JsonIgnore; import java.util.List; /** The properties of a cluster. */ @Fluent public final class ClusterProperties extends CommonClusterProperties { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ClusterProperties.class); + /** Creates an instance of ClusterProperties class. */ + public ClusterProperties() { + } /** {@inheritDoc} */ @Override 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 3e9649f7345f..122bc7b0f683 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,16 +5,12 @@ package com.azure.resourcemanager.avs.fluent.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** The properties of a cluster that may be updated. */ @Fluent public final class ClusterUpdateProperties { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ClusterUpdateProperties.class); - /* * The cluster size */ @@ -27,6 +23,10 @@ public final class ClusterUpdateProperties { @JsonProperty(value = "hosts") private List hosts; + /** Creates an instance of ClusterUpdateProperties class. */ + public ClusterUpdateProperties() { + } + /** * Get the clusterSize property: The cluster size. * 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 new file mode 100644 index 000000000000..3b054fcb974d --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/ClusterZoneListInner.java @@ -0,0 +1,55 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.avs.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.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 +public final class ClusterZoneListInner { + /* + * Zone and associated hosts info + */ + @JsonProperty(value = "zones") + private List zones; + + /** Creates an instance of ClusterZoneListInner class. */ + public 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() { + if (zones() != null) { + zones().forEach(e -> e.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 f1d89298b2da..2f28c024df6f 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/DatastoreInner.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/DatastoreInner.java @@ -6,25 +6,25 @@ import com.azure.core.annotation.Fluent; import com.azure.core.management.ProxyResource; -import com.azure.core.util.logging.ClientLogger; 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.NetAppVolume; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** A datastore resource. */ @Fluent public final class DatastoreInner extends ProxyResource { - @JsonIgnore private final ClientLogger logger = new ClientLogger(DatastoreInner.class); - /* * The properties of a datastore resource */ @JsonProperty(value = "properties") private DatastoreProperties innerProperties; + /** Creates an instance of DatastoreInner class. */ + public DatastoreInner() { + } + /** * Get the innerProperties property: The properties of a datastore resource. * 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 f75839da3198..6971f37da436 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,19 +5,15 @@ 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.DatastoreProvisioningState; import com.azure.resourcemanager.avs.models.DatastoreStatus; import com.azure.resourcemanager.avs.models.DiskPoolVolume; import com.azure.resourcemanager.avs.models.NetAppVolume; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** The properties of a datastore. */ @Fluent public final class DatastoreProperties { - @JsonIgnore private final ClientLogger logger = new ClientLogger(DatastoreProperties.class); - /* * The state of the datastore provisioning */ @@ -42,6 +38,10 @@ public final class DatastoreProperties { @JsonProperty(value = "status", access = JsonProperty.Access.WRITE_ONLY) private DatastoreStatus status; + /** Creates an instance of DatastoreProperties class. */ + public DatastoreProperties() { + } + /** * Get the provisioningState property: The state of the datastore provisioning. * 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 29d752c146a9..6cfe9af0432b 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 @@ -6,22 +6,22 @@ import com.azure.core.annotation.Immutable; import com.azure.core.management.ProxyResource; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.avs.models.ExpressRouteAuthorizationProvisioningState; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** ExpressRoute Circuit Authorization. */ @Immutable public final class ExpressRouteAuthorizationInner extends ProxyResource { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ExpressRouteAuthorizationInner.class); - /* * The properties of an ExpressRoute Circuit Authorization resource */ @JsonProperty(value = "properties", access = JsonProperty.Access.WRITE_ONLY) private ExpressRouteAuthorizationProperties innerProperties; + /** Creates an instance of ExpressRouteAuthorizationInner class. */ + public ExpressRouteAuthorizationInner() { + } + /** * Get the innerProperties property: The properties of an ExpressRoute Circuit Authorization resource. * 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 6a384becc4f5..282f0e6c2e86 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,16 +5,12 @@ 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.ExpressRouteAuthorizationProvisioningState; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** The properties of an ExpressRoute Circuit Authorization resource. */ @Fluent public final class ExpressRouteAuthorizationProperties { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ExpressRouteAuthorizationProperties.class); - /* * The state of the ExpressRoute Circuit Authorization provisioning */ @@ -39,6 +35,10 @@ public final class ExpressRouteAuthorizationProperties { @JsonProperty(value = "expressRouteId") private String expressRouteId; + /** Creates an instance of ExpressRouteAuthorizationProperties class. */ + public ExpressRouteAuthorizationProperties() { + } + /** * Get the provisioningState property: The state of the ExpressRoute Circuit Authorization provisioning. * 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 8ed4063ef60a..649dfe6debbe 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/GlobalReachConnectionInner.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/GlobalReachConnectionInner.java @@ -6,23 +6,23 @@ import com.azure.core.annotation.Fluent; import com.azure.core.management.ProxyResource; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.avs.models.GlobalReachConnectionProvisioningState; import com.azure.resourcemanager.avs.models.GlobalReachConnectionStatus; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** A global reach connection resource. */ @Fluent public final class GlobalReachConnectionInner extends ProxyResource { - @JsonIgnore private final ClientLogger logger = new ClientLogger(GlobalReachConnectionInner.class); - /* * The properties of a global reach connection resource */ @JsonProperty(value = "properties") private GlobalReachConnectionProperties innerProperties; + /** Creates an instance of GlobalReachConnectionInner class. */ + public GlobalReachConnectionInner() { + } + /** * Get the innerProperties property: The properties of a global reach connection resource. * 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 5b14acccf54c..dc4b9d3e5761 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,17 +5,13 @@ 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.GlobalReachConnectionProvisioningState; import com.azure.resourcemanager.avs.models.GlobalReachConnectionStatus; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** The properties of a global reach connection. */ @Fluent public final class GlobalReachConnectionProperties { - @JsonIgnore private final ClientLogger logger = new ClientLogger(GlobalReachConnectionProperties.class); - /* * The state of the ExpressRoute Circuit Authorization provisioning */ @@ -23,15 +19,13 @@ public final class GlobalReachConnectionProperties { 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; @@ -43,19 +37,21 @@ 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. */ + public GlobalReachConnectionProperties() { + } + /** * Get the provisioningState property: The state of the ExpressRoute Circuit Authorization provisioning. * 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 1b6c591b43cb..6dfdcec76d4b 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/HcxEnterpriseSiteInner.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/HcxEnterpriseSiteInner.java @@ -6,22 +6,22 @@ import com.azure.core.annotation.Immutable; import com.azure.core.management.ProxyResource; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.avs.models.HcxEnterpriseSiteStatus; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** An HCX Enterprise Site resource. */ @Immutable public final class HcxEnterpriseSiteInner extends ProxyResource { - @JsonIgnore private final ClientLogger logger = new ClientLogger(HcxEnterpriseSiteInner.class); - /* * The properties of an HCX Enterprise Site resource */ @JsonProperty(value = "properties", access = JsonProperty.Access.WRITE_ONLY) private HcxEnterpriseSiteProperties innerProperties; + /** Creates an instance of HcxEnterpriseSiteInner class. */ + public HcxEnterpriseSiteInner() { + } + /** * Get the innerProperties property: The properties of an HCX Enterprise Site resource. * 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 e81556abf1ab..76db6e83e6b3 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,16 +5,12 @@ package com.azure.resourcemanager.avs.fluent.models; import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.avs.models.HcxEnterpriseSiteStatus; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** The properties of an HCX Enterprise Site. */ @Immutable public final class HcxEnterpriseSiteProperties { - @JsonIgnore private final ClientLogger logger = new ClientLogger(HcxEnterpriseSiteProperties.class); - /* * The activation key */ @@ -27,6 +23,10 @@ public final class HcxEnterpriseSiteProperties { @JsonProperty(value = "status", access = JsonProperty.Access.WRITE_ONLY) private HcxEnterpriseSiteStatus status; + /** Creates an instance of HcxEnterpriseSiteProperties class. */ + public HcxEnterpriseSiteProperties() { + } + /** * Get the activationKey property: The activation key. * 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 0967f90c2264..464fbc7dc373 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,17 +5,13 @@ 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.OperationDisplay; import com.azure.resourcemanager.avs.models.OperationProperties; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** A REST API operation. */ @Fluent public final class OperationInner { - @JsonIgnore private final ClientLogger logger = new ClientLogger(OperationInner.class); - /* * Name of the operation being performed on this object */ @@ -29,8 +25,7 @@ public final class OperationInner { private OperationDisplay display; /* - * Gets or sets a value indicating whether the operation is a data action - * or not + * Gets or sets a value indicating whether the operation is a data action or not */ @JsonProperty(value = "isDataAction") private Boolean isDataAction; @@ -47,6 +42,10 @@ public final class OperationInner { @JsonProperty(value = "properties") private OperationProperties properties; + /** Creates an instance of OperationInner class. */ + public OperationInner() { + } + /** * Get the name property: Name of the operation being performed on this object. * 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 f0b6484680e5..ce6268027f37 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/PlacementPolicyInner.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/PlacementPolicyInner.java @@ -6,22 +6,22 @@ import com.azure.core.annotation.Fluent; import com.azure.core.management.ProxyResource; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.avs.models.PlacementPolicyProperties; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** A vSphere Distributed Resource Scheduler (DRS) placement policy. */ @Fluent public final class PlacementPolicyInner extends ProxyResource { - @JsonIgnore private final ClientLogger logger = new ClientLogger(PlacementPolicyInner.class); - /* * placement policy properties */ @JsonProperty(value = "properties") private PlacementPolicyProperties properties; + /** Creates an instance of PlacementPolicyInner class. */ + public PlacementPolicyInner() { + } + /** * Get the properties property: placement policy properties. * 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 c53dbfee4c1b..f1380c8a70d1 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,17 +5,15 @@ 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.AffinityStrength; +import com.azure.resourcemanager.avs.models.AzureHybridBenefitType; import com.azure.resourcemanager.avs.models.PlacementPolicyState; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** The properties of a placement policy resource that may be updated. */ @Fluent public final class PlacementPolicyUpdateProperties { - @JsonIgnore private final ClientLogger logger = new ClientLogger(PlacementPolicyUpdateProperties.class); - /* * Whether the placement policy is enabled or disabled */ @@ -34,6 +32,22 @@ public final class PlacementPolicyUpdateProperties { @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; + + /** Creates an instance of PlacementPolicyUpdateProperties class. */ + public PlacementPolicyUpdateProperties() { + } + /** * Get the state property: Whether the placement policy is enabled or disabled. * @@ -94,6 +108,46 @@ public PlacementPolicyUpdateProperties withHostMembers(List hostMembers) return this; } + /** + * Get the affinityStrength property: vm-host placement policy affinity strength (should/must). + * + * @return the affinityStrength value. + */ + public AffinityStrength affinityStrength() { + return this.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. + */ + public PlacementPolicyUpdateProperties withAffinityStrength(AffinityStrength affinityStrength) { + this.affinityStrength = affinityStrength; + return this; + } + + /** + * Get the azureHybridBenefitType property: placement policy azure hybrid benefit opt-in type. + * + * @return the azureHybridBenefitType value. + */ + public AzureHybridBenefitType azureHybridBenefitType() { + return this.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. + */ + public PlacementPolicyUpdateProperties withAzureHybridBenefitType(AzureHybridBenefitType azureHybridBenefitType) { + this.azureHybridBenefitType = azureHybridBenefitType; + return this; + } + /** * Validates the instance. * 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 528398653f3f..5573d4a52304 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 @@ -14,10 +14,10 @@ import com.azure.resourcemanager.avs.models.IdentitySource; import com.azure.resourcemanager.avs.models.InternetEnum; import com.azure.resourcemanager.avs.models.ManagementCluster; +import com.azure.resourcemanager.avs.models.NsxPublicIpQuotaRaisedEnum; import com.azure.resourcemanager.avs.models.PrivateCloudIdentity; import com.azure.resourcemanager.avs.models.PrivateCloudProvisioningState; import com.azure.resourcemanager.avs.models.Sku; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; import java.util.Map; @@ -25,8 +25,6 @@ /** A private cloud resource. */ @Fluent public final class PrivateCloudInner extends Resource { - @JsonIgnore private final ClientLogger logger = new ClientLogger(PrivateCloudInner.class); - /* * The private cloud SKU */ @@ -45,6 +43,10 @@ public final class PrivateCloudInner extends Resource { @JsonProperty(value = "identity") private PrivateCloudIdentity identity; + /** Creates an instance of PrivateCloudInner class. */ + public PrivateCloudInner() { + } + /** * Get the sku property: The private cloud SKU. * @@ -301,6 +303,16 @@ public PrivateCloudInner withSecondaryCircuit(Circuit secondaryCircuit) { return this; } + /** + * Get the nsxPublicIpQuotaRaised property: Flag to indicate whether the private cloud has the quota for provisioned + * NSX Public IP count raised from 64 to 1024. + * + * @return the nsxPublicIpQuotaRaised value. + */ + public NsxPublicIpQuotaRaisedEnum nsxPublicIpQuotaRaised() { + return this.innerProperties() == null ? null : this.innerProperties().nsxPublicIpQuotaRaised(); + } + /** * Get the managementCluster property: The default cluster used for management. * @@ -423,7 +435,7 @@ public PrivateCloudInner withEncryption(Encryption encryption) { */ public void validate() { if (sku() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException("Missing required property sku in model PrivateCloudInner")); } else { @@ -436,4 +448,6 @@ public void validate() { identity().validate(); } } + + 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/PrivateCloudProperties.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/PrivateCloudProperties.java index f1c36abae104..5037ffbf023c 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 @@ -13,16 +13,14 @@ import com.azure.resourcemanager.avs.models.IdentitySource; import com.azure.resourcemanager.avs.models.InternetEnum; import com.azure.resourcemanager.avs.models.ManagementCluster; +import com.azure.resourcemanager.avs.models.NsxPublicIpQuotaRaisedEnum; import com.azure.resourcemanager.avs.models.PrivateCloudProvisioningState; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** The properties of a private cloud resource. */ @Fluent public final class PrivateCloudProperties extends PrivateCloudUpdateProperties { - @JsonIgnore private final ClientLogger logger = new ClientLogger(PrivateCloudProperties.class); - /* * The provisioning state */ @@ -42,10 +40,8 @@ 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; @@ -69,15 +65,13 @@ public final class PrivateCloudProperties extends PrivateCloudUpdateProperties { private String vmotionNetwork; /* - * Optionally, set the vCenter admin password when the private cloud is - * created + * 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 + * Optionally, set the NSX-T Manager password when the private cloud is created */ @JsonProperty(value = "nsxtPassword") private String nsxtPassword; @@ -101,12 +95,22 @@ 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 + */ + @JsonProperty(value = "nsxPublicIpQuotaRaised", access = JsonProperty.Access.WRITE_ONLY) + private NsxPublicIpQuotaRaisedEnum nsxPublicIpQuotaRaised; + + /** Creates an instance of PrivateCloudProperties class. */ + public PrivateCloudProperties() { + } + /** * Get the provisioningState property: The provisioning state. * @@ -285,6 +289,16 @@ public PrivateCloudProperties withSecondaryCircuit(Circuit secondaryCircuit) { return this; } + /** + * Get the nsxPublicIpQuotaRaised property: Flag to indicate whether the private cloud has the quota for provisioned + * NSX Public IP count raised from 64 to 1024. + * + * @return the nsxPublicIpQuotaRaised value. + */ + public NsxPublicIpQuotaRaisedEnum nsxPublicIpQuotaRaised() { + return this.nsxPublicIpQuotaRaised; + } + /** {@inheritDoc} */ @Override public PrivateCloudProperties withManagementCluster(ManagementCluster managementCluster) { @@ -335,7 +349,7 @@ public void validate() { endpoints().validate(); } if (networkBlock() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( "Missing required property networkBlock in model PrivateCloudProperties")); @@ -344,4 +358,6 @@ public void validate() { secondaryCircuit().validate(); } } + + private static final ClientLogger LOGGER = new ClientLogger(PrivateCloudProperties.class); } 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 cdd4b7c7a745..2e079cd8b394 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,21 +5,17 @@ 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.AvailabilityProperties; 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.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** The properties of a private cloud resource that may be updated. */ @Fluent public class PrivateCloudUpdateProperties { - @JsonIgnore private final ClientLogger logger = new ClientLogger(PrivateCloudUpdateProperties.class); - /* * The default cluster used for management */ @@ -39,8 +35,7 @@ public class PrivateCloudUpdateProperties { private List identitySources; /* - * Properties describing how the cloud is distributed across availability - * zones + * Properties describing how the cloud is distributed across availability zones */ @JsonProperty(value = "availability") private AvailabilityProperties availability; @@ -51,6 +46,10 @@ public class PrivateCloudUpdateProperties { @JsonProperty(value = "encryption") private Encryption encryption; + /** Creates an instance of PrivateCloudUpdateProperties class. */ + public PrivateCloudUpdateProperties() { + } + /** * Get the managementCluster property: The default cluster used for management. * 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 005c9374d9f3..00f004118165 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,9 +5,7 @@ package com.azure.resourcemanager.avs.fluent.models; import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.avs.models.QuotaEnabled; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.Map; @@ -15,8 +13,6 @@ /** Subscription quotas. */ @Immutable public final class QuotaInner { - @JsonIgnore private final ClientLogger logger = new ClientLogger(QuotaInner.class); - /* * Remaining hosts quota by sku type */ @@ -30,6 +26,10 @@ public final class QuotaInner { @JsonProperty(value = "quotaEnabled", access = JsonProperty.Access.WRITE_ONLY) private QuotaEnabled quotaEnabled; + /** Creates an instance of QuotaInner class. */ + public QuotaInner() { + } + /** * Get the hostsRemaining property: Remaining hosts quota by sku type. * 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 633b697c6039..4c5a09b4b7dd 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 @@ -4,25 +4,25 @@ 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.util.logging.ClientLogger; import com.azure.resourcemanager.avs.models.ScriptParameter; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** A cmdlet available for script execution. */ -@Fluent +@Immutable public final class ScriptCmdletInner extends ProxyResource { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ScriptCmdletInner.class); - /* * The properties of a script cmdlet resource */ @JsonProperty(value = "properties") private ScriptCmdletProperties innerProperties; + /** Creates an instance of ScriptCmdletInner class. */ + public ScriptCmdletInner() { + } + /** * Get the innerProperties property: The properties of a script cmdlet resource. * 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 6fbab5c6c6b2..2afbbba9fc90 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,17 +5,13 @@ package com.azure.resourcemanager.avs.fluent.models; import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.avs.models.ScriptParameter; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** Properties of a pre-canned script. */ @Immutable public final class ScriptCmdletProperties { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ScriptCmdletProperties.class); - /* * Description of the scripts functionality */ @@ -34,6 +30,10 @@ public final class ScriptCmdletProperties { @JsonProperty(value = "parameters", access = JsonProperty.Access.WRITE_ONLY) private List parameters; + /** Creates an instance of ScriptCmdletProperties class. */ + public ScriptCmdletProperties() { + } + /** * Get the description property: Description of the scripts functionality. * 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 ce5e729a0a60..763ed5ac9c45 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/ScriptExecutionInner.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/ScriptExecutionInner.java @@ -6,10 +6,8 @@ import com.azure.core.annotation.Fluent; import com.azure.core.management.ProxyResource; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.avs.models.ScriptExecutionParameter; import com.azure.resourcemanager.avs.models.ScriptExecutionProvisioningState; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.time.OffsetDateTime; import java.util.List; @@ -18,14 +16,16 @@ /** An instance of a script executed by a user - custom or AVS. */ @Fluent public final class ScriptExecutionInner extends ProxyResource { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ScriptExecutionInner.class); - /* * The properties of a script execution resource */ @JsonProperty(value = "properties") private ScriptExecutionProperties innerProperties; + /** Creates an instance of ScriptExecutionInner class. */ + public ScriptExecutionInner() { + } + /** * Get the innerProperties property: The properties of a script execution resource. * 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 ce739e8e5408..4242773e828e 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 @@ -8,7 +8,6 @@ import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.avs.models.ScriptExecutionParameter; import com.azure.resourcemanager.avs.models.ScriptExecutionProvisioningState; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import java.time.OffsetDateTime; @@ -18,11 +17,8 @@ /** Properties of a user-invoked script. */ @Fluent public final class ScriptExecutionProperties { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ScriptExecutionProperties.class); - /* - * A reference to the script cmdlet resource if user is running a AVS - * script + * A reference to the script cmdlet resource if user is running a AVS script */ @JsonProperty(value = "scriptCmdletId") private String scriptCmdletId; @@ -34,15 +30,14 @@ 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; @@ -54,8 +49,7 @@ public final class ScriptExecutionProperties { private String timeout; /* - * Time to live for the resource. If not provided, will be available for 60 - * days + * Time to live for the resource. If not provided, will be available for 60 days */ @JsonProperty(value = "retention") private String retention; @@ -115,6 +109,10 @@ public final class ScriptExecutionProperties { @JsonProperty(value = "errors", access = JsonProperty.Access.WRITE_ONLY) 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. * @@ -355,10 +353,12 @@ public void validate() { hiddenParameters().forEach(e -> e.validate()); } if (timeout() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( "Missing required property timeout in model ScriptExecutionProperties")); } } + + private static final ClientLogger LOGGER = new ClientLogger(ScriptExecutionProperties.class); } 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 85b2600ac54d..f6a2efc4fb89 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 @@ -4,23 +4,23 @@ 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.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** Script Package resources available for execution. */ -@Fluent +@Immutable public final class ScriptPackageInner extends ProxyResource { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ScriptPackageInner.class); - /* * ScriptPackage resource properties */ @JsonProperty(value = "properties") private ScriptPackageProperties innerProperties; + /** Creates an instance of ScriptPackageInner class. */ + public ScriptPackageInner() { + } + /** * Get the innerProperties property: ScriptPackage resource properties. * @@ -48,6 +48,24 @@ public String version() { return this.innerProperties() == null ? null : this.innerProperties().version(); } + /** + * Get the company property: Company that created and supports the package. + * + * @return the company value. + */ + public String company() { + return this.innerProperties() == null ? null : this.innerProperties().company(); + } + + /** + * Get the uri property: Link to support by the package vendor. + * + * @return the uri value. + */ + public String uri() { + return this.innerProperties() == null ? null : this.innerProperties().uri(); + } + /** * Validates the instance. * 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 6fac988c97f1..57f3734d7cb3 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,15 +5,11 @@ package com.azure.resourcemanager.avs.fluent.models; import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** Properties of a Script Package subresource. */ @Immutable public final class ScriptPackageProperties { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ScriptPackageProperties.class); - /* * User friendly description of the package */ @@ -26,6 +22,22 @@ public final class ScriptPackageProperties { @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; + + /** Creates an instance of ScriptPackageProperties class. */ + public ScriptPackageProperties() { + } + /** * Get the description property: User friendly description of the package. * @@ -44,6 +56,24 @@ public String version() { return this.version; } + /** + * Get the company property: Company that created and supports the package. + * + * @return the company value. + */ + public String company() { + return this.company; + } + + /** + * Get the uri property: Link to support by the package vendor. + * + * @return the uri value. + */ + public String uri() { + return this.uri; + } + /** * Validates the instance. * 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 94a14b99465b..15806ec46fd8 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,16 +5,12 @@ package com.azure.resourcemanager.avs.fluent.models; import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.avs.models.TrialStatus; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** Subscription trial availability. */ @Immutable public final class TrialInner { - @JsonIgnore private final ClientLogger logger = new ClientLogger(TrialInner.class); - /* * Trial status */ @@ -27,6 +23,10 @@ public final class TrialInner { @JsonProperty(value = "availableHosts", access = JsonProperty.Access.WRITE_ONLY) private Integer availableHosts; + /** Creates an instance of TrialInner class. */ + public TrialInner() { + } + /** * Get the status property: Trial status. * 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 42263510d3a2..9225ad47331e 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 @@ -4,24 +4,24 @@ 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.util.logging.ClientLogger; import com.azure.resourcemanager.avs.models.VirtualMachineRestrictMovementState; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** Virtual Machine. */ -@Fluent +@Immutable public final class VirtualMachineInner extends ProxyResource { - @JsonIgnore private final ClientLogger logger = new ClientLogger(VirtualMachineInner.class); - /* * Virtual machine properties. */ @JsonProperty(value = "properties") private VirtualMachineProperties innerProperties; + /** Creates an instance of VirtualMachineInner class. */ + public VirtualMachineInner() { + } + /** * Get the innerProperties property: Virtual machine properties. * 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 ca90a48f9fe2..d0d91ff27ff3 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,16 +5,12 @@ package com.azure.resourcemanager.avs.fluent.models; import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.avs.models.VirtualMachineRestrictMovementState; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** Virtual Machine Properties. */ @Immutable public final class VirtualMachineProperties { - @JsonIgnore private final ClientLogger logger = new ClientLogger(VirtualMachineProperties.class); - /* * Display name of the VM. */ @@ -28,8 +24,7 @@ public final class VirtualMachineProperties { private String moRefId; /* - * Path to virtual machine's folder starting from datacenter virtual - * machine folder + * Path to virtual machine's folder starting from datacenter virtual machine folder */ @JsonProperty(value = "folderPath", access = JsonProperty.Access.WRITE_ONLY) private String folderPath; @@ -40,6 +35,10 @@ public final class VirtualMachineProperties { @JsonProperty(value = "restrictMovement", access = JsonProperty.Access.WRITE_ONLY) private VirtualMachineRestrictMovementState restrictMovement; + /** Creates an instance of VirtualMachineProperties class. */ + public VirtualMachineProperties() { + } + /** * Get the displayName property: Display name of the VM. * 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 60e0c24d723c..a21ac6609a15 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/WorkloadNetworkDhcpInner.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/WorkloadNetworkDhcpInner.java @@ -6,22 +6,22 @@ import com.azure.core.annotation.Fluent; import com.azure.core.management.ProxyResource; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.avs.models.WorkloadNetworkDhcpEntity; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** NSX DHCP. */ @Fluent public final class WorkloadNetworkDhcpInner extends ProxyResource { - @JsonIgnore private final ClientLogger logger = new ClientLogger(WorkloadNetworkDhcpInner.class); - /* * DHCP properties. */ @JsonProperty(value = "properties") private WorkloadNetworkDhcpEntity properties; + /** Creates an instance of WorkloadNetworkDhcpInner class. */ + public WorkloadNetworkDhcpInner() { + } + /** * Get the properties property: DHCP properties. * 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 29823277410d..bc59a6f148cf 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/WorkloadNetworkDnsServiceInner.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/WorkloadNetworkDnsServiceInner.java @@ -6,25 +6,25 @@ import com.azure.core.annotation.Fluent; import com.azure.core.management.ProxyResource; -import com.azure.core.util.logging.ClientLogger; 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.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** NSX DNS Service. */ @Fluent public final class WorkloadNetworkDnsServiceInner extends ProxyResource { - @JsonIgnore private final ClientLogger logger = new ClientLogger(WorkloadNetworkDnsServiceInner.class); - /* * DNS Service properties */ @JsonProperty(value = "properties") private WorkloadNetworkDnsServiceProperties innerProperties; + /** Creates an instance of WorkloadNetworkDnsServiceInner class. */ + public WorkloadNetworkDnsServiceInner() { + } + /** * Get the innerProperties property: DNS Service properties. * 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 325546f08011..6561cce4f273 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,19 +5,15 @@ 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.DnsServiceLogLevelEnum; import com.azure.resourcemanager.avs.models.DnsServiceStatusEnum; import com.azure.resourcemanager.avs.models.WorkloadNetworkDnsServiceProvisioningState; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** NSX DNS Service Properties. */ @Fluent public final class WorkloadNetworkDnsServiceProperties { - @JsonIgnore private final ClientLogger logger = new ClientLogger(WorkloadNetworkDnsServiceProperties.class); - /* * Display name of the DNS Service. */ @@ -66,6 +62,10 @@ public final class WorkloadNetworkDnsServiceProperties { @JsonProperty(value = "revision") private Long revision; + /** Creates an instance of WorkloadNetworkDnsServiceProperties class. */ + public WorkloadNetworkDnsServiceProperties() { + } + /** * Get the displayName property: Display name of the DNS Service. * 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 0f87c0189053..ae318d163590 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/WorkloadNetworkDnsZoneInner.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/WorkloadNetworkDnsZoneInner.java @@ -6,23 +6,23 @@ import com.azure.core.annotation.Fluent; import com.azure.core.management.ProxyResource; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.avs.models.WorkloadNetworkDnsZoneProvisioningState; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** NSX DNS Zone. */ @Fluent public final class WorkloadNetworkDnsZoneInner extends ProxyResource { - @JsonIgnore private final ClientLogger logger = new ClientLogger(WorkloadNetworkDnsZoneInner.class); - /* * DNS Zone properties */ @JsonProperty(value = "properties") private WorkloadNetworkDnsZoneProperties innerProperties; + /** Creates an instance of WorkloadNetworkDnsZoneInner class. */ + public WorkloadNetworkDnsZoneInner() { + } + /** * Get the innerProperties property: DNS Zone properties. * 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 f46f24a580ec..4fe34edcf669 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,17 +5,13 @@ 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.WorkloadNetworkDnsZoneProvisioningState; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** NSX DNS Zone Properties. */ @Fluent public final class WorkloadNetworkDnsZoneProperties { - @JsonIgnore private final ClientLogger logger = new ClientLogger(WorkloadNetworkDnsZoneProperties.class); - /* * Display name of the DNS Zone. */ @@ -58,6 +54,10 @@ public final class WorkloadNetworkDnsZoneProperties { @JsonProperty(value = "revision") private Long revision; + /** Creates an instance of WorkloadNetworkDnsZoneProperties class. */ + public WorkloadNetworkDnsZoneProperties() { + } + /** * Get the displayName property: Display name of the DNS Zone. * 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 95f5de7337f4..8058d5d6ae45 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/WorkloadNetworkGatewayInner.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/WorkloadNetworkGatewayInner.java @@ -6,21 +6,21 @@ import com.azure.core.annotation.Fluent; import com.azure.core.management.ProxyResource; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** NSX Gateway. */ @Fluent public final class WorkloadNetworkGatewayInner extends ProxyResource { - @JsonIgnore private final ClientLogger logger = new ClientLogger(WorkloadNetworkGatewayInner.class); - /* * Gateway properties. */ @JsonProperty(value = "properties") private WorkloadNetworkGatewayProperties innerProperties; + /** Creates an instance of WorkloadNetworkGatewayInner class. */ + public WorkloadNetworkGatewayInner() { + } + /** * Get the innerProperties property: Gateway properties. * 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 82f5eb677dfc..de6654a61cbf 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,15 +5,11 @@ package com.azure.resourcemanager.avs.fluent.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** Properties of a NSX Gateway. */ @Fluent public final class WorkloadNetworkGatewayProperties { - @JsonIgnore private final ClientLogger logger = new ClientLogger(WorkloadNetworkGatewayProperties.class); - /* * Display name of the DHCP entity. */ @@ -26,6 +22,10 @@ public final class WorkloadNetworkGatewayProperties { @JsonProperty(value = "path", access = JsonProperty.Access.WRITE_ONLY) private String path; + /** Creates an instance of WorkloadNetworkGatewayProperties class. */ + public WorkloadNetworkGatewayProperties() { + } + /** * Get the displayName property: Display name of the DHCP entity. * 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 new file mode 100644 index 000000000000..124c2f72d258 --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/WorkloadNetworkInner.java @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.avs.fluent.models; + +import com.azure.core.annotation.Immutable; +import com.azure.core.management.ProxyResource; + +/** Workload Network. */ +@Immutable +public final class WorkloadNetworkInner extends ProxyResource { + /** Creates an instance of WorkloadNetworkInner class. */ + public WorkloadNetworkInner() { + } + + /** + * 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/WorkloadNetworkPortMirroringInner.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/WorkloadNetworkPortMirroringInner.java index d4b1887daa8d..6d2b0944985b 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/WorkloadNetworkPortMirroringInner.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/WorkloadNetworkPortMirroringInner.java @@ -6,24 +6,24 @@ import com.azure.core.annotation.Fluent; import com.azure.core.management.ProxyResource; -import com.azure.core.util.logging.ClientLogger; 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.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** NSX Port Mirroring. */ @Fluent public final class WorkloadNetworkPortMirroringInner extends ProxyResource { - @JsonIgnore private final ClientLogger logger = new ClientLogger(WorkloadNetworkPortMirroringInner.class); - /* * Port Mirroring Properties. */ @JsonProperty(value = "properties") private WorkloadNetworkPortMirroringProperties innerProperties; + /** Creates an instance of WorkloadNetworkPortMirroringInner class. */ + public WorkloadNetworkPortMirroringInner() { + } + /** * Get the innerProperties property: Port Mirroring Properties. * 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 c79c69fece30..1c200f9e0c75 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,18 +5,14 @@ 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.PortMirroringDirectionEnum; import com.azure.resourcemanager.avs.models.PortMirroringStatusEnum; import com.azure.resourcemanager.avs.models.WorkloadNetworkPortMirroringProvisioningState; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** NSX Port Mirroring Properties. */ @Fluent public final class WorkloadNetworkPortMirroringProperties { - @JsonIgnore private final ClientLogger logger = new ClientLogger(WorkloadNetworkPortMirroringProperties.class); - /* * Display name of the port mirroring profile. */ @@ -59,6 +55,10 @@ public final class WorkloadNetworkPortMirroringProperties { @JsonProperty(value = "revision") private Long revision; + /** Creates an instance of WorkloadNetworkPortMirroringProperties class. */ + public WorkloadNetworkPortMirroringProperties() { + } + /** * Get the displayName property: Display name of the port mirroring profile. * 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 6d5a40e4862d..63ae633dbfed 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/WorkloadNetworkPublicIpInner.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/WorkloadNetworkPublicIpInner.java @@ -6,22 +6,22 @@ import com.azure.core.annotation.Fluent; import com.azure.core.management.ProxyResource; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.avs.models.WorkloadNetworkPublicIpProvisioningState; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** NSX Public IP Block. */ @Fluent public final class WorkloadNetworkPublicIpInner extends ProxyResource { - @JsonIgnore private final ClientLogger logger = new ClientLogger(WorkloadNetworkPublicIpInner.class); - /* * Public IP Block properties */ @JsonProperty(value = "properties") private WorkloadNetworkPublicIpProperties innerProperties; + /** Creates an instance of WorkloadNetworkPublicIpInner class. */ + public WorkloadNetworkPublicIpInner() { + } + /** * Get the innerProperties property: Public IP Block properties. * 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 0662e290c710..eb0048ccb84d 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,16 +5,12 @@ 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.WorkloadNetworkPublicIpProvisioningState; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** NSX Public IP Block Properties. */ @Fluent public final class WorkloadNetworkPublicIpProperties { - @JsonIgnore private final ClientLogger logger = new ClientLogger(WorkloadNetworkPublicIpProperties.class); - /* * Display name of the Public IP Block. */ @@ -39,6 +35,10 @@ public final class WorkloadNetworkPublicIpProperties { @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) private WorkloadNetworkPublicIpProvisioningState provisioningState; + /** Creates an instance of WorkloadNetworkPublicIpProperties class. */ + public WorkloadNetworkPublicIpProperties() { + } + /** * Get the displayName property: Display name of the Public IP Block. * 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 aaa206ed49b7..e21afbe56383 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/WorkloadNetworkSegmentInner.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/WorkloadNetworkSegmentInner.java @@ -6,26 +6,26 @@ import com.azure.core.annotation.Fluent; import com.azure.core.management.ProxyResource; -import com.azure.core.util.logging.ClientLogger; 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.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** NSX Segment. */ @Fluent public final class WorkloadNetworkSegmentInner extends ProxyResource { - @JsonIgnore private final ClientLogger logger = new ClientLogger(WorkloadNetworkSegmentInner.class); - /* * The properties of a Workload Segment proxy resource. */ @JsonProperty(value = "properties") private WorkloadNetworkSegmentProperties innerProperties; + /** Creates an instance of WorkloadNetworkSegmentInner class. */ + public WorkloadNetworkSegmentInner() { + } + /** * Get the innerProperties property: The properties of a Workload Segment proxy resource. * 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 3da4c29c0eb9..56f1eff1540d 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,20 +5,16 @@ 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.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.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** NSX Segment Properties. */ @Fluent public final class WorkloadNetworkSegmentProperties { - @JsonIgnore private final ClientLogger logger = new ClientLogger(WorkloadNetworkSegmentProperties.class); - /* * Display name of the segment. */ @@ -61,6 +57,10 @@ public final class WorkloadNetworkSegmentProperties { @JsonProperty(value = "revision") private Long revision; + /** Creates an instance of WorkloadNetworkSegmentProperties class. */ + public WorkloadNetworkSegmentProperties() { + } + /** * Get the displayName property: Display name of the segment. * 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 18c4dcda2e0b..80738f36409a 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/WorkloadNetworkVMGroupInner.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/WorkloadNetworkVMGroupInner.java @@ -6,24 +6,24 @@ import com.azure.core.annotation.Fluent; import com.azure.core.management.ProxyResource; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.avs.models.VMGroupStatusEnum; import com.azure.resourcemanager.avs.models.WorkloadNetworkVMGroupProvisioningState; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** NSX VM Group. */ @Fluent public final class WorkloadNetworkVMGroupInner extends ProxyResource { - @JsonIgnore private final ClientLogger logger = new ClientLogger(WorkloadNetworkVMGroupInner.class); - /* * VM Group properties. */ @JsonProperty(value = "properties") private WorkloadNetworkVMGroupProperties innerProperties; + /** Creates an instance of WorkloadNetworkVMGroupInner class. */ + public WorkloadNetworkVMGroupInner() { + } + /** * Get the innerProperties property: VM Group properties. * 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 73fef200e39e..9fa3a5c50ceb 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,18 +5,14 @@ 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.VMGroupStatusEnum; import com.azure.resourcemanager.avs.models.WorkloadNetworkVMGroupProvisioningState; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** NSX VM Group Properties. */ @Fluent public final class WorkloadNetworkVMGroupProperties { - @JsonIgnore private final ClientLogger logger = new ClientLogger(WorkloadNetworkVMGroupProperties.class); - /* * Display name of the VM group. */ @@ -47,6 +43,10 @@ public final class WorkloadNetworkVMGroupProperties { @JsonProperty(value = "revision") private Long revision; + /** Creates an instance of WorkloadNetworkVMGroupProperties class. */ + public WorkloadNetworkVMGroupProperties() { + } + /** * Get the displayName property: Display name of the VM group. * 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 3665e0260e86..64345cd8fe86 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/WorkloadNetworkVirtualMachineInner.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/WorkloadNetworkVirtualMachineInner.java @@ -6,22 +6,22 @@ import com.azure.core.annotation.Fluent; import com.azure.core.management.ProxyResource; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.avs.models.VMTypeEnum; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** NSX Virtual Machine. */ @Fluent public final class WorkloadNetworkVirtualMachineInner extends ProxyResource { - @JsonIgnore private final ClientLogger logger = new ClientLogger(WorkloadNetworkVirtualMachineInner.class); - /* * Virtual machine properties. */ @JsonProperty(value = "properties") private WorkloadNetworkVirtualMachineProperties innerProperties; + /** Creates an instance of WorkloadNetworkVirtualMachineInner class. */ + public WorkloadNetworkVirtualMachineInner() { + } + /** * Get the innerProperties property: Virtual machine properties. * 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 80a1b7a0d684..b465ca3e4116 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,16 +5,12 @@ 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.VMTypeEnum; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** NSX Virtual Machine Properties. */ @Fluent public final class WorkloadNetworkVirtualMachineProperties { - @JsonIgnore private final ClientLogger logger = new ClientLogger(WorkloadNetworkVirtualMachineProperties.class); - /* * Display name of the VM. */ @@ -27,6 +23,10 @@ public final class WorkloadNetworkVirtualMachineProperties { @JsonProperty(value = "vmType", access = JsonProperty.Access.WRITE_ONLY) private VMTypeEnum vmType; + /** Creates an instance of WorkloadNetworkVirtualMachineProperties class. */ + public WorkloadNetworkVirtualMachineProperties() { + } + /** * Get the displayName property: Display name of the VM. * 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 fa3fbc5a6658..c5a445f43318 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 @@ -30,6 +30,10 @@ public AddonProperties properties() { return this.innerModel().properties(); } + public String resourceGroupName() { + return resourceGroupName; + } + public AddonInner innerModel() { return this.innerObject; } 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 4d5a8484fafb..786ddda6ec98 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 @@ -29,7 +29,6 @@ import com.azure.core.management.polling.PollResult; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; -import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.avs.fluent.AddonsClient; @@ -41,8 +40,6 @@ /** An instance of this class provides access to all the operations defined in AddonsClient. */ public final class AddonsClientImpl implements AddonsClient { - private final ClientLogger logger = new ClientLogger(AddonsClientImpl.class); - /** The proxy service used to perform REST calls. */ private final AddonsService service; @@ -149,7 +146,7 @@ Mono> listNext( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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. + * @return a paged list of addons along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync(String resourceGroupName, String privateCloudName) { @@ -207,7 +204,7 @@ private Mono> listSinglePageAsync(String resourceGroup * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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. + * @return a paged list of addons along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync( @@ -262,7 +259,7 @@ private Mono> listSinglePageAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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. + * @return a paged list of addons as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(String resourceGroupName, String privateCloudName) { @@ -280,7 +277,7 @@ private PagedFlux listAsync(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 paged list of addons. + * @return a paged list of addons as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(String resourceGroupName, String privateCloudName, Context context) { @@ -297,7 +294,7 @@ private PagedFlux listAsync(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 paged list of addons. + * @return a paged list of addons as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(String resourceGroupName, String privateCloudName) { @@ -313,7 +310,7 @@ public PagedIterable list(String resourceGroupName, String privateCl * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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. + * @return a paged list of addons as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(String resourceGroupName, String privateCloudName, Context context) { @@ -329,7 +326,7 @@ public PagedIterable list(String resourceGroupName, String privateCl * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 an addon by name in a private cloud along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync( @@ -384,7 +381,7 @@ private Mono> getWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 an addon by name in a private cloud along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync( @@ -435,19 +432,12 @@ private Mono> getWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 an addon by name in a private cloud on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono getAsync(String resourceGroupName, String privateCloudName, String addonName) { return getWithResponseAsync(resourceGroupName, privateCloudName, addonName) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** @@ -456,14 +446,16 @@ private Mono getAsync(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 addonName Name of the addon for the private cloud. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 an addon by name in a private cloud along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public AddonInner get(String resourceGroupName, String privateCloudName, String addonName) { - return getAsync(resourceGroupName, privateCloudName, addonName).block(); + public Response getWithResponse( + String resourceGroupName, String privateCloudName, String addonName, Context context) { + return getWithResponseAsync(resourceGroupName, privateCloudName, addonName, context).block(); } /** @@ -472,16 +464,14 @@ public AddonInner get(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 addonName Name of the addon for the private cloud. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, String privateCloudName, String addonName, Context context) { - return getWithResponseAsync(resourceGroupName, privateCloudName, addonName, context).block(); + public AddonInner get(String resourceGroupName, String privateCloudName, String addonName) { + return getWithResponse(resourceGroupName, privateCloudName, addonName, Context.NONE).getValue(); } /** @@ -494,7 +484,7 @@ public Response getWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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. + * @return an addon resource along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> createOrUpdateWithResponseAsync( @@ -556,7 +546,7 @@ private Mono>> createOrUpdateWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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. + * @return an addon resource along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> createOrUpdateWithResponseAsync( @@ -614,7 +604,7 @@ private Mono>> createOrUpdateWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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. + * @return the {@link PollerFlux} for polling of an addon resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, AddonInner> beginCreateOrUpdateAsync( @@ -624,7 +614,7 @@ private PollerFlux, AddonInner> beginCreateOrUpdateAsync( return this .client .getLroResult( - mono, this.client.getHttpPipeline(), AddonInner.class, AddonInner.class, Context.NONE); + mono, this.client.getHttpPipeline(), AddonInner.class, AddonInner.class, this.client.getContext()); } /** @@ -638,7 +628,7 @@ private PollerFlux, AddonInner> beginCreateOrUpdateAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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. + * @return the {@link PollerFlux} for polling of an addon resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, AddonInner> beginCreateOrUpdateAsync( @@ -662,7 +652,7 @@ private PollerFlux, AddonInner> beginCreateOrUpdateAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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. + * @return the {@link SyncPoller} for polling of an addon resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, AddonInner> beginCreateOrUpdate( @@ -681,7 +671,7 @@ public SyncPoller, AddonInner> beginCreateOrUpdate( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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. + * @return the {@link SyncPoller} for polling of an addon resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, AddonInner> beginCreateOrUpdate( @@ -699,7 +689,7 @@ public SyncPoller, AddonInner> beginCreateOrUpdate( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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. + * @return an addon resource on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono createOrUpdateAsync( @@ -720,7 +710,7 @@ private Mono createOrUpdateAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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. + * @return an addon resource on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono createOrUpdateAsync( @@ -776,7 +766,7 @@ public AddonInner createOrUpdate( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> deleteWithResponseAsync( @@ -831,7 +821,7 @@ private Mono>> deleteWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> deleteWithResponseAsync( @@ -882,7 +872,7 @@ private Mono>> deleteWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginDeleteAsync( @@ -890,7 +880,8 @@ private PollerFlux, Void> beginDeleteAsync( Mono>> mono = deleteWithResponseAsync(resourceGroupName, privateCloudName, addonName); return this .client - .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, Context.NONE); + .getLroResult( + mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); } /** @@ -903,7 +894,7 @@ private PollerFlux, Void> beginDeleteAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginDeleteAsync( @@ -925,7 +916,7 @@ private PollerFlux, Void> beginDeleteAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete( @@ -943,7 +934,7 @@ public SyncPoller, Void> beginDelete( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete( @@ -960,7 +951,7 @@ public SyncPoller, Void> beginDelete( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @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) { @@ -979,7 +970,7 @@ private Mono deleteAsync(String resourceGroupName, String privateCloudName * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono deleteAsync( @@ -1023,11 +1014,12 @@ public void delete(String resourceGroupName, String privateCloudName, String add /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @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 paged list of addons. + * @return a paged list of addons along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink) { @@ -1058,12 +1050,13 @@ private Mono> listNextSinglePageAsync(String nextLink) /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @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 paged list of addons. + * @return a paged list of addons along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink, Context context) { 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 abdae483097d..e1067d0eac3a 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 @@ -13,10 +13,9 @@ import com.azure.resourcemanager.avs.fluent.models.AddonInner; import com.azure.resourcemanager.avs.models.Addon; import com.azure.resourcemanager.avs.models.Addons; -import com.fasterxml.jackson.annotation.JsonIgnore; public final class AddonsImpl implements Addons { - @JsonIgnore private final ClientLogger logger = new ClientLogger(AddonsImpl.class); + private static final ClientLogger LOGGER = new ClientLogger(AddonsImpl.class); private final AddonsClient innerClient; @@ -37,15 +36,6 @@ public PagedIterable list(String resourceGroupName, String privateCloudNa return Utils.mapPage(inner, inner1 -> new AddonImpl(inner1, this.manager())); } - public Addon get(String resourceGroupName, String privateCloudName, String addonName) { - AddonInner inner = this.serviceClient().get(resourceGroupName, privateCloudName, addonName); - if (inner != null) { - return new AddonImpl(inner, this.manager()); - } else { - return null; - } - } - public Response getWithResponse( String resourceGroupName, String privateCloudName, String addonName, Context context) { Response inner = @@ -61,6 +51,15 @@ public Response getWithResponse( } } + public Addon get(String resourceGroupName, String privateCloudName, String addonName) { + AddonInner inner = this.serviceClient().get(resourceGroupName, privateCloudName, addonName); + if (inner != null) { + return new AddonImpl(inner, this.manager()); + } else { + return null; + } + } + public void delete(String resourceGroupName, String privateCloudName, String addonName) { this.serviceClient().delete(resourceGroupName, privateCloudName, addonName); } @@ -72,7 +71,7 @@ public void delete(String resourceGroupName, String privateCloudName, String add public Addon getById(String id) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -80,14 +79,14 @@ public Addon getById(String id) { } String privateCloudName = Utils.getValueFromIdByName(id, "privateClouds"); if (privateCloudName == null) { - throw logger + 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"); if (addonName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'addons'.", id))); @@ -98,7 +97,7 @@ public Addon getById(String id) { public Response getByIdWithResponse(String id, Context context) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -106,14 +105,14 @@ public Response getByIdWithResponse(String id, Context context) { } String privateCloudName = Utils.getValueFromIdByName(id, "privateClouds"); if (privateCloudName == null) { - throw logger + 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"); if (addonName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'addons'.", id))); @@ -124,7 +123,7 @@ public Response getByIdWithResponse(String id, Context context) { public void deleteById(String id) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -132,14 +131,14 @@ public void deleteById(String id) { } String privateCloudName = Utils.getValueFromIdByName(id, "privateClouds"); if (privateCloudName == null) { - throw logger + 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"); if (addonName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'addons'.", id))); @@ -150,7 +149,7 @@ public void deleteById(String id) { public void deleteByIdWithResponse(String id, Context context) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -158,14 +157,14 @@ public void deleteByIdWithResponse(String id, Context context) { } String privateCloudName = Utils.getValueFromIdByName(id, "privateClouds"); if (privateCloudName == null) { - throw logger + 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"); if (addonName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'addons'.", id))); 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 978b61f253b4..f514c8dd969a 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 @@ -29,7 +29,6 @@ import com.azure.core.management.polling.PollResult; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; -import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.avs.fluent.AuthorizationsClient; @@ -41,8 +40,6 @@ /** An instance of this class provides access to all the operations defined in AuthorizationsClient. */ public final class AuthorizationsClientImpl implements AuthorizationsClient { - private final ClientLogger logger = new ClientLogger(AuthorizationsClientImpl.class); - /** The proxy service used to perform REST calls. */ private final AuthorizationsService service; @@ -150,7 +147,8 @@ Mono> listNext( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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. + * @return a paged list of ExpressRoute Circuit Authorizations along with {@link PagedResponse} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync( @@ -209,7 +207,8 @@ private Mono> listSinglePageAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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. + * @return a paged list of ExpressRoute Circuit Authorizations along with {@link PagedResponse} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync( @@ -264,7 +263,7 @@ private Mono> listSinglePageAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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. + * @return a paged list of ExpressRoute Circuit Authorizations as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(String resourceGroupName, String privateCloudName) { @@ -282,7 +281,7 @@ private PagedFlux listAsync(String resourceGroup * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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. + * @return a paged list of ExpressRoute Circuit Authorizations as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync( @@ -300,7 +299,7 @@ private PagedFlux listAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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. + * @return a paged list of ExpressRoute Circuit Authorizations as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(String resourceGroupName, String privateCloudName) { @@ -316,7 +315,7 @@ public PagedIterable list(String resourceGroupNa * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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. + * @return a paged list of ExpressRoute Circuit Authorizations as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list( @@ -333,7 +332,8 @@ public PagedIterable list( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 an ExpressRoute Circuit Authorization by name in a private cloud along with {@link Response} on + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync( @@ -389,7 +389,8 @@ private Mono> getWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 an ExpressRoute Circuit Authorization by name in a private cloud along with {@link Response} on + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync( @@ -441,20 +442,14 @@ private Mono> getWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 an ExpressRoute Circuit Authorization by name in a private cloud on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono getAsync( String resourceGroupName, String privateCloudName, String authorizationName) { return getWithResponseAsync(resourceGroupName, privateCloudName, authorizationName) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** @@ -463,15 +458,16 @@ private Mono getAsync( * @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 context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 an ExpressRoute Circuit Authorization by name in a private cloud along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ExpressRouteAuthorizationInner get( - String resourceGroupName, String privateCloudName, String authorizationName) { - return getAsync(resourceGroupName, privateCloudName, authorizationName).block(); + public Response getWithResponse( + String resourceGroupName, String privateCloudName, String authorizationName, Context context) { + return getWithResponseAsync(resourceGroupName, privateCloudName, authorizationName, context).block(); } /** @@ -480,16 +476,15 @@ public ExpressRouteAuthorizationInner get( * @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 context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, String privateCloudName, String authorizationName, Context context) { - return getWithResponseAsync(resourceGroupName, privateCloudName, authorizationName, context).block(); + public ExpressRouteAuthorizationInner get( + String resourceGroupName, String privateCloudName, String authorizationName) { + return getWithResponse(resourceGroupName, privateCloudName, authorizationName, Context.NONE).getValue(); } /** @@ -502,7 +497,7 @@ public Response getWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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. + * @return expressRoute Circuit Authorization along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> createOrUpdateWithResponseAsync( @@ -568,7 +563,7 @@ private Mono>> createOrUpdateWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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. + * @return expressRoute Circuit Authorization along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> createOrUpdateWithResponseAsync( @@ -631,7 +626,7 @@ private Mono>> createOrUpdateWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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. + * @return the {@link PollerFlux} for polling of expressRoute Circuit Authorization. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, ExpressRouteAuthorizationInner> @@ -649,7 +644,7 @@ private Mono>> createOrUpdateWithResponseAsync( this.client.getHttpPipeline(), ExpressRouteAuthorizationInner.class, ExpressRouteAuthorizationInner.class, - Context.NONE); + this.client.getContext()); } /** @@ -663,7 +658,7 @@ private Mono>> createOrUpdateWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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. + * @return the {@link PollerFlux} for polling of expressRoute Circuit Authorization. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, ExpressRouteAuthorizationInner> @@ -697,7 +692,7 @@ private Mono>> createOrUpdateWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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. + * @return the {@link SyncPoller} for polling of expressRoute Circuit Authorization. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, ExpressRouteAuthorizationInner> beginCreateOrUpdate( @@ -720,7 +715,7 @@ public SyncPoller, ExpressRouteAuthor * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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. + * @return the {@link SyncPoller} for polling of expressRoute Circuit Authorization. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, ExpressRouteAuthorizationInner> beginCreateOrUpdate( @@ -743,7 +738,7 @@ public SyncPoller, ExpressRouteAuthor * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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. + * @return expressRoute Circuit Authorization on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono createOrUpdateAsync( @@ -767,7 +762,7 @@ private Mono createOrUpdateAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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. + * @return expressRoute Circuit Authorization on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono createOrUpdateAsync( @@ -835,7 +830,7 @@ public ExpressRouteAuthorizationInner createOrUpdate( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> deleteWithResponseAsync( @@ -891,7 +886,7 @@ private Mono>> deleteWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> deleteWithResponseAsync( @@ -943,7 +938,7 @@ private Mono>> deleteWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginDeleteAsync( @@ -952,7 +947,8 @@ private PollerFlux, Void> beginDeleteAsync( deleteWithResponseAsync(resourceGroupName, privateCloudName, authorizationName); return this .client - .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, Context.NONE); + .getLroResult( + mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); } /** @@ -965,7 +961,7 @@ private PollerFlux, Void> beginDeleteAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginDeleteAsync( @@ -987,7 +983,7 @@ private PollerFlux, Void> beginDeleteAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete( @@ -1005,7 +1001,7 @@ public SyncPoller, Void> beginDelete( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete( @@ -1022,7 +1018,7 @@ public SyncPoller, Void> beginDelete( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @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) { @@ -1041,7 +1037,7 @@ private Mono deleteAsync(String resourceGroupName, String privateCloudName * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono deleteAsync( @@ -1085,11 +1081,13 @@ public void delete(String resourceGroupName, String privateCloudName, String aut /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @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 paged list of ExpressRoute Circuit Authorizations. + * @return a paged list of ExpressRoute Circuit Authorizations along with {@link PagedResponse} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink) { @@ -1120,12 +1118,14 @@ private Mono> listNextSinglePageAs /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @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 paged list of ExpressRoute Circuit Authorizations. + * @return a paged list of ExpressRoute Circuit Authorizations along with {@link PagedResponse} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync( 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 7dc3f9a4df18..5d117bfbdd20 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 @@ -13,10 +13,9 @@ import com.azure.resourcemanager.avs.fluent.models.ExpressRouteAuthorizationInner; import com.azure.resourcemanager.avs.models.Authorizations; import com.azure.resourcemanager.avs.models.ExpressRouteAuthorization; -import com.fasterxml.jackson.annotation.JsonIgnore; public final class AuthorizationsImpl implements Authorizations { - @JsonIgnore private final ClientLogger logger = new ClientLogger(AuthorizationsImpl.class); + private static final ClientLogger LOGGER = new ClientLogger(AuthorizationsImpl.class); private final AuthorizationsClient innerClient; @@ -41,16 +40,6 @@ public PagedIterable list( return Utils.mapPage(inner, inner1 -> new ExpressRouteAuthorizationImpl(inner1, this.manager())); } - public ExpressRouteAuthorization get(String resourceGroupName, String privateCloudName, String authorizationName) { - ExpressRouteAuthorizationInner inner = - this.serviceClient().get(resourceGroupName, privateCloudName, authorizationName); - if (inner != null) { - return new ExpressRouteAuthorizationImpl(inner, this.manager()); - } else { - return null; - } - } - public Response getWithResponse( String resourceGroupName, String privateCloudName, String authorizationName, Context context) { Response inner = @@ -66,6 +55,16 @@ public Response getWithResponse( } } + public ExpressRouteAuthorization get(String resourceGroupName, String privateCloudName, String authorizationName) { + ExpressRouteAuthorizationInner inner = + this.serviceClient().get(resourceGroupName, privateCloudName, authorizationName); + if (inner != null) { + return new ExpressRouteAuthorizationImpl(inner, this.manager()); + } else { + return null; + } + } + public void delete(String resourceGroupName, String privateCloudName, String authorizationName) { this.serviceClient().delete(resourceGroupName, privateCloudName, authorizationName); } @@ -77,7 +76,7 @@ public void delete(String resourceGroupName, String privateCloudName, String aut public ExpressRouteAuthorization getById(String id) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -85,14 +84,14 @@ public ExpressRouteAuthorization getById(String id) { } String privateCloudName = Utils.getValueFromIdByName(id, "privateClouds"); if (privateCloudName == null) { - throw logger + 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"); if (authorizationName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -104,7 +103,7 @@ public ExpressRouteAuthorization getById(String id) { public Response getByIdWithResponse(String id, Context context) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -112,14 +111,14 @@ public Response getByIdWithResponse(String id, Contex } String privateCloudName = Utils.getValueFromIdByName(id, "privateClouds"); if (privateCloudName == null) { - throw logger + 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"); if (authorizationName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -131,7 +130,7 @@ public Response getByIdWithResponse(String id, Contex public void deleteById(String id) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -139,14 +138,14 @@ public void deleteById(String id) { } String privateCloudName = Utils.getValueFromIdByName(id, "privateClouds"); if (privateCloudName == null) { - throw logger + 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"); if (authorizationName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -158,7 +157,7 @@ public void deleteById(String id) { public void deleteByIdWithResponse(String id, Context context) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -166,14 +165,14 @@ public void deleteByIdWithResponse(String id, Context context) { } String privateCloudName = Utils.getValueFromIdByName(id, "privateClouds"); if (privateCloudName == null) { - throw logger + 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"); if (authorizationName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String 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 e2270131fdb9..de60ad25db31 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 @@ -7,7 +7,6 @@ import com.azure.core.annotation.ServiceClientBuilder; import com.azure.core.http.HttpPipeline; import com.azure.core.http.HttpPipelineBuilder; -import com.azure.core.http.policy.CookiePolicy; import com.azure.core.http.policy.RetryPolicy; import com.azure.core.http.policy.UserAgentPolicy; import com.azure.core.management.AzureEnvironment; @@ -67,34 +66,34 @@ public AvsClientBuilder environment(AzureEnvironment environment) { } /* - * The default poll interval for long-running operation + * The HTTP pipeline to send requests through */ - private Duration defaultPollInterval; + private HttpPipeline pipeline; /** - * Sets The default poll interval for long-running operation. + * Sets The HTTP pipeline to send requests through. * - * @param defaultPollInterval the defaultPollInterval value. + * @param pipeline the pipeline value. * @return the AvsClientBuilder. */ - public AvsClientBuilder defaultPollInterval(Duration defaultPollInterval) { - this.defaultPollInterval = defaultPollInterval; + public AvsClientBuilder pipeline(HttpPipeline pipeline) { + this.pipeline = pipeline; return this; } /* - * The HTTP pipeline to send requests through + * The default poll interval for long-running operation */ - private HttpPipeline pipeline; + private Duration defaultPollInterval; /** - * Sets The HTTP pipeline to send requests through. + * Sets The default poll interval for long-running operation. * - * @param pipeline the pipeline value. + * @param defaultPollInterval the defaultPollInterval value. * @return the AvsClientBuilder. */ - public AvsClientBuilder pipeline(HttpPipeline pipeline) { - this.pipeline = pipeline; + public AvsClientBuilder defaultPollInterval(Duration defaultPollInterval) { + this.defaultPollInterval = defaultPollInterval; return this; } @@ -120,26 +119,26 @@ public AvsClientBuilder serializerAdapter(SerializerAdapter serializerAdapter) { * @return an instance of AvsClientImpl. */ public AvsClientImpl buildClient() { - if (endpoint == null) { - this.endpoint = "https://management.azure.com"; - } - if (environment == null) { - this.environment = AzureEnvironment.AZURE; - } - if (defaultPollInterval == null) { - this.defaultPollInterval = Duration.ofSeconds(30); - } - if (pipeline == null) { - this.pipeline = - new HttpPipelineBuilder() - .policies(new UserAgentPolicy(), new RetryPolicy(), new CookiePolicy()) - .build(); - } - if (serializerAdapter == null) { - this.serializerAdapter = SerializerFactory.createDefaultManagementSerializerAdapter(); - } + String localEndpoint = (endpoint != null) ? endpoint : "https://management.azure.com"; + AzureEnvironment localEnvironment = (environment != null) ? environment : AzureEnvironment.AZURE; + HttpPipeline localPipeline = + (pipeline != null) + ? pipeline + : new HttpPipelineBuilder().policies(new UserAgentPolicy(), new RetryPolicy()).build(); + Duration localDefaultPollInterval = + (defaultPollInterval != null) ? defaultPollInterval : Duration.ofSeconds(30); + SerializerAdapter localSerializerAdapter = + (serializerAdapter != null) + ? serializerAdapter + : SerializerFactory.createDefaultManagementSerializerAdapter(); AvsClientImpl client = - new AvsClientImpl(pipeline, serializerAdapter, defaultPollInterval, environment, subscriptionId, endpoint); + new AvsClientImpl( + localPipeline, + localSerializerAdapter, + localDefaultPollInterval, + localEnvironment, + subscriptionId, + localEndpoint); return client; } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/AvsClientImpl.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/AvsClientImpl.java index a9d0a9286972..03a9654af6c8 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 @@ -15,6 +15,7 @@ import com.azure.core.management.polling.PollResult; import com.azure.core.management.polling.PollerFactory; import com.azure.core.util.Context; +import com.azure.core.util.CoreUtils; import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.polling.AsyncPollResponse; import com.azure.core.util.polling.LongRunningOperationStatus; @@ -44,15 +45,12 @@ import java.nio.charset.Charset; import java.nio.charset.StandardCharsets; import java.time.Duration; -import java.util.Map; 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 { - private final ClientLogger logger = new ClientLogger(AvsClientImpl.class); - /** The ID of the target subscription. */ private final String subscriptionId; @@ -339,7 +337,7 @@ public ScriptExecutionsClient getScriptExecutions() { this.defaultPollInterval = defaultPollInterval; this.subscriptionId = subscriptionId; this.endpoint = endpoint; - this.apiVersion = "2021-12-01"; + this.apiVersion = "2022-05-01"; this.operations = new OperationsClientImpl(this); this.locations = new LocationsClientImpl(this); this.privateClouds = new PrivateCloudsClientImpl(this); @@ -374,10 +372,7 @@ public Context getContext() { * @return the merged context. */ public Context mergeContext(Context context) { - for (Map.Entry entry : this.getContext().getValues().entrySet()) { - context = context.addData(entry.getKey(), entry.getValue()); - } - return context; + return CoreUtils.mergeContexts(this.getContext(), context); } /** @@ -441,7 +436,7 @@ public Mono getLroFinalResultOrError(AsyncPollResponse, managementError = null; } } catch (IOException | RuntimeException ioe) { - logger.logThrowableAsWarning(ioe); + LOGGER.logThrowableAsWarning(ioe); } } } else { @@ -500,4 +495,6 @@ public Mono getBodyAsString(Charset charset) { return Mono.just(new String(responseBody, charset)); } } + + 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 04aadc494ec6..7a84a06180cf 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 @@ -34,6 +34,10 @@ public String linkedCloud() { return this.innerModel().linkedCloud(); } + public String resourceGroupName() { + return resourceGroupName; + } + public CloudLinkInner innerModel() { return this.innerObject; } 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 9e366bf64c2c..1725a47f015b 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 @@ -29,7 +29,6 @@ import com.azure.core.management.polling.PollResult; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; -import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.avs.fluent.CloudLinksClient; @@ -41,8 +40,6 @@ /** An instance of this class provides access to all the operations defined in CloudLinksClient. */ public final class CloudLinksClientImpl implements CloudLinksClient { - private final ClientLogger logger = new ClientLogger(CloudLinksClientImpl.class); - /** The proxy service used to perform REST calls. */ private final CloudLinksService service; @@ -150,7 +147,7 @@ Mono> listNext( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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. + * @return a paged list of cloud links along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync(String resourceGroupName, String privateCloudName) { @@ -208,7 +205,7 @@ private Mono> listSinglePageAsync(String resourceG * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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. + * @return a paged list of cloud links along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync( @@ -263,7 +260,7 @@ private Mono> listSinglePageAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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. + * @return a paged list of cloud links as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(String resourceGroupName, String privateCloudName) { @@ -281,7 +278,7 @@ private PagedFlux listAsync(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 paged list of cloud links. + * @return a paged list of cloud links as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(String resourceGroupName, String privateCloudName, Context context) { @@ -298,7 +295,7 @@ private PagedFlux listAsync(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 paged list of cloud links. + * @return a paged list of cloud links as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(String resourceGroupName, String privateCloudName) { @@ -314,7 +311,7 @@ public PagedIterable list(String resourceGroupName, String priva * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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. + * @return a paged list of cloud links as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(String resourceGroupName, String privateCloudName, Context context) { @@ -330,7 +327,8 @@ public PagedIterable list(String resourceGroupName, String priva * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 an cloud link by name in a private cloud along with {@link Response} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync( @@ -385,7 +383,8 @@ private Mono> getWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 an cloud link by name in a private cloud along with {@link Response} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync( @@ -436,19 +435,12 @@ private Mono> getWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 an cloud link by name in a private cloud on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono getAsync(String resourceGroupName, String privateCloudName, String cloudLinkName) { return getWithResponseAsync(resourceGroupName, privateCloudName, cloudLinkName) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** @@ -457,14 +449,16 @@ 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 cloudLinkName Name of the cloud link 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. - * @return an cloud link by name in a private cloud. + * @return an cloud link by name in a private cloud along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public CloudLinkInner get(String resourceGroupName, String privateCloudName, String cloudLinkName) { - return getAsync(resourceGroupName, privateCloudName, cloudLinkName).block(); + public Response getWithResponse( + String resourceGroupName, String privateCloudName, String cloudLinkName, Context context) { + return getWithResponseAsync(resourceGroupName, privateCloudName, cloudLinkName, context).block(); } /** @@ -473,16 +467,14 @@ public CloudLinkInner 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 cloudLinkName Name of the cloud link 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. * @return an cloud link by name in a private cloud. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, String privateCloudName, String cloudLinkName, Context context) { - return getWithResponseAsync(resourceGroupName, privateCloudName, cloudLinkName, context).block(); + public CloudLinkInner get(String resourceGroupName, String privateCloudName, String cloudLinkName) { + return getWithResponse(resourceGroupName, privateCloudName, cloudLinkName, Context.NONE).getValue(); } /** @@ -495,7 +487,7 @@ public Response getWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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. + * @return a cloud link resource along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> createOrUpdateWithResponseAsync( @@ -557,7 +549,7 @@ private Mono>> createOrUpdateWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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. + * @return a cloud link resource along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> createOrUpdateWithResponseAsync( @@ -619,7 +611,7 @@ private Mono>> createOrUpdateWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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. + * @return the {@link PollerFlux} for polling of a cloud link resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, CloudLinkInner> beginCreateOrUpdateAsync( @@ -629,7 +621,11 @@ private PollerFlux, CloudLinkInner> beginCreateOrUpda return this .client .getLroResult( - mono, this.client.getHttpPipeline(), CloudLinkInner.class, CloudLinkInner.class, Context.NONE); + mono, + this.client.getHttpPipeline(), + CloudLinkInner.class, + CloudLinkInner.class, + this.client.getContext()); } /** @@ -643,7 +639,7 @@ private PollerFlux, CloudLinkInner> beginCreateOrUpda * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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. + * @return the {@link PollerFlux} for polling of a cloud link resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, CloudLinkInner> beginCreateOrUpdateAsync( @@ -671,7 +667,7 @@ private PollerFlux, CloudLinkInner> beginCreateOrUpda * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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. + * @return the {@link SyncPoller} for polling of a cloud link resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, CloudLinkInner> beginCreateOrUpdate( @@ -690,7 +686,7 @@ public SyncPoller, CloudLinkInner> beginCreateOrUpdat * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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. + * @return the {@link SyncPoller} for polling of a cloud link resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, CloudLinkInner> beginCreateOrUpdate( @@ -713,7 +709,7 @@ public SyncPoller, CloudLinkInner> beginCreateOrUpdat * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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. + * @return a cloud link resource on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono createOrUpdateAsync( @@ -734,7 +730,7 @@ private Mono createOrUpdateAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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. + * @return a cloud link resource on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono createOrUpdateAsync( @@ -798,7 +794,7 @@ public CloudLinkInner createOrUpdate( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> deleteWithResponseAsync( @@ -853,7 +849,7 @@ private Mono>> deleteWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> deleteWithResponseAsync( @@ -904,7 +900,7 @@ private Mono>> deleteWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginDeleteAsync( @@ -913,7 +909,8 @@ private PollerFlux, Void> beginDeleteAsync( deleteWithResponseAsync(resourceGroupName, privateCloudName, cloudLinkName); return this .client - .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, Context.NONE); + .getLroResult( + mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); } /** @@ -926,7 +923,7 @@ private PollerFlux, Void> beginDeleteAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginDeleteAsync( @@ -948,7 +945,7 @@ private PollerFlux, Void> beginDeleteAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete( @@ -966,7 +963,7 @@ public SyncPoller, Void> beginDelete( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete( @@ -983,7 +980,7 @@ public SyncPoller, Void> beginDelete( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @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) { @@ -1002,7 +999,7 @@ private Mono deleteAsync(String resourceGroupName, String privateCloudName * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono deleteAsync( @@ -1046,11 +1043,12 @@ public void delete(String resourceGroupName, String privateCloudName, String clo /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @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 paged list of cloud links. + * @return a paged list of cloud links along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink) { @@ -1081,12 +1079,13 @@ private Mono> listNextSinglePageAsync(String nextL /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @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 paged list of cloud links. + * @return a paged list of cloud links along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink, Context context) { 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 bf4cbf3ee8fa..15419933382e 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 @@ -13,10 +13,9 @@ import com.azure.resourcemanager.avs.fluent.models.CloudLinkInner; import com.azure.resourcemanager.avs.models.CloudLink; import com.azure.resourcemanager.avs.models.CloudLinks; -import com.fasterxml.jackson.annotation.JsonIgnore; public final class CloudLinksImpl implements CloudLinks { - @JsonIgnore private final ClientLogger logger = new ClientLogger(CloudLinksImpl.class); + private static final ClientLogger LOGGER = new ClientLogger(CloudLinksImpl.class); private final CloudLinksClient innerClient; @@ -37,15 +36,6 @@ public PagedIterable list(String resourceGroupName, String privateClo return Utils.mapPage(inner, inner1 -> new CloudLinkImpl(inner1, this.manager())); } - public CloudLink get(String resourceGroupName, String privateCloudName, String cloudLinkName) { - CloudLinkInner inner = this.serviceClient().get(resourceGroupName, privateCloudName, cloudLinkName); - if (inner != null) { - return new CloudLinkImpl(inner, this.manager()); - } else { - return null; - } - } - public Response getWithResponse( String resourceGroupName, String privateCloudName, String cloudLinkName, Context context) { Response inner = @@ -61,6 +51,15 @@ public Response getWithResponse( } } + public CloudLink get(String resourceGroupName, String privateCloudName, String cloudLinkName) { + CloudLinkInner inner = this.serviceClient().get(resourceGroupName, privateCloudName, cloudLinkName); + if (inner != null) { + return new CloudLinkImpl(inner, this.manager()); + } else { + return null; + } + } + public void delete(String resourceGroupName, String privateCloudName, String cloudLinkName) { this.serviceClient().delete(resourceGroupName, privateCloudName, cloudLinkName); } @@ -72,7 +71,7 @@ public void delete(String resourceGroupName, String privateCloudName, String clo public CloudLink getById(String id) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -80,14 +79,14 @@ public CloudLink getById(String id) { } String privateCloudName = Utils.getValueFromIdByName(id, "privateClouds"); if (privateCloudName == null) { - throw logger + 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"); if (cloudLinkName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'cloudLinks'.", id))); @@ -98,7 +97,7 @@ public CloudLink getById(String id) { public Response getByIdWithResponse(String id, Context context) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -106,14 +105,14 @@ public Response getByIdWithResponse(String id, Context context) { } String privateCloudName = Utils.getValueFromIdByName(id, "privateClouds"); if (privateCloudName == null) { - throw logger + 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"); if (cloudLinkName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'cloudLinks'.", id))); @@ -124,7 +123,7 @@ public Response getByIdWithResponse(String id, Context context) { public void deleteById(String id) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -132,14 +131,14 @@ public void deleteById(String id) { } String privateCloudName = Utils.getValueFromIdByName(id, "privateClouds"); if (privateCloudName == null) { - throw logger + 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"); if (cloudLinkName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'cloudLinks'.", id))); @@ -150,7 +149,7 @@ public void deleteById(String id) { public void deleteByIdWithResponse(String id, Context context) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -158,14 +157,14 @@ public void deleteByIdWithResponse(String id, Context context) { } String privateCloudName = Utils.getValueFromIdByName(id, "privateClouds"); if (privateCloudName == null) { - throw logger + 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"); if (cloudLinkName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'cloudLinks'.", id))); 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 9e002c834a93..5cfb4ae07ef1 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 @@ -4,10 +4,12 @@ package com.azure.resourcemanager.avs.implementation; +import com.azure.core.http.rest.Response; import com.azure.core.util.Context; import com.azure.resourcemanager.avs.fluent.models.ClusterInner; import com.azure.resourcemanager.avs.models.Cluster; import com.azure.resourcemanager.avs.models.ClusterUpdate; +import com.azure.resourcemanager.avs.models.ClusterZoneList; import com.azure.resourcemanager.avs.models.Sku; import java.util.List; @@ -32,6 +34,10 @@ public Sku sku() { return this.innerModel().sku(); } + public String resourceGroupName() { + return resourceGroupName; + } + public ClusterInner innerModel() { return this.innerObject; } @@ -129,6 +135,16 @@ public Cluster refresh(Context context) { return this; } + public Response listZonesWithResponse(Context context) { + return serviceManager + .clusters() + .listZonesWithResponse(resourceGroupName, privateCloudName, clusterName, context); + } + + public ClusterZoneList listZones() { + return serviceManager.clusters().listZones(resourceGroupName, privateCloudName, clusterName); + } + public ClusterImpl withSku(Sku sku) { this.innerModel().withSku(sku); return this; 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 new file mode 100644 index 000000000000..7c77d52c280f --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/ClusterZoneListImpl.java @@ -0,0 +1,39 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.avs.implementation; + +import com.azure.resourcemanager.avs.fluent.models.ClusterZoneListInner; +import com.azure.resourcemanager.avs.models.ClusterZone; +import com.azure.resourcemanager.avs.models.ClusterZoneList; +import java.util.Collections; +import java.util.List; + +public final class ClusterZoneListImpl implements ClusterZoneList { + private ClusterZoneListInner innerObject; + + private final com.azure.resourcemanager.avs.AvsManager serviceManager; + + ClusterZoneListImpl(ClusterZoneListInner innerObject, com.azure.resourcemanager.avs.AvsManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + } + + public List zones() { + List inner = this.innerModel().zones(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + + public ClusterZoneListInner 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/ClustersClientImpl.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/ClustersClientImpl.java index 9e10db0fd2ad..7a2205739d8c 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 @@ -14,6 +14,7 @@ import com.azure.core.annotation.HostParam; import com.azure.core.annotation.Patch; 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; @@ -30,11 +31,11 @@ import com.azure.core.management.polling.PollResult; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; -import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.avs.fluent.ClustersClient; import com.azure.resourcemanager.avs.fluent.models.ClusterInner; +import com.azure.resourcemanager.avs.fluent.models.ClusterZoneListInner; import com.azure.resourcemanager.avs.models.ClusterList; import com.azure.resourcemanager.avs.models.ClusterUpdate; import java.nio.ByteBuffer; @@ -43,8 +44,6 @@ /** An instance of this class provides access to all the operations defined in ClustersClient. */ public final class ClustersClientImpl implements ClustersClient { - private final ClientLogger logger = new ClientLogger(ClustersClientImpl.class); - /** The proxy service used to perform REST calls. */ private final ClustersService service; @@ -149,6 +148,22 @@ Mono>> delete( @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}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listZones( + @HostParam("$host") String endpoint, + @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); + @Headers({"Content-Type: application/json"}) @Get("{nextLink}") @ExpectedResponses({200}) @@ -168,7 +183,7 @@ Mono> listNext( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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. + * @return a paged list of clusters along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync(String resourceGroupName, String privateCloudName) { @@ -226,7 +241,7 @@ private Mono> listSinglePageAsync(String resourceGro * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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. + * @return a paged list of clusters along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync( @@ -281,7 +296,7 @@ private Mono> listSinglePageAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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. + * @return a paged list of clusters as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(String resourceGroupName, String privateCloudName) { @@ -299,7 +314,7 @@ private PagedFlux listAsync(String resourceGroupName, String priva * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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. + * @return a paged list of clusters as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(String resourceGroupName, String privateCloudName, Context context) { @@ -316,7 +331,7 @@ private PagedFlux listAsync(String resourceGroupName, String priva * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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. + * @return a paged list of clusters as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(String resourceGroupName, String privateCloudName) { @@ -332,7 +347,7 @@ public PagedIterable list(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 paged list of clusters. + * @return a paged list of clusters as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(String resourceGroupName, String privateCloudName, Context context) { @@ -348,7 +363,8 @@ public PagedIterable list(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 cluster by name in a private cloud. + * @return a cluster by name in a private cloud along with {@link Response} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync( @@ -403,7 +419,8 @@ private Mono> getWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 by name in a private cloud along with {@link Response} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync( @@ -454,19 +471,12 @@ private Mono> getWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 by name in a private cloud on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono getAsync(String resourceGroupName, String privateCloudName, String clusterName) { return getWithResponseAsync(resourceGroupName, privateCloudName, clusterName) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** @@ -475,14 +485,16 @@ private Mono getAsync(String resourceGroupName, String privateClou * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. * @param clusterName Name of the cluster 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 cluster by name in a private cloud. + * @return a cluster by name in a private cloud along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ClusterInner get(String resourceGroupName, String privateCloudName, String clusterName) { - return getAsync(resourceGroupName, privateCloudName, clusterName).block(); + public Response getWithResponse( + String resourceGroupName, String privateCloudName, String clusterName, Context context) { + return getWithResponseAsync(resourceGroupName, privateCloudName, clusterName, context).block(); } /** @@ -491,16 +503,14 @@ public ClusterInner get(String resourceGroupName, String privateCloudName, Strin * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. * @param clusterName Name of the cluster 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 cluster by name in a private cloud. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, String privateCloudName, String clusterName, Context context) { - return getWithResponseAsync(resourceGroupName, privateCloudName, clusterName, context).block(); + public ClusterInner get(String resourceGroupName, String privateCloudName, String clusterName) { + return getWithResponse(resourceGroupName, privateCloudName, clusterName, Context.NONE).getValue(); } /** @@ -513,7 +523,7 @@ public Response getWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> createOrUpdateWithResponseAsync( @@ -575,7 +585,7 @@ private Mono>> createOrUpdateWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> createOrUpdateWithResponseAsync( @@ -633,7 +643,7 @@ private Mono>> createOrUpdateWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 the {@link PollerFlux} for polling of a cluster resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, ClusterInner> beginCreateOrUpdateAsync( @@ -643,7 +653,7 @@ private PollerFlux, ClusterInner> beginCreateOrUpdateAs return this .client .getLroResult( - mono, this.client.getHttpPipeline(), ClusterInner.class, ClusterInner.class, Context.NONE); + mono, this.client.getHttpPipeline(), ClusterInner.class, ClusterInner.class, this.client.getContext()); } /** @@ -657,7 +667,7 @@ private PollerFlux, ClusterInner> beginCreateOrUpdateAs * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 the {@link PollerFlux} for polling of a cluster resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, ClusterInner> beginCreateOrUpdateAsync( @@ -681,7 +691,7 @@ private PollerFlux, ClusterInner> beginCreateOrUpdateAs * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 the {@link SyncPoller} for polling of a cluster resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, ClusterInner> beginCreateOrUpdate( @@ -700,7 +710,7 @@ public SyncPoller, ClusterInner> beginCreateOrUpdate( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 the {@link SyncPoller} for polling of a cluster resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, ClusterInner> beginCreateOrUpdate( @@ -719,7 +729,7 @@ public SyncPoller, ClusterInner> beginCreateOrUpdate( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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) private Mono createOrUpdateAsync( @@ -740,7 +750,7 @@ private Mono createOrUpdateAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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) private Mono createOrUpdateAsync( @@ -797,7 +807,7 @@ public ClusterInner createOrUpdate( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> updateWithResponseAsync( @@ -859,7 +869,7 @@ 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 cluster resource. + * @return a cluster resource along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> updateWithResponseAsync( @@ -921,7 +931,7 @@ 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 cluster resource. + * @return the {@link PollerFlux} for polling of a cluster resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, ClusterInner> beginUpdateAsync( @@ -931,7 +941,7 @@ private PollerFlux, ClusterInner> beginUpdateAsync( return this .client .getLroResult( - mono, this.client.getHttpPipeline(), ClusterInner.class, ClusterInner.class, Context.NONE); + mono, this.client.getHttpPipeline(), ClusterInner.class, ClusterInner.class, this.client.getContext()); } /** @@ -945,7 +955,7 @@ private PollerFlux, ClusterInner> beginUpdateAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 the {@link PollerFlux} for polling of a cluster resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, ClusterInner> beginUpdateAsync( @@ -973,7 +983,7 @@ private PollerFlux, ClusterInner> beginUpdateAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 the {@link SyncPoller} for polling of a cluster resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, ClusterInner> beginUpdate( @@ -992,7 +1002,7 @@ public SyncPoller, ClusterInner> beginUpdate( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 the {@link SyncPoller} for polling of a cluster resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, ClusterInner> beginUpdate( @@ -1015,7 +1025,7 @@ public SyncPoller, ClusterInner> beginUpdate( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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) private Mono updateAsync( @@ -1036,7 +1046,7 @@ 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 cluster resource. + * @return a cluster resource on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono updateAsync( @@ -1100,7 +1110,7 @@ public ClusterInner update( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> deleteWithResponseAsync( @@ -1155,7 +1165,7 @@ private Mono>> deleteWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> deleteWithResponseAsync( @@ -1206,7 +1216,7 @@ private Mono>> deleteWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginDeleteAsync( @@ -1215,7 +1225,8 @@ private PollerFlux, Void> beginDeleteAsync( deleteWithResponseAsync(resourceGroupName, privateCloudName, clusterName); return this .client - .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, Context.NONE); + .getLroResult( + mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); } /** @@ -1228,7 +1239,7 @@ private PollerFlux, Void> beginDeleteAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginDeleteAsync( @@ -1250,7 +1261,7 @@ private PollerFlux, Void> beginDeleteAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete( @@ -1268,7 +1279,7 @@ public SyncPoller, Void> beginDelete( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete( @@ -1285,7 +1296,7 @@ public SyncPoller, Void> beginDelete( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @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) { @@ -1304,7 +1315,7 @@ private Mono deleteAsync(String resourceGroupName, String privateCloudName * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono deleteAsync( @@ -1345,14 +1356,175 @@ public void delete(String resourceGroupName, String privateCloudName, String clu deleteAsync(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. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + 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.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (privateCloudName == null) { + return Mono + .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); + } + if (clusterName == null) { + return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .listZones( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + privateCloudName, + clusterName, + this.client.getApiVersion(), + 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 context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + 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.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (privateCloudName == null) { + return Mono + .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); + } + if (clusterName == null) { + return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .listZones( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + privateCloudName, + clusterName, + this.client.getApiVersion(), + 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. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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) { + 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 context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + 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. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ClusterZoneListInner listZones(String resourceGroupName, String privateCloudName, String clusterName) { + return listZonesWithResponse(resourceGroupName, privateCloudName, clusterName, Context.NONE).getValue(); + } + /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @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 paged list of clusters. + * @return a paged list of clusters along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink) { @@ -1383,12 +1555,13 @@ private Mono> listNextSinglePageAsync(String nextLin /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @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 paged list of clusters. + * @return a paged list of clusters along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink, Context context) { 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 67a4f7972c7b..3f768a5c6164 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 @@ -11,12 +11,13 @@ import com.azure.core.util.logging.ClientLogger; 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.Cluster; +import com.azure.resourcemanager.avs.models.ClusterZoneList; import com.azure.resourcemanager.avs.models.Clusters; -import com.fasterxml.jackson.annotation.JsonIgnore; public final class ClustersImpl implements Clusters { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ClustersImpl.class); + private static final ClientLogger LOGGER = new ClientLogger(ClustersImpl.class); private final ClustersClient innerClient; @@ -37,15 +38,6 @@ public PagedIterable list(String resourceGroupName, String privateCloud return Utils.mapPage(inner, inner1 -> new ClusterImpl(inner1, this.manager())); } - public Cluster get(String resourceGroupName, String privateCloudName, String clusterName) { - ClusterInner inner = this.serviceClient().get(resourceGroupName, privateCloudName, clusterName); - if (inner != null) { - return new ClusterImpl(inner, this.manager()); - } else { - return null; - } - } - public Response getWithResponse( String resourceGroupName, String privateCloudName, String clusterName, Context context) { Response inner = @@ -61,6 +53,15 @@ public Response getWithResponse( } } + public Cluster get(String resourceGroupName, String privateCloudName, String clusterName) { + ClusterInner inner = this.serviceClient().get(resourceGroupName, privateCloudName, clusterName); + if (inner != null) { + return new ClusterImpl(inner, this.manager()); + } else { + return null; + } + } + public void delete(String resourceGroupName, String privateCloudName, String clusterName) { this.serviceClient().delete(resourceGroupName, privateCloudName, clusterName); } @@ -69,10 +70,34 @@ 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); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new ClusterZoneListImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public ClusterZoneList listZones(String resourceGroupName, String privateCloudName, String clusterName) { + ClusterZoneListInner inner = this.serviceClient().listZones(resourceGroupName, privateCloudName, clusterName); + if (inner != null) { + return new ClusterZoneListImpl(inner, this.manager()); + } else { + return null; + } + } + public Cluster getById(String id) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -80,14 +105,14 @@ public Cluster getById(String id) { } String privateCloudName = Utils.getValueFromIdByName(id, "privateClouds"); if (privateCloudName == null) { - throw logger + 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"); if (clusterName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'clusters'.", id))); @@ -98,7 +123,7 @@ public Cluster getById(String id) { public Response getByIdWithResponse(String id, Context context) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -106,14 +131,14 @@ public Response getByIdWithResponse(String id, Context context) { } String privateCloudName = Utils.getValueFromIdByName(id, "privateClouds"); if (privateCloudName == null) { - throw logger + 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"); if (clusterName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'clusters'.", id))); @@ -124,7 +149,7 @@ public Response getByIdWithResponse(String id, Context context) { public void deleteById(String id) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -132,14 +157,14 @@ public void deleteById(String id) { } String privateCloudName = Utils.getValueFromIdByName(id, "privateClouds"); if (privateCloudName == null) { - throw logger + 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"); if (clusterName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'clusters'.", id))); @@ -150,7 +175,7 @@ public void deleteById(String id) { public void deleteByIdWithResponse(String id, Context context) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -158,14 +183,14 @@ public void deleteByIdWithResponse(String id, Context context) { } String privateCloudName = Utils.getValueFromIdByName(id, "privateClouds"); if (privateCloudName == null) { - throw logger + 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"); if (clusterName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'clusters'.", id))); 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 478d504c6775..4a6f2fd3fdfa 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 @@ -45,6 +45,10 @@ public DatastoreStatus status() { return this.innerModel().status(); } + public String resourceGroupName() { + return resourceGroupName; + } + public DatastoreInner innerModel() { return this.innerObject; } 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 8a1016f73156..0c3f1ed6a5a4 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 @@ -29,7 +29,6 @@ import com.azure.core.management.polling.PollResult; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; -import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.avs.fluent.DatastoresClient; @@ -41,8 +40,6 @@ /** An instance of this class provides access to all the operations defined in DatastoresClient. */ public final class DatastoresClientImpl implements DatastoresClient { - private final ClientLogger logger = new ClientLogger(DatastoresClientImpl.class); - /** The proxy service used to perform REST calls. */ private final DatastoresService service; @@ -155,7 +152,7 @@ Mono> listNext( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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. + * @return a paged list of datastores along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync( @@ -219,7 +216,7 @@ private Mono> listSinglePageAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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. + * @return a paged list of datastores along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync( @@ -279,7 +276,7 @@ private Mono> listSinglePageAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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. + * @return a paged list of datastores as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(String resourceGroupName, String privateCloudName, String clusterName) { @@ -298,7 +295,7 @@ private PagedFlux listAsync(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 paged list of datastores. + * @return a paged list of datastores as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync( @@ -317,7 +314,7 @@ private PagedFlux listAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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. + * @return a paged list of datastores as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(String resourceGroupName, String privateCloudName, String clusterName) { @@ -334,7 +331,7 @@ public PagedIterable list(String resourceGroupName, String priva * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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. + * @return a paged list of datastores as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list( @@ -352,7 +349,8 @@ public PagedIterable list( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 in a private cloud cluster along with {@link Response} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync( @@ -412,7 +410,8 @@ private Mono> getWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 in a private cloud cluster along with {@link Response} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync( @@ -468,20 +467,13 @@ private Mono> getWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 in a private cloud cluster on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono getAsync( String resourceGroupName, String privateCloudName, String clusterName, String datastoreName) { return getWithResponseAsync(resourceGroupName, privateCloudName, clusterName, datastoreName) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** @@ -491,15 +483,16 @@ private Mono getAsync( * @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 context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 in a private cloud cluster along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public DatastoreInner get( - String resourceGroupName, String privateCloudName, String clusterName, String datastoreName) { - return getAsync(resourceGroupName, privateCloudName, clusterName, datastoreName).block(); + public Response getWithResponse( + String resourceGroupName, String privateCloudName, String clusterName, String datastoreName, Context context) { + return getWithResponseAsync(resourceGroupName, privateCloudName, clusterName, datastoreName, context).block(); } /** @@ -509,16 +502,16 @@ public DatastoreInner get( * @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 context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, String privateCloudName, String clusterName, String datastoreName, Context context) { - return getWithResponseAsync(resourceGroupName, privateCloudName, clusterName, datastoreName, context).block(); + public DatastoreInner get( + String resourceGroupName, String privateCloudName, String clusterName, String datastoreName) { + return getWithResponse(resourceGroupName, privateCloudName, clusterName, datastoreName, Context.NONE) + .getValue(); } /** @@ -532,7 +525,7 @@ public Response getWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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. + * @return a datastore resource along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> createOrUpdateWithResponseAsync( @@ -603,7 +596,7 @@ private Mono>> createOrUpdateWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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. + * @return a datastore resource along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> createOrUpdateWithResponseAsync( @@ -671,7 +664,7 @@ private Mono>> createOrUpdateWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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. + * @return the {@link PollerFlux} for polling of a datastore resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, DatastoreInner> beginCreateOrUpdateAsync( @@ -685,7 +678,11 @@ private PollerFlux, DatastoreInner> beginCreateOrUpda return this .client .getLroResult( - mono, this.client.getHttpPipeline(), DatastoreInner.class, DatastoreInner.class, Context.NONE); + mono, + this.client.getHttpPipeline(), + DatastoreInner.class, + DatastoreInner.class, + this.client.getContext()); } /** @@ -700,7 +697,7 @@ private PollerFlux, DatastoreInner> beginCreateOrUpda * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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. + * @return the {@link PollerFlux} for polling of a datastore resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, DatastoreInner> beginCreateOrUpdateAsync( @@ -731,7 +728,7 @@ private PollerFlux, DatastoreInner> beginCreateOrUpda * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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. + * @return the {@link SyncPoller} for polling of a datastore resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, DatastoreInner> beginCreateOrUpdate( @@ -756,7 +753,7 @@ public SyncPoller, DatastoreInner> beginCreateOrUpdat * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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. + * @return the {@link SyncPoller} for polling of a datastore resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, DatastoreInner> beginCreateOrUpdate( @@ -782,7 +779,7 @@ public SyncPoller, DatastoreInner> beginCreateOrUpdat * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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. + * @return a datastore resource on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono createOrUpdateAsync( @@ -808,7 +805,7 @@ private Mono createOrUpdateAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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. + * @return a datastore resource on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono createOrUpdateAsync( @@ -883,7 +880,7 @@ public DatastoreInner createOrUpdate( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> deleteWithResponseAsync( @@ -943,7 +940,7 @@ private Mono>> deleteWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> deleteWithResponseAsync( @@ -999,7 +996,7 @@ private Mono>> deleteWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginDeleteAsync( @@ -1008,7 +1005,8 @@ private PollerFlux, Void> beginDeleteAsync( deleteWithResponseAsync(resourceGroupName, privateCloudName, clusterName, datastoreName); return this .client - .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, Context.NONE); + .getLroResult( + mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); } /** @@ -1022,7 +1020,7 @@ private PollerFlux, Void> beginDeleteAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginDeleteAsync( @@ -1045,7 +1043,7 @@ private PollerFlux, Void> beginDeleteAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete( @@ -1064,7 +1062,7 @@ public SyncPoller, Void> beginDelete( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete( @@ -1083,7 +1081,7 @@ public SyncPoller, Void> beginDelete( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono deleteAsync( @@ -1104,7 +1102,7 @@ private Mono deleteAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono deleteAsync( @@ -1151,11 +1149,12 @@ public void delete( /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @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 paged list of datastores. + * @return a paged list of datastores along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink) { @@ -1186,12 +1185,13 @@ private Mono> listNextSinglePageAsync(String nextL /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @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 paged list of datastores. + * @return a paged list of datastores along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink, Context context) { 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 5b9860db13ad..8abe9945c2b9 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 @@ -13,10 +13,9 @@ import com.azure.resourcemanager.avs.fluent.models.DatastoreInner; import com.azure.resourcemanager.avs.models.Datastore; import com.azure.resourcemanager.avs.models.Datastores; -import com.fasterxml.jackson.annotation.JsonIgnore; public final class DatastoresImpl implements Datastores { - @JsonIgnore private final ClientLogger logger = new ClientLogger(DatastoresImpl.class); + private static final ClientLogger LOGGER = new ClientLogger(DatastoresImpl.class); private final DatastoresClient innerClient; @@ -40,16 +39,6 @@ public PagedIterable list( return Utils.mapPage(inner, inner1 -> new DatastoreImpl(inner1, this.manager())); } - public Datastore get(String resourceGroupName, String privateCloudName, String clusterName, String datastoreName) { - DatastoreInner inner = - this.serviceClient().get(resourceGroupName, privateCloudName, clusterName, datastoreName); - if (inner != null) { - return new DatastoreImpl(inner, this.manager()); - } else { - return null; - } - } - public Response getWithResponse( String resourceGroupName, String privateCloudName, String clusterName, String datastoreName, Context context) { Response inner = @@ -67,6 +56,16 @@ public Response getWithResponse( } } + public Datastore get(String resourceGroupName, String privateCloudName, String clusterName, String datastoreName) { + DatastoreInner inner = + this.serviceClient().get(resourceGroupName, privateCloudName, clusterName, datastoreName); + if (inner != null) { + return new DatastoreImpl(inner, this.manager()); + } else { + return null; + } + } + public void delete(String resourceGroupName, String privateCloudName, String clusterName, String datastoreName) { this.serviceClient().delete(resourceGroupName, privateCloudName, clusterName, datastoreName); } @@ -79,7 +78,7 @@ public void delete( public Datastore getById(String id) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -87,21 +86,21 @@ public Datastore getById(String id) { } String privateCloudName = Utils.getValueFromIdByName(id, "privateClouds"); if (privateCloudName == null) { - throw logger + 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"); if (clusterName == null) { - throw logger + 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"); if (datastoreName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'datastores'.", id))); @@ -114,7 +113,7 @@ public Datastore getById(String id) { public Response getByIdWithResponse(String id, Context context) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -122,21 +121,21 @@ public Response getByIdWithResponse(String id, Context context) { } String privateCloudName = Utils.getValueFromIdByName(id, "privateClouds"); if (privateCloudName == null) { - throw logger + 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"); if (clusterName == null) { - throw logger + 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"); if (datastoreName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'datastores'.", id))); @@ -147,7 +146,7 @@ public Response getByIdWithResponse(String id, Context context) { public void deleteById(String id) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -155,21 +154,21 @@ public void deleteById(String id) { } String privateCloudName = Utils.getValueFromIdByName(id, "privateClouds"); if (privateCloudName == null) { - throw logger + 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"); if (clusterName == null) { - throw logger + 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"); if (datastoreName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'datastores'.", id))); @@ -180,7 +179,7 @@ public void deleteById(String id) { public void deleteByIdWithResponse(String id, Context context) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -188,21 +187,21 @@ public void deleteByIdWithResponse(String id, Context context) { } String privateCloudName = Utils.getValueFromIdByName(id, "privateClouds"); if (privateCloudName == null) { - throw logger + 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"); if (clusterName == null) { - throw logger + 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"); if (datastoreName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'datastores'.", id))); 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 775ea488352d..fca23311cf81 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 @@ -43,6 +43,10 @@ public String expressRouteId() { return this.innerModel().expressRouteId(); } + public String resourceGroupName() { + return resourceGroupName; + } + public ExpressRouteAuthorizationInner innerModel() { return this.innerObject; } 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 471c6ea2b8f8..7a8385060012 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 @@ -52,6 +52,10 @@ public String expressRouteId() { return this.innerModel().expressRouteId(); } + public String resourceGroupName() { + return resourceGroupName; + } + public GlobalReachConnectionInner innerModel() { return this.innerObject; } 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 1b038d39c162..4b42e2c10f67 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 @@ -29,7 +29,6 @@ import com.azure.core.management.polling.PollResult; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; -import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.avs.fluent.GlobalReachConnectionsClient; @@ -41,8 +40,6 @@ /** An instance of this class provides access to all the operations defined in GlobalReachConnectionsClient. */ public final class GlobalReachConnectionsClientImpl implements GlobalReachConnectionsClient { - private final ClientLogger logger = new ClientLogger(GlobalReachConnectionsClientImpl.class); - /** The proxy service used to perform REST calls. */ private final GlobalReachConnectionsService service; @@ -151,7 +148,8 @@ Mono> listNext( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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. + * @return a paged list of global reach connections along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync( @@ -210,7 +208,8 @@ private Mono> listSinglePageAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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. + * @return a paged list of global reach connections along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync( @@ -265,7 +264,7 @@ private Mono> listSinglePageAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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. + * @return a paged list of global reach connections as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(String resourceGroupName, String privateCloudName) { @@ -283,7 +282,7 @@ private PagedFlux listAsync(String resourceGroupName * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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. + * @return a paged list of global reach connections as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync( @@ -301,7 +300,7 @@ private PagedFlux listAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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. + * @return a paged list of global reach connections as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(String resourceGroupName, String privateCloudName) { @@ -317,7 +316,7 @@ public PagedIterable list(String resourceGroupName, * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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. + * @return a paged list of global reach connections as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list( @@ -334,7 +333,8 @@ public PagedIterable list( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 global reach connection by name in a private cloud along with {@link Response} on successful completion + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync( @@ -392,7 +392,8 @@ private Mono> getWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 global reach connection by name in a private cloud along with {@link Response} on successful completion + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync( @@ -446,20 +447,13 @@ private Mono> getWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 global reach connection by name in a private cloud on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono getAsync( String resourceGroupName, String privateCloudName, String globalReachConnectionName) { return getWithResponseAsync(resourceGroupName, privateCloudName, globalReachConnectionName) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** @@ -468,15 +462,16 @@ private Mono getAsync( * @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 context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 global reach connection by name in a private cloud along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public GlobalReachConnectionInner get( - String resourceGroupName, String privateCloudName, String globalReachConnectionName) { - return getAsync(resourceGroupName, privateCloudName, globalReachConnectionName).block(); + public Response getWithResponse( + String resourceGroupName, String privateCloudName, String globalReachConnectionName, Context context) { + return getWithResponseAsync(resourceGroupName, privateCloudName, globalReachConnectionName, context).block(); } /** @@ -485,16 +480,15 @@ public GlobalReachConnectionInner get( * @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 context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, String privateCloudName, String globalReachConnectionName, Context context) { - return getWithResponseAsync(resourceGroupName, privateCloudName, globalReachConnectionName, context).block(); + public GlobalReachConnectionInner get( + String resourceGroupName, String privateCloudName, String globalReachConnectionName) { + return getWithResponse(resourceGroupName, privateCloudName, globalReachConnectionName, Context.NONE).getValue(); } /** @@ -507,7 +501,7 @@ public Response getWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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. + * @return a global reach connection resource along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> createOrUpdateWithResponseAsync( @@ -576,7 +570,7 @@ private Mono>> createOrUpdateWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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. + * @return a global reach connection resource along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> createOrUpdateWithResponseAsync( @@ -642,7 +636,7 @@ private Mono>> createOrUpdateWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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. + * @return the {@link PollerFlux} for polling of a global reach connection resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, GlobalReachConnectionInner> beginCreateOrUpdateAsync( @@ -660,7 +654,7 @@ private PollerFlux, GlobalReachConnection this.client.getHttpPipeline(), GlobalReachConnectionInner.class, GlobalReachConnectionInner.class, - Context.NONE); + this.client.getContext()); } /** @@ -674,7 +668,7 @@ private PollerFlux, GlobalReachConnection * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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. + * @return the {@link PollerFlux} for polling of a global reach connection resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, GlobalReachConnectionInner> beginCreateOrUpdateAsync( @@ -707,7 +701,7 @@ private PollerFlux, GlobalReachConnection * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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. + * @return the {@link SyncPoller} for polling of a global reach connection resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, GlobalReachConnectionInner> beginCreateOrUpdate( @@ -731,7 +725,7 @@ public SyncPoller, GlobalReachConnectionI * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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. + * @return the {@link SyncPoller} for polling of a global reach connection resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, GlobalReachConnectionInner> beginCreateOrUpdate( @@ -755,7 +749,7 @@ public SyncPoller, GlobalReachConnectionI * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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. + * @return a global reach connection resource on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono createOrUpdateAsync( @@ -780,7 +774,7 @@ private Mono createOrUpdateAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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. + * @return a global reach connection resource on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono createOrUpdateAsync( @@ -852,7 +846,7 @@ public GlobalReachConnectionInner createOrUpdate( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> deleteWithResponseAsync( @@ -910,7 +904,7 @@ private Mono>> deleteWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> deleteWithResponseAsync( @@ -964,7 +958,7 @@ private Mono>> deleteWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginDeleteAsync( @@ -973,7 +967,8 @@ private PollerFlux, Void> beginDeleteAsync( deleteWithResponseAsync(resourceGroupName, privateCloudName, globalReachConnectionName); return this .client - .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, Context.NONE); + .getLroResult( + mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); } /** @@ -986,7 +981,7 @@ private PollerFlux, Void> beginDeleteAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginDeleteAsync( @@ -1008,7 +1003,7 @@ private PollerFlux, Void> beginDeleteAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete( @@ -1026,7 +1021,7 @@ public SyncPoller, Void> beginDelete( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete( @@ -1044,7 +1039,7 @@ public SyncPoller, Void> beginDelete( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono deleteAsync( @@ -1064,7 +1059,7 @@ private Mono deleteAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono deleteAsync( @@ -1109,11 +1104,13 @@ public void delete( /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @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 paged list of global reach connections. + * @return a paged list of global reach connections along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink) { @@ -1144,12 +1141,14 @@ private Mono> listNextSinglePageAsync( /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @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 paged list of global reach connections. + * @return a paged list of global reach connections along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink, Context context) { 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 7bce17a0f1aa..ab9add31f05d 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 @@ -13,10 +13,9 @@ import com.azure.resourcemanager.avs.fluent.models.GlobalReachConnectionInner; import com.azure.resourcemanager.avs.models.GlobalReachConnection; import com.azure.resourcemanager.avs.models.GlobalReachConnections; -import com.fasterxml.jackson.annotation.JsonIgnore; public final class GlobalReachConnectionsImpl implements GlobalReachConnections { - @JsonIgnore private final ClientLogger logger = new ClientLogger(GlobalReachConnectionsImpl.class); + private static final ClientLogger LOGGER = new ClientLogger(GlobalReachConnectionsImpl.class); private final GlobalReachConnectionsClient innerClient; @@ -41,17 +40,6 @@ public PagedIterable list( return Utils.mapPage(inner, inner1 -> new GlobalReachConnectionImpl(inner1, this.manager())); } - 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 { - return null; - } - } - public Response getWithResponse( String resourceGroupName, String privateCloudName, String globalReachConnectionName, Context context) { Response inner = @@ -69,6 +57,17 @@ public Response getWithResponse( } } + 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 { + return null; + } + } + public void delete(String resourceGroupName, String privateCloudName, String globalReachConnectionName) { this.serviceClient().delete(resourceGroupName, privateCloudName, globalReachConnectionName); } @@ -81,7 +80,7 @@ public void delete( public GlobalReachConnection getById(String id) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -89,14 +88,14 @@ public GlobalReachConnection getById(String id) { } String privateCloudName = Utils.getValueFromIdByName(id, "privateClouds"); if (privateCloudName == null) { - throw logger + 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"); if (globalReachConnectionName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -112,7 +111,7 @@ public GlobalReachConnection getById(String id) { public Response getByIdWithResponse(String id, Context context) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -120,14 +119,14 @@ public Response getByIdWithResponse(String id, Context co } String privateCloudName = Utils.getValueFromIdByName(id, "privateClouds"); if (privateCloudName == null) { - throw logger + 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"); if (globalReachConnectionName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -141,7 +140,7 @@ public Response getByIdWithResponse(String id, Context co public void deleteById(String id) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -149,14 +148,14 @@ public void deleteById(String id) { } String privateCloudName = Utils.getValueFromIdByName(id, "privateClouds"); if (privateCloudName == null) { - throw logger + 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"); if (globalReachConnectionName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -170,7 +169,7 @@ public void deleteById(String id) { public void deleteByIdWithResponse(String id, Context context) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -178,14 +177,14 @@ public void deleteByIdWithResponse(String id, Context context) { } String privateCloudName = Utils.getValueFromIdByName(id, "privateClouds"); if (privateCloudName == null) { - throw logger + 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"); if (globalReachConnectionName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String 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 f37632330eac..5b895cc9d1fd 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 @@ -35,6 +35,10 @@ public HcxEnterpriseSiteStatus status() { return this.innerModel().status(); } + public String resourceGroupName() { + return resourceGroupName; + } + public HcxEnterpriseSiteInner innerModel() { return this.innerObject; } 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 3a1e8281a061..0d8a5f772a3c 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 @@ -28,7 +28,6 @@ import com.azure.core.management.exception.ManagementException; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.avs.fluent.HcxEnterpriseSitesClient; import com.azure.resourcemanager.avs.fluent.models.HcxEnterpriseSiteInner; import com.azure.resourcemanager.avs.models.HcxEnterpriseSiteList; @@ -36,8 +35,6 @@ /** An instance of this class provides access to all the operations defined in HcxEnterpriseSitesClient. */ public final class HcxEnterpriseSitesClientImpl implements HcxEnterpriseSitesClient { - private final ClientLogger logger = new ClientLogger(HcxEnterpriseSitesClientImpl.class); - /** The proxy service used to perform REST calls. */ private final HcxEnterpriseSitesService service; @@ -145,7 +142,8 @@ Mono> listNext( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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. + * @return a paged list of HCX Enterprise Sites along with {@link PagedResponse} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync( @@ -204,7 +202,8 @@ private Mono> listSinglePageAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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. + * @return a paged list of HCX Enterprise Sites along with {@link PagedResponse} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync( @@ -259,7 +258,7 @@ private Mono> listSinglePageAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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. + * @return a paged list of HCX Enterprise Sites as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(String resourceGroupName, String privateCloudName) { @@ -277,7 +276,7 @@ private PagedFlux listAsync(String resourceGroupName, St * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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. + * @return a paged list of HCX Enterprise Sites as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync( @@ -295,7 +294,7 @@ private PagedFlux listAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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. + * @return a paged list of HCX Enterprise Sites as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(String resourceGroupName, String privateCloudName) { @@ -311,7 +310,7 @@ public PagedIterable list(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 a paged list of HCX Enterprise Sites. + * @return a paged list of HCX Enterprise Sites as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list( @@ -328,7 +327,8 @@ public PagedIterable list( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 by name in a private cloud. + * @return an HCX Enterprise Site by name in a private cloud along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync( @@ -384,7 +384,8 @@ private Mono> getWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 by name in a private cloud. + * @return an HCX Enterprise Site by name in a private cloud along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync( @@ -436,20 +437,13 @@ private Mono> getWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 by name in a private cloud. + * @return an HCX Enterprise Site by name in a private cloud on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono getAsync( String resourceGroupName, String privateCloudName, String hcxEnterpriseSiteName) { return getWithResponseAsync(resourceGroupName, privateCloudName, hcxEnterpriseSiteName) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** @@ -458,14 +452,16 @@ private Mono getAsync( * @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 context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 by name in a private cloud. + * @return an HCX Enterprise Site by name in a private cloud along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public HcxEnterpriseSiteInner get(String resourceGroupName, String privateCloudName, String hcxEnterpriseSiteName) { - return getAsync(resourceGroupName, privateCloudName, hcxEnterpriseSiteName).block(); + public Response getWithResponse( + String resourceGroupName, String privateCloudName, String hcxEnterpriseSiteName, Context context) { + return getWithResponseAsync(resourceGroupName, privateCloudName, hcxEnterpriseSiteName, context).block(); } /** @@ -474,16 +470,14 @@ public HcxEnterpriseSiteInner get(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 hcxEnterpriseSiteName Name of the HCX Enterprise Site 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 an HCX Enterprise Site by name in a private cloud. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, String privateCloudName, String hcxEnterpriseSiteName, Context context) { - return getWithResponseAsync(resourceGroupName, privateCloudName, hcxEnterpriseSiteName, context).block(); + public HcxEnterpriseSiteInner get(String resourceGroupName, String privateCloudName, String hcxEnterpriseSiteName) { + return getWithResponse(resourceGroupName, privateCloudName, hcxEnterpriseSiteName, Context.NONE).getValue(); } /** @@ -496,7 +490,7 @@ public Response getWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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. + * @return an HCX Enterprise Site resource along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> createOrUpdateWithResponseAsync( @@ -563,7 +557,7 @@ private Mono> createOrUpdateWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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. + * @return an HCX Enterprise Site resource along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> createOrUpdateWithResponseAsync( @@ -627,7 +621,7 @@ private Mono> createOrUpdateWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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. + * @return an HCX Enterprise Site resource on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono createOrUpdateAsync( @@ -637,14 +631,7 @@ private Mono createOrUpdateAsync( HcxEnterpriseSiteInner hcxEnterpriseSite) { return createOrUpdateWithResponseAsync( resourceGroupName, privateCloudName, hcxEnterpriseSiteName, hcxEnterpriseSite) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** @@ -654,18 +641,21 @@ private Mono createOrUpdateAsync( * @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 context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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. + * @return an HCX Enterprise Site resource along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public HcxEnterpriseSiteInner createOrUpdate( + public Response createOrUpdateWithResponse( String resourceGroupName, String privateCloudName, String hcxEnterpriseSiteName, - HcxEnterpriseSiteInner hcxEnterpriseSite) { - return createOrUpdateAsync(resourceGroupName, privateCloudName, hcxEnterpriseSiteName, hcxEnterpriseSite) + HcxEnterpriseSiteInner hcxEnterpriseSite, + Context context) { + return createOrUpdateWithResponseAsync( + resourceGroupName, privateCloudName, hcxEnterpriseSiteName, hcxEnterpriseSite, context) .block(); } @@ -676,22 +666,20 @@ public HcxEnterpriseSiteInner createOrUpdate( * @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 context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 Response createOrUpdateWithResponse( + public HcxEnterpriseSiteInner createOrUpdate( String resourceGroupName, String privateCloudName, String hcxEnterpriseSiteName, - HcxEnterpriseSiteInner hcxEnterpriseSite, - Context context) { - return createOrUpdateWithResponseAsync( - resourceGroupName, privateCloudName, hcxEnterpriseSiteName, hcxEnterpriseSite, context) - .block(); + HcxEnterpriseSiteInner hcxEnterpriseSite) { + return createOrUpdateWithResponse( + resourceGroupName, privateCloudName, hcxEnterpriseSiteName, hcxEnterpriseSite, Context.NONE) + .getValue(); } /** @@ -703,7 +691,7 @@ public Response createOrUpdateWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> deleteWithResponseAsync( @@ -759,7 +747,7 @@ private Mono> deleteWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> deleteWithResponseAsync( @@ -811,12 +799,12 @@ private Mono> deleteWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono deleteAsync(String resourceGroupName, String privateCloudName, String hcxEnterpriseSiteName) { return deleteWithResponseAsync(resourceGroupName, privateCloudName, hcxEnterpriseSiteName) - .flatMap((Response res) -> Mono.empty()); + .flatMap(ignored -> Mono.empty()); } /** @@ -825,13 +813,16 @@ 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 hcxEnterpriseSiteName Name of the HCX Enterprise Site 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 the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String privateCloudName, String hcxEnterpriseSiteName) { - deleteAsync(resourceGroupName, privateCloudName, hcxEnterpriseSiteName).block(); + public Response deleteWithResponse( + String resourceGroupName, String privateCloudName, String hcxEnterpriseSiteName, Context context) { + return deleteWithResponseAsync(resourceGroupName, privateCloudName, hcxEnterpriseSiteName, context).block(); } /** @@ -840,26 +831,25 @@ public void delete(String resourceGroupName, String privateCloudName, String hcx * @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 context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response deleteWithResponse( - String resourceGroupName, String privateCloudName, String hcxEnterpriseSiteName, Context context) { - return deleteWithResponseAsync(resourceGroupName, privateCloudName, hcxEnterpriseSiteName, context).block(); + public void delete(String resourceGroupName, String privateCloudName, String hcxEnterpriseSiteName) { + deleteWithResponse(resourceGroupName, privateCloudName, hcxEnterpriseSiteName, Context.NONE); } /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @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 paged list of HCX Enterprise Sites. + * @return a paged list of HCX Enterprise Sites along with {@link PagedResponse} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink) { @@ -890,12 +880,14 @@ private Mono> listNextSinglePageAsync(Stri /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @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 paged list of HCX Enterprise Sites. + * @return a paged list of HCX Enterprise Sites along with {@link PagedResponse} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink, Context context) { 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 9b2a852772f4..da02e1679aa1 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 @@ -13,10 +13,9 @@ import com.azure.resourcemanager.avs.fluent.models.HcxEnterpriseSiteInner; import com.azure.resourcemanager.avs.models.HcxEnterpriseSite; import com.azure.resourcemanager.avs.models.HcxEnterpriseSites; -import com.fasterxml.jackson.annotation.JsonIgnore; public final class HcxEnterpriseSitesImpl implements HcxEnterpriseSites { - @JsonIgnore private final ClientLogger logger = new ClientLogger(HcxEnterpriseSitesImpl.class); + private static final ClientLogger LOGGER = new ClientLogger(HcxEnterpriseSitesImpl.class); private final HcxEnterpriseSitesClient innerClient; @@ -39,16 +38,6 @@ public PagedIterable list(String resourceGroupName, String pr return Utils.mapPage(inner, inner1 -> new HcxEnterpriseSiteImpl(inner1, this.manager())); } - public HcxEnterpriseSite get(String resourceGroupName, String privateCloudName, String hcxEnterpriseSiteName) { - HcxEnterpriseSiteInner inner = - this.serviceClient().get(resourceGroupName, privateCloudName, hcxEnterpriseSiteName); - if (inner != null) { - return new HcxEnterpriseSiteImpl(inner, this.manager()); - } else { - return null; - } - } - public Response getWithResponse( String resourceGroupName, String privateCloudName, String hcxEnterpriseSiteName, Context context) { Response inner = @@ -64,8 +53,14 @@ public Response getWithResponse( } } - public void delete(String resourceGroupName, String privateCloudName, String hcxEnterpriseSiteName) { - this.serviceClient().delete(resourceGroupName, privateCloudName, hcxEnterpriseSiteName); + public HcxEnterpriseSite get(String resourceGroupName, String privateCloudName, String hcxEnterpriseSiteName) { + HcxEnterpriseSiteInner inner = + this.serviceClient().get(resourceGroupName, privateCloudName, hcxEnterpriseSiteName); + if (inner != null) { + return new HcxEnterpriseSiteImpl(inner, this.manager()); + } else { + return null; + } } public Response deleteWithResponse( @@ -75,10 +70,14 @@ public Response deleteWithResponse( .deleteWithResponse(resourceGroupName, privateCloudName, hcxEnterpriseSiteName, context); } + public void delete(String resourceGroupName, String privateCloudName, String hcxEnterpriseSiteName) { + this.serviceClient().delete(resourceGroupName, privateCloudName, hcxEnterpriseSiteName); + } + public HcxEnterpriseSite getById(String id) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -86,14 +85,14 @@ public HcxEnterpriseSite getById(String id) { } String privateCloudName = Utils.getValueFromIdByName(id, "privateClouds"); if (privateCloudName == null) { - throw logger + 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"); if (hcxEnterpriseSiteName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -108,7 +107,7 @@ public HcxEnterpriseSite getById(String id) { public Response getByIdWithResponse(String id, Context context) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -116,14 +115,14 @@ public Response getByIdWithResponse(String id, Context contex } String privateCloudName = Utils.getValueFromIdByName(id, "privateClouds"); if (privateCloudName == null) { - throw logger + 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"); if (hcxEnterpriseSiteName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -136,7 +135,7 @@ public Response getByIdWithResponse(String id, Context contex public void deleteById(String id) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -144,14 +143,14 @@ public void deleteById(String id) { } String privateCloudName = Utils.getValueFromIdByName(id, "privateClouds"); if (privateCloudName == null) { - throw logger + 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"); if (hcxEnterpriseSiteName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -164,7 +163,7 @@ public void deleteById(String id) { public Response deleteByIdWithResponse(String id, Context context) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -172,14 +171,14 @@ public Response deleteByIdWithResponse(String id, Context context) { } String privateCloudName = Utils.getValueFromIdByName(id, "privateClouds"); if (privateCloudName == null) { - throw logger + 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"); if (hcxEnterpriseSiteName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String 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 3fcb66d6bf91..22d33b1a1b61 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 @@ -4,6 +4,7 @@ package com.azure.resourcemanager.avs.implementation; +import com.azure.core.annotation.BodyParam; import com.azure.core.annotation.ExpectedResponses; import com.azure.core.annotation.HeaderParam; import com.azure.core.annotation.Headers; @@ -21,16 +22,14 @@ import com.azure.core.management.exception.ManagementException; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.avs.fluent.LocationsClient; import com.azure.resourcemanager.avs.fluent.models.QuotaInner; import com.azure.resourcemanager.avs.fluent.models.TrialInner; +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. */ public final class LocationsClientImpl implements LocationsClient { - private final ClientLogger logger = new ClientLogger(LocationsClientImpl.class); - /** The proxy service used to perform REST calls. */ private final LocationsService service; @@ -64,6 +63,7 @@ Mono> checkTrialAvailability( @PathParam("subscriptionId") String subscriptionId, @PathParam("location") String location, @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") Sku sku, @HeaderParam("Accept") String accept, Context context); @@ -84,13 +84,14 @@ Mono> checkQuotaAvailability( * Return trial status for subscription by region. * * @param location Azure region. + * @param sku The sku to check for trial availability. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return subscription trial availability. + * @return subscription trial availability along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> checkTrialAvailabilityWithResponseAsync(String location) { + private Mono> checkTrialAvailabilityWithResponseAsync(String location, Sku sku) { if (this.client.getEndpoint() == null) { return Mono .error( @@ -106,6 +107,9 @@ private Mono> checkTrialAvailabilityWithResponseAsync(Strin if (location == null) { return Mono.error(new IllegalArgumentException("Parameter location is required and cannot be null.")); } + if (sku != null) { + sku.validate(); + } final String accept = "application/json"; return FluxUtil .withContext( @@ -116,6 +120,7 @@ private Mono> checkTrialAvailabilityWithResponseAsync(Strin this.client.getSubscriptionId(), location, this.client.getApiVersion(), + sku, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); @@ -125,14 +130,16 @@ private Mono> checkTrialAvailabilityWithResponseAsync(Strin * Return trial status for subscription by region. * * @param location Azure region. + * @param sku The sku to check for trial availability. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return subscription trial availability. + * @return subscription trial availability along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> checkTrialAvailabilityWithResponseAsync(String location, Context context) { + private Mono> checkTrialAvailabilityWithResponseAsync( + String location, Sku sku, Context context) { if (this.client.getEndpoint() == null) { return Mono .error( @@ -148,6 +155,9 @@ private Mono> checkTrialAvailabilityWithResponseAsync(Strin if (location == null) { return Mono.error(new IllegalArgumentException("Parameter location is required and cannot be null.")); } + if (sku != null) { + sku.validate(); + } final String accept = "application/json"; context = this.client.mergeContext(context); return service @@ -156,6 +166,7 @@ private Mono> checkTrialAvailabilityWithResponseAsync(Strin this.client.getSubscriptionId(), location, this.client.getApiVersion(), + sku, accept, context); } @@ -167,48 +178,43 @@ private Mono> checkTrialAvailabilityWithResponseAsync(Strin * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return subscription trial availability. + * @return subscription trial availability on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono checkTrialAvailabilityAsync(String location) { - return checkTrialAvailabilityWithResponseAsync(location) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); + final Sku sku = null; + return checkTrialAvailabilityWithResponseAsync(location, sku).flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** * Return trial status for subscription by region. * * @param location Azure region. + * @param sku The sku to check for trial availability. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return subscription trial availability. + * @return subscription trial availability along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public TrialInner checkTrialAvailability(String location) { - return checkTrialAvailabilityAsync(location).block(); + public Response checkTrialAvailabilityWithResponse(String location, Sku sku, Context context) { + return checkTrialAvailabilityWithResponseAsync(location, sku, context).block(); } /** * Return trial status for subscription by region. * * @param location Azure region. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return subscription trial availability. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response checkTrialAvailabilityWithResponse(String location, Context context) { - return checkTrialAvailabilityWithResponseAsync(location, context).block(); + public TrialInner checkTrialAvailability(String location) { + final Sku sku = null; + return checkTrialAvailabilityWithResponse(location, sku, Context.NONE).getValue(); } /** @@ -218,7 +224,7 @@ public Response checkTrialAvailabilityWithResponse(String location, * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return subscription quotas. + * @return subscription quotas along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> checkQuotaAvailabilityWithResponseAsync(String location) { @@ -260,7 +266,7 @@ private Mono> checkQuotaAvailabilityWithResponseAsync(Strin * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return subscription quotas. + * @return subscription quotas along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> checkQuotaAvailabilityWithResponseAsync(String location, Context context) { @@ -298,47 +304,39 @@ private Mono> checkQuotaAvailabilityWithResponseAsync(Strin * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return subscription quotas. + * @return subscription quotas on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono checkQuotaAvailabilityAsync(String location) { - return checkQuotaAvailabilityWithResponseAsync(location) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); + return checkQuotaAvailabilityWithResponseAsync(location).flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** * Return quota for subscription by region. * * @param location Azure region. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return subscription quotas. + * @return subscription quotas along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public QuotaInner checkQuotaAvailability(String location) { - return checkQuotaAvailabilityAsync(location).block(); + public Response checkQuotaAvailabilityWithResponse(String location, Context context) { + return checkQuotaAvailabilityWithResponseAsync(location, context).block(); } /** * Return quota for subscription by region. * * @param location Azure region. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return subscription quotas. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response checkQuotaAvailabilityWithResponse(String location, Context context) { - return checkQuotaAvailabilityWithResponseAsync(location, context).block(); + public QuotaInner checkQuotaAvailability(String location) { + return checkQuotaAvailabilityWithResponse(location, Context.NONE).getValue(); } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/LocationsImpl.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/LocationsImpl.java index 111e9ceb7856..d9493b69c400 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 @@ -13,11 +13,11 @@ import com.azure.resourcemanager.avs.fluent.models.TrialInner; import com.azure.resourcemanager.avs.models.Locations; import com.azure.resourcemanager.avs.models.Quota; +import com.azure.resourcemanager.avs.models.Sku; import com.azure.resourcemanager.avs.models.Trial; -import com.fasterxml.jackson.annotation.JsonIgnore; public final class LocationsImpl implements Locations { - @JsonIgnore private final ClientLogger logger = new ClientLogger(LocationsImpl.class); + private static final ClientLogger LOGGER = new ClientLogger(LocationsImpl.class); private final LocationsClient innerClient; @@ -28,17 +28,8 @@ public LocationsImpl(LocationsClient innerClient, com.azure.resourcemanager.avs. this.serviceManager = serviceManager; } - public Trial checkTrialAvailability(String location) { - TrialInner inner = this.serviceClient().checkTrialAvailability(location); - if (inner != null) { - return new TrialImpl(inner, this.manager()); - } else { - return null; - } - } - - public Response checkTrialAvailabilityWithResponse(String location, Context context) { - Response inner = this.serviceClient().checkTrialAvailabilityWithResponse(location, context); + public Response checkTrialAvailabilityWithResponse(String location, Sku sku, Context context) { + Response inner = this.serviceClient().checkTrialAvailabilityWithResponse(location, sku, context); if (inner != null) { return new SimpleResponse<>( inner.getRequest(), @@ -50,10 +41,10 @@ public Response checkTrialAvailabilityWithResponse(String location, Conte } } - public Quota checkQuotaAvailability(String location) { - QuotaInner inner = this.serviceClient().checkQuotaAvailability(location); + public Trial checkTrialAvailability(String location) { + TrialInner inner = this.serviceClient().checkTrialAvailability(location); if (inner != null) { - return new QuotaImpl(inner, this.manager()); + return new TrialImpl(inner, this.manager()); } else { return null; } @@ -72,6 +63,15 @@ public Response checkQuotaAvailabilityWithResponse(String location, Conte } } + public Quota checkQuotaAvailability(String location) { + QuotaInner inner = this.serviceClient().checkQuotaAvailability(location); + if (inner != null) { + return new QuotaImpl(inner, this.manager()); + } else { + return null; + } + } + private LocationsClient serviceClient() { return this.innerClient; } 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 9ac0b1d3586d..49cece686240 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 @@ -25,7 +25,6 @@ import com.azure.core.management.exception.ManagementException; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.avs.fluent.OperationsClient; import com.azure.resourcemanager.avs.fluent.models.OperationInner; import com.azure.resourcemanager.avs.models.OperationList; @@ -33,8 +32,6 @@ /** An instance of this class provides access to all the operations defined in OperationsClient. */ public final class OperationsClientImpl implements OperationsClient { - private final ClientLogger logger = new ClientLogger(OperationsClientImpl.class); - /** The proxy service used to perform REST calls. */ private final OperationsService service; @@ -85,7 +82,7 @@ Mono> listNext( * * @throws 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. + * @return pageable list of operations along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync() { @@ -118,7 +115,7 @@ private Mono> listSinglePageAsync() { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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. + * @return pageable list of operations along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync(Context context) { @@ -148,7 +145,7 @@ private Mono> listSinglePageAsync(Context context) * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return pageable list of operations. + * @return pageable list of operations as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync() { @@ -162,7 +159,7 @@ private PagedFlux listAsync() { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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. + * @return pageable list of operations as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(Context context) { @@ -175,7 +172,7 @@ private PagedFlux listAsync(Context context) { * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return pageable list of operations. + * @return pageable list of operations as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list() { @@ -189,7 +186,7 @@ public PagedIterable list() { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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. + * @return pageable list of operations as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(Context context) { @@ -199,11 +196,12 @@ public PagedIterable list(Context context) { /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @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 pageable list of operations. + * @return pageable list of operations along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink) { @@ -234,12 +232,13 @@ private Mono> listNextSinglePageAsync(String nextL /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @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 pageable list of operations. + * @return pageable list of operations along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink, Context context) { 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 af2be43bce46..32a039b0a971 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 @@ -11,10 +11,9 @@ import com.azure.resourcemanager.avs.fluent.models.OperationInner; import com.azure.resourcemanager.avs.models.Operation; import com.azure.resourcemanager.avs.models.Operations; -import com.fasterxml.jackson.annotation.JsonIgnore; public final class OperationsImpl implements Operations { - @JsonIgnore private final ClientLogger logger = new ClientLogger(OperationsImpl.class); + private static final ClientLogger LOGGER = new ClientLogger(OperationsImpl.class); private final OperationsClient innerClient; 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 7732e8141055..1fccc3911437 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 @@ -30,7 +30,6 @@ import com.azure.core.management.polling.PollResult; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; -import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.avs.fluent.PlacementPoliciesClient; @@ -43,8 +42,6 @@ /** An instance of this class provides access to all the operations defined in PlacementPoliciesClient. */ public final class PlacementPoliciesClientImpl implements PlacementPoliciesClient { - private final ClientLogger logger = new ClientLogger(PlacementPoliciesClientImpl.class); - /** The proxy service used to perform REST calls. */ private final PlacementPoliciesService service; @@ -175,7 +172,8 @@ Mono> listNext( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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. + * @return represents list of placement policies along with {@link PagedResponse} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync( @@ -239,7 +237,8 @@ private Mono> listSinglePageAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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. + * @return represents list of placement policies along with {@link PagedResponse} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync( @@ -299,7 +298,7 @@ private Mono> listSinglePageAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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. + * @return represents list of placement policies as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync( @@ -319,7 +318,7 @@ private PagedFlux listAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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. + * @return represents list of placement policies as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync( @@ -338,7 +337,7 @@ private PagedFlux listAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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. + * @return represents list of placement policies as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list( @@ -356,7 +355,7 @@ public PagedIterable list( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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. + * @return represents list of placement policies as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list( @@ -374,7 +373,8 @@ public PagedIterable list( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 placement policy by name in a private cloud cluster along with {@link Response} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync( @@ -435,7 +435,8 @@ private Mono> getWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 placement policy by name in a private cloud cluster along with {@link Response} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync( @@ -496,20 +497,13 @@ private Mono> getWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 placement policy by name in a private cloud cluster on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono getAsync( String resourceGroupName, String privateCloudName, String clusterName, String placementPolicyName) { return getWithResponseAsync(resourceGroupName, privateCloudName, clusterName, placementPolicyName) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** @@ -519,15 +513,21 @@ private Mono getAsync( * @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 context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 placement policy by name in a private cloud cluster along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public PlacementPolicyInner get( - String resourceGroupName, String privateCloudName, String clusterName, String placementPolicyName) { - return getAsync(resourceGroupName, privateCloudName, clusterName, placementPolicyName).block(); + public Response getWithResponse( + String resourceGroupName, + String privateCloudName, + String clusterName, + String placementPolicyName, + Context context) { + return getWithResponseAsync(resourceGroupName, privateCloudName, clusterName, placementPolicyName, context) + .block(); } /** @@ -537,21 +537,16 @@ public PlacementPolicyInner get( * @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 context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, - String privateCloudName, - String clusterName, - String placementPolicyName, - Context context) { - return getWithResponseAsync(resourceGroupName, privateCloudName, clusterName, placementPolicyName, context) - .block(); + public PlacementPolicyInner get( + String resourceGroupName, String privateCloudName, String clusterName, String placementPolicyName) { + return getWithResponse(resourceGroupName, privateCloudName, clusterName, placementPolicyName, Context.NONE) + .getValue(); } /** @@ -565,7 +560,8 @@ public Response getWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 along with {@link Response} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> createOrUpdateWithResponseAsync( @@ -638,7 +634,8 @@ private Mono>> createOrUpdateWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 along with {@link Response} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> createOrUpdateWithResponseAsync( @@ -708,7 +705,7 @@ private Mono>> createOrUpdateWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 the {@link PollerFlux} for polling of a vSphere Distributed Resource Scheduler (DRS) placement policy. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, PlacementPolicyInner> beginCreateOrUpdateAsync( @@ -727,7 +724,7 @@ private PollerFlux, PlacementPolicyInner> begin this.client.getHttpPipeline(), PlacementPolicyInner.class, PlacementPolicyInner.class, - Context.NONE); + this.client.getContext()); } /** @@ -742,7 +739,7 @@ private PollerFlux, PlacementPolicyInner> begin * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 the {@link PollerFlux} for polling of a vSphere Distributed Resource Scheduler (DRS) placement policy. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, PlacementPolicyInner> beginCreateOrUpdateAsync( @@ -773,7 +770,7 @@ private PollerFlux, PlacementPolicyInner> begin * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 the {@link SyncPoller} for polling of a vSphere Distributed Resource Scheduler (DRS) placement policy. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, PlacementPolicyInner> beginCreateOrUpdate( @@ -799,7 +796,7 @@ public SyncPoller, PlacementPolicyInner> beginC * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 the {@link SyncPoller} for polling of a vSphere Distributed Resource Scheduler (DRS) placement policy. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, PlacementPolicyInner> beginCreateOrUpdate( @@ -825,7 +822,7 @@ public SyncPoller, PlacementPolicyInner> beginC * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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) private Mono createOrUpdateAsync( @@ -852,7 +849,7 @@ private Mono createOrUpdateAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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) private Mono createOrUpdateAsync( @@ -931,7 +928,8 @@ public PlacementPolicyInner createOrUpdate( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 along with {@link Response} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> updateWithResponseAsync( @@ -1004,7 +1002,8 @@ 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 vSphere Distributed Resource Scheduler (DRS) placement policy. + * @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( @@ -1074,7 +1073,7 @@ 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 vSphere Distributed Resource Scheduler (DRS) placement policy. + * @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( @@ -1093,7 +1092,7 @@ private PollerFlux, PlacementPolicyInner> begin this.client.getHttpPipeline(), PlacementPolicyInner.class, PlacementPolicyInner.class, - Context.NONE); + this.client.getContext()); } /** @@ -1108,7 +1107,7 @@ private PollerFlux, PlacementPolicyInner> begin * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 the {@link PollerFlux} for polling of a vSphere Distributed Resource Scheduler (DRS) placement policy. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, PlacementPolicyInner> beginUpdateAsync( @@ -1139,7 +1138,7 @@ private PollerFlux, PlacementPolicyInner> begin * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 the {@link SyncPoller} for polling of a vSphere Distributed Resource Scheduler (DRS) placement policy. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, PlacementPolicyInner> beginUpdate( @@ -1165,7 +1164,7 @@ public SyncPoller, PlacementPolicyInner> beginU * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 the {@link SyncPoller} for polling of a vSphere Distributed Resource Scheduler (DRS) placement policy. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, PlacementPolicyInner> beginUpdate( @@ -1191,7 +1190,7 @@ public SyncPoller, PlacementPolicyInner> beginU * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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) private Mono updateAsync( @@ -1218,7 +1217,7 @@ 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 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) private Mono updateAsync( @@ -1295,7 +1294,7 @@ public PlacementPolicyInner update( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> deleteWithResponseAsync( @@ -1356,7 +1355,7 @@ private Mono>> deleteWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> deleteWithResponseAsync( @@ -1417,7 +1416,7 @@ private Mono>> deleteWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginDeleteAsync( @@ -1426,7 +1425,8 @@ private PollerFlux, Void> beginDeleteAsync( deleteWithResponseAsync(resourceGroupName, privateCloudName, clusterName, placementPolicyName); return this .client - .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, Context.NONE); + .getLroResult( + mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); } /** @@ -1440,7 +1440,7 @@ private PollerFlux, Void> beginDeleteAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginDeleteAsync( @@ -1467,7 +1467,7 @@ private PollerFlux, Void> beginDeleteAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete( @@ -1486,7 +1486,7 @@ public SyncPoller, Void> beginDelete( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete( @@ -1509,7 +1509,7 @@ public SyncPoller, Void> beginDelete( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono deleteAsync( @@ -1530,7 +1530,7 @@ private Mono deleteAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono deleteAsync( @@ -1586,11 +1586,13 @@ public void delete( /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @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 represents list of placement policies. + * @return represents list of placement policies along with {@link PagedResponse} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink) { @@ -1621,12 +1623,14 @@ private Mono> listNextSinglePageAsync(String /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @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 represents list of placement policies. + * @return represents list of placement policies along with {@link PagedResponse} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink, Context context) { 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 0d79eef2826d..4f297c00528d 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 @@ -13,10 +13,9 @@ import com.azure.resourcemanager.avs.fluent.models.PlacementPolicyInner; import com.azure.resourcemanager.avs.models.PlacementPolicies; import com.azure.resourcemanager.avs.models.PlacementPolicy; -import com.fasterxml.jackson.annotation.JsonIgnore; public final class PlacementPoliciesImpl implements PlacementPolicies { - @JsonIgnore private final ClientLogger logger = new ClientLogger(PlacementPoliciesImpl.class); + private static final ClientLogger LOGGER = new ClientLogger(PlacementPoliciesImpl.class); private final PlacementPoliciesClient innerClient; @@ -41,17 +40,6 @@ public PagedIterable list( return Utils.mapPage(inner, inner1 -> new PlacementPolicyImpl(inner1, this.manager())); } - 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 { - return null; - } - } - public Response getWithResponse( String resourceGroupName, String privateCloudName, @@ -73,6 +61,17 @@ public Response getWithResponse( } } + 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 { + return null; + } + } + public void delete( String resourceGroupName, String privateCloudName, String clusterName, String placementPolicyName) { this.serviceClient().delete(resourceGroupName, privateCloudName, clusterName, placementPolicyName); @@ -90,7 +89,7 @@ public void delete( public PlacementPolicy getById(String id) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -98,21 +97,21 @@ public PlacementPolicy getById(String id) { } String privateCloudName = Utils.getValueFromIdByName(id, "privateClouds"); if (privateCloudName == null) { - throw logger + 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"); if (clusterName == null) { - throw logger + 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"); if (placementPolicyName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -127,7 +126,7 @@ public PlacementPolicy getById(String id) { public Response getByIdWithResponse(String id, Context context) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -135,21 +134,21 @@ public Response getByIdWithResponse(String id, Context context) } String privateCloudName = Utils.getValueFromIdByName(id, "privateClouds"); if (privateCloudName == null) { - throw logger + 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"); if (clusterName == null) { - throw logger + 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"); if (placementPolicyName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -162,7 +161,7 @@ public Response getByIdWithResponse(String id, Context context) public void deleteById(String id) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -170,21 +169,21 @@ public void deleteById(String id) { } String privateCloudName = Utils.getValueFromIdByName(id, "privateClouds"); if (privateCloudName == null) { - throw logger + 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"); if (clusterName == null) { - throw logger + 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"); if (placementPolicyName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -197,7 +196,7 @@ public void deleteById(String id) { public void deleteByIdWithResponse(String id, Context context) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -205,21 +204,21 @@ public void deleteByIdWithResponse(String id, Context context) { } String privateCloudName = Utils.getValueFromIdByName(id, "privateClouds"); if (privateCloudName == null) { - throw logger + 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"); if (clusterName == null) { - throw logger + 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"); if (placementPolicyName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String 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 e0397b3df061..c5186ea13b29 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 @@ -6,6 +6,8 @@ import com.azure.core.util.Context; import com.azure.resourcemanager.avs.fluent.models.PlacementPolicyInner; +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.PlacementPolicyProperties; import com.azure.resourcemanager.avs.models.PlacementPolicyState; @@ -33,6 +35,10 @@ public PlacementPolicyProperties properties() { return this.innerModel().properties(); } + public String resourceGroupName() { + return resourceGroupName; + } + public PlacementPolicyInner innerModel() { return this.innerObject; } @@ -173,4 +179,14 @@ public PlacementPolicyImpl withHostMembers(List hostMembers) { this.updatePlacementPolicyUpdate.withHostMembers(hostMembers); return this; } + + public PlacementPolicyImpl withAffinityStrength(AffinityStrength affinityStrength) { + this.updatePlacementPolicyUpdate.withAffinityStrength(affinityStrength); + return this; + } + + public PlacementPolicyImpl withAzureHybridBenefitType(AzureHybridBenefitType azureHybridBenefitType) { + this.updatePlacementPolicyUpdate.withAzureHybridBenefitType(azureHybridBenefitType); + 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 c8e0dd48eb5f..6fbafb51a4fc 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 @@ -16,6 +16,7 @@ import com.azure.resourcemanager.avs.models.IdentitySource; import com.azure.resourcemanager.avs.models.InternetEnum; import com.azure.resourcemanager.avs.models.ManagementCluster; +import com.azure.resourcemanager.avs.models.NsxPublicIpQuotaRaisedEnum; import com.azure.resourcemanager.avs.models.PrivateCloud; import com.azure.resourcemanager.avs.models.PrivateCloudIdentity; import com.azure.resourcemanager.avs.models.PrivateCloudProvisioningState; @@ -120,6 +121,10 @@ public Circuit secondaryCircuit() { return this.innerModel().secondaryCircuit(); } + public NsxPublicIpQuotaRaisedEnum nsxPublicIpQuotaRaised() { + return this.innerModel().nsxPublicIpQuotaRaised(); + } + public ManagementCluster managementCluster() { return this.innerModel().managementCluster(); } @@ -153,6 +158,10 @@ public String regionName() { return this.location(); } + public String resourceGroupName() { + return resourceGroupName; + } + public PrivateCloudInner innerModel() { return this.innerObject; } @@ -262,16 +271,16 @@ public void rotateNsxtPassword(Context context) { serviceManager.privateClouds().rotateNsxtPassword(resourceGroupName, privateCloudName, context); } - public AdminCredentials listAdminCredentials() { - return serviceManager.privateClouds().listAdminCredentials(resourceGroupName, privateCloudName); - } - public Response listAdminCredentialsWithResponse(Context context) { return serviceManager .privateClouds() .listAdminCredentialsWithResponse(resourceGroupName, privateCloudName, context); } + public AdminCredentials listAdminCredentials() { + return serviceManager.privateClouds().listAdminCredentials(resourceGroupName, privateCloudName); + } + public PrivateCloudImpl withRegion(Region location) { this.innerModel().withLocation(location.toString()); return this; @@ -363,13 +372,8 @@ public PrivateCloudImpl withIdentitySources(List identitySources } public PrivateCloudImpl withAvailability(AvailabilityProperties availability) { - if (isInCreateMode()) { - this.innerModel().withAvailability(availability); - return this; - } else { - this.updatePrivateCloudUpdate.withAvailability(availability); - return this; - } + this.innerModel().withAvailability(availability); + return this; } public PrivateCloudImpl withEncryption(Encryption encryption) { 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 2a7c17207177..fb7f7634db2a 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 @@ -31,7 +31,6 @@ import com.azure.core.management.polling.PollResult; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; -import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.avs.fluent.PrivateCloudsClient; @@ -45,8 +44,6 @@ /** An instance of this class provides access to all the operations defined in PrivateCloudsClient. */ public final class PrivateCloudsClientImpl implements PrivateCloudsClient { - private final ClientLogger logger = new ClientLogger(PrivateCloudsClientImpl.class); - /** The proxy service used to perform REST calls. */ private final PrivateCloudsService service; @@ -229,7 +226,7 @@ Mono> listInSubscriptionNext( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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. + * @return a paged list of private clouds along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName) { @@ -281,7 +278,7 @@ private Mono> listByResourceGroupSinglePageAsyn * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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. + * @return a paged list of private clouds along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByResourceGroupSinglePageAsync( @@ -330,7 +327,7 @@ private Mono> listByResourceGroupSinglePageAsyn * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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. + * @return a paged list of private clouds as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByResourceGroupAsync(String resourceGroupName) { @@ -346,7 +343,7 @@ private PagedFlux listByResourceGroupAsync(String resourceGro * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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. + * @return a paged list of private clouds as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByResourceGroupAsync(String resourceGroupName, Context context) { @@ -362,7 +359,7 @@ private PagedFlux listByResourceGroupAsync(String resourceGro * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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. + * @return a paged list of private clouds as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByResourceGroup(String resourceGroupName) { @@ -377,7 +374,7 @@ public PagedIterable listByResourceGroup(String resourceGroup * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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. + * @return a paged list of private clouds as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByResourceGroup(String resourceGroupName, Context context) { @@ -389,7 +386,7 @@ public PagedIterable listByResourceGroup(String resourceGroup * * @throws ManagementException 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. + * @return a paged list of private clouds along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync() { @@ -435,7 +432,7 @@ private Mono> listSinglePageAsync() { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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. + * @return a paged list of private clouds along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync(Context context) { @@ -476,7 +473,7 @@ private Mono> listSinglePageAsync(Context conte * * @throws ManagementException 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. + * @return a paged list of private clouds as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync() { @@ -491,7 +488,7 @@ private PagedFlux listAsync() { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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. + * @return a paged list of private clouds as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(Context context) { @@ -504,7 +501,7 @@ private PagedFlux listAsync(Context context) { * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paged list of private clouds. + * @return a paged list of private clouds as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list() { @@ -518,7 +515,7 @@ public PagedIterable list() { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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. + * @return a paged list of private clouds as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(Context context) { @@ -533,7 +530,7 @@ public PagedIterable list(Context context) { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 private cloud along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getByResourceGroupWithResponseAsync( @@ -583,7 +580,7 @@ private Mono> getByResourceGroupWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 private cloud along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getByResourceGroupWithResponseAsync( @@ -629,19 +626,12 @@ private Mono> getByResourceGroupWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 private cloud on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono getByResourceGroupAsync(String resourceGroupName, String privateCloudName) { return getByResourceGroupWithResponseAsync(resourceGroupName, privateCloudName) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** @@ -649,14 +639,16 @@ private Mono getByResourceGroupAsync(String resourceGroupName * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 private cloud along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public PrivateCloudInner getByResourceGroup(String resourceGroupName, String privateCloudName) { - return getByResourceGroupAsync(resourceGroupName, privateCloudName).block(); + public Response getByResourceGroupWithResponse( + String resourceGroupName, String privateCloudName, Context context) { + return getByResourceGroupWithResponseAsync(resourceGroupName, privateCloudName, context).block(); } /** @@ -664,16 +656,14 @@ public PrivateCloudInner getByResourceGroup(String resourceGroupName, String pri * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getByResourceGroupWithResponse( - String resourceGroupName, String privateCloudName, Context context) { - return getByResourceGroupWithResponseAsync(resourceGroupName, privateCloudName, context).block(); + public PrivateCloudInner getByResourceGroup(String resourceGroupName, String privateCloudName) { + return getByResourceGroupWithResponse(resourceGroupName, privateCloudName, Context.NONE).getValue(); } /** @@ -685,7 +675,7 @@ public Response getByResourceGroupWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> createOrUpdateWithResponseAsync( @@ -742,7 +732,7 @@ private Mono>> createOrUpdateWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> createOrUpdateWithResponseAsync( @@ -795,7 +785,7 @@ private Mono>> createOrUpdateWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 the {@link PollerFlux} for polling of a private cloud resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, PrivateCloudInner> beginCreateOrUpdateAsync( @@ -805,7 +795,11 @@ private PollerFlux, PrivateCloudInner> beginCreate return this .client .getLroResult( - mono, this.client.getHttpPipeline(), PrivateCloudInner.class, PrivateCloudInner.class, Context.NONE); + mono, + this.client.getHttpPipeline(), + PrivateCloudInner.class, + PrivateCloudInner.class, + this.client.getContext()); } /** @@ -818,7 +812,7 @@ private PollerFlux, PrivateCloudInner> beginCreate * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 the {@link PollerFlux} for polling of a private cloud resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, PrivateCloudInner> beginCreateOrUpdateAsync( @@ -841,7 +835,7 @@ private PollerFlux, PrivateCloudInner> beginCreate * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 the {@link SyncPoller} for polling of a private cloud resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, PrivateCloudInner> beginCreateOrUpdate( @@ -859,7 +853,7 @@ public SyncPoller, PrivateCloudInner> beginCreateO * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 the {@link SyncPoller} for polling of a private cloud resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, PrivateCloudInner> beginCreateOrUpdate( @@ -876,7 +870,7 @@ public SyncPoller, PrivateCloudInner> beginCreateO * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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) private Mono createOrUpdateAsync( @@ -896,7 +890,7 @@ private Mono createOrUpdateAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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) private Mono createOrUpdateAsync( @@ -950,7 +944,7 @@ public PrivateCloudInner createOrUpdate( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> updateWithResponseAsync( @@ -1008,7 +1002,7 @@ 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. + * @return a private cloud resource along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> updateWithResponseAsync( @@ -1062,7 +1056,7 @@ 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. + * @return the {@link PollerFlux} for polling of a private cloud resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, PrivateCloudInner> beginUpdateAsync( @@ -1072,7 +1066,11 @@ private PollerFlux, PrivateCloudInner> beginUpdate return this .client .getLroResult( - mono, this.client.getHttpPipeline(), PrivateCloudInner.class, PrivateCloudInner.class, Context.NONE); + mono, + this.client.getHttpPipeline(), + PrivateCloudInner.class, + PrivateCloudInner.class, + this.client.getContext()); } /** @@ -1085,7 +1083,7 @@ private PollerFlux, PrivateCloudInner> beginUpdate * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 the {@link PollerFlux} for polling of a private cloud resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, PrivateCloudInner> beginUpdateAsync( @@ -1108,7 +1106,7 @@ private PollerFlux, PrivateCloudInner> beginUpdate * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 the {@link SyncPoller} for polling of a private cloud resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, PrivateCloudInner> beginUpdate( @@ -1126,7 +1124,7 @@ public SyncPoller, PrivateCloudInner> beginUpdate( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 the {@link SyncPoller} for polling of a private cloud resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, PrivateCloudInner> beginUpdate( @@ -1143,7 +1141,7 @@ public SyncPoller, PrivateCloudInner> beginUpdate( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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) private Mono updateAsync( @@ -1163,7 +1161,7 @@ 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. + * @return a private cloud resource on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono updateAsync( @@ -1216,7 +1214,7 @@ public PrivateCloudInner update( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> deleteWithResponseAsync( @@ -1266,7 +1264,7 @@ private Mono>> deleteWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> deleteWithResponseAsync( @@ -1312,14 +1310,15 @@ private Mono>> deleteWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @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, Context.NONE); + .getLroResult( + mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); } /** @@ -1331,7 +1330,7 @@ private PollerFlux, Void> beginDeleteAsync(String resourceGroup * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginDeleteAsync( @@ -1351,7 +1350,7 @@ private PollerFlux, Void> beginDeleteAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete(String resourceGroupName, String privateCloudName) { @@ -1367,7 +1366,7 @@ public SyncPoller, Void> beginDelete(String resourceGroupName, * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete( @@ -1383,7 +1382,7 @@ public SyncPoller, Void> beginDelete( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono deleteAsync(String resourceGroupName, String privateCloudName) { @@ -1401,7 +1400,7 @@ private Mono deleteAsync(String resourceGroupName, String privateCloudName * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @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) { @@ -1447,7 +1446,7 @@ public void delete(String resourceGroupName, String privateCloudName, Context co * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> rotateVcenterPasswordWithResponseAsync( @@ -1497,7 +1496,7 @@ private Mono>> rotateVcenterPasswordWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> rotateVcenterPasswordWithResponseAsync( @@ -1543,7 +1542,7 @@ private Mono>> rotateVcenterPasswordWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginRotateVcenterPasswordAsync( @@ -1552,7 +1551,8 @@ private PollerFlux, Void> beginRotateVcenterPasswordAsync( rotateVcenterPasswordWithResponseAsync(resourceGroupName, privateCloudName); return this .client - .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, Context.NONE); + .getLroResult( + mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); } /** @@ -1564,7 +1564,7 @@ private PollerFlux, Void> beginRotateVcenterPasswordAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginRotateVcenterPasswordAsync( @@ -1585,7 +1585,7 @@ private PollerFlux, Void> beginRotateVcenterPasswordAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginRotateVcenterPassword( @@ -1602,7 +1602,7 @@ public SyncPoller, Void> beginRotateVcenterPassword( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginRotateVcenterPassword( @@ -1618,7 +1618,7 @@ public SyncPoller, Void> beginRotateVcenterPassword( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono rotateVcenterPasswordAsync(String resourceGroupName, String privateCloudName) { @@ -1636,7 +1636,7 @@ private Mono rotateVcenterPasswordAsync(String resourceGroupName, String p * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono rotateVcenterPasswordAsync(String resourceGroupName, String privateCloudName, Context context) { @@ -1682,7 +1682,7 @@ public void rotateVcenterPassword(String resourceGroupName, String privateCloudN * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> rotateNsxtPasswordWithResponseAsync( @@ -1732,7 +1732,7 @@ private Mono>> rotateNsxtPasswordWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> rotateNsxtPasswordWithResponseAsync( @@ -1778,7 +1778,7 @@ private Mono>> rotateNsxtPasswordWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginRotateNsxtPasswordAsync( @@ -1787,7 +1787,8 @@ private PollerFlux, Void> beginRotateNsxtPasswordAsync( rotateNsxtPasswordWithResponseAsync(resourceGroupName, privateCloudName); return this .client - .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, Context.NONE); + .getLroResult( + mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); } /** @@ -1799,7 +1800,7 @@ private PollerFlux, Void> beginRotateNsxtPasswordAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginRotateNsxtPasswordAsync( @@ -1820,7 +1821,7 @@ private PollerFlux, Void> beginRotateNsxtPasswordAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginRotateNsxtPassword( @@ -1837,7 +1838,7 @@ public SyncPoller, Void> beginRotateNsxtPassword( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginRotateNsxtPassword( @@ -1853,7 +1854,7 @@ public SyncPoller, Void> beginRotateNsxtPassword( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono rotateNsxtPasswordAsync(String resourceGroupName, String privateCloudName) { @@ -1871,7 +1872,7 @@ private Mono rotateNsxtPasswordAsync(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 the completion. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono rotateNsxtPasswordAsync(String resourceGroupName, String privateCloudName, Context context) { @@ -1917,7 +1918,8 @@ public void rotateNsxtPassword(String resourceGroupName, String privateCloudName * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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. + * @return administrative credentials for accessing vCenter and NSX-T along with {@link Response} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listAdminCredentialsWithResponseAsync( @@ -1967,7 +1969,8 @@ private Mono> listAdminCredentialsWithResponseAs * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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. + * @return administrative credentials for accessing vCenter and NSX-T along with {@link Response} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listAdminCredentialsWithResponseAsync( @@ -2013,19 +2016,12 @@ private Mono> listAdminCredentialsWithResponseAs * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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. + * @return administrative credentials for accessing vCenter and NSX-T on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono listAdminCredentialsAsync(String resourceGroupName, String privateCloudName) { return listAdminCredentialsWithResponseAsync(resourceGroupName, privateCloudName) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** @@ -2033,14 +2029,16 @@ private Mono listAdminCredentialsAsync(String resourceGro * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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. + * @return administrative credentials for accessing vCenter and NSX-T along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public AdminCredentialsInner listAdminCredentials(String resourceGroupName, String privateCloudName) { - return listAdminCredentialsAsync(resourceGroupName, privateCloudName).block(); + public Response listAdminCredentialsWithResponse( + String resourceGroupName, String privateCloudName, Context context) { + return listAdminCredentialsWithResponseAsync(resourceGroupName, privateCloudName, context).block(); } /** @@ -2048,26 +2046,25 @@ public AdminCredentialsInner listAdminCredentials(String resourceGroupName, Stri * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return administrative credentials for accessing vCenter and NSX-T. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response listAdminCredentialsWithResponse( - String resourceGroupName, String privateCloudName, Context context) { - return listAdminCredentialsWithResponseAsync(resourceGroupName, privateCloudName, context).block(); + public AdminCredentialsInner listAdminCredentials(String resourceGroupName, String privateCloudName) { + return listAdminCredentialsWithResponse(resourceGroupName, privateCloudName, Context.NONE).getValue(); } /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @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 paged list of private clouds. + * @return a paged list of private clouds along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink) { @@ -2098,12 +2095,13 @@ private Mono> listNextSinglePageAsync(String ne /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @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 paged list of private clouds. + * @return a paged list of private clouds along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink, Context context) { @@ -2134,11 +2132,12 @@ private Mono> listNextSinglePageAsync(String ne /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @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 paged list of private clouds. + * @return a paged list of private clouds along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listInSubscriptionNextSinglePageAsync(String nextLink) { @@ -2170,12 +2169,13 @@ private Mono> listInSubscriptionNextSinglePageA /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @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 paged list of private clouds. + * @return a paged list of private clouds along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listInSubscriptionNextSinglePageAsync( 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 af80bf751db7..cfdafa4a1022 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 @@ -15,10 +15,9 @@ import com.azure.resourcemanager.avs.models.AdminCredentials; import com.azure.resourcemanager.avs.models.PrivateCloud; import com.azure.resourcemanager.avs.models.PrivateClouds; -import com.fasterxml.jackson.annotation.JsonIgnore; public final class PrivateCloudsImpl implements PrivateClouds { - @JsonIgnore private final ClientLogger logger = new ClientLogger(PrivateCloudsImpl.class); + private static final ClientLogger LOGGER = new ClientLogger(PrivateCloudsImpl.class); private final PrivateCloudsClient innerClient; @@ -49,15 +48,6 @@ public PagedIterable list(Context context) { return Utils.mapPage(inner, inner1 -> new PrivateCloudImpl(inner1, this.manager())); } - public PrivateCloud getByResourceGroup(String resourceGroupName, String privateCloudName) { - PrivateCloudInner inner = this.serviceClient().getByResourceGroup(resourceGroupName, privateCloudName); - if (inner != null) { - return new PrivateCloudImpl(inner, this.manager()); - } else { - return null; - } - } - public Response getByResourceGroupWithResponse( String resourceGroupName, String privateCloudName, Context context) { Response inner = @@ -73,6 +63,15 @@ public Response getByResourceGroupWithResponse( } } + public PrivateCloud getByResourceGroup(String resourceGroupName, String privateCloudName) { + PrivateCloudInner inner = this.serviceClient().getByResourceGroup(resourceGroupName, privateCloudName); + if (inner != null) { + return new PrivateCloudImpl(inner, this.manager()); + } else { + return null; + } + } + public void deleteByResourceGroup(String resourceGroupName, String privateCloudName) { this.serviceClient().delete(resourceGroupName, privateCloudName); } @@ -97,15 +96,6 @@ public void rotateNsxtPassword(String resourceGroupName, String privateCloudName this.serviceClient().rotateNsxtPassword(resourceGroupName, privateCloudName, context); } - public AdminCredentials listAdminCredentials(String resourceGroupName, String privateCloudName) { - AdminCredentialsInner inner = this.serviceClient().listAdminCredentials(resourceGroupName, privateCloudName); - if (inner != null) { - return new AdminCredentialsImpl(inner, this.manager()); - } else { - return null; - } - } - public Response listAdminCredentialsWithResponse( String resourceGroupName, String privateCloudName, Context context) { Response inner = @@ -121,10 +111,19 @@ public Response listAdminCredentialsWithResponse( } } + public AdminCredentials listAdminCredentials(String resourceGroupName, String privateCloudName) { + AdminCredentialsInner inner = this.serviceClient().listAdminCredentials(resourceGroupName, privateCloudName); + if (inner != null) { + return new AdminCredentialsImpl(inner, this.manager()); + } else { + return null; + } + } + public PrivateCloud getById(String id) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -132,7 +131,7 @@ public PrivateCloud getById(String id) { } String privateCloudName = Utils.getValueFromIdByName(id, "privateClouds"); if (privateCloudName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'privateClouds'.", id))); @@ -143,7 +142,7 @@ public PrivateCloud getById(String id) { public Response getByIdWithResponse(String id, Context context) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -151,7 +150,7 @@ public Response getByIdWithResponse(String id, Context context) { } String privateCloudName = Utils.getValueFromIdByName(id, "privateClouds"); if (privateCloudName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'privateClouds'.", id))); @@ -162,7 +161,7 @@ public Response getByIdWithResponse(String id, Context context) { public void deleteById(String id) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -170,7 +169,7 @@ public void deleteById(String id) { } String privateCloudName = Utils.getValueFromIdByName(id, "privateClouds"); if (privateCloudName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'privateClouds'.", id))); @@ -181,7 +180,7 @@ public void deleteById(String id) { public void deleteByIdWithResponse(String id, Context context) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -189,7 +188,7 @@ public void deleteByIdWithResponse(String id, Context context) { } String privateCloudName = Utils.getValueFromIdByName(id, "privateClouds"); if (privateCloudName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'privateClouds'.", id))); 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 96af231dc8ab..499d4ec18a72 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 @@ -25,7 +25,6 @@ import com.azure.core.management.exception.ManagementException; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.avs.fluent.ScriptCmdletsClient; import com.azure.resourcemanager.avs.fluent.models.ScriptCmdletInner; import com.azure.resourcemanager.avs.models.ScriptCmdletsList; @@ -33,8 +32,6 @@ /** An instance of this class provides access to all the operations defined in ScriptCmdletsClient. */ public final class ScriptCmdletsClientImpl implements ScriptCmdletsClient { - private final ClientLogger logger = new ClientLogger(ScriptCmdletsClientImpl.class); - /** The proxy service used to perform REST calls. */ private final ScriptCmdletsService service; @@ -113,7 +110,8 @@ Mono> listNext( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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. + * @return pageable list of scripts/cmdlets along with {@link PagedResponse} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync( @@ -179,7 +177,8 @@ private Mono> listSinglePageAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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. + * @return pageable list of scripts/cmdlets along with {@link PagedResponse} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync( @@ -241,7 +240,7 @@ private Mono> listSinglePageAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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. + * @return pageable list of scripts/cmdlets as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync( @@ -262,7 +261,7 @@ private PagedFlux listAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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. + * @return pageable list of scripts/cmdlets as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync( @@ -282,7 +281,7 @@ private PagedFlux listAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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. + * @return pageable list of scripts/cmdlets as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list( @@ -301,7 +300,7 @@ public PagedIterable list( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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. + * @return pageable list of scripts/cmdlets as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list( @@ -319,7 +318,8 @@ public PagedIterable list( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 cmdlet available for script execution along with {@link Response} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync( @@ -381,7 +381,8 @@ private Mono> getWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 cmdlet available for script execution along with {@link Response} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync( @@ -443,20 +444,13 @@ private Mono> getWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 cmdlet available for script execution on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono getAsync( String resourceGroupName, String privateCloudName, String scriptPackageName, String scriptCmdletName) { return getWithResponseAsync(resourceGroupName, privateCloudName, scriptPackageName, scriptCmdletName) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** @@ -466,15 +460,21 @@ private Mono getAsync( * @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 context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 cmdlet available for script execution along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ScriptCmdletInner get( - String resourceGroupName, String privateCloudName, String scriptPackageName, String scriptCmdletName) { - return getAsync(resourceGroupName, privateCloudName, scriptPackageName, scriptCmdletName).block(); + public Response getWithResponse( + String resourceGroupName, + String privateCloudName, + String scriptPackageName, + String scriptCmdletName, + Context context) { + return getWithResponseAsync(resourceGroupName, privateCloudName, scriptPackageName, scriptCmdletName, context) + .block(); } /** @@ -484,31 +484,28 @@ public ScriptCmdletInner get( * @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 context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, - String privateCloudName, - String scriptPackageName, - String scriptCmdletName, - Context context) { - return getWithResponseAsync(resourceGroupName, privateCloudName, scriptPackageName, scriptCmdletName, context) - .block(); + 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 nextLink parameter. + * @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 pageable list of scripts/cmdlets. + * @return pageable list of scripts/cmdlets along with {@link PagedResponse} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink) { @@ -539,12 +536,14 @@ private Mono> listNextSinglePageAsync(String ne /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @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 pageable list of scripts/cmdlets. + * @return pageable list of scripts/cmdlets along with {@link PagedResponse} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink, Context context) { 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 28a63f5d3b58..a1eacd0bb7dc 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 @@ -13,10 +13,9 @@ import com.azure.resourcemanager.avs.fluent.models.ScriptCmdletInner; import com.azure.resourcemanager.avs.models.ScriptCmdlet; import com.azure.resourcemanager.avs.models.ScriptCmdlets; -import com.fasterxml.jackson.annotation.JsonIgnore; public final class ScriptCmdletsImpl implements ScriptCmdlets { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ScriptCmdletsImpl.class); + private static final ClientLogger LOGGER = new ClientLogger(ScriptCmdletsImpl.class); private final ScriptCmdletsClient innerClient; @@ -41,17 +40,6 @@ public PagedIterable list( return Utils.mapPage(inner, inner1 -> new ScriptCmdletImpl(inner1, this.manager())); } - 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 { - return null; - } - } - public Response getWithResponse( String resourceGroupName, String privateCloudName, @@ -73,6 +61,17 @@ public Response getWithResponse( } } + 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 { + return null; + } + } + private ScriptCmdletsClient serviceClient() { return this.innerClient; } 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 3ce2d3856606..ee4225884020 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 @@ -128,6 +128,10 @@ public List errors() { } } + public String resourceGroupName() { + return resourceGroupName; + } + public ScriptExecutionInner innerModel() { return this.innerObject; } @@ -224,12 +228,6 @@ public ScriptExecution refresh(Context context) { return this; } - public ScriptExecution getExecutionLogs() { - return serviceManager - .scriptExecutions() - .getExecutionLogs(resourceGroupName, privateCloudName, scriptExecutionName); - } - public Response getExecutionLogsWithResponse( List scriptOutputStreamType, Context context) { return serviceManager @@ -238,6 +236,12 @@ public Response 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; 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 26edf6a22288..30507d2066d6 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 @@ -30,7 +30,6 @@ import com.azure.core.management.polling.PollResult; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; -import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.avs.fluent.ScriptExecutionsClient; @@ -44,8 +43,6 @@ /** An instance of this class provides access to all the operations defined in ScriptExecutionsClient. */ public final class ScriptExecutionsClientImpl implements ScriptExecutionsClient { - private final ClientLogger logger = new ClientLogger(ScriptExecutionsClientImpl.class); - /** The proxy service used to perform REST calls. */ private final ScriptExecutionsService service; @@ -170,7 +167,8 @@ Mono> listNext( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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. + * @return pageable list of script executions along with {@link PagedResponse} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync( @@ -229,7 +227,8 @@ private Mono> listSinglePageAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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. + * @return pageable list of script executions along with {@link PagedResponse} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync( @@ -284,7 +283,7 @@ private Mono> listSinglePageAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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. + * @return pageable list of script executions as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(String resourceGroupName, String privateCloudName) { @@ -302,7 +301,7 @@ 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 pageable list of script executions. + * @return pageable list of script executions as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync( @@ -320,7 +319,7 @@ private PagedFlux listAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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. + * @return pageable list of script executions as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(String resourceGroupName, String privateCloudName) { @@ -336,7 +335,7 @@ 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 pageable list of script executions. + * @return pageable list of script executions as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list( @@ -353,7 +352,8 @@ public PagedIterable list( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 an script execution by name in a private cloud along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync( @@ -409,7 +409,8 @@ private Mono> getWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 an script execution by name in a private cloud along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync( @@ -461,20 +462,13 @@ private Mono> getWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 an script execution by name in a private cloud 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( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** @@ -483,14 +477,16 @@ private Mono getAsync( * @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 context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 an script execution by name in a private cloud along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ScriptExecutionInner get(String resourceGroupName, String privateCloudName, String scriptExecutionName) { - return getAsync(resourceGroupName, privateCloudName, scriptExecutionName).block(); + public Response getWithResponse( + String resourceGroupName, String privateCloudName, String scriptExecutionName, Context context) { + return getWithResponseAsync(resourceGroupName, privateCloudName, scriptExecutionName, context).block(); } /** @@ -499,16 +495,14 @@ public ScriptExecutionInner 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 scriptExecutionName Name of the user-invoked script execution 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. * @return an script execution by name in a private cloud. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, String privateCloudName, String scriptExecutionName, Context context) { - return getWithResponseAsync(resourceGroupName, privateCloudName, scriptExecutionName, context).block(); + public ScriptExecutionInner get(String resourceGroupName, String privateCloudName, String scriptExecutionName) { + return getWithResponse(resourceGroupName, privateCloudName, scriptExecutionName, Context.NONE).getValue(); } /** @@ -521,7 +515,8 @@ public Response getWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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. + * @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( @@ -588,7 +583,8 @@ private Mono>> createOrUpdateWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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. + * @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( @@ -652,7 +648,7 @@ private Mono>> createOrUpdateWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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. + * @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( @@ -669,7 +665,7 @@ private PollerFlux, ScriptExecutionInner> begin this.client.getHttpPipeline(), ScriptExecutionInner.class, ScriptExecutionInner.class, - Context.NONE); + this.client.getContext()); } /** @@ -683,7 +679,7 @@ private PollerFlux, ScriptExecutionInner> begin * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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. + * @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( @@ -712,7 +708,7 @@ private PollerFlux, ScriptExecutionInner> begin * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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. + * @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( @@ -735,7 +731,7 @@ public SyncPoller, ScriptExecutionInner> beginC * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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. + * @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( @@ -759,7 +755,7 @@ public SyncPoller, ScriptExecutionInner> beginC * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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. + * @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( @@ -783,7 +779,7 @@ private Mono createOrUpdateAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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. + * @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( @@ -852,7 +848,7 @@ public ScriptExecutionInner createOrUpdate( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> deleteWithResponseAsync( @@ -908,7 +904,7 @@ private Mono>> deleteWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> deleteWithResponseAsync( @@ -960,7 +956,7 @@ private Mono>> deleteWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginDeleteAsync( @@ -969,7 +965,8 @@ private PollerFlux, Void> beginDeleteAsync( deleteWithResponseAsync(resourceGroupName, privateCloudName, scriptExecutionName); return this .client - .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, Context.NONE); + .getLroResult( + mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); } /** @@ -982,7 +979,7 @@ private PollerFlux, Void> beginDeleteAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginDeleteAsync( @@ -1004,7 +1001,7 @@ private PollerFlux, Void> beginDeleteAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete( @@ -1022,7 +1019,7 @@ public SyncPoller, Void> beginDelete( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete( @@ -1039,7 +1036,7 @@ public SyncPoller, Void> beginDelete( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @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) { @@ -1058,7 +1055,7 @@ private Mono deleteAsync(String resourceGroupName, String privateCloudName * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono deleteAsync( @@ -1110,7 +1107,8 @@ public void delete(String resourceGroupName, String privateCloudName, String scr * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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. + * @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( @@ -1172,7 +1170,8 @@ private Mono> getExecutionLogsWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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. + * @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( @@ -1226,29 +1225,18 @@ private Mono> getExecutionLogsWithResponseAsync( * @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 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. + * @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, - List scriptOutputStreamType) { + String resourceGroupName, String privateCloudName, String scriptExecutionName) { + final List scriptOutputStreamType = null; return getExecutionLogsWithResponseAsync( resourceGroupName, privateCloudName, scriptExecutionName, scriptOutputStreamType) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** @@ -1257,25 +1245,24 @@ private Mono getExecutionLogsAsync( * @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 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. + * @return an instance of a script executed by a user - custom or AVS along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getExecutionLogsAsync( - String resourceGroupName, String privateCloudName, String scriptExecutionName) { - final List scriptOutputStreamType = null; + public Response getExecutionLogsWithResponse( + String resourceGroupName, + String privateCloudName, + String scriptExecutionName, + List scriptOutputStreamType, + Context context) { return getExecutionLogsWithResponseAsync( - resourceGroupName, privateCloudName, scriptExecutionName, scriptOutputStreamType) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); + resourceGroupName, privateCloudName, scriptExecutionName, scriptOutputStreamType, context) + .block(); } /** @@ -1293,44 +1280,21 @@ private Mono getExecutionLogsAsync( public ScriptExecutionInner getExecutionLogs( String resourceGroupName, String privateCloudName, String scriptExecutionName) { final List scriptOutputStreamType = null; - return getExecutionLogsAsync(resourceGroupName, privateCloudName, scriptExecutionName, scriptOutputStreamType) - .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 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. - */ - @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 getExecutionLogsWithResponse( + resourceGroupName, privateCloudName, scriptExecutionName, scriptOutputStreamType, Context.NONE) + .getValue(); } /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @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 pageable list of script executions. + * @return pageable list of script executions along with {@link PagedResponse} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink) { @@ -1361,12 +1325,14 @@ private Mono> listNextSinglePageAsync(String /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @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 pageable list of script executions. + * @return pageable list of script executions along with {@link PagedResponse} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink, Context context) { 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 68b7f3fa15de..43fab5a4d89f 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 @@ -14,11 +14,10 @@ import com.azure.resourcemanager.avs.models.ScriptExecution; import com.azure.resourcemanager.avs.models.ScriptExecutions; import com.azure.resourcemanager.avs.models.ScriptOutputStreamType; -import com.fasterxml.jackson.annotation.JsonIgnore; import java.util.List; public final class ScriptExecutionsImpl implements ScriptExecutions { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ScriptExecutionsImpl.class); + private static final ClientLogger LOGGER = new ClientLogger(ScriptExecutionsImpl.class); private final ScriptExecutionsClient innerClient; @@ -41,15 +40,6 @@ public PagedIterable list(String resourceGroupName, String priv return Utils.mapPage(inner, inner1 -> new ScriptExecutionImpl(inner1, this.manager())); } - 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 Response getWithResponse( String resourceGroupName, String privateCloudName, String scriptExecutionName, Context context) { Response inner = @@ -65,6 +55,15 @@ public Response getWithResponse( } } + 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); } @@ -73,17 +72,6 @@ public void delete(String resourceGroupName, String privateCloudName, String scr this.serviceClient().delete(resourceGroupName, privateCloudName, scriptExecutionName, context); } - 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 Response getExecutionLogsWithResponse( String resourceGroupName, String privateCloudName, @@ -106,10 +94,21 @@ public Response getExecutionLogsWithResponse( } } + 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 = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -117,14 +116,14 @@ public ScriptExecution getById(String id) { } String privateCloudName = Utils.getValueFromIdByName(id, "privateClouds"); if (privateCloudName == null) { - throw logger + 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"); if (scriptExecutionName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -137,7 +136,7 @@ public ScriptExecution getById(String id) { public Response getByIdWithResponse(String id, Context context) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -145,14 +144,14 @@ public Response getByIdWithResponse(String id, Context context) } String privateCloudName = Utils.getValueFromIdByName(id, "privateClouds"); if (privateCloudName == null) { - throw logger + 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"); if (scriptExecutionName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -165,7 +164,7 @@ public Response getByIdWithResponse(String id, Context context) public void deleteById(String id) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -173,14 +172,14 @@ public void deleteById(String id) { } String privateCloudName = Utils.getValueFromIdByName(id, "privateClouds"); if (privateCloudName == null) { - throw logger + 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"); if (scriptExecutionName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -193,7 +192,7 @@ public void deleteById(String id) { public void deleteByIdWithResponse(String id, Context context) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -201,14 +200,14 @@ public void deleteByIdWithResponse(String id, Context context) { } String privateCloudName = Utils.getValueFromIdByName(id, "privateClouds"); if (privateCloudName == null) { - throw logger + 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"); if (scriptExecutionName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String 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 06de4c6f986b..357150e3d27a 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 @@ -37,6 +37,14 @@ public String version() { return this.innerModel().version(); } + public String company() { + return this.innerModel().company(); + } + + public String uri() { + return this.innerModel().uri(); + } + public ScriptPackageInner innerModel() { return this.innerObject; } 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 c3049d871e6c..b3afe78b6fad 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 @@ -25,7 +25,6 @@ import com.azure.core.management.exception.ManagementException; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.avs.fluent.ScriptPackagesClient; import com.azure.resourcemanager.avs.fluent.models.ScriptPackageInner; import com.azure.resourcemanager.avs.models.ScriptPackagesList; @@ -33,8 +32,6 @@ /** An instance of this class provides access to all the operations defined in ScriptPackagesClient. */ public final class ScriptPackagesClientImpl implements ScriptPackagesClient { - private final ClientLogger logger = new ClientLogger(ScriptPackagesClientImpl.class); - /** The proxy service used to perform REST calls. */ private final ScriptPackagesService service; @@ -109,7 +106,8 @@ Mono> listNext( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if 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. + * @return a list of the available script packages along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync( @@ -168,7 +166,8 @@ private Mono> listSinglePageAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if 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. + * @return a list of the available script packages along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync( @@ -223,7 +222,7 @@ private Mono> listSinglePageAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if 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. + * @return a list of the available script packages as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(String resourceGroupName, String privateCloudName) { @@ -241,7 +240,7 @@ private PagedFlux listAsync(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 list of the available script packages. + * @return a list of the available script packages as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync( @@ -259,7 +258,7 @@ private PagedFlux listAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if 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. + * @return a list of the available script packages as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(String resourceGroupName, String privateCloudName) { @@ -275,7 +274,7 @@ public PagedIterable list(String resourceGroupName, String p * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if 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. + * @return a list of the available script packages as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(String resourceGroupName, String privateCloudName, Context context) { @@ -291,7 +290,8 @@ public PagedIterable list(String resourceGroupName, String p * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 script package available to run on a private cloud along with {@link Response} on successful completion + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync( @@ -347,7 +347,8 @@ private Mono> getWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 script package available to run on a private cloud along with {@link Response} on successful completion + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync( @@ -399,20 +400,13 @@ private Mono> getWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 script package available to run on a private cloud on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono getAsync( String resourceGroupName, String privateCloudName, String scriptPackageName) { return getWithResponseAsync(resourceGroupName, privateCloudName, scriptPackageName) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** @@ -421,14 +415,16 @@ private Mono getAsync( * @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 context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 script package available to run on a private cloud along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ScriptPackageInner get(String resourceGroupName, String privateCloudName, String scriptPackageName) { - return getAsync(resourceGroupName, privateCloudName, scriptPackageName).block(); + public Response getWithResponse( + String resourceGroupName, String privateCloudName, String scriptPackageName, Context context) { + return getWithResponseAsync(resourceGroupName, privateCloudName, scriptPackageName, context).block(); } /** @@ -437,26 +433,26 @@ public ScriptPackageInner 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 scriptPackageName Name of the script package 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 script package available to run on a private cloud. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, String privateCloudName, String scriptPackageName, Context context) { - return getWithResponseAsync(resourceGroupName, privateCloudName, scriptPackageName, context).block(); + public ScriptPackageInner get(String resourceGroupName, String privateCloudName, String scriptPackageName) { + return getWithResponse(resourceGroupName, privateCloudName, scriptPackageName, Context.NONE).getValue(); } /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @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 the available script packages. + * @return a list of the available script packages along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink) { @@ -487,12 +483,14 @@ private Mono> listNextSinglePageAsync(String n /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @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 the available script packages. + * @return a list of the available script packages along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink, Context context) { 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 bdc1a43bb7fd..da824acd062d 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 @@ -13,10 +13,9 @@ import com.azure.resourcemanager.avs.fluent.models.ScriptPackageInner; import com.azure.resourcemanager.avs.models.ScriptPackage; import com.azure.resourcemanager.avs.models.ScriptPackages; -import com.fasterxml.jackson.annotation.JsonIgnore; public final class ScriptPackagesImpl implements ScriptPackages { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ScriptPackagesImpl.class); + private static final ClientLogger LOGGER = new ClientLogger(ScriptPackagesImpl.class); private final ScriptPackagesClient innerClient; @@ -39,15 +38,6 @@ public PagedIterable list(String resourceGroupName, String privat return Utils.mapPage(inner, inner1 -> new ScriptPackageImpl(inner1, this.manager())); } - public ScriptPackage get(String resourceGroupName, String privateCloudName, String scriptPackageName) { - ScriptPackageInner inner = this.serviceClient().get(resourceGroupName, privateCloudName, scriptPackageName); - if (inner != null) { - return new ScriptPackageImpl(inner, this.manager()); - } else { - return null; - } - } - public Response getWithResponse( String resourceGroupName, String privateCloudName, String scriptPackageName, Context context) { Response inner = @@ -63,6 +53,15 @@ public Response getWithResponse( } } + public ScriptPackage get(String resourceGroupName, String privateCloudName, String scriptPackageName) { + ScriptPackageInner inner = this.serviceClient().get(resourceGroupName, privateCloudName, scriptPackageName); + if (inner != null) { + return new ScriptPackageImpl(inner, this.manager()); + } else { + return null; + } + } + private ScriptPackagesClient serviceClient() { return this.innerClient; } 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 513bf44500d2..21c612ec5cc9 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 @@ -28,7 +28,6 @@ import com.azure.core.management.polling.PollResult; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; -import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.avs.fluent.VirtualMachinesClient; @@ -41,8 +40,6 @@ /** An instance of this class provides access to all the operations defined in VirtualMachinesClient. */ public final class VirtualMachinesClientImpl implements VirtualMachinesClient { - private final ClientLogger logger = new ClientLogger(VirtualMachinesClientImpl.class); - /** The proxy service used to perform REST calls. */ private final VirtualMachinesService service; @@ -138,7 +135,7 @@ Mono> listNext( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if 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. + * @return a list of Virtual Machines along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync( @@ -202,7 +199,7 @@ private Mono> listSinglePageAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if 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. + * @return a list of Virtual Machines along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync( @@ -262,7 +259,7 @@ private Mono> listSinglePageAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if 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. + * @return a list of Virtual Machines as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync( @@ -282,7 +279,7 @@ private PagedFlux listAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if 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. + * @return a list of Virtual Machines as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync( @@ -301,7 +298,7 @@ private PagedFlux listAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if 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. + * @return a list of Virtual Machines as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list( @@ -319,7 +316,7 @@ public PagedIterable list( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if 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. + * @return a list of Virtual Machines as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list( @@ -337,7 +334,8 @@ public PagedIterable list( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 virtual machine by id in a private cloud cluster along with {@link Response} on successful completion + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync( @@ -398,7 +396,8 @@ private Mono> getWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 virtual machine by id in a private cloud cluster along with {@link Response} on successful completion + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync( @@ -459,20 +458,13 @@ private Mono> getWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 virtual machine by id in a private cloud cluster on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono getAsync( String resourceGroupName, String privateCloudName, String clusterName, String virtualMachineId) { return getWithResponseAsync(resourceGroupName, privateCloudName, clusterName, virtualMachineId) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** @@ -482,15 +474,21 @@ private Mono getAsync( * @param privateCloudName Name of the private cloud. * @param clusterName Name of the cluster in 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 cluster. + * @return a virtual machine by id in a private cloud cluster along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public VirtualMachineInner get( - String resourceGroupName, String privateCloudName, String clusterName, String virtualMachineId) { - return getAsync(resourceGroupName, privateCloudName, clusterName, virtualMachineId).block(); + public Response getWithResponse( + String resourceGroupName, + String privateCloudName, + String clusterName, + String virtualMachineId, + Context context) { + return getWithResponseAsync(resourceGroupName, privateCloudName, clusterName, virtualMachineId, context) + .block(); } /** @@ -500,21 +498,16 @@ public VirtualMachineInner get( * @param privateCloudName Name of the private cloud. * @param clusterName Name of the cluster in 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 cluster. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, - String privateCloudName, - String clusterName, - String virtualMachineId, - Context context) { - return getWithResponseAsync(resourceGroupName, privateCloudName, clusterName, virtualMachineId, context) - .block(); + public VirtualMachineInner get( + String resourceGroupName, String privateCloudName, String clusterName, String virtualMachineId) { + return getWithResponse(resourceGroupName, privateCloudName, clusterName, virtualMachineId, Context.NONE) + .getValue(); } /** @@ -528,7 +521,7 @@ public Response getWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> restrictMovementWithResponseAsync( @@ -601,7 +594,7 @@ private Mono>> restrictMovementWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> restrictMovementWithResponseAsync( @@ -671,7 +664,7 @@ private Mono>> restrictMovementWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginRestrictMovementAsync( @@ -685,7 +678,8 @@ private PollerFlux, Void> beginRestrictMovementAsync( resourceGroupName, privateCloudName, clusterName, virtualMachineId, restrictMovement); return this .client - .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, Context.NONE); + .getLroResult( + mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); } /** @@ -700,7 +694,7 @@ private PollerFlux, Void> beginRestrictMovementAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginRestrictMovementAsync( @@ -730,7 +724,7 @@ private PollerFlux, Void> beginRestrictMovementAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginRestrictMovement( @@ -756,7 +750,7 @@ public SyncPoller, Void> beginRestrictMovement( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginRestrictMovement( @@ -782,7 +776,7 @@ public SyncPoller, Void> beginRestrictMovement( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono restrictMovementAsync( @@ -809,7 +803,7 @@ private Mono restrictMovementAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono restrictMovementAsync( @@ -877,11 +871,12 @@ public void restrictMovement( /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @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 Virtual Machines. + * @return a list of Virtual Machines along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink) { @@ -912,12 +907,13 @@ private Mono> listNextSinglePageAsync(String /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @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 Virtual Machines. + * @return a list of Virtual Machines along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink, Context context) { 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 dab49bab8836..12e5bb4e520a 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 @@ -14,10 +14,9 @@ import com.azure.resourcemanager.avs.models.VirtualMachine; import com.azure.resourcemanager.avs.models.VirtualMachineRestrictMovement; import com.azure.resourcemanager.avs.models.VirtualMachines; -import com.fasterxml.jackson.annotation.JsonIgnore; public final class VirtualMachinesImpl implements VirtualMachines { - @JsonIgnore private final ClientLogger logger = new ClientLogger(VirtualMachinesImpl.class); + private static final ClientLogger LOGGER = new ClientLogger(VirtualMachinesImpl.class); private final VirtualMachinesClient innerClient; @@ -42,17 +41,6 @@ public PagedIterable list( return Utils.mapPage(inner, inner1 -> new VirtualMachineImpl(inner1, this.manager())); } - 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 { - return null; - } - } - public Response getWithResponse( String resourceGroupName, String privateCloudName, @@ -74,6 +62,17 @@ public Response getWithResponse( } } + 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 { + return null; + } + } + public void restrictMovement( String resourceGroupName, String privateCloudName, 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 bfc1e0825a34..58335abd89d7 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 @@ -31,6 +31,10 @@ public WorkloadNetworkDhcpEntity properties() { return this.innerModel().properties(); } + public String resourceGroupName() { + return resourceGroupName; + } + public WorkloadNetworkDhcpInner innerModel() { return this.innerObject; } 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 065a33946b7b..895afaf8bff5 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 @@ -68,6 +68,10 @@ public Long revision() { return this.innerModel().revision(); } + public String resourceGroupName() { + return resourceGroupName; + } + public WorkloadNetworkDnsServiceInner innerModel() { return this.innerObject; } 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 45375171375d..f74b0b96cd38 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 @@ -67,6 +67,10 @@ public Long revision() { return this.innerModel().revision(); } + public String resourceGroupName() { + return resourceGroupName; + } + public WorkloadNetworkDnsZoneInner innerModel() { return this.innerObject; } 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 new file mode 100644 index 000000000000..1e66a40f2999 --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworkImpl.java @@ -0,0 +1,39 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.avs.implementation; + +import com.azure.resourcemanager.avs.fluent.models.WorkloadNetworkInner; +import com.azure.resourcemanager.avs.models.WorkloadNetwork; + +public final class WorkloadNetworkImpl implements WorkloadNetwork { + private WorkloadNetworkInner innerObject; + + private final com.azure.resourcemanager.avs.AvsManager serviceManager; + + WorkloadNetworkImpl(WorkloadNetworkInner 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 WorkloadNetworkInner 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/WorkloadNetworkPortMirroringImpl.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworkPortMirroringImpl.java index 5c4b88ba6572..e9195066f115 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 @@ -59,6 +59,10 @@ public Long revision() { return this.innerModel().revision(); } + public String resourceGroupName() { + return resourceGroupName; + } + public WorkloadNetworkPortMirroringInner innerModel() { return this.innerObject; } 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 7590a94e302a..51469b95435c 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 @@ -65,6 +65,10 @@ public Long revision() { return this.innerModel().revision(); } + public String resourceGroupName() { + return resourceGroupName; + } + public WorkloadNetworkSegmentInner innerModel() { return this.innerObject; } 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 0a06a88331ef..14b1f2f8e1b1 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 @@ -55,6 +55,10 @@ public Long revision() { return this.innerModel().revision(); } + public String resourceGroupName() { + return resourceGroupName; + } + public WorkloadNetworkVMGroupInner innerModel() { return this.innerObject; } 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 998e0bbbcd6a..1cbb4ac6054d 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 @@ -30,7 +30,6 @@ import com.azure.core.management.polling.PollResult; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; -import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.avs.fluent.WorkloadNetworksClient; @@ -38,6 +37,7 @@ 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; @@ -47,6 +47,8 @@ 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; @@ -58,8 +60,6 @@ /** An instance of this class provides access to all the operations defined in WorkloadNetworksClient. */ public final class WorkloadNetworksClientImpl implements WorkloadNetworksClient { - private final ClientLogger logger = new ClientLogger(WorkloadNetworksClientImpl.class); - /** The proxy service used to perform REST calls. */ private final WorkloadNetworksService service; @@ -84,6 +84,37 @@ public final class WorkloadNetworksClientImpl implements WorkloadNetworksClient @Host("{$host}") @ServiceInterface(name = "AvsClientWorkloadNet") private 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" @@ -696,6 +727,16 @@ Mono>> deletePublicIp( @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}) @@ -787,6 +828,349 @@ Mono> listPublicIPsNext( Context context); } + /** + * Get a private cloud workload network. + * + * @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}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync( + String resourceGroupName, String privateCloudName, WorkloadNetworkName 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.getSubscriptionId(), + resourceGroupName, + this.client.getApiVersion(), + privateCloudName, + workloadNetworkName, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get a private cloud workload network. + * + * @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}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync( + String resourceGroupName, String privateCloudName, WorkloadNetworkName 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.getSubscriptionId(), + resourceGroupName, + this.client.getApiVersion(), + privateCloudName, + workloadNetworkName, + accept, + context); + } + + /** + * Get a private cloud workload network. + * + * @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}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getAsync( + String resourceGroupName, String privateCloudName, WorkloadNetworkName workloadNetworkName) { + return getWithResponseAsync(resourceGroupName, privateCloudName, workloadNetworkName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Get a private cloud workload network. + * + * @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}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse( + String resourceGroupName, String privateCloudName, WorkloadNetworkName workloadNetworkName, Context context) { + return getWithResponseAsync(resourceGroupName, privateCloudName, workloadNetworkName, context).block(); + } + + /** + * Get a private cloud workload network. + * + * @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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public WorkloadNetworkInner get( + String resourceGroupName, String privateCloudName, WorkloadNetworkName workloadNetworkName) { + return getWithResponse(resourceGroupName, privateCloudName, workloadNetworkName, Context.NONE).getValue(); + } + + /** + * List of workload networks in a private cloud. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of workload networks 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.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 workload networks in a private cloud. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if 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> 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.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 workload networks in a private cloud. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of workload networks as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String resourceGroupName, String privateCloudName) { + return new PagedFlux<>( + () -> listSinglePageAsync(resourceGroupName, privateCloudName), + nextLink -> listNextSinglePageAsync(nextLink)); + } + + /** + * List of workload networks in a private cloud. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of workload networks as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync( + String resourceGroupName, String privateCloudName, Context context) { + return new PagedFlux<>( + () -> listSinglePageAsync(resourceGroupName, privateCloudName, context), + nextLink -> listNextSinglePageAsync(nextLink, context)); + } + + /** + * List of workload networks in a private cloud. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of workload networks as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String resourceGroupName, String privateCloudName) { + return new PagedIterable<>(listAsync(resourceGroupName, privateCloudName)); + } + + /** + * List of workload networks in a private cloud. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if 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}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list( + String resourceGroupName, String privateCloudName, Context context) { + return new PagedIterable<>(listAsync(resourceGroupName, privateCloudName, context)); + } + /** * List of segments in a private cloud workload network. * @@ -795,7 +1179,7 @@ Mono> listPublicIPsNext( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if 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. + * @return a list of NSX Segments along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSegmentsSinglePageAsync( @@ -854,7 +1238,7 @@ private Mono> listSegmentsSinglePageA * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if 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. + * @return a list of NSX Segments along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSegmentsSinglePageAsync( @@ -909,7 +1293,7 @@ private Mono> listSegmentsSinglePageA * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if 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. + * @return a list of NSX Segments as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listSegmentsAsync( @@ -928,7 +1312,7 @@ private PagedFlux listSegmentsAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if 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. + * @return a list of NSX Segments as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listSegmentsAsync( @@ -946,7 +1330,7 @@ private PagedFlux listSegmentsAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if 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. + * @return a list of NSX Segments as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listSegments(String resourceGroupName, String privateCloudName) { @@ -962,7 +1346,7 @@ public PagedIterable listSegments(String resourceGr * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if 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. + * @return a list of NSX Segments as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listSegments( @@ -979,7 +1363,8 @@ public PagedIterable listSegments( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a segment by id in a private cloud workload network. + * @return a 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( @@ -1034,7 +1419,8 @@ private Mono> getSegmentWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a segment by id in a private cloud workload network. + * @return a 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( @@ -1085,20 +1471,13 @@ private Mono> getSegmentWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a segment by id in a private cloud workload network. + * @return a 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( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** @@ -1107,14 +1486,16 @@ private Mono getSegmentAsync( * @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. + * @return a segment by id in a private cloud workload network along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public WorkloadNetworkSegmentInner getSegment(String resourceGroupName, String privateCloudName, String segmentId) { - return getSegmentAsync(resourceGroupName, privateCloudName, segmentId).block(); + public Response getSegmentWithResponse( + String resourceGroupName, String privateCloudName, String segmentId, Context context) { + return getSegmentWithResponseAsync(resourceGroupName, privateCloudName, segmentId, context).block(); } /** @@ -1123,16 +1504,14 @@ 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 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. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getSegmentWithResponse( - String resourceGroupName, String privateCloudName, String segmentId, Context context) { - return getSegmentWithResponseAsync(resourceGroupName, privateCloudName, segmentId, context).block(); + public WorkloadNetworkSegmentInner getSegment(String resourceGroupName, String privateCloudName, String segmentId) { + return getSegmentWithResponse(resourceGroupName, privateCloudName, segmentId, Context.NONE).getValue(); } /** @@ -1145,7 +1524,7 @@ public Response getSegmentWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return nSX Segment. + * @return nSX Segment along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> createSegmentsWithResponseAsync( @@ -1212,7 +1591,7 @@ private Mono>> createSegmentsWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return nSX Segment. + * @return nSX Segment along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> createSegmentsWithResponseAsync( @@ -1276,7 +1655,7 @@ private Mono>> createSegmentsWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return nSX Segment. + * @return the {@link PollerFlux} for polling of nSX Segment. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, WorkloadNetworkSegmentInner> beginCreateSegmentsAsync( @@ -1293,7 +1672,7 @@ private PollerFlux, WorkloadNetworkSegme this.client.getHttpPipeline(), WorkloadNetworkSegmentInner.class, WorkloadNetworkSegmentInner.class, - Context.NONE); + this.client.getContext()); } /** @@ -1307,7 +1686,7 @@ private PollerFlux, WorkloadNetworkSegme * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return nSX Segment. + * @return the {@link PollerFlux} for polling of nSX Segment. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, WorkloadNetworkSegmentInner> beginCreateSegmentsAsync( @@ -1340,7 +1719,7 @@ private PollerFlux, WorkloadNetworkSegme * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return nSX Segment. + * @return the {@link SyncPoller} for polling of nSX Segment. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, WorkloadNetworkSegmentInner> beginCreateSegments( @@ -1363,7 +1742,7 @@ public SyncPoller, WorkloadNetworkSegmen * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return nSX Segment. + * @return the {@link SyncPoller} for polling of nSX Segment. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, WorkloadNetworkSegmentInner> beginCreateSegments( @@ -1386,7 +1765,7 @@ public SyncPoller, WorkloadNetworkSegmen * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return nSX Segment. + * @return nSX Segment on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono createSegmentsAsync( @@ -1410,7 +1789,7 @@ private Mono createSegmentsAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return nSX Segment. + * @return nSX Segment on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono createSegmentsAsync( @@ -1479,7 +1858,7 @@ public WorkloadNetworkSegmentInner createSegments( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return nSX Segment. + * @return nSX Segment along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> updateSegmentsWithResponseAsync( @@ -1546,7 +1925,7 @@ private Mono>> updateSegmentsWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return nSX Segment. + * @return nSX Segment along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> updateSegmentsWithResponseAsync( @@ -1610,7 +1989,7 @@ private Mono>> updateSegmentsWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return nSX Segment. + * @return the {@link PollerFlux} for polling of nSX Segment. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, WorkloadNetworkSegmentInner> beginUpdateSegmentsAsync( @@ -1627,7 +2006,7 @@ private PollerFlux, WorkloadNetworkSegme this.client.getHttpPipeline(), WorkloadNetworkSegmentInner.class, WorkloadNetworkSegmentInner.class, - Context.NONE); + this.client.getContext()); } /** @@ -1641,7 +2020,7 @@ private PollerFlux, WorkloadNetworkSegme * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return nSX Segment. + * @return the {@link PollerFlux} for polling of nSX Segment. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, WorkloadNetworkSegmentInner> beginUpdateSegmentsAsync( @@ -1674,7 +2053,7 @@ private PollerFlux, WorkloadNetworkSegme * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return nSX Segment. + * @return the {@link SyncPoller} for polling of nSX Segment. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, WorkloadNetworkSegmentInner> beginUpdateSegments( @@ -1697,7 +2076,7 @@ public SyncPoller, WorkloadNetworkSegmen * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return nSX Segment. + * @return the {@link SyncPoller} for polling of nSX Segment. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, WorkloadNetworkSegmentInner> beginUpdateSegments( @@ -1720,7 +2099,7 @@ public SyncPoller, WorkloadNetworkSegmen * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return nSX Segment. + * @return nSX Segment on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono updateSegmentsAsync( @@ -1744,7 +2123,7 @@ private Mono updateSegmentsAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return nSX Segment. + * @return nSX Segment on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono updateSegmentsAsync( @@ -1812,7 +2191,7 @@ public WorkloadNetworkSegmentInner updateSegments( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> deleteSegmentWithResponseAsync( @@ -1867,7 +2246,7 @@ private Mono>> deleteSegmentWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> deleteSegmentWithResponseAsync( @@ -1918,7 +2297,7 @@ private Mono>> deleteSegmentWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginDeleteSegmentAsync( @@ -1927,7 +2306,8 @@ private PollerFlux, Void> beginDeleteSegmentAsync( deleteSegmentWithResponseAsync(resourceGroupName, privateCloudName, segmentId); return this .client - .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, Context.NONE); + .getLroResult( + mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); } /** @@ -1940,7 +2320,7 @@ private PollerFlux, Void> beginDeleteSegmentAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginDeleteSegmentAsync( @@ -1962,7 +2342,7 @@ private PollerFlux, Void> beginDeleteSegmentAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDeleteSegment( @@ -1980,7 +2360,7 @@ public SyncPoller, Void> beginDeleteSegment( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDeleteSegment( @@ -1997,7 +2377,7 @@ public SyncPoller, Void> beginDeleteSegment( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @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) { @@ -2016,7 +2396,7 @@ private Mono deleteSegmentAsync(String resourceGroupName, String privateCl * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono deleteSegmentAsync( @@ -2065,7 +2445,7 @@ public void deleteSegment(String resourceGroupName, String privateCloudName, Str * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if 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. + * @return a list of NSX dhcp entities along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listDhcpSinglePageAsync( @@ -2124,7 +2504,7 @@ private Mono> listDhcpSinglePageAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if 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. + * @return a list of NSX dhcp entities along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listDhcpSinglePageAsync( @@ -2179,7 +2559,7 @@ private Mono> listDhcpSinglePageAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if 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. + * @return a list of NSX dhcp entities as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listDhcpAsync(String resourceGroupName, String privateCloudName) { @@ -2197,7 +2577,7 @@ private PagedFlux listDhcpAsync(String resourceGroupNa * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if 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. + * @return a list of NSX dhcp entities as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listDhcpAsync( @@ -2215,7 +2595,7 @@ private PagedFlux listDhcpAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if 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. + * @return a list of NSX dhcp entities as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listDhcp(String resourceGroupName, String privateCloudName) { @@ -2231,7 +2611,7 @@ public PagedIterable listDhcp(String resourceGroupName * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if 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. + * @return a list of NSX dhcp entities as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listDhcp( @@ -2248,7 +2628,8 @@ public PagedIterable listDhcp( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return dhcp by id in a private cloud workload network. + * @return 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( @@ -2303,7 +2684,8 @@ private Mono> getDhcpWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return dhcp by id in a private cloud workload network. + * @return 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( @@ -2354,20 +2736,13 @@ private Mono> getDhcpWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return dhcp by id in a private cloud workload network. + * @return 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( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** @@ -2376,14 +2751,16 @@ private Mono getDhcpAsync( * @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. + * @return dhcp by id in a private cloud workload network along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public WorkloadNetworkDhcpInner getDhcp(String resourceGroupName, String dhcpId, String privateCloudName) { - return getDhcpAsync(resourceGroupName, dhcpId, privateCloudName).block(); + public Response getDhcpWithResponse( + String resourceGroupName, String dhcpId, String privateCloudName, Context context) { + return getDhcpWithResponseAsync(resourceGroupName, dhcpId, privateCloudName, context).block(); } /** @@ -2392,16 +2769,14 @@ public WorkloadNetworkDhcpInner getDhcp(String resourceGroupName, String dhcpId, * @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. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getDhcpWithResponse( - String resourceGroupName, String dhcpId, String privateCloudName, Context context) { - return getDhcpWithResponseAsync(resourceGroupName, dhcpId, privateCloudName, context).block(); + public WorkloadNetworkDhcpInner getDhcp(String resourceGroupName, String dhcpId, String privateCloudName) { + return getDhcpWithResponse(resourceGroupName, dhcpId, privateCloudName, Context.NONE).getValue(); } /** @@ -2414,7 +2789,7 @@ public Response getDhcpWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return nSX DHCP. + * @return nSX DHCP along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> createDhcpWithResponseAsync( @@ -2480,7 +2855,7 @@ private Mono>> createDhcpWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return nSX DHCP. + * @return nSX DHCP along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> createDhcpWithResponseAsync( @@ -2543,7 +2918,7 @@ private Mono>> createDhcpWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return nSX DHCP. + * @return the {@link PollerFlux} for polling of nSX DHCP. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, WorkloadNetworkDhcpInner> beginCreateDhcpAsync( @@ -2560,7 +2935,7 @@ private PollerFlux, WorkloadNetworkDhcpInne this.client.getHttpPipeline(), WorkloadNetworkDhcpInner.class, WorkloadNetworkDhcpInner.class, - Context.NONE); + this.client.getContext()); } /** @@ -2574,7 +2949,7 @@ private PollerFlux, WorkloadNetworkDhcpInne * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return nSX DHCP. + * @return the {@link PollerFlux} for polling of nSX DHCP. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, WorkloadNetworkDhcpInner> beginCreateDhcpAsync( @@ -2606,7 +2981,7 @@ private PollerFlux, WorkloadNetworkDhcpInne * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return nSX DHCP. + * @return the {@link SyncPoller} for polling of nSX DHCP. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, WorkloadNetworkDhcpInner> beginCreateDhcp( @@ -2628,7 +3003,7 @@ public SyncPoller, WorkloadNetworkDhcpInner * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return nSX DHCP. + * @return the {@link SyncPoller} for polling of nSX DHCP. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, WorkloadNetworkDhcpInner> beginCreateDhcp( @@ -2651,7 +3026,7 @@ public SyncPoller, WorkloadNetworkDhcpInner * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return nSX DHCP. + * @return nSX DHCP on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono createDhcpAsync( @@ -2675,7 +3050,7 @@ private Mono createDhcpAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return nSX DHCP. + * @return nSX DHCP on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono createDhcpAsync( @@ -2743,7 +3118,7 @@ public WorkloadNetworkDhcpInner createDhcp( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return nSX DHCP. + * @return nSX DHCP along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> updateDhcpWithResponseAsync( @@ -2809,7 +3184,7 @@ private Mono>> updateDhcpWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return nSX DHCP. + * @return nSX DHCP along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> updateDhcpWithResponseAsync( @@ -2872,7 +3247,7 @@ private Mono>> updateDhcpWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return nSX DHCP. + * @return the {@link PollerFlux} for polling of nSX DHCP. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, WorkloadNetworkDhcpInner> beginUpdateDhcpAsync( @@ -2889,7 +3264,7 @@ private PollerFlux, WorkloadNetworkDhcpInne this.client.getHttpPipeline(), WorkloadNetworkDhcpInner.class, WorkloadNetworkDhcpInner.class, - Context.NONE); + this.client.getContext()); } /** @@ -2903,7 +3278,7 @@ private PollerFlux, WorkloadNetworkDhcpInne * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return nSX DHCP. + * @return the {@link PollerFlux} for polling of nSX DHCP. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, WorkloadNetworkDhcpInner> beginUpdateDhcpAsync( @@ -2935,7 +3310,7 @@ private PollerFlux, WorkloadNetworkDhcpInne * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return nSX DHCP. + * @return the {@link SyncPoller} for polling of nSX DHCP. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, WorkloadNetworkDhcpInner> beginUpdateDhcp( @@ -2957,7 +3332,7 @@ public SyncPoller, WorkloadNetworkDhcpInner * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return nSX DHCP. + * @return the {@link SyncPoller} for polling of nSX DHCP. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, WorkloadNetworkDhcpInner> beginUpdateDhcp( @@ -2980,7 +3355,7 @@ public SyncPoller, WorkloadNetworkDhcpInner * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return nSX DHCP. + * @return nSX DHCP on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono updateDhcpAsync( @@ -3004,7 +3379,7 @@ private Mono updateDhcpAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return nSX DHCP. + * @return nSX DHCP on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono updateDhcpAsync( @@ -3071,7 +3446,7 @@ public WorkloadNetworkDhcpInner updateDhcp( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> deleteDhcpWithResponseAsync( @@ -3126,7 +3501,7 @@ private Mono>> deleteDhcpWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> deleteDhcpWithResponseAsync( @@ -3177,7 +3552,7 @@ private Mono>> deleteDhcpWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginDeleteDhcpAsync( @@ -3186,7 +3561,8 @@ private PollerFlux, Void> beginDeleteDhcpAsync( deleteDhcpWithResponseAsync(resourceGroupName, privateCloudName, dhcpId); return this .client - .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, Context.NONE); + .getLroResult( + mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); } /** @@ -3199,7 +3575,7 @@ private PollerFlux, Void> beginDeleteDhcpAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginDeleteDhcpAsync( @@ -3221,7 +3597,7 @@ private PollerFlux, Void> beginDeleteDhcpAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDeleteDhcp( @@ -3239,7 +3615,7 @@ public SyncPoller, Void> beginDeleteDhcp( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDeleteDhcp( @@ -3256,7 +3632,7 @@ public SyncPoller, Void> beginDeleteDhcp( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @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) { @@ -3275,7 +3651,7 @@ private Mono deleteDhcpAsync(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 the completion. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono deleteDhcpAsync( @@ -3324,7 +3700,7 @@ public void deleteDhcp(String resourceGroupName, String privateCloudName, 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 list of NSX Gateways. + * @return a list of NSX Gateways along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listGatewaysSinglePageAsync( @@ -3383,7 +3759,7 @@ private Mono> listGatewaysSinglePageA * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if 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. + * @return a list of NSX Gateways along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listGatewaysSinglePageAsync( @@ -3438,7 +3814,7 @@ private Mono> listGatewaysSinglePageA * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if 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. + * @return a list of NSX Gateways as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listGatewaysAsync( @@ -3457,7 +3833,7 @@ private PagedFlux listGatewaysAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if 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. + * @return a list of NSX Gateways as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listGatewaysAsync( @@ -3475,7 +3851,7 @@ private PagedFlux listGatewaysAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if 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. + * @return a list of NSX Gateways as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listGateways(String resourceGroupName, String privateCloudName) { @@ -3491,7 +3867,7 @@ public PagedIterable listGateways(String resourceGr * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if 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. + * @return a list of NSX Gateways as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listGateways( @@ -3508,7 +3884,8 @@ public PagedIterable listGateways( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a gateway by id in a private cloud workload network. + * @return a 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( @@ -3563,7 +3940,8 @@ private Mono> getGatewayWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a gateway by id in a private cloud workload network. + * @return a 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( @@ -3614,20 +3992,13 @@ private Mono> getGatewayWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a gateway by id in a private cloud workload network. + * @return a 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( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** @@ -3636,14 +4007,16 @@ private Mono getGatewayAsync( * @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. + * @return a gateway by id in a private cloud workload network along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public WorkloadNetworkGatewayInner getGateway(String resourceGroupName, String privateCloudName, String gatewayId) { - return getGatewayAsync(resourceGroupName, privateCloudName, gatewayId).block(); + public Response getGatewayWithResponse( + String resourceGroupName, String privateCloudName, String gatewayId, Context context) { + return getGatewayWithResponseAsync(resourceGroupName, privateCloudName, gatewayId, context).block(); } /** @@ -3652,16 +4025,14 @@ 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 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. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getGatewayWithResponse( - String resourceGroupName, String privateCloudName, String gatewayId, Context context) { - return getGatewayWithResponseAsync(resourceGroupName, privateCloudName, gatewayId, context).block(); + public WorkloadNetworkGatewayInner getGateway(String resourceGroupName, String privateCloudName, String gatewayId) { + return getGatewayWithResponse(resourceGroupName, privateCloudName, gatewayId, Context.NONE).getValue(); } /** @@ -3672,7 +4043,7 @@ public Response getGatewayWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if 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. + * @return a list of NSX Port Mirroring along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listPortMirroringSinglePageAsync( @@ -3731,7 +4102,7 @@ private Mono> listPortMirroring * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if 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. + * @return a list of NSX Port Mirroring along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listPortMirroringSinglePageAsync( @@ -3786,7 +4157,7 @@ private Mono> listPortMirroring * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if 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. + * @return a list of NSX Port Mirroring as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listPortMirroringAsync( @@ -3805,7 +4176,7 @@ private PagedFlux listPortMirroringAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if 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. + * @return a list of NSX Port Mirroring as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listPortMirroringAsync( @@ -3823,7 +4194,7 @@ private PagedFlux listPortMirroringAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if 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. + * @return a list of NSX Port Mirroring as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listPortMirroring( @@ -3840,7 +4211,7 @@ public PagedIterable listPortMirroring( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if 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. + * @return a list of NSX Port Mirroring as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listPortMirroring( @@ -3857,7 +4228,8 @@ public PagedIterable listPortMirroring( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a port mirroring profile by id in a private cloud workload network. + * @return 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( @@ -3913,7 +4285,8 @@ private Mono> getPortMirroringWithRe * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a port mirroring profile by id in a private cloud workload network. + * @return 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( @@ -3965,20 +4338,14 @@ private Mono> getPortMirroringWithRe * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a port mirroring profile by id in a private cloud workload network. + * @return 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( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** @@ -3987,15 +4354,16 @@ private Mono getPortMirroringAsync( * @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. + * @return a port mirroring profile by id in a private cloud workload network along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public WorkloadNetworkPortMirroringInner getPortMirroring( - String resourceGroupName, String privateCloudName, String portMirroringId) { - return getPortMirroringAsync(resourceGroupName, privateCloudName, portMirroringId).block(); + public Response getPortMirroringWithResponse( + String resourceGroupName, String privateCloudName, String portMirroringId, Context context) { + return getPortMirroringWithResponseAsync(resourceGroupName, privateCloudName, portMirroringId, context).block(); } /** @@ -4004,16 +4372,16 @@ public WorkloadNetworkPortMirroringInner getPortMirroring( * @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. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getPortMirroringWithResponse( - String resourceGroupName, String privateCloudName, String portMirroringId, Context context) { - return getPortMirroringWithResponseAsync(resourceGroupName, privateCloudName, portMirroringId, context).block(); + public WorkloadNetworkPortMirroringInner getPortMirroring( + String resourceGroupName, String privateCloudName, String portMirroringId) { + return getPortMirroringWithResponse(resourceGroupName, privateCloudName, portMirroringId, Context.NONE) + .getValue(); } /** @@ -4026,7 +4394,7 @@ public Response getPortMirroringWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return nSX Port Mirroring. + * @return nSX Port Mirroring along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> createPortMirroringWithResponseAsync( @@ -4095,7 +4463,7 @@ private Mono>> createPortMirroringWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return nSX Port Mirroring. + * @return nSX Port Mirroring along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> createPortMirroringWithResponseAsync( @@ -4161,7 +4529,7 @@ private Mono>> createPortMirroringWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return nSX Port Mirroring. + * @return the {@link PollerFlux} for polling of nSX Port Mirroring. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, WorkloadNetworkPortMirroringInner> @@ -4180,7 +4548,7 @@ private Mono>> createPortMirroringWithResponseAsync( this.client.getHttpPipeline(), WorkloadNetworkPortMirroringInner.class, WorkloadNetworkPortMirroringInner.class, - Context.NONE); + this.client.getContext()); } /** @@ -4194,7 +4562,7 @@ private Mono>> createPortMirroringWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return nSX Port Mirroring. + * @return the {@link PollerFlux} for polling of nSX Port Mirroring. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, WorkloadNetworkPortMirroringInner> @@ -4228,7 +4596,7 @@ private Mono>> createPortMirroringWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return nSX Port Mirroring. + * @return the {@link SyncPoller} for polling of nSX Port Mirroring. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, WorkloadNetworkPortMirroringInner> @@ -4253,7 +4621,7 @@ private Mono>> createPortMirroringWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return nSX Port Mirroring. + * @return the {@link SyncPoller} for polling of nSX Port Mirroring. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, WorkloadNetworkPortMirroringInner> @@ -4278,7 +4646,7 @@ private Mono>> createPortMirroringWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return nSX Port Mirroring. + * @return nSX Port Mirroring on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono createPortMirroringAsync( @@ -4303,7 +4671,7 @@ private Mono createPortMirroringAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return nSX Port Mirroring. + * @return nSX Port Mirroring on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono createPortMirroringAsync( @@ -4376,7 +4744,7 @@ public WorkloadNetworkPortMirroringInner createPortMirroring( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return nSX Port Mirroring. + * @return nSX Port Mirroring along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> updatePortMirroringWithResponseAsync( @@ -4445,7 +4813,7 @@ private Mono>> updatePortMirroringWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return nSX Port Mirroring. + * @return nSX Port Mirroring along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> updatePortMirroringWithResponseAsync( @@ -4511,7 +4879,7 @@ private Mono>> updatePortMirroringWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return nSX Port Mirroring. + * @return the {@link PollerFlux} for polling of nSX Port Mirroring. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, WorkloadNetworkPortMirroringInner> @@ -4530,7 +4898,7 @@ private Mono>> updatePortMirroringWithResponseAsync( this.client.getHttpPipeline(), WorkloadNetworkPortMirroringInner.class, WorkloadNetworkPortMirroringInner.class, - Context.NONE); + this.client.getContext()); } /** @@ -4544,7 +4912,7 @@ private Mono>> updatePortMirroringWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return nSX Port Mirroring. + * @return the {@link PollerFlux} for polling of nSX Port Mirroring. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, WorkloadNetworkPortMirroringInner> @@ -4578,7 +4946,7 @@ private Mono>> updatePortMirroringWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return nSX Port Mirroring. + * @return the {@link SyncPoller} for polling of nSX Port Mirroring. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, WorkloadNetworkPortMirroringInner> @@ -4603,7 +4971,7 @@ private Mono>> updatePortMirroringWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return nSX Port Mirroring. + * @return the {@link SyncPoller} for polling of nSX Port Mirroring. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, WorkloadNetworkPortMirroringInner> @@ -4628,7 +4996,7 @@ private Mono>> updatePortMirroringWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return nSX Port Mirroring. + * @return nSX Port Mirroring on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono updatePortMirroringAsync( @@ -4653,7 +5021,7 @@ private Mono updatePortMirroringAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return nSX Port Mirroring. + * @return nSX Port Mirroring on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono updatePortMirroringAsync( @@ -4725,7 +5093,7 @@ public WorkloadNetworkPortMirroringInner updatePortMirroring( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> deletePortMirroringWithResponseAsync( @@ -4781,7 +5149,7 @@ private Mono>> deletePortMirroringWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> deletePortMirroringWithResponseAsync( @@ -4833,7 +5201,7 @@ private Mono>> deletePortMirroringWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginDeletePortMirroringAsync( @@ -4842,7 +5210,8 @@ private PollerFlux, Void> beginDeletePortMirroringAsync( deletePortMirroringWithResponseAsync(resourceGroupName, portMirroringId, privateCloudName); return this .client - .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, Context.NONE); + .getLroResult( + mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); } /** @@ -4855,7 +5224,7 @@ private PollerFlux, Void> beginDeletePortMirroringAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginDeletePortMirroringAsync( @@ -4877,7 +5246,7 @@ private PollerFlux, Void> beginDeletePortMirroringAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDeletePortMirroring( @@ -4895,7 +5264,7 @@ public SyncPoller, Void> beginDeletePortMirroring( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDeletePortMirroring( @@ -4913,7 +5282,7 @@ public SyncPoller, Void> beginDeletePortMirroring( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono deletePortMirroringAsync( @@ -4933,7 +5302,7 @@ private Mono deletePortMirroringAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono deletePortMirroringAsync( @@ -4983,7 +5352,7 @@ public void deletePortMirroring( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if 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. + * @return a list of NSX VM Groups along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listVMGroupsSinglePageAsync( @@ -5042,7 +5411,7 @@ private Mono> listVMGroupsSinglePageA * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if 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. + * @return a list of NSX VM Groups along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listVMGroupsSinglePageAsync( @@ -5097,7 +5466,7 @@ private Mono> listVMGroupsSinglePageA * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if 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. + * @return a list of NSX VM Groups as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listVMGroupsAsync( @@ -5116,7 +5485,7 @@ private PagedFlux listVMGroupsAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if 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. + * @return a list of NSX VM Groups as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listVMGroupsAsync( @@ -5134,7 +5503,7 @@ private PagedFlux listVMGroupsAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if 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. + * @return a list of NSX VM Groups as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listVMGroups(String resourceGroupName, String privateCloudName) { @@ -5150,7 +5519,7 @@ public PagedIterable listVMGroups(String resourceGr * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if 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. + * @return a list of NSX VM Groups as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listVMGroups( @@ -5167,7 +5536,8 @@ public PagedIterable listVMGroups( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a vm group by id in a private cloud workload network. + * @return a 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( @@ -5222,7 +5592,8 @@ private Mono> getVMGroupWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a vm group by id in a private cloud workload network. + * @return a 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( @@ -5273,20 +5644,13 @@ private Mono> getVMGroupWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a vm group by id in a private cloud workload network. + * @return a 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( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** @@ -5295,14 +5659,16 @@ private Mono getVMGroupAsync( * @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. + * @return a vm group by id in a private cloud workload network along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public WorkloadNetworkVMGroupInner getVMGroup(String resourceGroupName, String privateCloudName, String vmGroupId) { - return getVMGroupAsync(resourceGroupName, privateCloudName, vmGroupId).block(); + public Response getVMGroupWithResponse( + String resourceGroupName, String privateCloudName, String vmGroupId, Context context) { + return getVMGroupWithResponseAsync(resourceGroupName, privateCloudName, vmGroupId, context).block(); } /** @@ -5311,16 +5677,14 @@ 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 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. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getVMGroupWithResponse( - String resourceGroupName, String privateCloudName, String vmGroupId, Context context) { - return getVMGroupWithResponseAsync(resourceGroupName, privateCloudName, vmGroupId, context).block(); + public WorkloadNetworkVMGroupInner getVMGroup(String resourceGroupName, String privateCloudName, String vmGroupId) { + return getVMGroupWithResponse(resourceGroupName, privateCloudName, vmGroupId, Context.NONE).getValue(); } /** @@ -5333,7 +5697,7 @@ public Response getVMGroupWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return nSX VM Group. + * @return nSX VM Group along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> createVMGroupWithResponseAsync( @@ -5400,7 +5764,7 @@ private Mono>> createVMGroupWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return nSX VM Group. + * @return nSX VM Group along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> createVMGroupWithResponseAsync( @@ -5464,7 +5828,7 @@ private Mono>> createVMGroupWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return nSX VM Group. + * @return the {@link PollerFlux} for polling of nSX VM Group. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, WorkloadNetworkVMGroupInner> beginCreateVMGroupAsync( @@ -5481,7 +5845,7 @@ private PollerFlux, WorkloadNetworkVMGro this.client.getHttpPipeline(), WorkloadNetworkVMGroupInner.class, WorkloadNetworkVMGroupInner.class, - Context.NONE); + this.client.getContext()); } /** @@ -5495,7 +5859,7 @@ private PollerFlux, WorkloadNetworkVMGro * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return nSX VM Group. + * @return the {@link PollerFlux} for polling of nSX VM Group. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, WorkloadNetworkVMGroupInner> beginCreateVMGroupAsync( @@ -5528,7 +5892,7 @@ private PollerFlux, WorkloadNetworkVMGro * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return nSX VM Group. + * @return the {@link SyncPoller} for polling of nSX VM Group. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, WorkloadNetworkVMGroupInner> beginCreateVMGroup( @@ -5551,7 +5915,7 @@ public SyncPoller, WorkloadNetworkVMGrou * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return nSX VM Group. + * @return the {@link SyncPoller} for polling of nSX VM Group. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, WorkloadNetworkVMGroupInner> beginCreateVMGroup( @@ -5574,7 +5938,7 @@ public SyncPoller, WorkloadNetworkVMGrou * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return nSX VM Group. + * @return nSX VM Group on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono createVMGroupAsync( @@ -5598,7 +5962,7 @@ private Mono createVMGroupAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return nSX VM Group. + * @return nSX VM Group on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono createVMGroupAsync( @@ -5667,7 +6031,7 @@ public WorkloadNetworkVMGroupInner createVMGroup( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return nSX VM Group. + * @return nSX VM Group along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> updateVMGroupWithResponseAsync( @@ -5734,7 +6098,7 @@ private Mono>> updateVMGroupWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return nSX VM Group. + * @return nSX VM Group along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> updateVMGroupWithResponseAsync( @@ -5798,7 +6162,7 @@ private Mono>> updateVMGroupWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return nSX VM Group. + * @return the {@link PollerFlux} for polling of nSX VM Group. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, WorkloadNetworkVMGroupInner> beginUpdateVMGroupAsync( @@ -5815,7 +6179,7 @@ private PollerFlux, WorkloadNetworkVMGro this.client.getHttpPipeline(), WorkloadNetworkVMGroupInner.class, WorkloadNetworkVMGroupInner.class, - Context.NONE); + this.client.getContext()); } /** @@ -5829,7 +6193,7 @@ private PollerFlux, WorkloadNetworkVMGro * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return nSX VM Group. + * @return the {@link PollerFlux} for polling of nSX VM Group. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, WorkloadNetworkVMGroupInner> beginUpdateVMGroupAsync( @@ -5862,7 +6226,7 @@ private PollerFlux, WorkloadNetworkVMGro * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return nSX VM Group. + * @return the {@link SyncPoller} for polling of nSX VM Group. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, WorkloadNetworkVMGroupInner> beginUpdateVMGroup( @@ -5885,7 +6249,7 @@ public SyncPoller, WorkloadNetworkVMGrou * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return nSX VM Group. + * @return the {@link SyncPoller} for polling of nSX VM Group. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, WorkloadNetworkVMGroupInner> beginUpdateVMGroup( @@ -5908,7 +6272,7 @@ public SyncPoller, WorkloadNetworkVMGrou * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return nSX VM Group. + * @return nSX VM Group on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono updateVMGroupAsync( @@ -5932,7 +6296,7 @@ private Mono updateVMGroupAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return nSX VM Group. + * @return nSX VM Group on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono updateVMGroupAsync( @@ -6000,7 +6364,7 @@ public WorkloadNetworkVMGroupInner updateVMGroup( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> deleteVMGroupWithResponseAsync( @@ -6055,7 +6419,7 @@ private Mono>> deleteVMGroupWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> deleteVMGroupWithResponseAsync( @@ -6106,7 +6470,7 @@ private Mono>> deleteVMGroupWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginDeleteVMGroupAsync( @@ -6115,7 +6479,8 @@ private PollerFlux, Void> beginDeleteVMGroupAsync( deleteVMGroupWithResponseAsync(resourceGroupName, vmGroupId, privateCloudName); return this .client - .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, Context.NONE); + .getLroResult( + mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); } /** @@ -6128,7 +6493,7 @@ private PollerFlux, Void> beginDeleteVMGroupAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginDeleteVMGroupAsync( @@ -6150,7 +6515,7 @@ private PollerFlux, Void> beginDeleteVMGroupAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDeleteVMGroup( @@ -6168,7 +6533,7 @@ public SyncPoller, Void> beginDeleteVMGroup( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDeleteVMGroup( @@ -6185,7 +6550,7 @@ public SyncPoller, Void> beginDeleteVMGroup( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @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) { @@ -6204,7 +6569,7 @@ private Mono deleteVMGroupAsync(String resourceGroupName, String vmGroupId * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono deleteVMGroupAsync( @@ -6253,7 +6618,7 @@ public void deleteVMGroup(String resourceGroupName, String vmGroupId, 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 list of NSX Virtual Machines. + * @return a list of NSX Virtual Machines along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listVirtualMachinesSinglePageAsync( @@ -6312,7 +6677,7 @@ private Mono> listVirtualMachi * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if 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. + * @return a list of NSX Virtual Machines along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listVirtualMachinesSinglePageAsync( @@ -6367,7 +6732,7 @@ private Mono> listVirtualMachi * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if 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. + * @return a list of NSX Virtual Machines as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listVirtualMachinesAsync( @@ -6386,7 +6751,7 @@ private PagedFlux listVirtualMachinesAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if 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. + * @return a list of NSX Virtual Machines as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listVirtualMachinesAsync( @@ -6404,7 +6769,7 @@ private PagedFlux listVirtualMachinesAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if 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. + * @return a list of NSX Virtual Machines as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listVirtualMachines( @@ -6421,7 +6786,7 @@ public PagedIterable listVirtualMachines( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if 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. + * @return a list of NSX Virtual Machines as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listVirtualMachines( @@ -6438,7 +6803,8 @@ public PagedIterable listVirtualMachines( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a virtual machine by id in a private cloud workload network. + * @return a 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( @@ -6494,7 +6860,8 @@ private Mono> getVirtualMachineWith * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a virtual machine by id in a private cloud workload network. + * @return a 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( @@ -6546,20 +6913,13 @@ private Mono> getVirtualMachineWith * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a virtual machine by id in a private cloud workload network. + * @return a 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( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** @@ -6568,15 +6928,17 @@ private Mono getVirtualMachineAsync( * @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. + * @return a virtual machine by id in a private cloud workload network along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public WorkloadNetworkVirtualMachineInner getVirtualMachine( - String resourceGroupName, String privateCloudName, String virtualMachineId) { - return getVirtualMachineAsync(resourceGroupName, privateCloudName, virtualMachineId).block(); + public Response getVirtualMachineWithResponse( + String resourceGroupName, String privateCloudName, String virtualMachineId, Context context) { + return getVirtualMachineWithResponseAsync(resourceGroupName, privateCloudName, virtualMachineId, context) + .block(); } /** @@ -6585,17 +6947,16 @@ public WorkloadNetworkVirtualMachineInner getVirtualMachine( * @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. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getVirtualMachineWithResponse( - String resourceGroupName, String privateCloudName, String virtualMachineId, Context context) { - return getVirtualMachineWithResponseAsync(resourceGroupName, privateCloudName, virtualMachineId, context) - .block(); + public WorkloadNetworkVirtualMachineInner getVirtualMachine( + String resourceGroupName, String privateCloudName, String virtualMachineId) { + return getVirtualMachineWithResponse(resourceGroupName, privateCloudName, virtualMachineId, Context.NONE) + .getValue(); } /** @@ -6606,7 +6967,7 @@ public Response getVirtualMachineWithRespons * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if 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. + * @return a list of NSX DNS Services along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listDnsServicesSinglePageAsync( @@ -6665,7 +7026,7 @@ private Mono> listDnsServicesSingl * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if 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. + * @return a list of NSX DNS Services along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listDnsServicesSinglePageAsync( @@ -6720,7 +7081,7 @@ private Mono> listDnsServicesSingl * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if 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. + * @return a list of NSX DNS Services as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listDnsServicesAsync( @@ -6739,7 +7100,7 @@ private PagedFlux listDnsServicesAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if 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. + * @return a list of NSX DNS Services as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listDnsServicesAsync( @@ -6757,7 +7118,7 @@ private PagedFlux listDnsServicesAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if 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. + * @return a list of NSX DNS Services as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listDnsServices( @@ -6774,7 +7135,7 @@ public PagedIterable listDnsServices( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if 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. + * @return a list of NSX DNS Services as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listDnsServices( @@ -6791,7 +7152,8 @@ public PagedIterable listDnsServices( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a DNS service by id in a private cloud workload network. + * @return 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( @@ -6846,7 +7208,8 @@ private Mono> getDnsServiceWithResponse * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a DNS service by id in a private cloud workload network. + * @return 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( @@ -6897,20 +7260,13 @@ private Mono> getDnsServiceWithResponse * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a DNS service by id in a private cloud workload network. + * @return 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( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** @@ -6919,15 +7275,16 @@ private Mono getDnsServiceAsync( * @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. + * @return a DNS service by id in a private cloud workload network along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public WorkloadNetworkDnsServiceInner getDnsService( - String resourceGroupName, String privateCloudName, String dnsServiceId) { - return getDnsServiceAsync(resourceGroupName, privateCloudName, dnsServiceId).block(); + public Response getDnsServiceWithResponse( + String resourceGroupName, String privateCloudName, String dnsServiceId, Context context) { + return getDnsServiceWithResponseAsync(resourceGroupName, privateCloudName, dnsServiceId, context).block(); } /** @@ -6936,16 +7293,15 @@ public WorkloadNetworkDnsServiceInner getDnsService( * @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. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getDnsServiceWithResponse( - String resourceGroupName, String privateCloudName, String dnsServiceId, Context context) { - return getDnsServiceWithResponseAsync(resourceGroupName, privateCloudName, dnsServiceId, context).block(); + public WorkloadNetworkDnsServiceInner getDnsService( + String resourceGroupName, String privateCloudName, String dnsServiceId) { + return getDnsServiceWithResponse(resourceGroupName, privateCloudName, dnsServiceId, Context.NONE).getValue(); } /** @@ -6958,7 +7314,7 @@ public Response getDnsServiceWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return nSX DNS Service. + * @return nSX DNS Service along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> createDnsServiceWithResponseAsync( @@ -7026,7 +7382,7 @@ private Mono>> createDnsServiceWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return nSX DNS Service. + * @return nSX DNS Service along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> createDnsServiceWithResponseAsync( @@ -7091,7 +7447,7 @@ private Mono>> createDnsServiceWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return nSX DNS Service. + * @return the {@link PollerFlux} for polling of nSX DNS Service. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, WorkloadNetworkDnsServiceInner> @@ -7110,7 +7466,7 @@ private Mono>> createDnsServiceWithResponseAsync( this.client.getHttpPipeline(), WorkloadNetworkDnsServiceInner.class, WorkloadNetworkDnsServiceInner.class, - Context.NONE); + this.client.getContext()); } /** @@ -7124,7 +7480,7 @@ private Mono>> createDnsServiceWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return nSX DNS Service. + * @return the {@link PollerFlux} for polling of nSX DNS Service. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, WorkloadNetworkDnsServiceInner> @@ -7158,7 +7514,7 @@ private Mono>> createDnsServiceWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return nSX DNS Service. + * @return the {@link SyncPoller} for polling of nSX DNS Service. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, WorkloadNetworkDnsServiceInner> beginCreateDnsService( @@ -7181,7 +7537,7 @@ public SyncPoller, WorkloadNetworkDns * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return nSX DNS Service. + * @return the {@link SyncPoller} for polling of nSX DNS Service. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, WorkloadNetworkDnsServiceInner> beginCreateDnsService( @@ -7205,7 +7561,7 @@ public SyncPoller, WorkloadNetworkDns * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return nSX DNS Service. + * @return nSX DNS Service on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono createDnsServiceAsync( @@ -7229,7 +7585,7 @@ private Mono createDnsServiceAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return nSX DNS Service. + * @return nSX DNS Service on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono createDnsServiceAsync( @@ -7301,7 +7657,7 @@ public WorkloadNetworkDnsServiceInner createDnsService( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return nSX DNS Service. + * @return nSX DNS Service along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> updateDnsServiceWithResponseAsync( @@ -7369,7 +7725,7 @@ private Mono>> updateDnsServiceWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return nSX DNS Service. + * @return nSX DNS Service along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> updateDnsServiceWithResponseAsync( @@ -7434,7 +7790,7 @@ private Mono>> updateDnsServiceWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return nSX DNS Service. + * @return the {@link PollerFlux} for polling of nSX DNS Service. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, WorkloadNetworkDnsServiceInner> @@ -7453,7 +7809,7 @@ private Mono>> updateDnsServiceWithResponseAsync( this.client.getHttpPipeline(), WorkloadNetworkDnsServiceInner.class, WorkloadNetworkDnsServiceInner.class, - Context.NONE); + this.client.getContext()); } /** @@ -7467,7 +7823,7 @@ private Mono>> updateDnsServiceWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return nSX DNS Service. + * @return the {@link PollerFlux} for polling of nSX DNS Service. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, WorkloadNetworkDnsServiceInner> @@ -7501,7 +7857,7 @@ private Mono>> updateDnsServiceWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return nSX DNS Service. + * @return the {@link SyncPoller} for polling of nSX DNS Service. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, WorkloadNetworkDnsServiceInner> beginUpdateDnsService( @@ -7524,7 +7880,7 @@ public SyncPoller, WorkloadNetworkDns * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return nSX DNS Service. + * @return the {@link SyncPoller} for polling of nSX DNS Service. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, WorkloadNetworkDnsServiceInner> beginUpdateDnsService( @@ -7548,7 +7904,7 @@ public SyncPoller, WorkloadNetworkDns * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return nSX DNS Service. + * @return nSX DNS Service on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono updateDnsServiceAsync( @@ -7572,7 +7928,7 @@ private Mono updateDnsServiceAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return nSX DNS Service. + * @return nSX DNS Service on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono updateDnsServiceAsync( @@ -7643,7 +7999,7 @@ public WorkloadNetworkDnsServiceInner updateDnsService( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> deleteDnsServiceWithResponseAsync( @@ -7698,7 +8054,7 @@ private Mono>> deleteDnsServiceWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> deleteDnsServiceWithResponseAsync( @@ -7749,7 +8105,7 @@ private Mono>> deleteDnsServiceWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginDeleteDnsServiceAsync( @@ -7758,7 +8114,8 @@ private PollerFlux, Void> beginDeleteDnsServiceAsync( deleteDnsServiceWithResponseAsync(resourceGroupName, dnsServiceId, privateCloudName); return this .client - .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, Context.NONE); + .getLroResult( + mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); } /** @@ -7771,7 +8128,7 @@ private PollerFlux, Void> beginDeleteDnsServiceAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginDeleteDnsServiceAsync( @@ -7793,7 +8150,7 @@ private PollerFlux, Void> beginDeleteDnsServiceAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDeleteDnsService( @@ -7811,7 +8168,7 @@ public SyncPoller, Void> beginDeleteDnsService( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDeleteDnsService( @@ -7828,7 +8185,7 @@ public SyncPoller, Void> beginDeleteDnsService( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @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) { @@ -7847,7 +8204,7 @@ private Mono deleteDnsServiceAsync(String resourceGroupName, String dnsSer * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono deleteDnsServiceAsync( @@ -7897,7 +8254,7 @@ public void deleteDnsService( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if 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. + * @return a list of NSX DNS Zones along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listDnsZonesSinglePageAsync( @@ -7956,7 +8313,7 @@ private Mono> listDnsZonesSinglePageA * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if 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. + * @return a list of NSX DNS Zones along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listDnsZonesSinglePageAsync( @@ -8011,7 +8368,7 @@ private Mono> listDnsZonesSinglePageA * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if 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. + * @return a list of NSX DNS Zones as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listDnsZonesAsync( @@ -8030,7 +8387,7 @@ private PagedFlux listDnsZonesAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if 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. + * @return a list of NSX DNS Zones as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listDnsZonesAsync( @@ -8048,7 +8405,7 @@ private PagedFlux listDnsZonesAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if 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. + * @return a list of NSX DNS Zones as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listDnsZones(String resourceGroupName, String privateCloudName) { @@ -8064,7 +8421,7 @@ public PagedIterable listDnsZones(String resourceGr * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if 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. + * @return a list of NSX DNS Zones as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listDnsZones( @@ -8081,7 +8438,8 @@ public PagedIterable listDnsZones( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a DNS zone by id in a private cloud workload network. + * @return 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( @@ -8136,7 +8494,8 @@ private Mono> getDnsZoneWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a DNS zone by id in a private cloud workload network. + * @return 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( @@ -8187,20 +8546,13 @@ private Mono> getDnsZoneWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a DNS zone by id in a private cloud workload network. + * @return 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( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** @@ -8209,14 +8561,16 @@ private Mono getDnsZoneAsync( * @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. + * @return a DNS zone by id in a private cloud workload network along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public WorkloadNetworkDnsZoneInner getDnsZone(String resourceGroupName, String privateCloudName, String dnsZoneId) { - return getDnsZoneAsync(resourceGroupName, privateCloudName, dnsZoneId).block(); + public Response getDnsZoneWithResponse( + String resourceGroupName, String privateCloudName, String dnsZoneId, Context context) { + return getDnsZoneWithResponseAsync(resourceGroupName, privateCloudName, dnsZoneId, context).block(); } /** @@ -8225,16 +8579,14 @@ 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 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. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getDnsZoneWithResponse( - String resourceGroupName, String privateCloudName, String dnsZoneId, Context context) { - return getDnsZoneWithResponseAsync(resourceGroupName, privateCloudName, dnsZoneId, context).block(); + public WorkloadNetworkDnsZoneInner getDnsZone(String resourceGroupName, String privateCloudName, String dnsZoneId) { + return getDnsZoneWithResponse(resourceGroupName, privateCloudName, dnsZoneId, Context.NONE).getValue(); } /** @@ -8247,7 +8599,7 @@ public Response getDnsZoneWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return nSX DNS Zone. + * @return nSX DNS Zone along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> createDnsZoneWithResponseAsync( @@ -8314,7 +8666,7 @@ private Mono>> createDnsZoneWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return nSX DNS Zone. + * @return nSX DNS Zone along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> createDnsZoneWithResponseAsync( @@ -8378,7 +8730,7 @@ private Mono>> createDnsZoneWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return nSX DNS Zone. + * @return the {@link PollerFlux} for polling of nSX DNS Zone. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, WorkloadNetworkDnsZoneInner> beginCreateDnsZoneAsync( @@ -8395,7 +8747,7 @@ private PollerFlux, WorkloadNetworkDnsZo this.client.getHttpPipeline(), WorkloadNetworkDnsZoneInner.class, WorkloadNetworkDnsZoneInner.class, - Context.NONE); + this.client.getContext()); } /** @@ -8409,7 +8761,7 @@ private PollerFlux, WorkloadNetworkDnsZo * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return nSX DNS Zone. + * @return the {@link PollerFlux} for polling of nSX DNS Zone. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, WorkloadNetworkDnsZoneInner> beginCreateDnsZoneAsync( @@ -8442,7 +8794,7 @@ private PollerFlux, WorkloadNetworkDnsZo * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return nSX DNS Zone. + * @return the {@link SyncPoller} for polling of nSX DNS Zone. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, WorkloadNetworkDnsZoneInner> beginCreateDnsZone( @@ -8465,7 +8817,7 @@ public SyncPoller, WorkloadNetworkDnsZon * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return nSX DNS Zone. + * @return the {@link SyncPoller} for polling of nSX DNS Zone. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, WorkloadNetworkDnsZoneInner> beginCreateDnsZone( @@ -8488,7 +8840,7 @@ public SyncPoller, WorkloadNetworkDnsZon * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return nSX DNS Zone. + * @return nSX DNS Zone on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono createDnsZoneAsync( @@ -8512,7 +8864,7 @@ private Mono createDnsZoneAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return nSX DNS Zone. + * @return nSX DNS Zone on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono createDnsZoneAsync( @@ -8581,7 +8933,7 @@ public WorkloadNetworkDnsZoneInner createDnsZone( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return nSX DNS Zone. + * @return nSX DNS Zone along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> updateDnsZoneWithResponseAsync( @@ -8648,7 +9000,7 @@ private Mono>> updateDnsZoneWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return nSX DNS Zone. + * @return nSX DNS Zone along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> updateDnsZoneWithResponseAsync( @@ -8712,7 +9064,7 @@ private Mono>> updateDnsZoneWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return nSX DNS Zone. + * @return the {@link PollerFlux} for polling of nSX DNS Zone. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, WorkloadNetworkDnsZoneInner> beginUpdateDnsZoneAsync( @@ -8729,7 +9081,7 @@ private PollerFlux, WorkloadNetworkDnsZo this.client.getHttpPipeline(), WorkloadNetworkDnsZoneInner.class, WorkloadNetworkDnsZoneInner.class, - Context.NONE); + this.client.getContext()); } /** @@ -8743,7 +9095,7 @@ private PollerFlux, WorkloadNetworkDnsZo * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return nSX DNS Zone. + * @return the {@link PollerFlux} for polling of nSX DNS Zone. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, WorkloadNetworkDnsZoneInner> beginUpdateDnsZoneAsync( @@ -8776,7 +9128,7 @@ private PollerFlux, WorkloadNetworkDnsZo * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return nSX DNS Zone. + * @return the {@link SyncPoller} for polling of nSX DNS Zone. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, WorkloadNetworkDnsZoneInner> beginUpdateDnsZone( @@ -8799,7 +9151,7 @@ public SyncPoller, WorkloadNetworkDnsZon * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return nSX DNS Zone. + * @return the {@link SyncPoller} for polling of nSX DNS Zone. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, WorkloadNetworkDnsZoneInner> beginUpdateDnsZone( @@ -8822,7 +9174,7 @@ public SyncPoller, WorkloadNetworkDnsZon * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return nSX DNS Zone. + * @return nSX DNS Zone on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono updateDnsZoneAsync( @@ -8846,7 +9198,7 @@ private Mono updateDnsZoneAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return nSX DNS Zone. + * @return nSX DNS Zone on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono updateDnsZoneAsync( @@ -8914,7 +9266,7 @@ public WorkloadNetworkDnsZoneInner updateDnsZone( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> deleteDnsZoneWithResponseAsync( @@ -8969,7 +9321,7 @@ private Mono>> deleteDnsZoneWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> deleteDnsZoneWithResponseAsync( @@ -9020,7 +9372,7 @@ private Mono>> deleteDnsZoneWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginDeleteDnsZoneAsync( @@ -9029,7 +9381,8 @@ private PollerFlux, Void> beginDeleteDnsZoneAsync( deleteDnsZoneWithResponseAsync(resourceGroupName, dnsZoneId, privateCloudName); return this .client - .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, Context.NONE); + .getLroResult( + mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); } /** @@ -9042,7 +9395,7 @@ private PollerFlux, Void> beginDeleteDnsZoneAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginDeleteDnsZoneAsync( @@ -9064,7 +9417,7 @@ private PollerFlux, Void> beginDeleteDnsZoneAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDeleteDnsZone( @@ -9082,7 +9435,7 @@ public SyncPoller, Void> beginDeleteDnsZone( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDeleteDnsZone( @@ -9099,7 +9452,7 @@ public SyncPoller, Void> beginDeleteDnsZone( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @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) { @@ -9118,7 +9471,7 @@ private Mono deleteDnsZoneAsync(String resourceGroupName, String dnsZoneId * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono deleteDnsZoneAsync( @@ -9167,7 +9520,7 @@ public void deleteDnsZone(String resourceGroupName, String dnsZoneId, 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 list of NSX Public IP Blocks. + * @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( @@ -9226,7 +9579,7 @@ private Mono> listPublicIPsSinglePag * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if 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. + * @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( @@ -9281,7 +9634,7 @@ private Mono> listPublicIPsSinglePag * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if 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. + * @return a list of NSX Public IP Blocks as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listPublicIPsAsync( @@ -9300,7 +9653,7 @@ private PagedFlux listPublicIPsAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if 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. + * @return a list of NSX Public IP Blocks as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listPublicIPsAsync( @@ -9318,7 +9671,7 @@ private PagedFlux listPublicIPsAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if 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. + * @return a list of NSX Public IP Blocks as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listPublicIPs( @@ -9335,7 +9688,7 @@ public PagedIterable listPublicIPs( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if 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. + * @return a list of NSX Public IP Blocks as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listPublicIPs( @@ -9352,7 +9705,8 @@ public PagedIterable listPublicIPs( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a Public IP Block by id in a private cloud workload network. + * @return a 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( @@ -9407,7 +9761,8 @@ private Mono> getPublicIpWithResponseAsyn * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a Public IP Block by id in a private cloud workload network. + * @return a 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( @@ -9458,20 +9813,13 @@ private Mono> getPublicIpWithResponseAsyn * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a Public IP Block by id in a private cloud workload network. + * @return a 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( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** @@ -9480,15 +9828,16 @@ private Mono getPublicIpAsync( * @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. + * @return a Public IP Block by id in a private cloud workload network along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public WorkloadNetworkPublicIpInner getPublicIp( - String resourceGroupName, String privateCloudName, String publicIpId) { - return getPublicIpAsync(resourceGroupName, privateCloudName, publicIpId).block(); + public Response getPublicIpWithResponse( + String resourceGroupName, String privateCloudName, String publicIpId, Context context) { + return getPublicIpWithResponseAsync(resourceGroupName, privateCloudName, publicIpId, context).block(); } /** @@ -9497,16 +9846,15 @@ public WorkloadNetworkPublicIpInner getPublicIp( * @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. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getPublicIpWithResponse( - String resourceGroupName, String privateCloudName, String publicIpId, Context context) { - return getPublicIpWithResponseAsync(resourceGroupName, privateCloudName, publicIpId, context).block(); + public WorkloadNetworkPublicIpInner getPublicIp( + String resourceGroupName, String privateCloudName, String publicIpId) { + return getPublicIpWithResponse(resourceGroupName, privateCloudName, publicIpId, Context.NONE).getValue(); } /** @@ -9519,7 +9867,7 @@ public Response getPublicIpWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return nSX Public IP Block. + * @return nSX Public IP Block along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> createPublicIpWithResponseAsync( @@ -9586,7 +9934,7 @@ private Mono>> createPublicIpWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return nSX Public IP Block. + * @return nSX Public IP Block along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> createPublicIpWithResponseAsync( @@ -9650,7 +9998,7 @@ private Mono>> createPublicIpWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return nSX Public IP Block. + * @return the {@link PollerFlux} for polling of nSX Public IP Block. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, WorkloadNetworkPublicIpInner> beginCreatePublicIpAsync( @@ -9667,7 +10015,7 @@ private PollerFlux, WorkloadNetworkPubl this.client.getHttpPipeline(), WorkloadNetworkPublicIpInner.class, WorkloadNetworkPublicIpInner.class, - Context.NONE); + this.client.getContext()); } /** @@ -9681,7 +10029,7 @@ private PollerFlux, WorkloadNetworkPubl * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return nSX Public IP Block. + * @return the {@link PollerFlux} for polling of nSX Public IP Block. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, WorkloadNetworkPublicIpInner> beginCreatePublicIpAsync( @@ -9714,7 +10062,7 @@ private PollerFlux, WorkloadNetworkPubl * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return nSX Public IP Block. + * @return the {@link SyncPoller} for polling of nSX Public IP Block. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, WorkloadNetworkPublicIpInner> beginCreatePublicIp( @@ -9737,7 +10085,7 @@ public SyncPoller, WorkloadNetworkPubli * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return nSX Public IP Block. + * @return the {@link SyncPoller} for polling of nSX Public IP Block. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, WorkloadNetworkPublicIpInner> beginCreatePublicIp( @@ -9761,7 +10109,7 @@ public SyncPoller, WorkloadNetworkPubli * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return nSX Public IP Block. + * @return nSX Public IP Block on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono createPublicIpAsync( @@ -9785,7 +10133,7 @@ private Mono createPublicIpAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return nSX Public IP Block. + * @return nSX Public IP Block on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono createPublicIpAsync( @@ -9854,7 +10202,7 @@ public WorkloadNetworkPublicIpInner createPublicIp( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> deletePublicIpWithResponseAsync( @@ -9909,7 +10257,7 @@ private Mono>> deletePublicIpWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> deletePublicIpWithResponseAsync( @@ -9960,7 +10308,7 @@ private Mono>> deletePublicIpWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginDeletePublicIpAsync( @@ -9969,7 +10317,8 @@ private PollerFlux, Void> beginDeletePublicIpAsync( deletePublicIpWithResponseAsync(resourceGroupName, publicIpId, privateCloudName); return this .client - .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, Context.NONE); + .getLroResult( + mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); } /** @@ -9982,7 +10331,7 @@ private PollerFlux, Void> beginDeletePublicIpAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginDeletePublicIpAsync( @@ -10004,7 +10353,7 @@ private PollerFlux, Void> beginDeletePublicIpAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDeletePublicIp( @@ -10022,7 +10371,7 @@ public SyncPoller, Void> beginDeletePublicIp( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDeletePublicIp( @@ -10039,7 +10388,7 @@ public SyncPoller, Void> beginDeletePublicIp( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @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) { @@ -10058,7 +10407,7 @@ private Mono deletePublicIpAsync(String resourceGroupName, String publicIp * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono deletePublicIpAsync( @@ -10102,11 +10451,85 @@ public void deletePublicIp(String resourceGroupName, String publicIpId, String p /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @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. + * @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) { @@ -10137,12 +10560,13 @@ private Mono> listSegmentsNextSingleP /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @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. + * @return a list of NSX Segments along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSegmentsNextSinglePageAsync( @@ -10174,11 +10598,12 @@ private Mono> listSegmentsNextSingleP /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @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. + * @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) { @@ -10209,12 +10634,13 @@ private Mono> listDhcpNextSinglePageAsyn /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @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. + * @return a list of NSX dhcp entities along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listDhcpNextSinglePageAsync( @@ -10246,11 +10672,12 @@ private Mono> listDhcpNextSinglePageAsyn /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @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. + * @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) { @@ -10281,12 +10708,13 @@ private Mono> listGatewaysNextSingleP /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @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. + * @return a list of NSX Gateways along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listGatewaysNextSinglePageAsync( @@ -10318,11 +10746,12 @@ private Mono> listGatewaysNextSingleP /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @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. + * @return a list of NSX Port Mirroring along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listPortMirroringNextSinglePageAsync( @@ -10354,12 +10783,13 @@ private Mono> listPortMirroring /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @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. + * @return a list of NSX Port Mirroring along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listPortMirroringNextSinglePageAsync( @@ -10391,11 +10821,12 @@ private Mono> listPortMirroring /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @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. + * @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) { @@ -10426,12 +10857,13 @@ private Mono> listVMGroupsNextSingleP /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @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. + * @return a list of NSX VM Groups along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listVMGroupsNextSinglePageAsync( @@ -10463,11 +10895,12 @@ private Mono> listVMGroupsNextSingleP /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @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. + * @return a list of NSX Virtual Machines along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listVirtualMachinesNextSinglePageAsync( @@ -10500,12 +10933,13 @@ private Mono> listVirtualMachi /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @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. + * @return a list of NSX Virtual Machines along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listVirtualMachinesNextSinglePageAsync( @@ -10537,11 +10971,12 @@ private Mono> listVirtualMachi /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @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. + * @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) { @@ -10572,12 +11007,13 @@ private Mono> listDnsServicesNextS /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @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. + * @return a list of NSX DNS Services along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listDnsServicesNextSinglePageAsync( @@ -10609,11 +11045,12 @@ private Mono> listDnsServicesNextS /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @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. + * @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) { @@ -10644,12 +11081,13 @@ private Mono> listDnsZonesNextSingleP /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @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. + * @return a list of NSX DNS Zones along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listDnsZonesNextSinglePageAsync( @@ -10681,11 +11119,12 @@ private Mono> listDnsZonesNextSingleP /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @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. + * @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) { @@ -10716,12 +11155,13 @@ private Mono> listPublicIPsNextSingl /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @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. + * @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( 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 43cb44aaed03..9ea22c33e54c 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 @@ -14,25 +14,27 @@ 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; -import com.fasterxml.jackson.annotation.JsonIgnore; public final class WorkloadNetworksImpl implements WorkloadNetworks { - @JsonIgnore private final ClientLogger logger = new ClientLogger(WorkloadNetworksImpl.class); + private static final ClientLogger LOGGER = new ClientLogger(WorkloadNetworksImpl.class); private final WorkloadNetworksClient innerClient; @@ -44,6 +46,42 @@ public WorkloadNetworksImpl( this.serviceManager = serviceManager; } + public Response getWithResponse( + String resourceGroupName, String privateCloudName, WorkloadNetworkName workloadNetworkName, Context context) { + Response inner = + this.serviceClient().getWithResponse(resourceGroupName, privateCloudName, workloadNetworkName, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new WorkloadNetworkImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public WorkloadNetwork get( + String resourceGroupName, String privateCloudName, WorkloadNetworkName workloadNetworkName) { + WorkloadNetworkInner inner = this.serviceClient().get(resourceGroupName, privateCloudName, workloadNetworkName); + if (inner != null) { + return new WorkloadNetworkImpl(inner, this.manager()); + } else { + return null; + } + } + + public PagedIterable list(String resourceGroupName, String privateCloudName) { + PagedIterable inner = this.serviceClient().list(resourceGroupName, privateCloudName); + return Utils.mapPage(inner, inner1 -> new WorkloadNetworkImpl(inner1, this.manager())); + } + + 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); @@ -57,16 +95,6 @@ public PagedIterable listSegments( return Utils.mapPage(inner, inner1 -> new WorkloadNetworkSegmentImpl(inner1, this.manager())); } - 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 Response getSegmentWithResponse( String resourceGroupName, String privateCloudName, String segmentId, Context context) { Response inner = @@ -82,6 +110,16 @@ public Response getSegmentWithResponse( } } + 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); } @@ -103,15 +141,6 @@ public PagedIterable listDhcp( return Utils.mapPage(inner, inner1 -> new WorkloadNetworkDhcpImpl(inner1, this.manager())); } - 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 Response getDhcpWithResponse( String resourceGroupName, String dhcpId, String privateCloudName, Context context) { Response inner = @@ -127,6 +156,15 @@ public Response getDhcpWithResponse( } } + 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); } @@ -148,16 +186,6 @@ public PagedIterable listGateways( return Utils.mapPage(inner, inner1 -> new WorkloadNetworkGatewayImpl(inner1, this.manager())); } - 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 Response getGatewayWithResponse( String resourceGroupName, String privateCloudName, String gatewayId, Context context) { Response inner = @@ -173,6 +201,16 @@ public Response getGatewayWithResponse( } } + 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 = @@ -187,17 +225,6 @@ public PagedIterable listPortMirroring( return Utils.mapPage(inner, inner1 -> new WorkloadNetworkPortMirroringImpl(inner1, this.manager())); } - 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 Response getPortMirroringWithResponse( String resourceGroupName, String privateCloudName, String portMirroringId, Context context) { Response inner = @@ -215,6 +242,17 @@ public Response getPortMirroringWithResponse( } } + 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); } @@ -237,16 +275,6 @@ public PagedIterable listVMGroups( return Utils.mapPage(inner, inner1 -> new WorkloadNetworkVMGroupImpl(inner1, this.manager())); } - 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 Response getVMGroupWithResponse( String resourceGroupName, String privateCloudName, String vmGroupId, Context context) { Response inner = @@ -262,6 +290,16 @@ public Response getVMGroupWithResponse( } } + 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); } @@ -284,17 +322,6 @@ public PagedIterable listVirtualMachines( return Utils.mapPage(inner, inner1 -> new WorkloadNetworkVirtualMachineImpl(inner1, this.manager())); } - 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 Response getVirtualMachineWithResponse( String resourceGroupName, String privateCloudName, String virtualMachineId, Context context) { Response inner = @@ -312,6 +339,17 @@ public Response getVirtualMachineWithResponse( } } + 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); @@ -325,17 +363,6 @@ public PagedIterable listDnsServices( return Utils.mapPage(inner, inner1 -> new WorkloadNetworkDnsServiceImpl(inner1, this.manager())); } - 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 Response getDnsServiceWithResponse( String resourceGroupName, String privateCloudName, String dnsServiceId, Context context) { Response inner = @@ -351,6 +378,17 @@ public Response getDnsServiceWithResponse( } } + 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); } @@ -373,16 +411,6 @@ public PagedIterable listDnsZones( return Utils.mapPage(inner, inner1 -> new WorkloadNetworkDnsZoneImpl(inner1, this.manager())); } - 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 Response getDnsZoneWithResponse( String resourceGroupName, String privateCloudName, String dnsZoneId, Context context) { Response inner = @@ -398,6 +426,16 @@ public Response getDnsZoneWithResponse( } } + 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); } @@ -419,16 +457,6 @@ public PagedIterable listPublicIPs( return Utils.mapPage(inner, inner1 -> new WorkloadNetworkPublicIpImpl(inner1, this.manager())); } - 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 Response getPublicIpWithResponse( String resourceGroupName, String privateCloudName, String publicIpId, Context context) { Response inner = @@ -444,6 +472,16 @@ public Response getPublicIpWithResponse( } } + 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); } @@ -455,7 +493,7 @@ public void deletePublicIp(String resourceGroupName, String publicIpId, String p public WorkloadNetworkSegment getSegmentById(String id) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -463,14 +501,14 @@ public WorkloadNetworkSegment getSegmentById(String id) { } String privateCloudName = Utils.getValueFromIdByName(id, "privateClouds"); if (privateCloudName == null) { - throw logger + 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 + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'segments'.", id))); @@ -481,7 +519,7 @@ public WorkloadNetworkSegment getSegmentById(String id) { public Response getSegmentByIdWithResponse(String id, Context context) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -489,14 +527,14 @@ public Response getSegmentByIdWithResponse(String id, Co } String privateCloudName = Utils.getValueFromIdByName(id, "privateClouds"); if (privateCloudName == null) { - throw logger + 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 + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'segments'.", id))); @@ -507,7 +545,7 @@ public Response getSegmentByIdWithResponse(String id, Co public WorkloadNetworkDhcp getDhcpById(String id) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -515,7 +553,7 @@ public WorkloadNetworkDhcp getDhcpById(String id) { } String dhcpId = Utils.getValueFromIdByName(id, "dhcpConfigurations"); if (dhcpId == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -524,7 +562,7 @@ public WorkloadNetworkDhcp getDhcpById(String id) { } String privateCloudName = Utils.getValueFromIdByName(id, "privateClouds"); if (privateCloudName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'privateClouds'.", id))); @@ -535,7 +573,7 @@ public WorkloadNetworkDhcp getDhcpById(String id) { public Response getDhcpByIdWithResponse(String id, Context context) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -543,7 +581,7 @@ public Response getDhcpByIdWithResponse(String id, Context } String dhcpId = Utils.getValueFromIdByName(id, "dhcpConfigurations"); if (dhcpId == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -552,7 +590,7 @@ public Response getDhcpByIdWithResponse(String id, Context } String privateCloudName = Utils.getValueFromIdByName(id, "privateClouds"); if (privateCloudName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'privateClouds'.", id))); @@ -563,7 +601,7 @@ public Response getDhcpByIdWithResponse(String id, Context public WorkloadNetworkPortMirroring getPortMirroringById(String id) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -571,14 +609,14 @@ public WorkloadNetworkPortMirroring getPortMirroringById(String id) { } String privateCloudName = Utils.getValueFromIdByName(id, "privateClouds"); if (privateCloudName == null) { - throw logger + 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 + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -594,7 +632,7 @@ public WorkloadNetworkPortMirroring getPortMirroringById(String id) { public Response getPortMirroringByIdWithResponse(String id, Context context) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -602,14 +640,14 @@ public Response getPortMirroringByIdWithResponse(S } String privateCloudName = Utils.getValueFromIdByName(id, "privateClouds"); if (privateCloudName == null) { - throw logger + 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 + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -623,7 +661,7 @@ public Response getPortMirroringByIdWithResponse(S public WorkloadNetworkVMGroup getVMGroupById(String id) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -631,14 +669,14 @@ public WorkloadNetworkVMGroup getVMGroupById(String id) { } String privateCloudName = Utils.getValueFromIdByName(id, "privateClouds"); if (privateCloudName == null) { - throw logger + 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 + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'vmGroups'.", id))); @@ -649,7 +687,7 @@ public WorkloadNetworkVMGroup getVMGroupById(String id) { public Response getVMGroupByIdWithResponse(String id, Context context) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -657,14 +695,14 @@ public Response getVMGroupByIdWithResponse(String id, Co } String privateCloudName = Utils.getValueFromIdByName(id, "privateClouds"); if (privateCloudName == null) { - throw logger + 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 + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'vmGroups'.", id))); @@ -675,7 +713,7 @@ public Response getVMGroupByIdWithResponse(String id, Co public WorkloadNetworkDnsService getDnsServiceById(String id) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -683,14 +721,14 @@ public WorkloadNetworkDnsService getDnsServiceById(String id) { } String privateCloudName = Utils.getValueFromIdByName(id, "privateClouds"); if (privateCloudName == null) { - throw logger + 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 + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'dnsServices'.", id))); @@ -703,7 +741,7 @@ public WorkloadNetworkDnsService getDnsServiceById(String id) { public Response getDnsServiceByIdWithResponse(String id, Context context) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -711,14 +749,14 @@ public Response getDnsServiceByIdWithResponse(String } String privateCloudName = Utils.getValueFromIdByName(id, "privateClouds"); if (privateCloudName == null) { - throw logger + 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 + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'dnsServices'.", id))); @@ -729,7 +767,7 @@ public Response getDnsServiceByIdWithResponse(String public WorkloadNetworkDnsZone getDnsZoneById(String id) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -737,14 +775,14 @@ public WorkloadNetworkDnsZone getDnsZoneById(String id) { } String privateCloudName = Utils.getValueFromIdByName(id, "privateClouds"); if (privateCloudName == null) { - throw logger + 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 + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'dnsZones'.", id))); @@ -755,7 +793,7 @@ public WorkloadNetworkDnsZone getDnsZoneById(String id) { public Response getDnsZoneByIdWithResponse(String id, Context context) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -763,14 +801,14 @@ public Response getDnsZoneByIdWithResponse(String id, Co } String privateCloudName = Utils.getValueFromIdByName(id, "privateClouds"); if (privateCloudName == null) { - throw logger + 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 + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'dnsZones'.", id))); @@ -781,7 +819,7 @@ public Response getDnsZoneByIdWithResponse(String id, Co public WorkloadNetworkPublicIp getPublicIpById(String id) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -789,14 +827,14 @@ public WorkloadNetworkPublicIp getPublicIpById(String id) { } String privateCloudName = Utils.getValueFromIdByName(id, "privateClouds"); if (privateCloudName == null) { - throw logger + 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 + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'publicIPs'.", id))); @@ -807,7 +845,7 @@ public WorkloadNetworkPublicIp getPublicIpById(String id) { public Response getPublicIpByIdWithResponse(String id, Context context) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -815,14 +853,14 @@ public Response getPublicIpByIdWithResponse(String id, } String privateCloudName = Utils.getValueFromIdByName(id, "privateClouds"); if (privateCloudName == null) { - throw logger + 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 + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'publicIPs'.", id))); @@ -833,7 +871,7 @@ public Response getPublicIpByIdWithResponse(String id, public void deleteSegmentById(String id) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -841,14 +879,14 @@ public void deleteSegmentById(String id) { } String privateCloudName = Utils.getValueFromIdByName(id, "privateClouds"); if (privateCloudName == null) { - throw logger + 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 + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'segments'.", id))); @@ -859,7 +897,7 @@ public void deleteSegmentById(String id) { public void deleteSegmentByIdWithResponse(String id, Context context) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -867,14 +905,14 @@ public void deleteSegmentByIdWithResponse(String id, Context context) { } String privateCloudName = Utils.getValueFromIdByName(id, "privateClouds"); if (privateCloudName == null) { - throw logger + 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 + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'segments'.", id))); @@ -885,7 +923,7 @@ public void deleteSegmentByIdWithResponse(String id, Context context) { public void deleteDhcpById(String id) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -893,14 +931,14 @@ public void deleteDhcpById(String id) { } String privateCloudName = Utils.getValueFromIdByName(id, "privateClouds"); if (privateCloudName == null) { - throw logger + 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 + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -913,7 +951,7 @@ public void deleteDhcpById(String id) { public void deleteDhcpByIdWithResponse(String id, Context context) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -921,14 +959,14 @@ public void deleteDhcpByIdWithResponse(String id, Context context) { } String privateCloudName = Utils.getValueFromIdByName(id, "privateClouds"); if (privateCloudName == null) { - throw logger + 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 + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -941,7 +979,7 @@ public void deleteDhcpByIdWithResponse(String id, Context context) { public void deletePortMirroringById(String id) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -949,7 +987,7 @@ public void deletePortMirroringById(String id) { } String portMirroringId = Utils.getValueFromIdByName(id, "portMirroringProfiles"); if (portMirroringId == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -959,7 +997,7 @@ public void deletePortMirroringById(String id) { } String privateCloudName = Utils.getValueFromIdByName(id, "privateClouds"); if (privateCloudName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'privateClouds'.", id))); @@ -970,7 +1008,7 @@ public void deletePortMirroringById(String id) { public void deletePortMirroringByIdWithResponse(String id, Context context) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -978,7 +1016,7 @@ public void deletePortMirroringByIdWithResponse(String id, Context context) { } String portMirroringId = Utils.getValueFromIdByName(id, "portMirroringProfiles"); if (portMirroringId == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -988,7 +1026,7 @@ public void deletePortMirroringByIdWithResponse(String id, Context context) { } String privateCloudName = Utils.getValueFromIdByName(id, "privateClouds"); if (privateCloudName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'privateClouds'.", id))); @@ -999,7 +1037,7 @@ public void deletePortMirroringByIdWithResponse(String id, Context context) { public void deleteVMGroupById(String id) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -1007,14 +1045,14 @@ public void deleteVMGroupById(String id) { } String vmGroupId = Utils.getValueFromIdByName(id, "vmGroups"); if (vmGroupId == null) { - throw logger + 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 + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'privateClouds'.", id))); @@ -1025,7 +1063,7 @@ public void deleteVMGroupById(String id) { public void deleteVMGroupByIdWithResponse(String id, Context context) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -1033,14 +1071,14 @@ public void deleteVMGroupByIdWithResponse(String id, Context context) { } String vmGroupId = Utils.getValueFromIdByName(id, "vmGroups"); if (vmGroupId == null) { - throw logger + 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 + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'privateClouds'.", id))); @@ -1051,7 +1089,7 @@ public void deleteVMGroupByIdWithResponse(String id, Context context) { public void deleteDnsServiceById(String id) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -1059,14 +1097,14 @@ public void deleteDnsServiceById(String id) { } String dnsServiceId = Utils.getValueFromIdByName(id, "dnsServices"); if (dnsServiceId == null) { - throw logger + 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 + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'privateClouds'.", id))); @@ -1077,7 +1115,7 @@ public void deleteDnsServiceById(String id) { public void deleteDnsServiceByIdWithResponse(String id, Context context) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -1085,14 +1123,14 @@ public void deleteDnsServiceByIdWithResponse(String id, Context context) { } String dnsServiceId = Utils.getValueFromIdByName(id, "dnsServices"); if (dnsServiceId == null) { - throw logger + 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 + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'privateClouds'.", id))); @@ -1103,7 +1141,7 @@ public void deleteDnsServiceByIdWithResponse(String id, Context context) { public void deleteDnsZoneById(String id) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -1111,14 +1149,14 @@ public void deleteDnsZoneById(String id) { } String dnsZoneId = Utils.getValueFromIdByName(id, "dnsZones"); if (dnsZoneId == null) { - throw logger + 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 + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'privateClouds'.", id))); @@ -1129,7 +1167,7 @@ public void deleteDnsZoneById(String id) { public void deleteDnsZoneByIdWithResponse(String id, Context context) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -1137,14 +1175,14 @@ public void deleteDnsZoneByIdWithResponse(String id, Context context) { } String dnsZoneId = Utils.getValueFromIdByName(id, "dnsZones"); if (dnsZoneId == null) { - throw logger + 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 + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'privateClouds'.", id))); @@ -1155,7 +1193,7 @@ public void deleteDnsZoneByIdWithResponse(String id, Context context) { public void deletePublicIpById(String id) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -1163,14 +1201,14 @@ public void deletePublicIpById(String id) { } String publicIpId = Utils.getValueFromIdByName(id, "publicIPs"); if (publicIpId == null) { - throw logger + 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 + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'privateClouds'.", id))); @@ -1181,7 +1219,7 @@ public void deletePublicIpById(String id) { public void deletePublicIpByIdWithResponse(String id, Context context) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -1189,14 +1227,14 @@ public void deletePublicIpByIdWithResponse(String id, Context context) { } String publicIpId = Utils.getValueFromIdByName(id, "publicIPs"); if (publicIpId == null) { - throw logger + 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 + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'privateClouds'.", id))); 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 980b007256c6..e878524205d6 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 @@ -37,6 +37,13 @@ public interface Addon { */ AddonProperties properties(); + /** + * 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. * 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 new file mode 100644 index 000000000000..80446d49c90a --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/AddonArcProperties.java @@ -0,0 +1,56 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.avs.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; +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") +@JsonTypeName("Arc") +@Fluent +public final class AddonArcProperties extends AddonProperties { + /* + * The VMware vCenter resource ID + */ + @JsonProperty(value = "vCenter") + private String vCenter; + + /** Creates an instance of AddonArcProperties class. */ + public AddonArcProperties() { + } + + /** + * Get the vCenter property: The VMware vCenter resource ID. + * + * @return the vCenter value. + */ + public String vCenter() { + return this.vCenter; + } + + /** + * Set the vCenter property: The VMware vCenter resource ID. + * + * @param vCenter the vCenter value to set. + * @return the AddonArcProperties object itself. + */ + public AddonArcProperties withVCenter(String vCenter) { + this.vCenter = vCenter; + 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/AddonHcxProperties.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/AddonHcxProperties.java index f5e45d024a9f..ce29dab08cce 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,7 +6,6 @@ import com.azure.core.annotation.Fluent; import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; @@ -16,14 +15,16 @@ @JsonTypeName("HCX") @Fluent public final class AddonHcxProperties extends AddonProperties { - @JsonIgnore private final ClientLogger logger = new ClientLogger(AddonHcxProperties.class); - /* * The HCX offer, example VMware MaaS Cloud Provider (Enterprise) */ @JsonProperty(value = "offer", required = true) private String offer; + /** Creates an instance of AddonHcxProperties class. */ + public AddonHcxProperties() { + } + /** * Get the offer property: The HCX offer, example VMware MaaS Cloud Provider (Enterprise). * @@ -53,9 +54,11 @@ public AddonHcxProperties withOffer(String offer) { public void validate() { super.validate(); if (offer() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException("Missing required property offer in model AddonHcxProperties")); } } + + private static final ClientLogger LOGGER = new ClientLogger(AddonHcxProperties.class); } 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 index abec9b8b2c5a..0ee7ce36d6f6 100644 --- 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 @@ -5,17 +5,13 @@ package com.azure.resourcemanager.avs.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.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** A paged list of addons. */ @Immutable public final class AddonList { - @JsonIgnore private final ClientLogger logger = new ClientLogger(AddonList.class); - /* * The items on a page */ @@ -28,6 +24,10 @@ public final class AddonList { @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. * 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 20727cbb2d95..58efc7492e42 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,8 +5,6 @@ package com.azure.resourcemanager.avs.models; import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonSubTypes; import com.fasterxml.jackson.annotation.JsonTypeInfo; @@ -22,18 +20,21 @@ @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 = "HCX", value = AddonHcxProperties.class), + @JsonSubTypes.Type(name = "Arc", value = AddonArcProperties.class) }) @Immutable public class AddonProperties { - @JsonIgnore private final ClientLogger logger = new ClientLogger(AddonProperties.class); - /* * The state of the addon provisioning */ @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) private AddonProvisioningState provisioningState; + /** Creates an instance of AddonProperties class. */ + public AddonProperties() { + } + /** * Get the provisioningState property: The state of the addon provisioning. * 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 e5149cb2d39c..f231d907215f 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/AddonProvisioningState.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/AddonProvisioningState.java @@ -8,7 +8,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for AddonProvisioningState. */ +/** The state of the addon provisioning. */ public final class AddonProvisioningState extends ExpandableStringEnum { /** Static value Succeeded for AddonProvisioningState. */ public static final AddonProvisioningState SUCCEEDED = fromString("Succeeded"); @@ -28,6 +28,9 @@ public final class AddonProvisioningState extends ExpandableStringEnum values() { return values(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 4598cf108e70..669eca9222a2 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,8 +5,6 @@ package com.azure.resourcemanager.avs.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; @@ -16,14 +14,16 @@ @JsonTypeName("SRM") @Fluent public final class AddonSrmProperties extends AddonProperties { - @JsonIgnore private final ClientLogger logger = new ClientLogger(AddonSrmProperties.class); - /* * The Site Recovery Manager (SRM) license */ @JsonProperty(value = "licenseKey") private String licenseKey; + /** Creates an instance of AddonSrmProperties class. */ + public AddonSrmProperties() { + } + /** * Get the licenseKey property: The Site Recovery Manager (SRM) license. * 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 e2de340fd99f..cf9b550cc187 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/AddonType.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/AddonType.java @@ -8,7 +8,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for AddonType. */ +/** The type of private cloud addon. */ public final class AddonType extends ExpandableStringEnum { /** Static value SRM for AddonType. */ public static final AddonType SRM = fromString("SRM"); @@ -19,6 +19,9 @@ public final class AddonType extends ExpandableStringEnum { /** Static value HCX for AddonType. */ public static final AddonType HCX = fromString("HCX"); + /** Static value Arc for AddonType. */ + public static final AddonType ARC = fromString("Arc"); + /** * Creates or finds a AddonType from its string representation. * @@ -30,7 +33,11 @@ public static AddonType fromString(String name) { return fromString(name, AddonType.class); } - /** @return known AddonType values. */ + /** + * Gets known AddonType values. + * + * @return known AddonType values. + */ public static Collection values() { return values(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 6435a9f27174..6ea7a60736e9 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,8 +5,6 @@ package com.azure.resourcemanager.avs.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; @@ -16,14 +14,16 @@ @JsonTypeName("VR") @Fluent public final class AddonVrProperties extends AddonProperties { - @JsonIgnore private final ClientLogger logger = new ClientLogger(AddonVrProperties.class); - /* * The vSphere Replication Server (VRS) count */ @JsonProperty(value = "vrsCount", required = true) private int vrsCount; + /** Creates an instance of AddonVrProperties class. */ + public AddonVrProperties() { + } + /** * Get the vrsCount property: The vSphere Replication Server (VRS) count. * 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 d13c1a4397a5..200999a91096 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 @@ -18,7 +18,7 @@ public interface Addons { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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. + * @return a paged list of addons as paginated response with {@link PagedIterable}. */ PagedIterable list(String resourceGroupName, String privateCloudName); @@ -31,7 +31,7 @@ public interface Addons { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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. + * @return a paged list of addons as paginated response with {@link PagedIterable}. */ PagedIterable list(String resourceGroupName, String privateCloudName, Context context); @@ -41,12 +41,14 @@ public interface Addons { * @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 context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.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 an addon by name in a private cloud along with {@link Response}. */ - Addon get(String resourceGroupName, String privateCloudName, String addonName); + Response getWithResponse( + String resourceGroupName, String privateCloudName, String addonName, Context context); /** * Get an addon by name in a private cloud. @@ -54,14 +56,12 @@ public interface Addons { * @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 context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.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. */ - Response getWithResponse( - String resourceGroupName, String privateCloudName, String addonName, Context context); + Addon get(String resourceGroupName, String privateCloudName, String addonName); /** * Delete a addon in a private cloud. @@ -95,7 +95,7 @@ Response getWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.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 an addon by name in a private cloud along with {@link Response}. */ Addon getById(String id); @@ -107,7 +107,7 @@ Response getWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.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 an addon by name in a private cloud along with {@link Response}. */ Response getByIdWithResponse(String id, Context context); 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 new file mode 100644 index 000000000000..211a75482fd1 --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/AffinityStrength.java @@ -0,0 +1,38 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.avs.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** VM-Host placement policy affinity strength (should/must). */ +public final class AffinityStrength extends ExpandableStringEnum { + /** Static value Should for AffinityStrength. */ + public static final AffinityStrength SHOULD = fromString("Should"); + + /** Static value Must for AffinityStrength. */ + public static final AffinityStrength MUST = fromString("Must"); + + /** + * Creates or finds a AffinityStrength from its string representation. + * + * @param name a name to look for. + * @return the corresponding AffinityStrength. + */ + @JsonCreator + public static AffinityStrength fromString(String name) { + return fromString(name, AffinityStrength.class); + } + + /** + * Gets known AffinityStrength values. + * + * @return known AffinityStrength values. + */ + public static Collection values() { + return values(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 fc125264da55..65593d17b366 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/AffinityType.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/AffinityType.java @@ -8,7 +8,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for AffinityType. */ +/** Placement policy affinity type. */ public final class AffinityType extends ExpandableStringEnum { /** Static value Affinity for AffinityType. */ public static final AffinityType AFFINITY = fromString("Affinity"); @@ -27,7 +27,11 @@ public static AffinityType fromString(String name) { return fromString(name, AffinityType.class); } - /** @return known AffinityType values. */ + /** + * Gets known AffinityType values. + * + * @return known AffinityType values. + */ public static Collection values() { return values(AffinityType.class); } 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 159cd5a22ac7..5ad49c3b8147 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 @@ -18,7 +18,7 @@ public interface Authorizations { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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. + * @return a paged list of ExpressRoute Circuit Authorizations as paginated response with {@link PagedIterable}. */ PagedIterable list(String resourceGroupName, String privateCloudName); @@ -31,7 +31,7 @@ public interface Authorizations { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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. + * @return a paged list of ExpressRoute Circuit Authorizations as paginated response with {@link PagedIterable}. */ PagedIterable list(String resourceGroupName, String privateCloudName, Context context); @@ -41,12 +41,14 @@ public interface Authorizations { * @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 context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.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 an ExpressRoute Circuit Authorization by name in a private cloud along with {@link Response}. */ - ExpressRouteAuthorization get(String resourceGroupName, String privateCloudName, String authorizationName); + Response getWithResponse( + String resourceGroupName, String privateCloudName, String authorizationName, Context context); /** * Get an ExpressRoute Circuit Authorization by name in a private cloud. @@ -54,14 +56,12 @@ public interface Authorizations { * @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 context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.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. */ - Response getWithResponse( - String resourceGroupName, String privateCloudName, String authorizationName, Context context); + ExpressRouteAuthorization get(String resourceGroupName, String privateCloudName, String authorizationName); /** * Delete an ExpressRoute Circuit Authorization in a private cloud. @@ -95,7 +95,7 @@ Response getWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.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 an ExpressRoute Circuit Authorization by name in a private cloud along with {@link Response}. */ ExpressRouteAuthorization getById(String id); @@ -107,7 +107,7 @@ Response getWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.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 an ExpressRoute Circuit Authorization by name in a private cloud along with {@link Response}. */ Response getByIdWithResponse(String id, Context context); 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 d64bff150de6..c1f9a63e202c 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,15 +5,11 @@ package com.azure.resourcemanager.avs.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** The properties describing private cloud availability zone distribution. */ @Fluent public final class AvailabilityProperties { - @JsonIgnore private final ClientLogger logger = new ClientLogger(AvailabilityProperties.class); - /* * The availability strategy for the private cloud */ @@ -32,6 +28,10 @@ public final class AvailabilityProperties { @JsonProperty(value = "secondaryZone") private Integer secondaryZone; + /** Creates an instance of AvailabilityProperties class. */ + public AvailabilityProperties() { + } + /** * Get the strategy property: The availability strategy for the private cloud. * 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 8e4b3d1f6b91..be82d9c6b2ef 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/AvailabilityStrategy.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/AvailabilityStrategy.java @@ -8,7 +8,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for AvailabilityStrategy. */ +/** The availability strategy for the private cloud. */ public final class AvailabilityStrategy extends ExpandableStringEnum { /** Static value SingleZone for AvailabilityStrategy. */ public static final AvailabilityStrategy SINGLE_ZONE = fromString("SingleZone"); @@ -27,7 +27,11 @@ public static AvailabilityStrategy fromString(String name) { return fromString(name, AvailabilityStrategy.class); } - /** @return known AvailabilityStrategy values. */ + /** + * Gets known AvailabilityStrategy values. + * + * @return known AvailabilityStrategy values. + */ public static Collection values() { return values(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 new file mode 100644 index 000000000000..f13e4cc27720 --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/AzureHybridBenefitType.java @@ -0,0 +1,38 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.avs.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** Placement policy hosts opt-in Azure Hybrid Benefit type. */ +public final class AzureHybridBenefitType extends ExpandableStringEnum { + /** Static value SqlHost for AzureHybridBenefitType. */ + public static final AzureHybridBenefitType SQL_HOST = fromString("SqlHost"); + + /** Static value None for AzureHybridBenefitType. */ + public static final AzureHybridBenefitType NONE = fromString("None"); + + /** + * Creates or finds a AzureHybridBenefitType from its string representation. + * + * @param name a name to look for. + * @return the corresponding AzureHybridBenefitType. + */ + @JsonCreator + public static AzureHybridBenefitType fromString(String name) { + return fromString(name, AzureHybridBenefitType.class); + } + + /** + * Gets known AzureHybridBenefitType values. + * + * @return known AzureHybridBenefitType values. + */ + public static Collection values() { + return values(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 3170b471158b..c2754622da1a 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,15 +5,11 @@ package com.azure.resourcemanager.avs.models; import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** An ExpressRoute Circuit. */ @Immutable public final class Circuit { - @JsonIgnore private final ClientLogger logger = new ClientLogger(Circuit.class); - /* * CIDR of primary subnet */ @@ -38,6 +34,10 @@ public final class Circuit { @JsonProperty(value = "expressRoutePrivatePeeringID", access = JsonProperty.Access.WRITE_ONLY) private String expressRoutePrivatePeeringId; + /** Creates an instance of Circuit class. */ + public Circuit() { + } + /** * Get the primarySubnet property: CIDR of primary subnet. * 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 6d228c66e7fb..ebfc13c37789 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 @@ -44,6 +44,13 @@ public interface CloudLink { */ 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. * 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 index 8edb8a431cb2..0a50fa8b50c8 100644 --- 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 @@ -5,17 +5,13 @@ package com.azure.resourcemanager.avs.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.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** A paged list of cloud links. */ @Immutable public final class CloudLinkList { - @JsonIgnore private final ClientLogger logger = new ClientLogger(CloudLinkList.class); - /* * The items on a page */ @@ -28,6 +24,10 @@ public final class CloudLinkList { @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. * 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 cb60c0711ea2..6952435521fd 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/CloudLinkStatus.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/CloudLinkStatus.java @@ -8,7 +8,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for CloudLinkStatus. */ +/** The state of the cloud link. */ public final class CloudLinkStatus extends ExpandableStringEnum { /** Static value Active for CloudLinkStatus. */ public static final CloudLinkStatus ACTIVE = fromString("Active"); @@ -36,7 +36,11 @@ public static CloudLinkStatus fromString(String name) { return fromString(name, CloudLinkStatus.class); } - /** @return known CloudLinkStatus values. */ + /** + * Gets known CloudLinkStatus values. + * + * @return known CloudLinkStatus values. + */ public static Collection values() { return values(CloudLinkStatus.class); } 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 29fc017548fd..bd7761b6b158 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 @@ -18,7 +18,7 @@ public interface CloudLinks { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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. + * @return a paged list of cloud links as paginated response with {@link PagedIterable}. */ PagedIterable list(String resourceGroupName, String privateCloudName); @@ -31,7 +31,7 @@ public interface CloudLinks { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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. + * @return a paged list of cloud links as paginated response with {@link PagedIterable}. */ PagedIterable list(String resourceGroupName, String privateCloudName, Context context); @@ -41,12 +41,14 @@ public interface CloudLinks { * @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 context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.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 an cloud link by name in a private cloud along with {@link Response}. */ - CloudLink get(String resourceGroupName, String privateCloudName, String cloudLinkName); + Response getWithResponse( + String resourceGroupName, String privateCloudName, String cloudLinkName, Context context); /** * Get an cloud link by name in a private cloud. @@ -54,14 +56,12 @@ public interface CloudLinks { * @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 context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.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. */ - Response getWithResponse( - String resourceGroupName, String privateCloudName, String cloudLinkName, Context context); + CloudLink get(String resourceGroupName, String privateCloudName, String cloudLinkName); /** * Delete a cloud link in a private cloud. @@ -95,7 +95,7 @@ Response getWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.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 an cloud link by name in a private cloud along with {@link Response}. */ CloudLink getById(String id); @@ -107,7 +107,7 @@ Response getWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.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 an cloud link by name in a private cloud along with {@link Response}. */ Response getByIdWithResponse(String id, Context context); 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 f48fa18d9060..53fab1525f55 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 @@ -4,6 +4,7 @@ package com.azure.resourcemanager.avs.models; +import com.azure.core.http.rest.Response; import com.azure.core.util.Context; import com.azure.resourcemanager.avs.fluent.models.ClusterInner; import java.util.List; @@ -38,6 +39,13 @@ public interface Cluster { */ Sku sku(); + /** + * 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. * @@ -160,4 +168,24 @@ interface WithHosts { * @return the refreshed resource. */ Cluster refresh(Context context); + + /** + * 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. + * @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(Context context); + + /** + * 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. + */ + ClusterZoneList listZones(); } 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 index 076d3182e445..698ec28a4705 100644 --- 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 @@ -5,17 +5,13 @@ package com.azure.resourcemanager.avs.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.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** A paged list of clusters. */ @Immutable public final class ClusterList { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ClusterList.class); - /* * The items on a page */ @@ -28,6 +24,10 @@ public final class ClusterList { @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. * 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 4e09de3e0a53..e9c063ac3cd7 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ClusterProvisioningState.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ClusterProvisioningState.java @@ -8,7 +8,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for ClusterProvisioningState. */ +/** The state of the cluster provisioning. */ public final class ClusterProvisioningState extends ExpandableStringEnum { /** Static value Succeeded for ClusterProvisioningState. */ public static final ClusterProvisioningState SUCCEEDED = fromString("Succeeded"); @@ -25,6 +25,9 @@ public final class ClusterProvisioningState extends ExpandableStringEnum values() { return values(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 edb25ff36728..4262fdfbb867 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,23 +5,23 @@ package com.azure.resourcemanager.avs.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.avs.fluent.models.ClusterUpdateProperties; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** An update of a cluster resource. */ @Fluent public final class ClusterUpdate { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ClusterUpdate.class); - /* * The properties of a cluster resource that may be updated */ @JsonProperty(value = "properties") private ClusterUpdateProperties innerProperties; + /** Creates an instance of ClusterUpdate class. */ + public ClusterUpdate() { + } + /** * Get the innerProperties property: The properties of a cluster resource that may be updated. * 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 new file mode 100644 index 000000000000..7d1dcfc2aba5 --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ClusterZone.java @@ -0,0 +1,55 @@ +// Copyright (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.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** Zone and associated hosts info. */ +@Immutable +public final class ClusterZone { + /* + * 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; + + /** Creates an instance of ClusterZone class. */ + public ClusterZone() { + } + + /** + * Get the hosts property: List of hosts belonging to the availability zone in a cluster. + * + * @return the hosts value. + */ + public List hosts() { + return this.hosts; + } + + /** + * Get the zone property: Availability zone identifier. + * + * @return the zone value. + */ + public String zone() { + return this.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 new file mode 100644 index 000000000000..eb2a3d1a71b2 --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ClusterZoneList.java @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.avs.models; + +import com.azure.resourcemanager.avs.fluent.models.ClusterZoneListInner; +import java.util.List; + +/** 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 a910e6e8bc53..d6132d16b850 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 @@ -18,7 +18,7 @@ public interface Clusters { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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. + * @return a paged list of clusters as paginated response with {@link PagedIterable}. */ PagedIterable list(String resourceGroupName, String privateCloudName); @@ -31,7 +31,7 @@ public interface Clusters { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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. + * @return a paged list of clusters as paginated response with {@link PagedIterable}. */ PagedIterable list(String resourceGroupName, String privateCloudName, Context context); @@ -41,12 +41,14 @@ public interface Clusters { * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. * @param clusterName Name of the cluster 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 cluster by name in a private cloud. + * @return a cluster by name in a private cloud along with {@link Response}. */ - Cluster get(String resourceGroupName, String privateCloudName, String clusterName); + Response getWithResponse( + String resourceGroupName, String privateCloudName, String clusterName, Context context); /** * Get a cluster by name in a private cloud. @@ -54,14 +56,12 @@ public interface Clusters { * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. * @param clusterName Name of the cluster 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 cluster by name in a private cloud. */ - Response getWithResponse( - String resourceGroupName, String privateCloudName, String clusterName, Context context); + Cluster get(String resourceGroupName, String privateCloudName, String clusterName); /** * Delete a cluster in a private cloud. @@ -88,6 +88,34 @@ Response getWithResponse( */ void delete(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 context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.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); + + /** + * 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. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.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. + */ + ClusterZoneList listZones(String resourceGroupName, String privateCloudName, String clusterName); + /** * Get a cluster by name in a private cloud. * @@ -95,7 +123,7 @@ Response getWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 by name in a private cloud along with {@link Response}. */ Cluster getById(String id); @@ -107,7 +135,7 @@ Response getWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 by name in a private cloud along with {@link Response}. */ Response getByIdWithResponse(String id, Context context); 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 index 028c345b0cc8..4b007a2eb563 100644 --- 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 @@ -5,16 +5,12 @@ package com.azure.resourcemanager.avs.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** The common properties of a cluster. */ @Fluent public class CommonClusterProperties { - @JsonIgnore private final ClientLogger logger = new ClientLogger(CommonClusterProperties.class); - /* * The cluster size */ @@ -39,6 +35,10 @@ public class CommonClusterProperties { @JsonProperty(value = "hosts") private List hosts; + /** Creates an instance of CommonClusterProperties class. */ + public CommonClusterProperties() { + } + /** * Get the clusterSize property: The cluster size. * 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 16609919e0ef..c6d5f21191e6 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 @@ -58,6 +58,13 @@ public interface Datastore { */ 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. * 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 index 0e7688f6f27d..fc4350052c9b 100644 --- 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 @@ -5,17 +5,13 @@ package com.azure.resourcemanager.avs.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.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** A paged list of datastores. */ @Immutable public final class DatastoreList { - @JsonIgnore private final ClientLogger logger = new ClientLogger(DatastoreList.class); - /* * The items on a page */ @@ -28,6 +24,10 @@ public final class DatastoreList { @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. * 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 5e421f1c07dc..57c22ca734be 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/DatastoreProvisioningState.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/DatastoreProvisioningState.java @@ -8,7 +8,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for DatastoreProvisioningState. */ +/** The state of the datastore provisioning. */ public final class DatastoreProvisioningState extends ExpandableStringEnum { /** Static value Succeeded for DatastoreProvisioningState. */ public static final DatastoreProvisioningState SUCCEEDED = fromString("Succeeded"); @@ -31,6 +31,9 @@ public final class DatastoreProvisioningState extends ExpandableStringEnum values() { return values(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 e616ae57bf96..8b88ac7035f9 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/DatastoreStatus.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/DatastoreStatus.java @@ -8,7 +8,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for DatastoreStatus. */ +/** The operational status of the datastore. */ public final class DatastoreStatus extends ExpandableStringEnum { /** Static value Unknown for DatastoreStatus. */ public static final DatastoreStatus UNKNOWN = fromString("Unknown"); @@ -42,7 +42,11 @@ public static DatastoreStatus fromString(String name) { return fromString(name, DatastoreStatus.class); } - /** @return known DatastoreStatus values. */ + /** + * Gets known DatastoreStatus values. + * + * @return known DatastoreStatus values. + */ public static Collection values() { return values(DatastoreStatus.class); } 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 e6c8e4f32c36..d17b66844d94 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 @@ -19,7 +19,7 @@ public interface Datastores { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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. + * @return a paged list of datastores as paginated response with {@link PagedIterable}. */ PagedIterable list(String resourceGroupName, String privateCloudName, String clusterName); @@ -33,7 +33,7 @@ public interface Datastores { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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. + * @return a paged list of datastores as paginated response with {@link PagedIterable}. */ PagedIterable list( String resourceGroupName, String privateCloudName, String clusterName, Context context); @@ -45,12 +45,14 @@ PagedIterable list( * @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 context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 in a private cloud cluster along with {@link Response}. */ - Datastore get(String resourceGroupName, String privateCloudName, String clusterName, String datastoreName); + Response getWithResponse( + String resourceGroupName, String privateCloudName, String clusterName, String datastoreName, Context context); /** * Get a datastore in a private cloud cluster. @@ -59,14 +61,12 @@ PagedIterable list( * @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 context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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. */ - Response getWithResponse( - String resourceGroupName, String privateCloudName, String clusterName, String datastoreName, Context context); + Datastore get(String resourceGroupName, String privateCloudName, String clusterName, String datastoreName); /** * Delete a datastore in a private cloud cluster. @@ -103,7 +103,7 @@ void delete( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 in a private cloud cluster along with {@link Response}. */ Datastore getById(String id); @@ -115,7 +115,7 @@ void delete( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 in a private cloud cluster along with {@link Response}. */ Response getByIdWithResponse(String id, Context context); 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 499ed9b7e829..d62bd38d9b03 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/DhcpTypeEnum.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/DhcpTypeEnum.java @@ -8,7 +8,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for DhcpTypeEnum. */ +/** Type of DHCP: SERVER or RELAY. */ public final class DhcpTypeEnum extends ExpandableStringEnum { /** Static value SERVER for DhcpTypeEnum. */ public static final DhcpTypeEnum SERVER = fromString("SERVER"); @@ -27,7 +27,11 @@ public static DhcpTypeEnum fromString(String name) { return fromString(name, DhcpTypeEnum.class); } - /** @return known DhcpTypeEnum values. */ + /** + * Gets known DhcpTypeEnum values. + * + * @return known DhcpTypeEnum values. + */ public static Collection values() { return values(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 4fdaaaaaa49b..dfdb8fc94aab 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,14 +6,11 @@ import com.azure.core.annotation.Fluent; import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** An iSCSI volume from Microsoft.StoragePool provider. */ @Fluent public final class DiskPoolVolume { - @JsonIgnore private final ClientLogger logger = new ClientLogger(DiskPoolVolume.class); - /* * Azure resource ID of the iSCSI target */ @@ -27,8 +24,7 @@ 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; @@ -39,6 +35,10 @@ public final class DiskPoolVolume { @JsonProperty(value = "path", access = JsonProperty.Access.WRITE_ONLY) private String path; + /** Creates an instance of DiskPoolVolume class. */ + public DiskPoolVolume() { + } + /** * Get the targetId property: Azure resource ID of the iSCSI target. * @@ -117,14 +117,16 @@ public String path() { */ public void validate() { if (targetId() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException("Missing required property targetId in model DiskPoolVolume")); } if (lunName() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException("Missing required property lunName in model DiskPoolVolume")); } } + + private static final ClientLogger LOGGER = new ClientLogger(DiskPoolVolume.class); } 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 c6563e416b17..165edb24152c 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/DnsServiceLogLevelEnum.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/DnsServiceLogLevelEnum.java @@ -8,7 +8,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for DnsServiceLogLevelEnum. */ +/** DNS Service log level. */ public final class DnsServiceLogLevelEnum extends ExpandableStringEnum { /** Static value DEBUG for DnsServiceLogLevelEnum. */ public static final DnsServiceLogLevelEnum DEBUG = fromString("DEBUG"); @@ -36,7 +36,11 @@ public static DnsServiceLogLevelEnum fromString(String name) { return fromString(name, DnsServiceLogLevelEnum.class); } - /** @return known DnsServiceLogLevelEnum values. */ + /** + * Gets known DnsServiceLogLevelEnum values. + * + * @return known DnsServiceLogLevelEnum values. + */ public static Collection values() { return values(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 6da13ca6f03d..fc76762a5615 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/DnsServiceStatusEnum.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/DnsServiceStatusEnum.java @@ -8,7 +8,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for DnsServiceStatusEnum. */ +/** DNS Service status. */ public final class DnsServiceStatusEnum extends ExpandableStringEnum { /** Static value SUCCESS for DnsServiceStatusEnum. */ public static final DnsServiceStatusEnum SUCCESS = fromString("SUCCESS"); @@ -27,7 +27,11 @@ public static DnsServiceStatusEnum fromString(String name) { return fromString(name, DnsServiceStatusEnum.class); } - /** @return known DnsServiceStatusEnum values. */ + /** + * Gets known DnsServiceStatusEnum values. + * + * @return known DnsServiceStatusEnum values. + */ public static Collection values() { return values(DnsServiceStatusEnum.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 bd12af2b97b5..96c7d0e8c1e5 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,15 +5,11 @@ package com.azure.resourcemanager.avs.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** The properties of customer managed encryption key. */ @Fluent public final class Encryption { - @JsonIgnore private final ClientLogger logger = new ClientLogger(Encryption.class); - /* * Status of customer managed encryption key */ @@ -26,6 +22,10 @@ public final class Encryption { @JsonProperty(value = "keyVaultProperties") private EncryptionKeyVaultProperties keyVaultProperties; + /** Creates an instance of Encryption class. */ + public Encryption() { + } + /** * Get the status property: Status of customer managed encryption key. * 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 a01689d52878..b31afb32347e 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/EncryptionKeyStatus.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/EncryptionKeyStatus.java @@ -8,7 +8,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for EncryptionKeyStatus. */ +/** The state of key provided. */ public final class EncryptionKeyStatus extends ExpandableStringEnum { /** Static value Connected for EncryptionKeyStatus. */ public static final EncryptionKeyStatus CONNECTED = fromString("Connected"); @@ -27,7 +27,11 @@ public static EncryptionKeyStatus fromString(String name) { return fromString(name, EncryptionKeyStatus.class); } - /** @return known EncryptionKeyStatus values. */ + /** + * Gets known EncryptionKeyStatus values. + * + * @return known EncryptionKeyStatus values. + */ public static Collection values() { return values(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 90ae742198fb..bf93ec50e582 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,15 +5,11 @@ package com.azure.resourcemanager.avs.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** An Encryption Key. */ @Fluent public final class EncryptionKeyVaultProperties { - @JsonIgnore private final ClientLogger logger = new ClientLogger(EncryptionKeyVaultProperties.class); - /* * The name of the key. */ @@ -26,6 +22,12 @@ public final class EncryptionKeyVaultProperties { @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. */ @@ -44,6 +46,10 @@ public final class EncryptionKeyVaultProperties { @JsonProperty(value = "versionType", access = JsonProperty.Access.WRITE_ONLY) private EncryptionVersionType versionType; + /** Creates an instance of EncryptionKeyVaultProperties class. */ + public EncryptionKeyVaultProperties() { + } + /** * Get the keyName property: The name of the key. * @@ -84,6 +90,15 @@ public EncryptionKeyVaultProperties withKeyVersion(String keyVersion) { return this; } + /** + * Get the autoDetectedKeyVersion property: The auto-detected version of the key if versionType is auto-detected. + * + * @return the autoDetectedKeyVersion value. + */ + public String autoDetectedKeyVersion() { + return this.autoDetectedKeyVersion; + } + /** * Get the keyVaultUrl property: The URL of the vault. * 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 915c8cc7c3d3..f43441379abc 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/EncryptionState.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/EncryptionState.java @@ -8,7 +8,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for EncryptionState. */ +/** Status of customer managed encryption key. */ public final class EncryptionState extends ExpandableStringEnum { /** Static value Enabled for EncryptionState. */ public static final EncryptionState ENABLED = fromString("Enabled"); @@ -27,7 +27,11 @@ public static EncryptionState fromString(String name) { return fromString(name, EncryptionState.class); } - /** @return known EncryptionState values. */ + /** + * Gets known EncryptionState values. + * + * @return known EncryptionState values. + */ public static Collection values() { return values(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 dc4c2ff3c47f..a243d310c6ba 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/EncryptionVersionType.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/EncryptionVersionType.java @@ -8,7 +8,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for EncryptionVersionType. */ +/** Property of the key if user provided or auto detected. */ public final class EncryptionVersionType extends ExpandableStringEnum { /** Static value Fixed for EncryptionVersionType. */ public static final EncryptionVersionType FIXED = fromString("Fixed"); @@ -27,7 +27,11 @@ public static EncryptionVersionType fromString(String name) { return fromString(name, EncryptionVersionType.class); } - /** @return known EncryptionVersionType values. */ + /** + * Gets known EncryptionVersionType values. + * + * @return known EncryptionVersionType values. + */ public static Collection values() { return values(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 ed4a4dd08b0b..b17d025d6723 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,15 +5,11 @@ package com.azure.resourcemanager.avs.models; import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** Endpoint addresses. */ @Immutable public final class Endpoints { - @JsonIgnore private final ClientLogger logger = new ClientLogger(Endpoints.class); - /* * Endpoint for the NSX-T Data Center manager */ @@ -32,6 +28,10 @@ public final class Endpoints { @JsonProperty(value = "hcxCloudManager", access = JsonProperty.Access.WRITE_ONLY) private String hcxCloudManager; + /** Creates an instance of Endpoints class. */ + public Endpoints() { + } + /** * Get the nsxtManager property: Endpoint for the NSX-T Data Center manager. * 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 1de94bfe8e39..b1d5360e1172 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 @@ -58,6 +58,13 @@ public interface ExpressRouteAuthorization { */ 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. * 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 index b2ded183dd02..21a78e738c8c 100644 --- 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 @@ -5,17 +5,13 @@ package com.azure.resourcemanager.avs.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.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** A paged list of ExpressRoute Circuit Authorizations. */ @Immutable public final class ExpressRouteAuthorizationList { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ExpressRouteAuthorizationList.class); - /* * The items on a page */ @@ -28,6 +24,10 @@ public final class ExpressRouteAuthorizationList { @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. * 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 9417bb55c2e7..4d421b9868a3 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ExpressRouteAuthorizationProvisioningState.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ExpressRouteAuthorizationProvisioningState.java @@ -8,7 +8,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for ExpressRouteAuthorizationProvisioningState. */ +/** The state of the ExpressRoute Circuit Authorization provisioning. */ public final class ExpressRouteAuthorizationProvisioningState extends ExpandableStringEnum { /** Static value Succeeded for ExpressRouteAuthorizationProvisioningState. */ @@ -20,6 +20,9 @@ public final class ExpressRouteAuthorizationProvisioningState /** Static value Updating for ExpressRouteAuthorizationProvisioningState. */ public static final ExpressRouteAuthorizationProvisioningState UPDATING = fromString("Updating"); + /** Static value Canceled for ExpressRouteAuthorizationProvisioningState. */ + public static final ExpressRouteAuthorizationProvisioningState CANCELED = fromString("Canceled"); + /** * Creates or finds a ExpressRouteAuthorizationProvisioningState from its string representation. * @@ -31,7 +34,11 @@ public static ExpressRouteAuthorizationProvisioningState fromString(String name) return fromString(name, ExpressRouteAuthorizationProvisioningState.class); } - /** @return known ExpressRouteAuthorizationProvisioningState values. */ + /** + * Gets known ExpressRouteAuthorizationProvisioningState values. + * + * @return known ExpressRouteAuthorizationProvisioningState values. + */ public static Collection values() { return values(ExpressRouteAuthorizationProvisioningState.class); } 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 6e0dc2bbd8c4..c32b3c004a24 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 @@ -76,6 +76,13 @@ public interface GlobalReachConnection { */ 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. * 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 index 0fe961e0c62f..e73d1e22c2fb 100644 --- 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 @@ -5,17 +5,13 @@ package com.azure.resourcemanager.avs.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.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** A paged list of global reach connections. */ @Immutable public final class GlobalReachConnectionList { - @JsonIgnore private final ClientLogger logger = new ClientLogger(GlobalReachConnectionList.class); - /* * The items on a page */ @@ -28,6 +24,10 @@ public final class GlobalReachConnectionList { @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. * 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 46e331c555ab..a50bc1f3afa0 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/GlobalReachConnectionProvisioningState.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/GlobalReachConnectionProvisioningState.java @@ -8,7 +8,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for GlobalReachConnectionProvisioningState. */ +/** The state of the ExpressRoute Circuit Authorization provisioning. */ public final class GlobalReachConnectionProvisioningState extends ExpandableStringEnum { /** Static value Succeeded for GlobalReachConnectionProvisioningState. */ @@ -20,6 +20,9 @@ public final class GlobalReachConnectionProvisioningState /** Static value Updating for GlobalReachConnectionProvisioningState. */ public static final GlobalReachConnectionProvisioningState UPDATING = fromString("Updating"); + /** Static value Canceled for GlobalReachConnectionProvisioningState. */ + public static final GlobalReachConnectionProvisioningState CANCELED = fromString("Canceled"); + /** * Creates or finds a GlobalReachConnectionProvisioningState from its string representation. * @@ -31,7 +34,11 @@ public static GlobalReachConnectionProvisioningState fromString(String name) { return fromString(name, GlobalReachConnectionProvisioningState.class); } - /** @return known GlobalReachConnectionProvisioningState values. */ + /** + * Gets known GlobalReachConnectionProvisioningState values. + * + * @return known GlobalReachConnectionProvisioningState values. + */ public static Collection values() { return values(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 d3c4ca0ffe32..d5bbb32dba93 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/GlobalReachConnectionStatus.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/GlobalReachConnectionStatus.java @@ -8,7 +8,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for GlobalReachConnectionStatus. */ +/** The connection status of the global reach connection. */ public final class GlobalReachConnectionStatus extends ExpandableStringEnum { /** Static value Connected for GlobalReachConnectionStatus. */ public static final GlobalReachConnectionStatus CONNECTED = fromString("Connected"); @@ -30,7 +30,11 @@ public static GlobalReachConnectionStatus fromString(String name) { return fromString(name, GlobalReachConnectionStatus.class); } - /** @return known GlobalReachConnectionStatus values. */ + /** + * Gets known GlobalReachConnectionStatus values. + * + * @return known GlobalReachConnectionStatus values. + */ public static Collection values() { return values(GlobalReachConnectionStatus.class); } 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 861a4a862cd3..0836f07b11a1 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 @@ -18,7 +18,7 @@ public interface GlobalReachConnections { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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. + * @return a paged list of global reach connections as paginated response with {@link PagedIterable}. */ PagedIterable list(String resourceGroupName, String privateCloudName); @@ -31,7 +31,7 @@ public interface GlobalReachConnections { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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. + * @return a paged list of global reach connections as paginated response with {@link PagedIterable}. */ PagedIterable list(String resourceGroupName, String privateCloudName, Context context); @@ -41,12 +41,14 @@ public interface GlobalReachConnections { * @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 context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 global reach connection by name in a private cloud along with {@link Response}. */ - GlobalReachConnection get(String resourceGroupName, String privateCloudName, String globalReachConnectionName); + Response getWithResponse( + String resourceGroupName, String privateCloudName, String globalReachConnectionName, Context context); /** * Get a global reach connection by name in a private cloud. @@ -54,14 +56,12 @@ public interface GlobalReachConnections { * @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 context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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. */ - Response getWithResponse( - String resourceGroupName, String privateCloudName, String globalReachConnectionName, Context context); + GlobalReachConnection get(String resourceGroupName, String privateCloudName, String globalReachConnectionName); /** * Delete a global reach connection in a private cloud. @@ -95,7 +95,7 @@ Response getWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 global reach connection by name in a private cloud along with {@link Response}. */ GlobalReachConnection getById(String id); @@ -107,7 +107,7 @@ Response getWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 global reach connection by name in a private cloud along with {@link Response}. */ Response getByIdWithResponse(String id, Context context); 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 4271101ddc91..06c71fff6bcb 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 @@ -44,6 +44,13 @@ public interface HcxEnterpriseSite { */ 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. * 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 index bd7b127715fc..46623c57f8ba 100644 --- 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 @@ -5,17 +5,13 @@ package com.azure.resourcemanager.avs.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.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** A paged list of HCX Enterprise Sites. */ @Immutable public final class HcxEnterpriseSiteList { - @JsonIgnore private final ClientLogger logger = new ClientLogger(HcxEnterpriseSiteList.class); - /* * The items on a page */ @@ -28,6 +24,10 @@ public final class HcxEnterpriseSiteList { @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. * 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 75ed1e3c7cd7..6dd9ccc6a5cd 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/HcxEnterpriseSiteStatus.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/HcxEnterpriseSiteStatus.java @@ -8,7 +8,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for HcxEnterpriseSiteStatus. */ +/** The status of the HCX Enterprise Site. */ public final class HcxEnterpriseSiteStatus extends ExpandableStringEnum { /** Static value Available for HcxEnterpriseSiteStatus. */ public static final HcxEnterpriseSiteStatus AVAILABLE = fromString("Available"); @@ -33,7 +33,11 @@ public static HcxEnterpriseSiteStatus fromString(String name) { return fromString(name, HcxEnterpriseSiteStatus.class); } - /** @return known HcxEnterpriseSiteStatus values. */ + /** + * Gets known HcxEnterpriseSiteStatus values. + * + * @return known HcxEnterpriseSiteStatus values. + */ public static Collection values() { return values(HcxEnterpriseSiteStatus.class); } 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 e5a9e518e951..8b07a2eca321 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 @@ -18,7 +18,7 @@ public interface HcxEnterpriseSites { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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. + * @return a paged list of HCX Enterprise Sites as paginated response with {@link PagedIterable}. */ PagedIterable list(String resourceGroupName, String privateCloudName); @@ -31,7 +31,7 @@ public interface HcxEnterpriseSites { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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. + * @return a paged list of HCX Enterprise Sites as paginated response with {@link PagedIterable}. */ PagedIterable list(String resourceGroupName, String privateCloudName, Context context); @@ -41,12 +41,14 @@ public interface HcxEnterpriseSites { * @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 context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.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 by name in a private cloud. + * @return an HCX Enterprise Site by name in a private cloud along with {@link Response}. */ - HcxEnterpriseSite get(String resourceGroupName, String privateCloudName, String hcxEnterpriseSiteName); + Response getWithResponse( + String resourceGroupName, String privateCloudName, String hcxEnterpriseSiteName, Context context); /** * Get an HCX Enterprise Site by name in a private cloud. @@ -54,14 +56,12 @@ public interface HcxEnterpriseSites { * @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 context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.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 by name in a private cloud. */ - Response getWithResponse( - String resourceGroupName, String privateCloudName, String hcxEnterpriseSiteName, Context context); + HcxEnterpriseSite get(String resourceGroupName, String privateCloudName, String hcxEnterpriseSiteName); /** * Delete an HCX Enterprise Site in a private cloud. @@ -69,11 +69,14 @@ Response getWithResponse( * @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 context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown 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}. */ - void delete(String resourceGroupName, String privateCloudName, String hcxEnterpriseSiteName); + Response deleteWithResponse( + String resourceGroupName, String privateCloudName, String hcxEnterpriseSiteName, Context context); /** * Delete an HCX Enterprise Site in a private cloud. @@ -81,14 +84,11 @@ Response getWithResponse( * @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 context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. */ - Response deleteWithResponse( - String resourceGroupName, String privateCloudName, String hcxEnterpriseSiteName, Context context); + void delete(String resourceGroupName, String privateCloudName, String hcxEnterpriseSiteName); /** * Get an HCX Enterprise Site by name in a private cloud. @@ -97,7 +97,7 @@ Response deleteWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.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 by name in a private cloud. + * @return an HCX Enterprise Site by name in a private cloud along with {@link Response}. */ HcxEnterpriseSite getById(String id); @@ -109,7 +109,7 @@ Response deleteWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.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 by name in a private cloud. + * @return an HCX Enterprise Site by name in a private cloud along with {@link Response}. */ Response getByIdWithResponse(String id, Context context); @@ -131,7 +131,7 @@ Response deleteWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. + * @return the {@link Response}. */ Response deleteByIdWithResponse(String id, Context context); 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 254b0ea80077..9c4438359065 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,15 +5,11 @@ package com.azure.resourcemanager.avs.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** vCenter Single Sign On Identity Source. */ @Fluent public final class IdentitySource { - @JsonIgnore private final ClientLogger logger = new ClientLogger(IdentitySource.class); - /* * The name of the identity source */ @@ -63,19 +59,21 @@ 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. */ + public IdentitySource() { + } + /** * Get the name property: The name of the identity source. * 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 96afefae99e9..f13d166d2633 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/InternetEnum.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/InternetEnum.java @@ -8,7 +8,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for InternetEnum. */ +/** Connectivity to internet is enabled or disabled. */ public final class InternetEnum extends ExpandableStringEnum { /** Static value Enabled for InternetEnum. */ public static final InternetEnum ENABLED = fromString("Enabled"); @@ -27,7 +27,11 @@ public static InternetEnum fromString(String name) { return fromString(name, InternetEnum.class); } - /** @return known InternetEnum values. */ + /** + * Gets known InternetEnum values. + * + * @return known InternetEnum values. + */ public static Collection values() { return values(InternetEnum.class); } 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 06887a5f4675..14b6b212efde 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 @@ -13,45 +13,46 @@ public interface Locations { * Return trial status for subscription by region. * * @param location Azure region. + * @param sku The sku to check for trial availability. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return subscription trial availability. + * @return subscription trial availability along with {@link Response}. */ - Trial checkTrialAvailability(String location); + Response checkTrialAvailabilityWithResponse(String location, Sku sku, Context context); /** * Return trial status for subscription by region. * * @param location Azure region. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return subscription trial availability. */ - Response checkTrialAvailabilityWithResponse(String location, Context context); + Trial checkTrialAvailability(String location); /** * Return quota for subscription by region. * * @param location Azure region. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return subscription quotas. + * @return subscription quotas along with {@link Response}. */ - Quota checkQuotaAvailability(String location); + Response checkQuotaAvailabilityWithResponse(String location, Context context); /** * Return quota for subscription by region. * * @param location Azure region. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return subscription quotas. */ - Response checkQuotaAvailabilityWithResponse(String location, Context context); + Quota checkQuotaAvailability(String location); } diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/LogSpecification.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/LogSpecification.java index 06a7966a15d3..4740950751a3 100644 --- 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 @@ -5,15 +5,11 @@ package com.azure.resourcemanager.avs.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** Specifications of the Log for Azure Monitoring. */ @Fluent public final class LogSpecification { - @JsonIgnore private final ClientLogger logger = new ClientLogger(LogSpecification.class); - /* * Name of the log */ @@ -32,6 +28,10 @@ public final class LogSpecification { @JsonProperty(value = "blobDuration") private String blobDuration; + /** Creates an instance of LogSpecification class. */ + public LogSpecification() { + } + /** * Get the name property: Name of the log. * 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 ef5be09351a6..7f1e6434c851 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,14 +5,14 @@ package com.azure.resourcemanager.avs.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import java.util.List; /** The properties of a management cluster. */ @Fluent public final class ManagementCluster extends CommonClusterProperties { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ManagementCluster.class); + /** Creates an instance of ManagementCluster class. */ + public ManagementCluster() { + } /** {@inheritDoc} */ @Override 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 index 45f5278ee505..c46df6fe18e8 100644 --- 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 @@ -5,15 +5,11 @@ package com.azure.resourcemanager.avs.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** Specifications of the Dimension of metrics. */ @Fluent public final class MetricDimension { - @JsonIgnore private final ClientLogger logger = new ClientLogger(MetricDimension.class); - /* * Name of the dimension */ @@ -33,12 +29,15 @@ public final class MetricDimension { private String internalName; /* - * A boolean flag indicating whether this dimension should be included for - * the shoebox export scenario + * 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. * 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 index 03b1c521c1aa..dc41d7139556 100644 --- 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 @@ -5,16 +5,12 @@ package com.azure.resourcemanager.avs.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** Specifications of the Metrics for Azure Monitoring. */ @Fluent public final class MetricSpecification { - @JsonIgnore private final ClientLogger logger = new ClientLogger(MetricSpecification.class); - /* * Name of the metric */ @@ -40,15 +36,13 @@ public final class MetricSpecification { private String unit; /* - * Name of the metric category that the metric belongs to. A metric can - * only belong to a single category. + * 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. + * Only provide one value for this field. Valid values: Average, Minimum, Maximum, Total, Count. */ @JsonProperty(value = "aggregationType") private String aggregationType; @@ -66,8 +60,7 @@ public final class MetricSpecification { private List supportedTimeGrainTypes; /* - * Optional. If set to true, then zero will be returned for time duration - * where no metric is emitted/published. + * 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; @@ -96,6 +89,10 @@ public final class MetricSpecification { @JsonProperty(value = "sourceMdmNamespace") private String sourceMdmNamespace; + /** Creates an instance of MetricSpecification class. */ + public MetricSpecification() { + } + /** * Get the name property: Name of the metric. * 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 3eb683764f9d..ee48a96003e6 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/MountOptionEnum.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/MountOptionEnum.java @@ -8,7 +8,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for MountOptionEnum. */ +/** Mode that describes whether the LUN has to be mounted as a datastore or attached as a LUN. */ public final class MountOptionEnum extends ExpandableStringEnum { /** Static value MOUNT for MountOptionEnum. */ public static final MountOptionEnum MOUNT = fromString("MOUNT"); @@ -27,7 +27,11 @@ public static MountOptionEnum fromString(String name) { return fromString(name, MountOptionEnum.class); } - /** @return known MountOptionEnum values. */ + /** + * Gets known MountOptionEnum values. + * + * @return known MountOptionEnum values. + */ public static Collection values() { return values(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 0390a4183a87..a891e2bbb9bf 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,20 +6,21 @@ import com.azure.core.annotation.Fluent; import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** An Azure NetApp Files volume from Microsoft.NetApp provider. */ @Fluent public final class NetAppVolume { - @JsonIgnore private final ClientLogger logger = new ClientLogger(NetAppVolume.class); - /* * Azure resource ID of the NetApp volume */ @JsonProperty(value = "id", required = true) private String id; + /** Creates an instance of NetAppVolume class. */ + public NetAppVolume() { + } + /** * Get the id property: Azure resource ID of the NetApp volume. * @@ -47,9 +48,11 @@ public NetAppVolume withId(String id) { */ public void validate() { if (id() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException("Missing required property id in model NetAppVolume")); } } + + private static final ClientLogger LOGGER = new ClientLogger(NetAppVolume.class); } 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 new file mode 100644 index 000000000000..12e91be75245 --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/NsxPublicIpQuotaRaisedEnum.java @@ -0,0 +1,40 @@ +// Copyright (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; + +/** + * Flag to indicate whether the private cloud has the quota for provisioned NSX Public IP count raised from 64 to 1024. + */ +public final class NsxPublicIpQuotaRaisedEnum extends ExpandableStringEnum { + /** Static value Enabled for NsxPublicIpQuotaRaisedEnum. */ + public static final NsxPublicIpQuotaRaisedEnum ENABLED = fromString("Enabled"); + + /** Static value Disabled for NsxPublicIpQuotaRaisedEnum. */ + public static final NsxPublicIpQuotaRaisedEnum DISABLED = fromString("Disabled"); + + /** + * Creates or finds a NsxPublicIpQuotaRaisedEnum from its string representation. + * + * @param name a name to look for. + * @return the corresponding NsxPublicIpQuotaRaisedEnum. + */ + @JsonCreator + public static NsxPublicIpQuotaRaisedEnum fromString(String name) { + return fromString(name, NsxPublicIpQuotaRaisedEnum.class); + } + + /** + * Gets known NsxPublicIpQuotaRaisedEnum values. + * + * @return known NsxPublicIpQuotaRaisedEnum values. + */ + public static Collection values() { + return values(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 69d36d2f0a70..816f07571bdb 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,15 +5,11 @@ package com.azure.resourcemanager.avs.models; import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** Contains the localized display information for this operation. */ @Immutable public final class OperationDisplay { - @JsonIgnore private final ClientLogger logger = new ClientLogger(OperationDisplay.class); - /* * Localized friendly form of the resource provider name */ @@ -38,6 +34,10 @@ public final class OperationDisplay { @JsonProperty(value = "description", access = JsonProperty.Access.WRITE_ONLY) private String description; + /** Creates an instance of OperationDisplay class. */ + public OperationDisplay() { + } + /** * Get the provider property: Localized friendly form of the resource provider name. * 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 index dd66d3048feb..db2ba6e2ae71 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/OperationList.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/OperationList.java @@ -5,17 +5,13 @@ package com.azure.resourcemanager.avs.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.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** Pageable list of operations. */ @Immutable public final class OperationList { - @JsonIgnore private final ClientLogger logger = new ClientLogger(OperationList.class); - /* * List of operations */ @@ -28,6 +24,10 @@ public final class OperationList { @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. * 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 index d673d4f092ea..004cddca52d7 100644 --- 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 @@ -5,21 +5,21 @@ package com.azure.resourcemanager.avs.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** Extra Operation properties. */ @Fluent public final class OperationProperties { - @JsonIgnore private final ClientLogger logger = new ClientLogger(OperationProperties.class); - /* * 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. * 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 a1b3a4e23676..4fbbe1e188a6 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 @@ -14,7 +14,7 @@ public interface Operations { * * @throws com.azure.core.management.exception.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. + * @return pageable list of operations as paginated response with {@link PagedIterable}. */ PagedIterable list(); @@ -25,7 +25,7 @@ public interface Operations { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.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. + * @return pageable list of operations 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 e75365aff594..1dd3a801b2e2 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/OptionalParamEnum.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/OptionalParamEnum.java @@ -8,7 +8,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for OptionalParamEnum. */ +/** Is this parameter required or optional. */ public final class OptionalParamEnum extends ExpandableStringEnum { /** Static value Optional for OptionalParamEnum. */ public static final OptionalParamEnum OPTIONAL = fromString("Optional"); @@ -27,7 +27,11 @@ public static OptionalParamEnum fromString(String name) { return fromString(name, OptionalParamEnum.class); } - /** @return known OptionalParamEnum values. */ + /** + * Gets known OptionalParamEnum values. + * + * @return known OptionalParamEnum values. + */ public static Collection values() { return values(OptionalParamEnum.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 10b9df8042d6..1f69de84e47a 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,8 +5,6 @@ package com.azure.resourcemanager.avs.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; @@ -16,8 +14,6 @@ @JsonTypeName("Credential") @Fluent public final class PSCredentialExecutionParameter extends ScriptExecutionParameter { - @JsonIgnore private final ClientLogger logger = new ClientLogger(PSCredentialExecutionParameter.class); - /* * username for login */ @@ -30,6 +26,10 @@ public final class PSCredentialExecutionParameter extends ScriptExecutionParamet @JsonProperty(value = "password") private String password; + /** Creates an instance of PSCredentialExecutionParameter class. */ + public PSCredentialExecutionParameter() { + } + /** * Get the username property: username for login. * 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 fdeec1d5ff10..72f2987469de 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 @@ -19,7 +19,7 @@ public interface PlacementPolicies { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.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. + * @return represents list of placement policies as paginated response with {@link PagedIterable}. */ PagedIterable list(String resourceGroupName, String privateCloudName, String clusterName); @@ -33,7 +33,7 @@ public interface PlacementPolicies { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.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. + * @return represents list of placement policies as paginated response with {@link PagedIterable}. */ PagedIterable list( String resourceGroupName, String privateCloudName, String clusterName, Context context); @@ -45,13 +45,18 @@ PagedIterable list( * @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 context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 placement policy by name in a private cloud cluster along with {@link Response}. */ - PlacementPolicy get( - String resourceGroupName, String privateCloudName, String clusterName, String placementPolicyName); + Response getWithResponse( + String resourceGroupName, + String privateCloudName, + String clusterName, + String placementPolicyName, + Context context); /** * Get a placement policy by name in a private cloud cluster. @@ -60,18 +65,13 @@ PlacementPolicy get( * @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 context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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. */ - Response getWithResponse( - String resourceGroupName, - String privateCloudName, - String clusterName, - String placementPolicyName, - Context context); + PlacementPolicy get( + String resourceGroupName, String privateCloudName, String clusterName, String placementPolicyName); /** * Delete a placement policy in a private cloud cluster. @@ -112,7 +112,7 @@ void delete( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 placement policy by name in a private cloud cluster along with {@link Response}. */ PlacementPolicy getById(String id); @@ -124,7 +124,7 @@ void delete( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 placement policy by name in a private cloud cluster along with {@link Response}. */ Response getByIdWithResponse(String id, Context context); 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 index fa0f71aa94f1..29ec0afcf22b 100644 --- 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 @@ -5,17 +5,13 @@ package com.azure.resourcemanager.avs.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.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** Represents list of placement policies. */ @Immutable public final class PlacementPoliciesList { - @JsonIgnore private final ClientLogger logger = new ClientLogger(PlacementPoliciesList.class); - /* * The items on the page */ @@ -28,6 +24,10 @@ public final class PlacementPoliciesList { @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. * 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 b8f8caa73196..ea86f1409f64 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 @@ -38,6 +38,13 @@ public interface PlacementPolicy { */ PlacementPolicyProperties properties(); + /** + * 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. * @@ -105,7 +112,12 @@ interface WithProperties { PlacementPolicy.Update update(); /** The template for PlacementPolicy update. */ - interface Update extends UpdateStages.WithState, UpdateStages.WithVmMembers, UpdateStages.WithHostMembers { + interface Update + extends UpdateStages.WithState, + UpdateStages.WithVmMembers, + UpdateStages.WithHostMembers, + UpdateStages.WithAffinityStrength, + UpdateStages.WithAzureHybridBenefitType { /** * Executes the update request. * @@ -153,6 +165,26 @@ interface WithHostMembers { */ Update withHostMembers(List hostMembers); } + /** 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. */ + 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. + */ + Update withAzureHybridBenefitType(AzureHybridBenefitType azureHybridBenefitType); + } } /** * Refreshes the resource to sync with Azure. 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 94d9c3fe3965..8ec701e857a4 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,8 +5,6 @@ package com.azure.resourcemanager.avs.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonSubTypes; import com.fasterxml.jackson.annotation.JsonTypeInfo; @@ -25,8 +23,6 @@ }) @Fluent public class PlacementPolicyProperties { - @JsonIgnore private final ClientLogger logger = new ClientLogger(PlacementPolicyProperties.class); - /* * Whether the placement policy is enabled or disabled */ @@ -45,6 +41,10 @@ public class PlacementPolicyProperties { @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) private PlacementPolicyProvisioningState provisioningState; + /** Creates an instance of PlacementPolicyProperties class. */ + public PlacementPolicyProperties() { + } + /** * Get the state property: Whether the placement policy is enabled or disabled. * 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 6dc1f737fccc..4c5d330ab197 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/PlacementPolicyProvisioningState.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/PlacementPolicyProvisioningState.java @@ -8,7 +8,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for PlacementPolicyProvisioningState. */ +/** The provisioning state. */ public final class PlacementPolicyProvisioningState extends ExpandableStringEnum { /** Static value Succeeded for PlacementPolicyProvisioningState. */ public static final PlacementPolicyProvisioningState SUCCEEDED = fromString("Succeeded"); @@ -25,6 +25,9 @@ public final class PlacementPolicyProvisioningState extends ExpandableStringEnum /** 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 or finds a PlacementPolicyProvisioningState from its string representation. * @@ -36,7 +39,11 @@ public static PlacementPolicyProvisioningState fromString(String name) { return fromString(name, PlacementPolicyProvisioningState.class); } - /** @return known PlacementPolicyProvisioningState values. */ + /** + * Gets known PlacementPolicyProvisioningState values. + * + * @return known PlacementPolicyProvisioningState values. + */ public static Collection values() { return values(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 3bf080d04b68..81e74edca4fe 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/PlacementPolicyState.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/PlacementPolicyState.java @@ -8,7 +8,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for PlacementPolicyState. */ +/** Whether the placement policy is enabled or disabled. */ public final class PlacementPolicyState extends ExpandableStringEnum { /** Static value Enabled for PlacementPolicyState. */ public static final PlacementPolicyState ENABLED = fromString("Enabled"); @@ -27,7 +27,11 @@ public static PlacementPolicyState fromString(String name) { return fromString(name, PlacementPolicyState.class); } - /** @return known PlacementPolicyState values. */ + /** + * Gets known PlacementPolicyState values. + * + * @return known PlacementPolicyState values. + */ public static Collection values() { return values(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 df77cae7c554..1831fa8ff09e 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/PlacementPolicyType.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/PlacementPolicyType.java @@ -8,7 +8,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for PlacementPolicyType. */ +/** placement policy type. */ public final class PlacementPolicyType extends ExpandableStringEnum { /** Static value VmVm for PlacementPolicyType. */ public static final PlacementPolicyType VM_VM = fromString("VmVm"); @@ -27,7 +27,11 @@ public static PlacementPolicyType fromString(String name) { return fromString(name, PlacementPolicyType.class); } - /** @return known PlacementPolicyType values. */ + /** + * Gets known PlacementPolicyType values. + * + * @return known PlacementPolicyType values. + */ public static Collection values() { return values(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 b5bc14e53009..e02f60b975d4 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,23 +5,23 @@ package com.azure.resourcemanager.avs.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.avs.fluent.models.PlacementPolicyUpdateProperties; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** An update of a DRS placement policy resource. */ @Fluent public final class PlacementPolicyUpdate { - @JsonIgnore private final ClientLogger logger = new ClientLogger(PlacementPolicyUpdate.class); - /* * The properties of a placement policy resource that may be updated */ @JsonProperty(value = "properties") private PlacementPolicyUpdateProperties innerProperties; + /** Creates an instance of PlacementPolicyUpdate class. */ + public PlacementPolicyUpdate() { + } + /** * Get the innerProperties property: The properties of a placement policy resource that may be updated. * @@ -100,6 +100,52 @@ public PlacementPolicyUpdate withHostMembers(List hostMembers) { return this; } + /** + * Get the affinityStrength property: vm-host placement policy affinity strength (should/must). + * + * @return the affinityStrength value. + */ + public AffinityStrength affinityStrength() { + return this.innerProperties() == null ? null : this.innerProperties().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. + */ + public PlacementPolicyUpdate withAffinityStrength(AffinityStrength affinityStrength) { + if (this.innerProperties() == null) { + this.innerProperties = new PlacementPolicyUpdateProperties(); + } + this.innerProperties().withAffinityStrength(affinityStrength); + return this; + } + + /** + * Get the azureHybridBenefitType property: placement policy azure hybrid benefit opt-in type. + * + * @return the azureHybridBenefitType value. + */ + public AzureHybridBenefitType azureHybridBenefitType() { + return this.innerProperties() == null ? null : this.innerProperties().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. + */ + public PlacementPolicyUpdate withAzureHybridBenefitType(AzureHybridBenefitType azureHybridBenefitType) { + if (this.innerProperties() == null) { + this.innerProperties = new PlacementPolicyUpdateProperties(); + } + this.innerProperties().withAzureHybridBenefitType(azureHybridBenefitType); + return this; + } + /** * Validates the instance. * 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 737f5a010706..a93c351fb31c 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/PortMirroringDirectionEnum.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/PortMirroringDirectionEnum.java @@ -8,7 +8,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for PortMirroringDirectionEnum. */ +/** Direction of port mirroring profile. */ public final class PortMirroringDirectionEnum extends ExpandableStringEnum { /** Static value INGRESS for PortMirroringDirectionEnum. */ public static final PortMirroringDirectionEnum INGRESS = fromString("INGRESS"); @@ -30,7 +30,11 @@ public static PortMirroringDirectionEnum fromString(String name) { return fromString(name, PortMirroringDirectionEnum.class); } - /** @return known PortMirroringDirectionEnum values. */ + /** + * Gets known PortMirroringDirectionEnum values. + * + * @return known PortMirroringDirectionEnum values. + */ public static Collection values() { return values(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 7ff71f94c477..09ab783d2061 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/PortMirroringStatusEnum.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/PortMirroringStatusEnum.java @@ -8,7 +8,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for PortMirroringStatusEnum. */ +/** Port Mirroring Status. */ public final class PortMirroringStatusEnum extends ExpandableStringEnum { /** Static value SUCCESS for PortMirroringStatusEnum. */ public static final PortMirroringStatusEnum SUCCESS = fromString("SUCCESS"); @@ -27,7 +27,11 @@ public static PortMirroringStatusEnum fromString(String name) { return fromString(name, PortMirroringStatusEnum.class); } - /** @return known PortMirroringStatusEnum values. */ + /** + * Gets known PortMirroringStatusEnum values. + * + * @return known PortMirroringStatusEnum values. + */ public static Collection values() { return values(PortMirroringStatusEnum.class); } 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 1fcae2fc05e8..d954512532bc 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 @@ -156,6 +156,14 @@ public interface PrivateCloud { */ 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. + * + * @return the nsxPublicIpQuotaRaised value. + */ + NsxPublicIpQuotaRaisedEnum nsxPublicIpQuotaRaised(); + /** * Gets the managementCluster property: The default cluster used for management. * @@ -205,6 +213,13 @@ public interface PrivateCloud { */ 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. * @@ -439,7 +454,6 @@ interface Update UpdateStages.WithManagementCluster, UpdateStages.WithInternet, UpdateStages.WithIdentitySources, - UpdateStages.WithAvailability, UpdateStages.WithEncryption { /** * Executes the update request. @@ -508,17 +522,6 @@ interface WithIdentitySources { */ Update withIdentitySources(List identitySources); } - /** The stage of the PrivateCloud update 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. - */ - Update withAvailability(AvailabilityProperties availability); - } /** The stage of the PrivateCloud update allowing to specify encryption. */ interface WithEncryption { /** @@ -584,20 +587,20 @@ interface WithEncryption { /** * List the admin credentials for the private cloud. * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return administrative credentials for accessing vCenter and NSX-T. + * @return administrative credentials for accessing vCenter and NSX-T along with {@link Response}. */ - AdminCredentials listAdminCredentials(); + Response listAdminCredentialsWithResponse(Context context); /** * List the admin credentials for the private cloud. * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.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. */ - Response listAdminCredentialsWithResponse(Context context); + AdminCredentials listAdminCredentials(); } 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 6d1b4588edff..b53b028f5921 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 @@ -5,37 +5,35 @@ package com.azure.resourcemanager.avs.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** Identity for the virtual machine. */ @Fluent public class PrivateCloudIdentity { - @JsonIgnore private final ClientLogger logger = new ClientLogger(PrivateCloudIdentity.class); - /* - * The principal ID of private cloud identity. This property will only be - * provided for a system assigned identity. + * The principal ID of private cloud identity. This property will only be provided for a system assigned identity. */ @JsonProperty(value = "principalId", access = JsonProperty.Access.WRITE_ONLY) private String principalId; /* - * The tenant ID associated with the private cloud. This property will only - * be provided for a system assigned identity. + * The tenant ID associated with the private cloud. This property will only be provided for a system assigned + * identity. */ @JsonProperty(value = "tenantId", access = JsonProperty.Access.WRITE_ONLY) private String tenantId; /* - * The type of identity used for the private cloud. The type - * 'SystemAssigned' refers to an implicitly created identity. The type - * 'None' will remove any identities from the Private Cloud. + * The type of identity used for the private cloud. The type 'SystemAssigned' refers to an implicitly created + * identity. The type 'None' will remove any identities from the Private Cloud. */ @JsonProperty(value = "type") private ResourceIdentityType type; + /** Creates an instance of PrivateCloudIdentity class. */ + public PrivateCloudIdentity() { + } + /** * Get the principalId property: The principal ID of private cloud identity. This property will only be provided for * a system assigned identity. 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 index 83854d31dd90..74fb1b195e24 100644 --- 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 @@ -5,17 +5,13 @@ package com.azure.resourcemanager.avs.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.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** A paged list of private clouds. */ @Immutable public final class PrivateCloudList { - @JsonIgnore private final ClientLogger logger = new ClientLogger(PrivateCloudList.class); - /* * The items on the page */ @@ -28,6 +24,10 @@ public final class PrivateCloudList { @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. * 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 3e68372ca785..c428719b8114 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/PrivateCloudProvisioningState.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/PrivateCloudProvisioningState.java @@ -8,7 +8,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for PrivateCloudProvisioningState. */ +/** The provisioning state. */ public final class PrivateCloudProvisioningState extends ExpandableStringEnum { /** Static value Succeeded for PrivateCloudProvisioningState. */ public static final PrivateCloudProvisioningState SUCCEEDED = fromString("Succeeded"); @@ -31,6 +31,9 @@ public final class PrivateCloudProvisioningState extends ExpandableStringEnum values() { return values(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 ea7d0a815925..7c90b8d6cf04 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,7 @@ package com.azure.resourcemanager.avs.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.avs.fluent.models.PrivateCloudUpdateProperties; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; @@ -16,8 +14,6 @@ /** An update to a private cloud resource. */ @Fluent public final class PrivateCloudUpdate { - @JsonIgnore private final ClientLogger logger = new ClientLogger(PrivateCloudUpdate.class); - /* * Resource tags */ @@ -37,6 +33,10 @@ public final class PrivateCloudUpdate { @JsonProperty(value = "identity") private PrivateCloudIdentity identity; + /** Creates an instance of PrivateCloudUpdate class. */ + public PrivateCloudUpdate() { + } + /** * Get the tags property: Resource tags. * 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 f1eefd6da32a..91d4e76b2f99 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 @@ -17,7 +17,7 @@ public interface PrivateClouds { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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. + * @return a paged list of private clouds as paginated response with {@link PagedIterable}. */ PagedIterable listByResourceGroup(String resourceGroupName); @@ -29,7 +29,7 @@ public interface PrivateClouds { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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. + * @return a paged list of private clouds as paginated response with {@link PagedIterable}. */ PagedIterable listByResourceGroup(String resourceGroupName, Context context); @@ -38,7 +38,7 @@ public interface PrivateClouds { * * @throws com.azure.core.management.exception.ManagementException 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. + * @return a paged list of private clouds as paginated response with {@link PagedIterable}. */ PagedIterable list(); @@ -49,7 +49,7 @@ public interface PrivateClouds { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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. + * @return a paged list of private clouds as paginated response with {@link PagedIterable}. */ PagedIterable list(Context context); @@ -58,26 +58,26 @@ public interface PrivateClouds { * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param 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. + * @return a private cloud along with {@link Response}. */ - PrivateCloud getByResourceGroup(String resourceGroupName, String privateCloudName); + Response getByResourceGroupWithResponse( + String resourceGroupName, String privateCloudName, Context context); /** * Get a private cloud. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a private cloud. */ - Response getByResourceGroupWithResponse( - String resourceGroupName, String privateCloudName, Context context); + PrivateCloud getByResourceGroup(String resourceGroupName, String privateCloudName); /** * Delete a private cloud. @@ -153,26 +153,26 @@ Response getByResourceGroupWithResponse( * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return administrative credentials for accessing vCenter and NSX-T. + * @return administrative credentials for accessing vCenter and NSX-T along with {@link Response}. */ - AdminCredentials listAdminCredentials(String resourceGroupName, String privateCloudName); + 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. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.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. */ - Response listAdminCredentialsWithResponse( - String resourceGroupName, String privateCloudName, Context context); + AdminCredentials listAdminCredentials(String resourceGroupName, String privateCloudName); /** * Get a private cloud. @@ -181,7 +181,7 @@ Response listAdminCredentialsWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 private cloud along with {@link Response}. */ PrivateCloud getById(String id); @@ -193,7 +193,7 @@ Response listAdminCredentialsWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 private cloud along with {@link Response}. */ Response getByIdWithResponse(String id, Context context); 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 d5400779d0fd..4f8055b79209 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/QuotaEnabled.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/QuotaEnabled.java @@ -8,7 +8,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for QuotaEnabled. */ +/** Host quota is active for current subscription. */ public final class QuotaEnabled extends ExpandableStringEnum { /** Static value Enabled for QuotaEnabled. */ public static final QuotaEnabled ENABLED = fromString("Enabled"); @@ -27,7 +27,11 @@ public static QuotaEnabled fromString(String name) { return fromString(name, QuotaEnabled.class); } - /** @return known QuotaEnabled values. */ + /** + * Gets known QuotaEnabled values. + * + * @return known QuotaEnabled values. + */ public static Collection values() { return values(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 dea69e9ee945..ca9f92f3c167 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 @@ -8,7 +8,10 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for ResourceIdentityType. */ +/** + * The type of identity used for the private cloud. The type 'SystemAssigned' refers to an implicitly created identity. + * The type 'None' will remove any identities from the Private Cloud. + */ public final class ResourceIdentityType extends ExpandableStringEnum { /** Static value SystemAssigned for ResourceIdentityType. */ public static final ResourceIdentityType SYSTEM_ASSIGNED = fromString("SystemAssigned"); @@ -27,7 +30,11 @@ public static ResourceIdentityType fromString(String name) { return fromString(name, ResourceIdentityType.class); } - /** @return known ResourceIdentityType values. */ + /** + * 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/ScriptCmdlets.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ScriptCmdlets.java index b76b5749c1c7..21db768aed70 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 @@ -20,7 +20,7 @@ public interface ScriptCmdlets { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.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. + * @return pageable list of scripts/cmdlets as paginated response with {@link PagedIterable}. */ PagedIterable list(String resourceGroupName, String privateCloudName, String scriptPackageName); @@ -35,7 +35,7 @@ public interface ScriptCmdlets { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.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. + * @return pageable list of scripts/cmdlets as paginated response with {@link PagedIterable}. */ PagedIterable list( String resourceGroupName, String privateCloudName, String scriptPackageName, Context context); @@ -47,13 +47,18 @@ PagedIterable list( * @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 context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 cmdlet available for script execution along with {@link Response}. */ - ScriptCmdlet get( - String resourceGroupName, String privateCloudName, String scriptPackageName, String scriptCmdletName); + 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. @@ -62,16 +67,11 @@ ScriptCmdlet get( * @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 context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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. */ - Response getWithResponse( - String resourceGroupName, - String privateCloudName, - String scriptPackageName, - String scriptCmdletName, - Context context); + 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 index da41bb74f31a..005d7ef37f1a 100644 --- 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 @@ -5,17 +5,13 @@ package com.azure.resourcemanager.avs.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.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** Pageable list of scripts/cmdlets. */ @Immutable public final class ScriptCmdletsList { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ScriptCmdletsList.class); - /* * List of scripts */ @@ -28,6 +24,10 @@ public final class ScriptCmdletsList { @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. * 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 dd7fd277b2a6..bdceca705769 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 @@ -141,6 +141,13 @@ public interface ScriptExecution { */ 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. * @@ -422,23 +429,23 @@ 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. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.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. + * @return an instance of a script executed by a user - custom or AVS along with {@link Response}. */ - ScriptExecution getExecutionLogs(); + Response getExecutionLogsWithResponse( + List scriptOutputStreamType, 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. */ - Response getExecutionLogsWithResponse( - List scriptOutputStreamType, Context context); + 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 index 814515ad07ce..874d0a6d0013 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,7 +6,6 @@ import com.azure.core.annotation.Fluent; import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonSubTypes; import com.fasterxml.jackson.annotation.JsonTypeInfo; @@ -26,14 +25,16 @@ }) @Fluent public class ScriptExecutionParameter { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ScriptExecutionParameter.class); - /* * The parameter name */ @JsonProperty(value = "name", required = true) private String name; + /** Creates an instance of ScriptExecutionParameter class. */ + public ScriptExecutionParameter() { + } + /** * Get the name property: The parameter name. * @@ -61,9 +62,11 @@ public ScriptExecutionParameter withName(String name) { */ public void validate() { if (name() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException("Missing required property name in model ScriptExecutionParameter")); } } + + private static final ClientLogger LOGGER = new ClientLogger(ScriptExecutionParameter.class); } 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 da5513bd95b2..46482d575ed7 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ScriptExecutionParameterType.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ScriptExecutionParameterType.java @@ -8,7 +8,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for ScriptExecutionParameterType. */ +/** The type of execution parameter. */ public final class ScriptExecutionParameterType extends ExpandableStringEnum { /** Static value Value for ScriptExecutionParameterType. */ public static final ScriptExecutionParameterType VALUE = fromString("Value"); @@ -30,7 +30,11 @@ public static ScriptExecutionParameterType fromString(String name) { return fromString(name, ScriptExecutionParameterType.class); } - /** @return known ScriptExecutionParameterType values. */ + /** + * 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 index f56227df4120..e8af6f9e7bea 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ScriptExecutionProvisioningState.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ScriptExecutionProvisioningState.java @@ -8,7 +8,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for ScriptExecutionProvisioningState. */ +/** The state of the script execution resource. */ public final class ScriptExecutionProvisioningState extends ExpandableStringEnum { /** Static value Pending for ScriptExecutionProvisioningState. */ public static final ScriptExecutionProvisioningState PENDING = fromString("Pending"); @@ -31,6 +31,9 @@ public final class ScriptExecutionProvisioningState extends ExpandableStringEnum /** 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 or finds a ScriptExecutionProvisioningState from its string representation. * @@ -42,7 +45,11 @@ public static ScriptExecutionProvisioningState fromString(String name) { return fromString(name, ScriptExecutionProvisioningState.class); } - /** @return known ScriptExecutionProvisioningState values. */ + /** + * 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 index 7b2bfe3ea2ae..96e89fdfe282 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 @@ -19,7 +19,7 @@ public interface ScriptExecutions { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.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. + * @return pageable list of script executions as paginated response with {@link PagedIterable}. */ PagedIterable list(String resourceGroupName, String privateCloudName); @@ -32,7 +32,7 @@ public interface ScriptExecutions { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.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. + * @return pageable list of script executions as paginated response with {@link PagedIterable}. */ PagedIterable list(String resourceGroupName, String privateCloudName, Context context); @@ -42,12 +42,14 @@ public interface ScriptExecutions { * @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 context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.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 an script execution by name in a private cloud along with {@link Response}. */ - ScriptExecution get(String resourceGroupName, String privateCloudName, String scriptExecutionName); + Response getWithResponse( + String resourceGroupName, String privateCloudName, String scriptExecutionName, Context context); /** * Get an script execution by name in a private cloud. @@ -55,14 +57,12 @@ public interface ScriptExecutions { * @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 context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.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. */ - Response getWithResponse( - String resourceGroupName, String privateCloudName, String scriptExecutionName, Context context); + ScriptExecution get(String resourceGroupName, String privateCloudName, String scriptExecutionName); /** * Cancel a ScriptExecution in a private cloud. @@ -95,12 +95,20 @@ Response getWithResponse( * @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 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. + * @return an instance of a script executed by a user - custom or AVS along with {@link Response}. */ - ScriptExecution getExecutionLogs(String resourceGroupName, String privateCloudName, String scriptExecutionName); + Response getExecutionLogsWithResponse( + String resourceGroupName, + String privateCloudName, + String scriptExecutionName, + List scriptOutputStreamType, + Context context); /** * Return the logs for a script execution resource. @@ -108,20 +116,12 @@ Response getWithResponse( * @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 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. */ - Response getExecutionLogsWithResponse( - String resourceGroupName, - String privateCloudName, - String scriptExecutionName, - List scriptOutputStreamType, - Context context); + ScriptExecution getExecutionLogs(String resourceGroupName, String privateCloudName, String scriptExecutionName); /** * Get an script execution by name in a private cloud. @@ -130,7 +130,7 @@ Response getExecutionLogsWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.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 an script execution by name in a private cloud along with {@link Response}. */ ScriptExecution getById(String id); @@ -142,7 +142,7 @@ Response getExecutionLogsWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.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 an script execution by name in a private cloud along with {@link Response}. */ Response getByIdWithResponse(String id, Context context); 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 index 5da4b98db8f2..efa59a4a74d2 100644 --- 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 @@ -5,17 +5,13 @@ package com.azure.resourcemanager.avs.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.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** Pageable list of script executions. */ @Immutable public final class ScriptExecutionsList { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ScriptExecutionsList.class); - /* * List of scripts */ @@ -28,6 +24,10 @@ public final class ScriptExecutionsList { @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. * 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 57465b43d52a..d00f8429ff6f 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 @@ -33,7 +33,11 @@ public static ScriptOutputStreamType fromString(String name) { return fromString(name, ScriptOutputStreamType.class); } - /** @return known ScriptOutputStreamType values. */ + /** + * 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/ScriptPackage.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ScriptPackage.java index 6e066fac34a5..beff089fb54e 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 @@ -43,6 +43,20 @@ public interface ScriptPackage { */ 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. * 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 14880ffcf8a3..9951320526c5 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 @@ -18,7 +18,7 @@ public interface ScriptPackages { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if 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. + * @return a list of the available script packages as paginated response with {@link PagedIterable}. */ PagedIterable list(String resourceGroupName, String privateCloudName); @@ -31,7 +31,7 @@ public interface ScriptPackages { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if 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. + * @return a list of the available script packages as paginated response with {@link PagedIterable}. */ PagedIterable list(String resourceGroupName, String privateCloudName, Context context); @@ -41,12 +41,14 @@ public interface ScriptPackages { * @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 context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 script package available to run on a private cloud along with {@link Response}. */ - ScriptPackage get(String resourceGroupName, String privateCloudName, String scriptPackageName); + Response getWithResponse( + String resourceGroupName, String privateCloudName, String scriptPackageName, Context context); /** * Get a script package available to run on a private cloud. @@ -54,12 +56,10 @@ public interface ScriptPackages { * @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 context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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. */ - Response getWithResponse( - String resourceGroupName, String privateCloudName, String scriptPackageName, Context context); + 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 index 7a54dc7398f9..8cea424d7b62 100644 --- 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 @@ -5,17 +5,13 @@ package com.azure.resourcemanager.avs.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.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** A list of the available script packages. */ @Immutable public final class ScriptPackagesList { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ScriptPackagesList.class); - /* * List of script package resources */ @@ -28,6 +24,10 @@ public final class ScriptPackagesList { @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. * 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 8163edfe1004..f626c36b226d 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,18 +5,13 @@ package com.azure.resourcemanager.avs.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** An parameter that the script will accept. */ @Fluent public final class ScriptParameter { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ScriptParameter.class); - /* - * 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; @@ -34,8 +29,7 @@ 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; @@ -46,6 +40,10 @@ public final class ScriptParameter { @JsonProperty(value = "optional", access = JsonProperty.Access.WRITE_ONLY) private OptionalParamEnum optional; + /** Creates an instance of ScriptParameter class. */ + public ScriptParameter() { + } + /** * Get the type property: The type of parameter the script is expecting. psCredential is a PSCredentialObject. * 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 322040c554fb..91417f0bb1e2 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ScriptParameterTypes.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ScriptParameterTypes.java @@ -8,7 +8,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for ScriptParameterTypes. */ +/** The type of parameter the script is expecting. psCredential is a PSCredentialObject. */ public final class ScriptParameterTypes extends ExpandableStringEnum { /** Static value String for ScriptParameterTypes. */ public static final ScriptParameterTypes STRING = fromString("String"); @@ -39,7 +39,11 @@ public static ScriptParameterTypes fromString(String name) { return fromString(name, ScriptParameterTypes.class); } - /** @return known ScriptParameterTypes values. */ + /** + * Gets known ScriptParameterTypes values. + * + * @return known ScriptParameterTypes values. + */ public static Collection values() { return values(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 68318d075fca..9f7c01b71ca8 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,8 +5,6 @@ package com.azure.resourcemanager.avs.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; @@ -16,14 +14,16 @@ @JsonTypeName("SecureValue") @Fluent public final class ScriptSecureStringExecutionParameter extends ScriptExecutionParameter { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ScriptSecureStringExecutionParameter.class); - /* * 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. */ + public ScriptSecureStringExecutionParameter() { + } + /** * Get the secureValue property: A secure value for the passed parameter, not to be stored in logs. * 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 8a377ded9899..5b013c585b4f 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,8 +5,6 @@ package com.azure.resourcemanager.avs.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; @@ -16,14 +14,16 @@ @JsonTypeName("Value") @Fluent public final class ScriptStringExecutionParameter extends ScriptExecutionParameter { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ScriptStringExecutionParameter.class); - /* * The value for the passed parameter */ @JsonProperty(value = "value") private String value; + /** Creates an instance of ScriptStringExecutionParameter class. */ + public ScriptStringExecutionParameter() { + } + /** * Get the value property: The value for the passed parameter. * 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 a54d1b9194a3..f15342de0d11 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/SegmentStatusEnum.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/SegmentStatusEnum.java @@ -8,7 +8,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for SegmentStatusEnum. */ +/** Segment status. */ public final class SegmentStatusEnum extends ExpandableStringEnum { /** Static value SUCCESS for SegmentStatusEnum. */ public static final SegmentStatusEnum SUCCESS = fromString("SUCCESS"); @@ -27,7 +27,11 @@ public static SegmentStatusEnum fromString(String name) { return fromString(name, SegmentStatusEnum.class); } - /** @return known SegmentStatusEnum values. */ + /** + * Gets known SegmentStatusEnum values. + * + * @return known SegmentStatusEnum values. + */ public static Collection values() { return values(SegmentStatusEnum.class); } 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 index c2f563fa8c9a..90674af3ee14 100644 --- 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 @@ -5,16 +5,12 @@ package com.azure.resourcemanager.avs.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** Service specification payload. */ @Fluent public final class ServiceSpecification { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ServiceSpecification.class); - /* * Specifications of the Log for Azure Monitoring */ @@ -27,6 +23,10 @@ public final class ServiceSpecification { @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. * 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 8c80da85983c..0e32c9d1a4dc 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,20 +6,21 @@ import com.azure.core.annotation.Fluent; import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** The resource model definition representing SKU. */ @Fluent public final class Sku { - @JsonIgnore private final ClientLogger logger = new ClientLogger(Sku.class); - /* * The name of the SKU. */ @JsonProperty(value = "name", required = true) private String name; + /** Creates an instance of Sku class. */ + public Sku() { + } + /** * Get the name property: The name of the SKU. * @@ -47,8 +48,10 @@ public Sku withName(String name) { */ public void validate() { if (name() == null) { - throw logger + throw LOGGER .logExceptionAsError(new IllegalArgumentException("Missing required property name in model Sku")); } } + + private static final ClientLogger LOGGER = new ClientLogger(Sku.class); } 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 9edb7bf99b49..bd4f8658fdae 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/SslEnum.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/SslEnum.java @@ -8,7 +8,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for SslEnum. */ +/** Protect LDAP communication using SSL certificate (LDAPS). */ public final class SslEnum extends ExpandableStringEnum { /** Static value Enabled for SslEnum. */ public static final SslEnum ENABLED = fromString("Enabled"); @@ -27,7 +27,11 @@ public static SslEnum fromString(String name) { return fromString(name, SslEnum.class); } - /** @return known SslEnum values. */ + /** + * Gets known SslEnum values. + * + * @return known SslEnum values. + */ public static Collection values() { return values(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 c9340a3683f3..b843c1f88f85 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/TrialStatus.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/TrialStatus.java @@ -8,7 +8,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for TrialStatus. */ +/** Trial status. */ public final class TrialStatus extends ExpandableStringEnum { /** Static value TrialAvailable for TrialStatus. */ public static final TrialStatus TRIAL_AVAILABLE = fromString("TrialAvailable"); @@ -30,7 +30,11 @@ public static TrialStatus fromString(String name) { return fromString(name, TrialStatus.class); } - /** @return known TrialStatus values. */ + /** + * Gets known TrialStatus values. + * + * @return known TrialStatus values. + */ public static Collection values() { return values(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 1b0832448dc4..f5a73ad41156 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/VMGroupStatusEnum.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/VMGroupStatusEnum.java @@ -8,7 +8,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for VMGroupStatusEnum. */ +/** VM Group status. */ public final class VMGroupStatusEnum extends ExpandableStringEnum { /** Static value SUCCESS for VMGroupStatusEnum. */ public static final VMGroupStatusEnum SUCCESS = fromString("SUCCESS"); @@ -27,7 +27,11 @@ public static VMGroupStatusEnum fromString(String name) { return fromString(name, VMGroupStatusEnum.class); } - /** @return known VMGroupStatusEnum values. */ + /** + * Gets known VMGroupStatusEnum values. + * + * @return known VMGroupStatusEnum values. + */ public static Collection values() { return values(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 f2e70b145061..90e8c48a9fd1 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/VMTypeEnum.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/VMTypeEnum.java @@ -8,7 +8,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for VMTypeEnum. */ +/** Virtual machine type. */ public final class VMTypeEnum extends ExpandableStringEnum { /** Static value REGULAR for VMTypeEnum. */ public static final VMTypeEnum REGULAR = fromString("REGULAR"); @@ -30,7 +30,11 @@ public static VMTypeEnum fromString(String name) { return fromString(name, VMTypeEnum.class); } - /** @return known VMTypeEnum values. */ + /** + * Gets known VMTypeEnum values. + * + * @return known VMTypeEnum values. + */ public static Collection values() { return values(VMTypeEnum.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 7c922f8df9a2..a5ce9a333732 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,21 +5,21 @@ package com.azure.resourcemanager.avs.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** Set VM DRS-driven movement to restricted (enabled) or not (disabled). */ @Fluent public final class VirtualMachineRestrictMovement { - @JsonIgnore private final ClientLogger logger = new ClientLogger(VirtualMachineRestrictMovement.class); - /* * Whether VM DRS-driven movement is restricted (enabled) or not (disabled) */ @JsonProperty(value = "restrictMovement") private VirtualMachineRestrictMovementState restrictMovement; + /** Creates an instance of VirtualMachineRestrictMovement class. */ + public VirtualMachineRestrictMovement() { + } + /** * Get the restrictMovement property: Whether VM DRS-driven movement is restricted (enabled) or not (disabled). * 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 3d0e655c91ef..1c2c5ed73199 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/VirtualMachineRestrictMovementState.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/VirtualMachineRestrictMovementState.java @@ -8,7 +8,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for VirtualMachineRestrictMovementState. */ +/** Whether VM DRS-driven movement is restricted (enabled) or not (disabled). */ public final class VirtualMachineRestrictMovementState extends ExpandableStringEnum { /** Static value Enabled for VirtualMachineRestrictMovementState. */ @@ -28,7 +28,11 @@ public static VirtualMachineRestrictMovementState fromString(String name) { return fromString(name, VirtualMachineRestrictMovementState.class); } - /** @return known VirtualMachineRestrictMovementState values. */ + /** + * Gets known VirtualMachineRestrictMovementState values. + * + * @return known VirtualMachineRestrictMovementState values. + */ public static Collection values() { return values(VirtualMachineRestrictMovementState.class); } 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 5015a34134aa..61d18c347c0e 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 @@ -19,7 +19,7 @@ public interface VirtualMachines { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if 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. + * @return a list of Virtual Machines as paginated response with {@link PagedIterable}. */ PagedIterable list(String resourceGroupName, String privateCloudName, String clusterName); @@ -33,7 +33,7 @@ public interface VirtualMachines { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if 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. + * @return a list of Virtual Machines as paginated response with {@link PagedIterable}. */ PagedIterable list( String resourceGroupName, String privateCloudName, String clusterName, Context context); @@ -45,12 +45,18 @@ PagedIterable list( * @param privateCloudName Name of the private cloud. * @param clusterName Name of the cluster in 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 cluster. + * @return a virtual machine by id in a private cloud cluster along with {@link Response}. */ - VirtualMachine get(String resourceGroupName, String privateCloudName, String clusterName, String virtualMachineId); + Response getWithResponse( + String resourceGroupName, + String privateCloudName, + String clusterName, + String virtualMachineId, + Context context); /** * Get a virtual machine by id in a private cloud cluster. @@ -59,18 +65,12 @@ PagedIterable list( * @param privateCloudName Name of the private cloud. * @param clusterName Name of the cluster in 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 cluster. */ - Response getWithResponse( - String resourceGroupName, - String privateCloudName, - String clusterName, - String virtualMachineId, - Context context); + VirtualMachine get(String resourceGroupName, String privateCloudName, String clusterName, String virtualMachineId); /** * Enable or disable DRS-driven VM movement restriction. 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 index 7b42bb9d2a3e..f34c01e0b7e1 100644 --- 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 @@ -5,17 +5,13 @@ package com.azure.resourcemanager.avs.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.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** A list of Virtual Machines. */ @Immutable public final class VirtualMachinesList { - @JsonIgnore private final ClientLogger logger = new ClientLogger(VirtualMachinesList.class); - /* * The items to be displayed on the page */ @@ -28,6 +24,10 @@ public final class VirtualMachinesList { @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. * 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 a4d869f469f2..bd9f6037aa26 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/VisibilityParameterEnum.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/VisibilityParameterEnum.java @@ -8,7 +8,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for VisibilityParameterEnum. */ +/** Should this parameter be visible to arm and passed in the parameters argument when executing. */ public final class VisibilityParameterEnum extends ExpandableStringEnum { /** Static value Visible for VisibilityParameterEnum. */ public static final VisibilityParameterEnum VISIBLE = fromString("Visible"); @@ -27,7 +27,11 @@ public static VisibilityParameterEnum fromString(String name) { return fromString(name, VisibilityParameterEnum.class); } - /** @return known VisibilityParameterEnum values. */ + /** + * Gets known VisibilityParameterEnum values. + * + * @return known VisibilityParameterEnum values. + */ public static Collection values() { return values(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 7949984f111b..4f878e55ae1d 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,7 +6,6 @@ import com.azure.core.annotation.Fluent; import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; @@ -17,8 +16,6 @@ @JsonTypeName("VmHost") @Fluent public final class VmHostPlacementPolicyProperties extends PlacementPolicyProperties { - @JsonIgnore private final ClientLogger logger = new ClientLogger(VmHostPlacementPolicyProperties.class); - /* * Virtual machine members list */ @@ -37,6 +34,22 @@ public final class VmHostPlacementPolicyProperties extends PlacementPolicyProper @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; + + /** Creates an instance of VmHostPlacementPolicyProperties class. */ + public VmHostPlacementPolicyProperties() { + } + /** * Get the vmMembers property: Virtual machine members list. * @@ -97,6 +110,46 @@ public VmHostPlacementPolicyProperties withAffinityType(AffinityType affinityTyp return this; } + /** + * Get the affinityStrength property: vm-host placement policy affinity strength (should/must). + * + * @return the affinityStrength value. + */ + public AffinityStrength affinityStrength() { + return this.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. + */ + public VmHostPlacementPolicyProperties withAffinityStrength(AffinityStrength affinityStrength) { + this.affinityStrength = affinityStrength; + return this; + } + + /** + * Get the azureHybridBenefitType property: placement policy azure hybrid benefit opt-in type. + * + * @return the azureHybridBenefitType value. + */ + public AzureHybridBenefitType azureHybridBenefitType() { + return this.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. + */ + public VmHostPlacementPolicyProperties withAzureHybridBenefitType(AzureHybridBenefitType azureHybridBenefitType) { + this.azureHybridBenefitType = azureHybridBenefitType; + return this; + } + /** {@inheritDoc} */ @Override public VmHostPlacementPolicyProperties withState(PlacementPolicyState state) { @@ -120,22 +173,24 @@ public VmHostPlacementPolicyProperties withDisplayName(String displayName) { public void validate() { super.validate(); if (vmMembers() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( "Missing required property vmMembers in model VmHostPlacementPolicyProperties")); } if (hostMembers() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( "Missing required property hostMembers in model VmHostPlacementPolicyProperties")); } if (affinityType() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( "Missing required property affinityType in model VmHostPlacementPolicyProperties")); } } + + private static final ClientLogger LOGGER = new ClientLogger(VmHostPlacementPolicyProperties.class); } 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 eda05d12283b..9490841d7fdd 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,7 +6,6 @@ import com.azure.core.annotation.Fluent; import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; @@ -17,8 +16,6 @@ @JsonTypeName("VmVm") @Fluent public final class VmPlacementPolicyProperties extends PlacementPolicyProperties { - @JsonIgnore private final ClientLogger logger = new ClientLogger(VmPlacementPolicyProperties.class); - /* * Virtual machine members list */ @@ -31,6 +28,10 @@ public final class VmPlacementPolicyProperties extends PlacementPolicyProperties @JsonProperty(value = "affinityType", required = true) private AffinityType affinityType; + /** Creates an instance of VmPlacementPolicyProperties class. */ + public VmPlacementPolicyProperties() { + } + /** * Get the vmMembers property: Virtual machine members list. * @@ -94,16 +95,18 @@ public VmPlacementPolicyProperties withDisplayName(String displayName) { public void validate() { super.validate(); if (vmMembers() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( "Missing required property vmMembers in model VmPlacementPolicyProperties")); } if (affinityType() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( "Missing required property affinityType in model VmPlacementPolicyProperties")); } } + + private static final ClientLogger LOGGER = new ClientLogger(VmPlacementPolicyProperties.class); } 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 new file mode 100644 index 000000000000..6a1f5adc5c2e --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetwork.java @@ -0,0 +1,38 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.avs.models; + +import com.azure.resourcemanager.avs.fluent.models.WorkloadNetworkInner; + +/** 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 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 790822493138..4153230ac12d 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 @@ -37,6 +37,13 @@ public interface WorkloadNetworkDhcp { */ WorkloadNetworkDhcpEntity properties(); + /** + * 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. * 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 65e456dde323..3a4d30859f4e 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,8 +5,6 @@ package com.azure.resourcemanager.avs.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonSubTypes; import com.fasterxml.jackson.annotation.JsonTypeInfo; @@ -26,8 +24,6 @@ }) @Fluent public class WorkloadNetworkDhcpEntity { - @JsonIgnore private final ClientLogger logger = new ClientLogger(WorkloadNetworkDhcpEntity.class); - /* * Display name of the DHCP entity. */ @@ -52,6 +48,10 @@ public class WorkloadNetworkDhcpEntity { @JsonProperty(value = "revision") private Long revision; + /** Creates an instance of WorkloadNetworkDhcpEntity class. */ + public WorkloadNetworkDhcpEntity() { + } + /** * Get the displayName property: Display name of the DHCP entity. * 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 index 72fb3d17f6bb..5a8c6027a8ad 100644 --- 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 @@ -5,17 +5,13 @@ package com.azure.resourcemanager.avs.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.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** A list of NSX dhcp entities. */ @Immutable public final class WorkloadNetworkDhcpList { - @JsonIgnore private final ClientLogger logger = new ClientLogger(WorkloadNetworkDhcpList.class); - /* * The items on the page */ @@ -28,6 +24,10 @@ public final class WorkloadNetworkDhcpList { @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. * 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 e39302dbb6ba..623be0969eba 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkDhcpProvisioningState.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkDhcpProvisioningState.java @@ -8,7 +8,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for WorkloadNetworkDhcpProvisioningState. */ +/** The provisioning state. */ public final class WorkloadNetworkDhcpProvisioningState extends ExpandableStringEnum { /** Static value Succeeded for WorkloadNetworkDhcpProvisioningState. */ @@ -26,6 +26,9 @@ public final class 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 or finds a WorkloadNetworkDhcpProvisioningState from its string representation. * @@ -37,7 +40,11 @@ public static WorkloadNetworkDhcpProvisioningState fromString(String name) { return fromString(name, WorkloadNetworkDhcpProvisioningState.class); } - /** @return known WorkloadNetworkDhcpProvisioningState values. */ + /** + * Gets known WorkloadNetworkDhcpProvisioningState values. + * + * @return known WorkloadNetworkDhcpProvisioningState values. + */ public static Collection values() { return values(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 626989e0a187..237b520ca080 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,8 +5,6 @@ package com.azure.resourcemanager.avs.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; @@ -17,14 +15,16 @@ @JsonTypeName("RELAY") @Fluent public final class WorkloadNetworkDhcpRelay extends WorkloadNetworkDhcpEntity { - @JsonIgnore private final ClientLogger logger = new ClientLogger(WorkloadNetworkDhcpRelay.class); - /* * DHCP Relay Addresses. Max 3. */ @JsonProperty(value = "serverAddresses") private List serverAddresses; + /** Creates an instance of WorkloadNetworkDhcpRelay class. */ + public WorkloadNetworkDhcpRelay() { + } + /** * Get the serverAddresses property: DHCP Relay Addresses. Max 3. * 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 397faeaeef06..b4a427a995f4 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,8 +5,6 @@ package com.azure.resourcemanager.avs.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; @@ -16,8 +14,6 @@ @JsonTypeName("SERVER") @Fluent public final class WorkloadNetworkDhcpServer extends WorkloadNetworkDhcpEntity { - @JsonIgnore private final ClientLogger logger = new ClientLogger(WorkloadNetworkDhcpServer.class); - /* * DHCP Server Address. */ @@ -30,6 +26,10 @@ public final class WorkloadNetworkDhcpServer extends WorkloadNetworkDhcpEntity { @JsonProperty(value = "leaseTime") private Long leaseTime; + /** Creates an instance of WorkloadNetworkDhcpServer class. */ + public WorkloadNetworkDhcpServer() { + } + /** * Get the serverAddress property: DHCP Server Address. * 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 2f676481ae73..3c45ca165382 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 @@ -87,6 +87,13 @@ public interface WorkloadNetworkDnsService { */ 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. * 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 20291ed0b3b3..e256ea9053f4 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkDnsServiceProvisioningState.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkDnsServiceProvisioningState.java @@ -8,7 +8,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for WorkloadNetworkDnsServiceProvisioningState. */ +/** The provisioning state. */ public final class WorkloadNetworkDnsServiceProvisioningState extends ExpandableStringEnum { /** Static value Succeeded for WorkloadNetworkDnsServiceProvisioningState. */ @@ -26,6 +26,9 @@ public final class 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 or finds a WorkloadNetworkDnsServiceProvisioningState from its string representation. * @@ -37,7 +40,11 @@ public static WorkloadNetworkDnsServiceProvisioningState fromString(String name) return fromString(name, WorkloadNetworkDnsServiceProvisioningState.class); } - /** @return known WorkloadNetworkDnsServiceProvisioningState values. */ + /** + * Gets known WorkloadNetworkDnsServiceProvisioningState values. + * + * @return known WorkloadNetworkDnsServiceProvisioningState values. + */ public static Collection values() { return values(WorkloadNetworkDnsServiceProvisioningState.class); } 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 index f4c5c46e39e3..48c08fb3ff51 100644 --- 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 @@ -5,17 +5,13 @@ package com.azure.resourcemanager.avs.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.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** A list of NSX DNS Services. */ @Immutable public final class WorkloadNetworkDnsServicesList { - @JsonIgnore private final ClientLogger logger = new ClientLogger(WorkloadNetworkDnsServicesList.class); - /* * The items on the page */ @@ -28,6 +24,10 @@ public final class WorkloadNetworkDnsServicesList { @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. * 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 a454a6d9cb49..07c105921ed5 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 @@ -80,6 +80,13 @@ public interface WorkloadNetworkDnsZone { */ 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. * 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 899f54f56add..de35b48853bc 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkDnsZoneProvisioningState.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkDnsZoneProvisioningState.java @@ -8,7 +8,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for WorkloadNetworkDnsZoneProvisioningState. */ +/** The provisioning state. */ public final class WorkloadNetworkDnsZoneProvisioningState extends ExpandableStringEnum { /** Static value Succeeded for WorkloadNetworkDnsZoneProvisioningState. */ @@ -26,6 +26,9 @@ public final class 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 or finds a WorkloadNetworkDnsZoneProvisioningState from its string representation. * @@ -37,7 +40,11 @@ public static WorkloadNetworkDnsZoneProvisioningState fromString(String name) { return fromString(name, WorkloadNetworkDnsZoneProvisioningState.class); } - /** @return known WorkloadNetworkDnsZoneProvisioningState values. */ + /** + * Gets known WorkloadNetworkDnsZoneProvisioningState values. + * + * @return known WorkloadNetworkDnsZoneProvisioningState values. + */ public static Collection values() { return values(WorkloadNetworkDnsZoneProvisioningState.class); } 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 index 34011c3aaa23..eae0312f71d5 100644 --- 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 @@ -5,17 +5,13 @@ package com.azure.resourcemanager.avs.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.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** A list of NSX DNS Zones. */ @Immutable public final class WorkloadNetworkDnsZonesList { - @JsonIgnore private final ClientLogger logger = new ClientLogger(WorkloadNetworkDnsZonesList.class); - /* * The items on the page */ @@ -28,6 +24,10 @@ public final class WorkloadNetworkDnsZonesList { @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. * 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 index 530b25c7cdf9..8a4d22638ed1 100644 --- 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 @@ -5,17 +5,13 @@ package com.azure.resourcemanager.avs.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.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** A list of NSX Gateways. */ @Immutable public final class WorkloadNetworkGatewayList { - @JsonIgnore private final ClientLogger logger = new ClientLogger(WorkloadNetworkGatewayList.class); - /* * The items on the page */ @@ -28,6 +24,10 @@ public final class WorkloadNetworkGatewayList { @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. * 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 new file mode 100644 index 000000000000..dfeea962626c --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkList.java @@ -0,0 +1,59 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.avs.models; + +import com.azure.core.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 new file mode 100644 index 000000000000..93799b1537dc --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkName.java @@ -0,0 +1,35 @@ +// Copyright (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 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 b09cf54104c0..8471c8bfda81 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 @@ -79,6 +79,13 @@ public interface WorkloadNetworkPortMirroring { */ 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. * 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 index e82f73dc4031..516774fb1819 100644 --- 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 @@ -5,17 +5,13 @@ package com.azure.resourcemanager.avs.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.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** A list of NSX Port Mirroring. */ @Immutable public final class WorkloadNetworkPortMirroringList { - @JsonIgnore private final ClientLogger logger = new ClientLogger(WorkloadNetworkPortMirroringList.class); - /* * The items on the page */ @@ -28,6 +24,10 @@ public final class WorkloadNetworkPortMirroringList { @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. * 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 74622a41bd16..feca4767c370 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkPortMirroringProvisioningState.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkPortMirroringProvisioningState.java @@ -8,7 +8,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for WorkloadNetworkPortMirroringProvisioningState. */ +/** The provisioning state. */ public final class WorkloadNetworkPortMirroringProvisioningState extends ExpandableStringEnum { /** Static value Succeeded for WorkloadNetworkPortMirroringProvisioningState. */ @@ -26,6 +26,9 @@ public final class 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 or finds a WorkloadNetworkPortMirroringProvisioningState from its string representation. * @@ -37,7 +40,11 @@ public static WorkloadNetworkPortMirroringProvisioningState fromString(String na return fromString(name, WorkloadNetworkPortMirroringProvisioningState.class); } - /** @return known WorkloadNetworkPortMirroringProvisioningState values. */ + /** + * Gets known WorkloadNetworkPortMirroringProvisioningState values. + * + * @return known WorkloadNetworkPortMirroringProvisioningState values. + */ public static Collection values() { return values(WorkloadNetworkPortMirroringProvisioningState.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 index e88e3b73273a..6dffca84e92e 100644 --- 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 @@ -5,17 +5,13 @@ package com.azure.resourcemanager.avs.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.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** A list of NSX Public IP Blocks. */ @Immutable public final class WorkloadNetworkPublicIPsList { - @JsonIgnore private final ClientLogger logger = new ClientLogger(WorkloadNetworkPublicIPsList.class); - /* * The items on the page */ @@ -28,6 +24,10 @@ public final class WorkloadNetworkPublicIPsList { @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. * 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 3063d0d53699..6150da8b6a19 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkPublicIpProvisioningState.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkPublicIpProvisioningState.java @@ -8,7 +8,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for WorkloadNetworkPublicIpProvisioningState. */ +/** The provisioning state. */ public final class WorkloadNetworkPublicIpProvisioningState extends ExpandableStringEnum { /** Static value Succeeded for WorkloadNetworkPublicIpProvisioningState. */ @@ -26,6 +26,9 @@ public final class 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 or finds a WorkloadNetworkPublicIpProvisioningState from its string representation. * @@ -37,7 +40,11 @@ public static WorkloadNetworkPublicIpProvisioningState fromString(String name) { return fromString(name, WorkloadNetworkPublicIpProvisioningState.class); } - /** @return known WorkloadNetworkPublicIpProvisioningState values. */ + /** + * Gets known WorkloadNetworkPublicIpProvisioningState values. + * + * @return known WorkloadNetworkPublicIpProvisioningState values. + */ public static Collection values() { return values(WorkloadNetworkPublicIpProvisioningState.class); } 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 a2ff84fb48a3..ea52c1b78b42 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 @@ -80,6 +80,13 @@ public interface WorkloadNetworkSegment { */ 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. * 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 c310126fd773..149673fa5dda 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,21 +5,21 @@ package com.azure.resourcemanager.avs.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** Ports and any VIF attached to segment. */ @Fluent public final class WorkloadNetworkSegmentPortVif { - @JsonIgnore private final ClientLogger logger = new ClientLogger(WorkloadNetworkSegmentPortVif.class); - /* * Name of port or VIF attached to segment. */ @JsonProperty(value = "portName") private String portName; + /** Creates an instance of WorkloadNetworkSegmentPortVif class. */ + public WorkloadNetworkSegmentPortVif() { + } + /** * Get the portName property: Name of port or VIF attached to segment. * 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 454ae0b71e6e..8c168fd96f74 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkSegmentProvisioningState.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkSegmentProvisioningState.java @@ -8,7 +8,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for WorkloadNetworkSegmentProvisioningState. */ +/** The provisioning state. */ public final class WorkloadNetworkSegmentProvisioningState extends ExpandableStringEnum { /** Static value Succeeded for WorkloadNetworkSegmentProvisioningState. */ @@ -26,6 +26,9 @@ public final class 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 or finds a WorkloadNetworkSegmentProvisioningState from its string representation. * @@ -37,7 +40,11 @@ public static WorkloadNetworkSegmentProvisioningState fromString(String name) { return fromString(name, WorkloadNetworkSegmentProvisioningState.class); } - /** @return known WorkloadNetworkSegmentProvisioningState values. */ + /** + * Gets known WorkloadNetworkSegmentProvisioningState values. + * + * @return known WorkloadNetworkSegmentProvisioningState values. + */ public static Collection values() { return values(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 0d434e1c740d..bc57151382bd 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,16 +5,12 @@ package com.azure.resourcemanager.avs.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** Subnet configuration for segment. */ @Fluent public final class WorkloadNetworkSegmentSubnet { - @JsonIgnore private final ClientLogger logger = new ClientLogger(WorkloadNetworkSegmentSubnet.class); - /* * DHCP Range assigned for subnet. */ @@ -27,6 +23,10 @@ public final class WorkloadNetworkSegmentSubnet { @JsonProperty(value = "gatewayAddress") private String gatewayAddress; + /** Creates an instance of WorkloadNetworkSegmentSubnet class. */ + public WorkloadNetworkSegmentSubnet() { + } + /** * Get the dhcpRanges property: DHCP Range assigned for subnet. * 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 index aef9594abc79..55c33dbfc717 100644 --- 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 @@ -5,17 +5,13 @@ package com.azure.resourcemanager.avs.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.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** A list of NSX Segments. */ @Immutable public final class WorkloadNetworkSegmentsList { - @JsonIgnore private final ClientLogger logger = new ClientLogger(WorkloadNetworkSegmentsList.class); - /* * The items on the page */ @@ -28,6 +24,10 @@ public final class WorkloadNetworkSegmentsList { @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. * 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 18438fad3f05..1f21995b1116 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 @@ -66,6 +66,13 @@ public interface WorkloadNetworkVMGroup { */ 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. * 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 b848504b44cb..070f874e84d8 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkVMGroupProvisioningState.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkVMGroupProvisioningState.java @@ -8,7 +8,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for WorkloadNetworkVMGroupProvisioningState. */ +/** The provisioning state. */ public final class WorkloadNetworkVMGroupProvisioningState extends ExpandableStringEnum { /** Static value Succeeded for WorkloadNetworkVMGroupProvisioningState. */ @@ -26,6 +26,9 @@ public final class 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 or finds a WorkloadNetworkVMGroupProvisioningState from its string representation. * @@ -37,7 +40,11 @@ public static WorkloadNetworkVMGroupProvisioningState fromString(String name) { return fromString(name, WorkloadNetworkVMGroupProvisioningState.class); } - /** @return known WorkloadNetworkVMGroupProvisioningState values. */ + /** + * Gets known WorkloadNetworkVMGroupProvisioningState values. + * + * @return known WorkloadNetworkVMGroupProvisioningState values. + */ public static Collection values() { return values(WorkloadNetworkVMGroupProvisioningState.class); } 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 index ac5458a9d235..fa7180149e1f 100644 --- 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 @@ -5,17 +5,13 @@ package com.azure.resourcemanager.avs.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.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** A list of NSX VM Groups. */ @Immutable public final class WorkloadNetworkVMGroupsList { - @JsonIgnore private final ClientLogger logger = new ClientLogger(WorkloadNetworkVMGroupsList.class); - /* * The items on the page */ @@ -28,6 +24,10 @@ public final class WorkloadNetworkVMGroupsList { @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. * 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 index 8201046cd9c4..ca30f36c8ea6 100644 --- 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 @@ -5,17 +5,13 @@ package com.azure.resourcemanager.avs.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.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** A list of NSX Virtual Machines. */ @Immutable public final class WorkloadNetworkVirtualMachinesList { - @JsonIgnore private final ClientLogger logger = new ClientLogger(WorkloadNetworkVirtualMachinesList.class); - /* * The items on the page */ @@ -28,6 +24,10 @@ public final class WorkloadNetworkVirtualMachinesList { @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. * 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 a61dbb7b8e2d..5e8841fc6d2a 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 @@ -10,6 +10,59 @@ /** Resource collection API of WorkloadNetworks. */ public interface WorkloadNetworks { + /** + * Get a private cloud workload network. + * + * @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}. + */ + Response getWithResponse( + String resourceGroupName, String privateCloudName, WorkloadNetworkName workloadNetworkName, Context context); + + /** + * Get a private cloud workload network. + * + * @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. + */ + WorkloadNetwork get(String resourceGroupName, String privateCloudName, WorkloadNetworkName workloadNetworkName); + + /** + * List of workload networks in a private cloud. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if 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}. + */ + PagedIterable list(String resourceGroupName, String privateCloudName); + + /** + * List of workload networks in a private cloud. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if 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}. + */ + PagedIterable list(String resourceGroupName, String privateCloudName, Context context); + /** * List of segments in a private cloud workload network. * @@ -18,7 +71,7 @@ public interface WorkloadNetworks { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if 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. + * @return a list of NSX Segments as paginated response with {@link PagedIterable}. */ PagedIterable listSegments(String resourceGroupName, String privateCloudName); @@ -31,7 +84,7 @@ public interface WorkloadNetworks { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if 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. + * @return a list of NSX Segments as paginated response with {@link PagedIterable}. */ PagedIterable listSegments( String resourceGroupName, String privateCloudName, Context context); @@ -42,12 +95,14 @@ PagedIterable listSegments( * @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. + * @return a segment by id in a private cloud workload network along with {@link Response}. */ - WorkloadNetworkSegment getSegment(String resourceGroupName, String privateCloudName, String segmentId); + Response getSegmentWithResponse( + String resourceGroupName, String privateCloudName, String segmentId, Context context); /** * Get a segment by id in a private cloud workload network. @@ -55,14 +110,12 @@ PagedIterable listSegments( * @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. */ - Response getSegmentWithResponse( - String resourceGroupName, String privateCloudName, String segmentId, Context context); + WorkloadNetworkSegment getSegment(String resourceGroupName, String privateCloudName, String segmentId); /** * Delete a segment by id in a private cloud workload network. @@ -97,7 +150,7 @@ Response getSegmentWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if 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. + * @return a list of NSX dhcp entities as paginated response with {@link PagedIterable}. */ PagedIterable listDhcp(String resourceGroupName, String privateCloudName); @@ -110,7 +163,7 @@ Response getSegmentWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if 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. + * @return a list of NSX dhcp entities as paginated response with {@link PagedIterable}. */ PagedIterable listDhcp(String resourceGroupName, String privateCloudName, Context context); @@ -120,12 +173,14 @@ Response getSegmentWithResponse( * @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. + * @return dhcp by id in a private cloud workload network along with {@link Response}. */ - WorkloadNetworkDhcp getDhcp(String resourceGroupName, String dhcpId, String privateCloudName); + Response getDhcpWithResponse( + String resourceGroupName, String dhcpId, String privateCloudName, Context context); /** * Get dhcp by id in a private cloud workload network. @@ -133,14 +188,12 @@ Response getSegmentWithResponse( * @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. */ - Response getDhcpWithResponse( - String resourceGroupName, String dhcpId, String privateCloudName, Context context); + WorkloadNetworkDhcp getDhcp(String resourceGroupName, String dhcpId, String privateCloudName); /** * Delete dhcp by id in a private cloud workload network. @@ -175,7 +228,7 @@ Response getDhcpWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if 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. + * @return a list of NSX Gateways as paginated response with {@link PagedIterable}. */ PagedIterable listGateways(String resourceGroupName, String privateCloudName); @@ -188,7 +241,7 @@ Response getDhcpWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if 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. + * @return a list of NSX Gateways as paginated response with {@link PagedIterable}. */ PagedIterable listGateways( String resourceGroupName, String privateCloudName, Context context); @@ -199,12 +252,14 @@ PagedIterable listGateways( * @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. + * @return a gateway by id in a private cloud workload network along with {@link Response}. */ - WorkloadNetworkGateway getGateway(String resourceGroupName, String privateCloudName, String gatewayId); + Response getGatewayWithResponse( + String resourceGroupName, String privateCloudName, String gatewayId, Context context); /** * Get a gateway by id in a private cloud workload network. @@ -212,14 +267,12 @@ PagedIterable listGateways( * @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. */ - Response getGatewayWithResponse( - String resourceGroupName, String privateCloudName, String gatewayId, Context context); + WorkloadNetworkGateway getGateway(String resourceGroupName, String privateCloudName, String gatewayId); /** * List of port mirroring profiles in a private cloud workload network. @@ -229,7 +282,7 @@ Response getGatewayWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if 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. + * @return a list of NSX Port Mirroring as paginated response with {@link PagedIterable}. */ PagedIterable listPortMirroring(String resourceGroupName, String privateCloudName); @@ -242,7 +295,7 @@ Response getGatewayWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if 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. + * @return a list of NSX Port Mirroring as paginated response with {@link PagedIterable}. */ PagedIterable listPortMirroring( String resourceGroupName, String privateCloudName, Context context); @@ -253,13 +306,14 @@ PagedIterable listPortMirroring( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. * @param portMirroringId NSX Port Mirroring identifier. Generally the same as the Port Mirroring display name. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a port mirroring profile by id in a private cloud workload network. + * @return a port mirroring profile by id in a private cloud workload network along with {@link Response}. */ - WorkloadNetworkPortMirroring getPortMirroring( - String resourceGroupName, String privateCloudName, String portMirroringId); + Response getPortMirroringWithResponse( + String resourceGroupName, String privateCloudName, String portMirroringId, Context context); /** * Get a port mirroring profile by id in a private cloud workload network. @@ -267,14 +321,13 @@ WorkloadNetworkPortMirroring getPortMirroring( * @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. */ - Response getPortMirroringWithResponse( - String resourceGroupName, String privateCloudName, String portMirroringId, Context context); + WorkloadNetworkPortMirroring getPortMirroring( + String resourceGroupName, String privateCloudName, String portMirroringId); /** * Delete a port mirroring profile by id in a private cloud workload network. @@ -310,7 +363,7 @@ void deletePortMirroring( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if 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. + * @return a list of NSX VM Groups as paginated response with {@link PagedIterable}. */ PagedIterable listVMGroups(String resourceGroupName, String privateCloudName); @@ -323,7 +376,7 @@ void deletePortMirroring( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if 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. + * @return a list of NSX VM Groups as paginated response with {@link PagedIterable}. */ PagedIterable listVMGroups( String resourceGroupName, String privateCloudName, Context context); @@ -334,12 +387,14 @@ PagedIterable listVMGroups( * @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. + * @return a vm group by id in a private cloud workload network along with {@link Response}. */ - WorkloadNetworkVMGroup getVMGroup(String resourceGroupName, String privateCloudName, String vmGroupId); + Response getVMGroupWithResponse( + String resourceGroupName, String privateCloudName, String vmGroupId, Context context); /** * Get a vm group by id in a private cloud workload network. @@ -347,14 +402,12 @@ PagedIterable listVMGroups( * @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. */ - Response getVMGroupWithResponse( - String resourceGroupName, String privateCloudName, String vmGroupId, Context context); + WorkloadNetworkVMGroup getVMGroup(String resourceGroupName, String privateCloudName, String vmGroupId); /** * Delete a vm group by id in a private cloud workload network. @@ -389,7 +442,7 @@ Response getVMGroupWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if 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. + * @return a list of NSX Virtual Machines as paginated response with {@link PagedIterable}. */ PagedIterable listVirtualMachines(String resourceGroupName, String privateCloudName); @@ -402,7 +455,7 @@ Response getVMGroupWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if 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. + * @return a list of NSX Virtual Machines as paginated response with {@link PagedIterable}. */ PagedIterable listVirtualMachines( String resourceGroupName, String privateCloudName, Context context); @@ -413,13 +466,14 @@ PagedIterable listVirtualMachines( * @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. + * @return a virtual machine by id in a private cloud workload network along with {@link Response}. */ - WorkloadNetworkVirtualMachine getVirtualMachine( - String resourceGroupName, String privateCloudName, String virtualMachineId); + Response getVirtualMachineWithResponse( + String resourceGroupName, String privateCloudName, String virtualMachineId, Context context); /** * Get a virtual machine by id in a private cloud workload network. @@ -427,14 +481,13 @@ WorkloadNetworkVirtualMachine getVirtualMachine( * @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. */ - Response getVirtualMachineWithResponse( - String resourceGroupName, String privateCloudName, String virtualMachineId, Context context); + WorkloadNetworkVirtualMachine getVirtualMachine( + String resourceGroupName, String privateCloudName, String virtualMachineId); /** * List of DNS services in a private cloud workload network. @@ -444,7 +497,7 @@ Response getVirtualMachineWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if 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. + * @return a list of NSX DNS Services as paginated response with {@link PagedIterable}. */ PagedIterable listDnsServices(String resourceGroupName, String privateCloudName); @@ -457,7 +510,7 @@ Response getVirtualMachineWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if 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. + * @return a list of NSX DNS Services as paginated response with {@link PagedIterable}. */ PagedIterable listDnsServices( String resourceGroupName, String privateCloudName, Context context); @@ -468,12 +521,14 @@ PagedIterable listDnsServices( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. * @param dnsServiceId NSX DNS Service identifier. Generally the same as the DNS Service's display name. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a DNS service by id in a private cloud workload network. + * @return a DNS service by id in a private cloud workload network along with {@link Response}. */ - WorkloadNetworkDnsService getDnsService(String resourceGroupName, String privateCloudName, String dnsServiceId); + Response getDnsServiceWithResponse( + String resourceGroupName, String privateCloudName, String dnsServiceId, Context context); /** * Get a DNS service by id in a private cloud workload network. @@ -481,14 +536,12 @@ PagedIterable listDnsServices( * @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. */ - Response getDnsServiceWithResponse( - String resourceGroupName, String privateCloudName, String dnsServiceId, Context context); + WorkloadNetworkDnsService getDnsService(String resourceGroupName, String privateCloudName, String dnsServiceId); /** * Delete a DNS service by id in a private cloud workload network. @@ -523,7 +576,7 @@ Response getDnsServiceWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if 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. + * @return a list of NSX DNS Zones as paginated response with {@link PagedIterable}. */ PagedIterable listDnsZones(String resourceGroupName, String privateCloudName); @@ -536,7 +589,7 @@ Response getDnsServiceWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if 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. + * @return a list of NSX DNS Zones as paginated response with {@link PagedIterable}. */ PagedIterable listDnsZones( String resourceGroupName, String privateCloudName, Context context); @@ -547,12 +600,14 @@ PagedIterable listDnsZones( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. * @param dnsZoneId NSX DNS Zone identifier. Generally the same as the DNS Zone's display name. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a DNS zone by id in a private cloud workload network. + * @return a DNS zone by id in a private cloud workload network along with {@link Response}. */ - WorkloadNetworkDnsZone getDnsZone(String resourceGroupName, String privateCloudName, String dnsZoneId); + Response getDnsZoneWithResponse( + String resourceGroupName, String privateCloudName, String dnsZoneId, Context context); /** * Get a DNS zone by id in a private cloud workload network. @@ -560,14 +615,12 @@ PagedIterable listDnsZones( * @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. */ - Response getDnsZoneWithResponse( - String resourceGroupName, String privateCloudName, String dnsZoneId, Context context); + WorkloadNetworkDnsZone getDnsZone(String resourceGroupName, String privateCloudName, String dnsZoneId); /** * Delete a DNS zone by id in a private cloud workload network. @@ -602,7 +655,7 @@ Response getDnsZoneWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if 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. + * @return a list of NSX Public IP Blocks as paginated response with {@link PagedIterable}. */ PagedIterable listPublicIPs(String resourceGroupName, String privateCloudName); @@ -615,7 +668,7 @@ Response getDnsZoneWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if 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. + * @return a list of NSX Public IP Blocks as paginated response with {@link PagedIterable}. */ PagedIterable listPublicIPs( String resourceGroupName, String privateCloudName, Context context); @@ -626,12 +679,14 @@ PagedIterable listPublicIPs( * @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. + * @return a Public IP Block by id in a private cloud workload network along with {@link Response}. */ - WorkloadNetworkPublicIp getPublicIp(String resourceGroupName, String privateCloudName, String publicIpId); + Response getPublicIpWithResponse( + String resourceGroupName, String privateCloudName, String publicIpId, Context context); /** * Get a Public IP Block by id in a private cloud workload network. @@ -639,14 +694,12 @@ PagedIterable listPublicIPs( * @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. */ - Response getPublicIpWithResponse( - String resourceGroupName, String privateCloudName, String publicIpId, Context context); + WorkloadNetworkPublicIp getPublicIp(String resourceGroupName, String privateCloudName, String publicIpId); /** * Delete a Public IP Block by id in a private cloud workload network. @@ -680,7 +733,7 @@ Response getPublicIpWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a segment by id in a private cloud workload network. + * @return a segment by id in a private cloud workload network along with {@link Response}. */ WorkloadNetworkSegment getSegmentById(String id); @@ -692,7 +745,7 @@ Response getPublicIpWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a segment by id in a private cloud workload network. + * @return a segment by id in a private cloud workload network along with {@link Response}. */ Response getSegmentByIdWithResponse(String id, Context context); @@ -703,7 +756,7 @@ Response getPublicIpWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return dhcp by id in a private cloud workload network. + * @return dhcp by id in a private cloud workload network along with {@link Response}. */ WorkloadNetworkDhcp getDhcpById(String id); @@ -715,7 +768,7 @@ Response getPublicIpWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return dhcp by id in a private cloud workload network. + * @return dhcp by id in a private cloud workload network along with {@link Response}. */ Response getDhcpByIdWithResponse(String id, Context context); @@ -726,7 +779,7 @@ Response getPublicIpWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a port mirroring profile by id in a private cloud workload network. + * @return a port mirroring profile by id in a private cloud workload network along with {@link Response}. */ WorkloadNetworkPortMirroring getPortMirroringById(String id); @@ -738,7 +791,7 @@ Response getPublicIpWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a port mirroring profile by id in a private cloud workload network. + * @return a port mirroring profile by id in a private cloud workload network along with {@link Response}. */ Response getPortMirroringByIdWithResponse(String id, Context context); @@ -749,7 +802,7 @@ Response getPublicIpWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a vm group by id in a private cloud workload network. + * @return a vm group by id in a private cloud workload network along with {@link Response}. */ WorkloadNetworkVMGroup getVMGroupById(String id); @@ -761,7 +814,7 @@ Response getPublicIpWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a vm group by id in a private cloud workload network. + * @return a vm group by id in a private cloud workload network along with {@link Response}. */ Response getVMGroupByIdWithResponse(String id, Context context); @@ -772,7 +825,7 @@ Response getPublicIpWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a DNS service by id in a private cloud workload network. + * @return a DNS service by id in a private cloud workload network along with {@link Response}. */ WorkloadNetworkDnsService getDnsServiceById(String id); @@ -784,7 +837,7 @@ Response getPublicIpWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a DNS service by id in a private cloud workload network. + * @return a DNS service by id in a private cloud workload network along with {@link Response}. */ Response getDnsServiceByIdWithResponse(String id, Context context); @@ -795,7 +848,7 @@ Response getPublicIpWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a DNS zone by id in a private cloud workload network. + * @return a DNS zone by id in a private cloud workload network along with {@link Response}. */ WorkloadNetworkDnsZone getDnsZoneById(String id); @@ -807,7 +860,7 @@ Response getPublicIpWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a DNS zone by id in a private cloud workload network. + * @return a DNS zone by id in a private cloud workload network along with {@link Response}. */ Response getDnsZoneByIdWithResponse(String id, Context context); @@ -818,7 +871,7 @@ Response getPublicIpWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a Public IP Block by id in a private cloud workload network. + * @return a Public IP Block by id in a private cloud workload network along with {@link Response}. */ WorkloadNetworkPublicIp getPublicIpById(String id); @@ -830,7 +883,7 @@ Response getPublicIpWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a Public IP Block by id in a private cloud workload network. + * @return a Public IP Block by id in a private cloud workload network along with {@link Response}. */ Response getPublicIpByIdWithResponse(String id, Context context); 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 1833437a1bae..a467e3faa04c 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 @@ -4,6 +4,7 @@ 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; @@ -11,7 +12,7 @@ /** Samples for Addons CreateOrUpdate. */ public final class AddonsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2021-12-01/examples/Addons_CreateOrUpdate_HCX.json + * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2022-05-01/examples/Addons_CreateOrUpdate_HCX.json */ /** * Sample code: Addons_CreateOrUpdate_HCX. @@ -28,7 +29,7 @@ public static void addonsCreateOrUpdateHCX(com.azure.resourcemanager.avs.AvsMana } /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2021-12-01/examples/Addons_CreateOrUpdate_SRM.json + * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2022-05-01/examples/Addons_CreateOrUpdate_SRM.json */ /** * Sample code: Addons_CreateOrUpdate_SRM. @@ -45,7 +46,27 @@ public static void addonsCreateOrUpdateSRM(com.azure.resourcemanager.avs.AvsMana } /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2021-12-01/examples/Addons_CreateOrUpdate_VR.json + * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2022-05-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() + .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/2022-05-01/examples/Addons_CreateOrUpdate_VR.json */ /** * Sample code: Addons_CreateOrUpdate_VR. diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/AddonsDeleteSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/AddonsDeleteSamples.java index b137dd2fb584..21b1c5f5f524 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 @@ /** Samples for Addons Delete. */ public final class AddonsDeleteSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2021-12-01/examples/Addons_Delete.json + * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2022-05-01/examples/Addons_Delete.json */ /** * Sample code: Addons_Delete. diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/AddonsGetSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/AddonsGetSamples.java index 62ef21029210..a93c735b60a7 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,7 @@ /** Samples for Addons Get. */ public final class AddonsGetSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2021-12-01/examples/Addons_Get_SRM.json + * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2022-05-01/examples/Addons_Get_SRM.json */ /** * Sample code: Addons_Get_SRM. @@ -21,7 +21,7 @@ public static void addonsGetSRM(com.azure.resourcemanager.avs.AvsManager manager } /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2021-12-01/examples/Addons_Get_VR.json + * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2022-05-01/examples/Addons_Get_VR.json */ /** * Sample code: Addons_Get_VR. @@ -33,7 +33,7 @@ public static void addonsGetVR(com.azure.resourcemanager.avs.AvsManager manager) } /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2021-12-01/examples/Addons_Get_HCX.json + * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2022-05-01/examples/Addons_Get_HCX.json */ /** * Sample code: Addons_Get_HCX. @@ -43,4 +43,16 @@ public static void addonsGetVR(com.azure.resourcemanager.avs.AvsManager manager) public static void addonsGetHCX(com.azure.resourcemanager.avs.AvsManager manager) { manager.addons().getWithResponse("group1", "cloud1", "hcx", Context.NONE); } + + /* + * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2022-05-01/examples/Addons_Get_ArcReg.json + */ + /** + * Sample code: Addons_Get_ArcReg. + * + * @param manager Entry point to AvsManager. + */ + public static void addonsGetArcReg(com.azure.resourcemanager.avs.AvsManager manager) { + manager.addons().getWithResponse("group1", "cloud1", "arc", 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 index 82ff373f06ff..c05a67a134fb 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 @@ /** Samples for Addons List. */ public final class AddonsListSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2021-12-01/examples/Addons_List.json + * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2022-05-01/examples/Addons_List.json */ /** * Sample code: Addons_List. diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/AuthorizationsCreateOrUpdateSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/AuthorizationsCreateOrUpdateSamples.java index 0578412366f6..d4b239849dfe 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 @@ -7,7 +7,7 @@ /** Samples for Authorizations CreateOrUpdate. */ public final class AuthorizationsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2021-12-01/examples/Authorizations_CreateOrUpdate.json + * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2022-05-01/examples/Authorizations_CreateOrUpdate.json */ /** * Sample code: Authorizations_CreateOrUpdate. diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/AuthorizationsDeleteSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/AuthorizationsDeleteSamples.java index b3d0f4b0778c..2e396f3cdc91 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 @@ /** Samples for Authorizations Delete. */ public final class AuthorizationsDeleteSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2021-12-01/examples/Authorizations_Delete.json + * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2022-05-01/examples/Authorizations_Delete.json */ /** * Sample code: Authorizations_Delete. diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/AuthorizationsGetSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/AuthorizationsGetSamples.java index c33d5cc5400a..9b3f15215169 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 @@ /** Samples for Authorizations Get. */ public final class AuthorizationsGetSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2021-12-01/examples/Authorizations_Get.json + * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2022-05-01/examples/Authorizations_Get.json */ /** * Sample code: Authorizations_Get. diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/AuthorizationsListSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/AuthorizationsListSamples.java index a26657640b88..e3f3b755e810 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 @@ /** Samples for Authorizations List. */ public final class AuthorizationsListSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2021-12-01/examples/Authorizations_List.json + * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2022-05-01/examples/Authorizations_List.json */ /** * Sample code: Authorizations_List. diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/CloudLinksCreateOrUpdateSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/CloudLinksCreateOrUpdateSamples.java index 75a8fb9b0716..b74beb80f48e 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 @@ -7,7 +7,7 @@ /** Samples for CloudLinks CreateOrUpdate. */ public final class CloudLinksCreateOrUpdateSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2021-12-01/examples/CloudLinks_CreateOrUpdate.json + * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2022-05-01/examples/CloudLinks_CreateOrUpdate.json */ /** * Sample code: CloudLinks_CreateOrUpdate. diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/CloudLinksDeleteSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/CloudLinksDeleteSamples.java index 852de1aec854..94217fa9f64a 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 @@ /** Samples for CloudLinks Delete. */ public final class CloudLinksDeleteSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2021-12-01/examples/CloudLinks_Delete.json + * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2022-05-01/examples/CloudLinks_Delete.json */ /** * Sample code: CloudLinks_Delete. diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/CloudLinksGetSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/CloudLinksGetSamples.java index 169d6c29fe05..5e6fb4f40a7a 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 @@ /** Samples for CloudLinks Get. */ public final class CloudLinksGetSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2021-12-01/examples/CloudLinks_Get.json + * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2022-05-01/examples/CloudLinks_Get.json */ /** * Sample code: CloudLinks_Get. diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/CloudLinksListSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/CloudLinksListSamples.java index 5e25834259c1..6ea6f593be13 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 @@ /** Samples for CloudLinks List. */ public final class CloudLinksListSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2021-12-01/examples/CloudLinks_List.json + * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2022-05-01/examples/CloudLinks_List.json */ /** * Sample code: CloudLinks_List. diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/ClustersCreateOrUpdateSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/ClustersCreateOrUpdateSamples.java index b5da96d27713..d6335d254e4c 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 @@ -9,7 +9,7 @@ /** Samples for Clusters CreateOrUpdate. */ public final class ClustersCreateOrUpdateSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2021-12-01/examples/Clusters_CreateOrUpdate.json + * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2022-05-01/examples/Clusters_CreateOrUpdate.json */ /** * Sample code: Clusters_CreateOrUpdate. diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/ClustersDeleteSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/ClustersDeleteSamples.java index 151e394e440b..f82bc3df1c90 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 @@ /** Samples for Clusters Delete. */ public final class ClustersDeleteSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2021-12-01/examples/Clusters_Delete.json + * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2022-05-01/examples/Clusters_Delete.json */ /** * Sample code: Clusters_Delete. diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/ClustersGetSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/ClustersGetSamples.java index e7ae57711129..a52e733a3146 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 @@ /** Samples for Clusters Get. */ public final class ClustersGetSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2021-12-01/examples/Clusters_Get.json + * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2022-05-01/examples/Clusters_Get.json */ /** * Sample code: Clusters_Get. diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/ClustersListSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/ClustersListSamples.java index 0312b5d14d7c..601d90c81331 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 @@ /** Samples for Clusters List. */ public final class ClustersListSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2021-12-01/examples/Clusters_List.json + * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2022-05-01/examples/Clusters_List.json */ /** * Sample code: Clusters_List. diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/ClustersListZonesSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/ClustersListZonesSamples.java new file mode 100644 index 000000000000..24771fdb416e --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/ClustersListZonesSamples.java @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.avs.generated; + +import com.azure.core.util.Context; + +/** Samples for Clusters ListZones. */ +public final class ClustersListZonesSamples { + /* + * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2022-05-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", Context.NONE); + } + + /* + * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2022-05-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) { + manager.clusters().listZonesWithResponse("group1", "cloud1", "cluster1", 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 0d906f0138f4..ef33cf02318a 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 @@ -10,7 +10,7 @@ /** Samples for Clusters Update. */ public final class ClustersUpdateSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2021-12-01/examples/Clusters_Update.json + * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2022-05-01/examples/Clusters_Update.json */ /** * Sample code: Clusters_Update. diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/DatastoresCreateOrUpdateSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/DatastoresCreateOrUpdateSamples.java index 9c93f96c67f2..3c12a4ac90a4 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 @@ -9,7 +9,7 @@ /** Samples for Datastores CreateOrUpdate. */ public final class DatastoresCreateOrUpdateSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2021-12-01/examples/Datastores_CreateOrUpdate.json + * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2022-05-01/examples/Datastores_CreateOrUpdate.json */ /** * Sample code: Datastores_CreateOrUpdate. diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/DatastoresDeleteSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/DatastoresDeleteSamples.java index 36e476be1544..432d613406e5 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 @@ /** Samples for Datastores Delete. */ public final class DatastoresDeleteSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2021-12-01/examples/Datastores_Delete.json + * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2022-05-01/examples/Datastores_Delete.json */ /** * Sample code: Datastores_Delete. diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/DatastoresGetSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/DatastoresGetSamples.java index 9b45b4fdbeb5..4f15aafc96e5 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 @@ /** Samples for Datastores Get. */ public final class DatastoresGetSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2021-12-01/examples/Datastores_Get.json + * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2022-05-01/examples/Datastores_Get.json */ /** * Sample code: Datastores_Get. diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/DatastoresListSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/DatastoresListSamples.java index 26c1dc59a45a..d4aae20cc234 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 @@ /** Samples for Datastores List. */ public final class DatastoresListSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2021-12-01/examples/Datastores_List.json + * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2022-05-01/examples/Datastores_List.json */ /** * Sample code: Datastores_List. diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/GlobalReachConnectionsCreateOrUpdateSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/GlobalReachConnectionsCreateOrUpdateSamples.java index d1054d889bf3..0f9a90194043 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 @@ -7,7 +7,7 @@ /** Samples for GlobalReachConnections CreateOrUpdate. */ public final class GlobalReachConnectionsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2021-12-01/examples/GlobalReachConnections_CreateOrUpdate.json + * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2022-05-01/examples/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 9f18c47d4ca8..16dae58f6433 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,7 +9,7 @@ /** Samples for GlobalReachConnections Delete. */ public final class GlobalReachConnectionsDeleteSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2021-12-01/examples/GlobalReachConnections_Delete.json + * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2022-05-01/examples/GlobalReachConnections_Delete.json */ /** * Sample code: GlobalReachConnections_Delete. diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/GlobalReachConnectionsGetSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/GlobalReachConnectionsGetSamples.java index 4f27f5db3ad7..a6bd62408421 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,7 +9,7 @@ /** Samples for GlobalReachConnections Get. */ public final class GlobalReachConnectionsGetSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2021-12-01/examples/GlobalReachConnections_Get.json + * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2022-05-01/examples/GlobalReachConnections_Get.json */ /** * Sample code: GlobalReachConnections_Get. diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/GlobalReachConnectionsListSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/GlobalReachConnectionsListSamples.java index fa6d8c1464d3..0e7c8bb4e5b4 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,7 +9,7 @@ /** Samples for GlobalReachConnections List. */ public final class GlobalReachConnectionsListSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2021-12-01/examples/GlobalReachConnections_List.json + * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2022-05-01/examples/GlobalReachConnections_List.json */ /** * Sample code: GlobalReachConnections_List. diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/HcxEnterpriseSitesCreateOrUpdateSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/HcxEnterpriseSitesCreateOrUpdateSamples.java index ce4d7686c245..f60ad5c03356 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 @@ -7,7 +7,7 @@ /** Samples for HcxEnterpriseSites CreateOrUpdate. */ public final class HcxEnterpriseSitesCreateOrUpdateSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2021-12-01/examples/HcxEnterpriseSites_CreateOrUpdate.json + * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2022-05-01/examples/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 258f5db81c38..940954b55d0e 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,7 +9,7 @@ /** Samples for HcxEnterpriseSites Delete. */ public final class HcxEnterpriseSitesDeleteSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2021-12-01/examples/HcxEnterpriseSites_Delete.json + * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2022-05-01/examples/HcxEnterpriseSites_Delete.json */ /** * Sample code: HcxEnterpriseSites_Delete. diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/HcxEnterpriseSitesGetSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/HcxEnterpriseSitesGetSamples.java index 7667cea88fe0..43e8e0dbb69a 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 @@ /** Samples for HcxEnterpriseSites Get. */ public final class HcxEnterpriseSitesGetSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2021-12-01/examples/HcxEnterpriseSites_Get.json + * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2022-05-01/examples/HcxEnterpriseSites_Get.json */ /** * Sample code: HcxEnterpriseSites_Get. diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/HcxEnterpriseSitesListSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/HcxEnterpriseSitesListSamples.java index 5c5fdbd22e18..dcce7db6e1c8 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,7 +9,7 @@ /** Samples for HcxEnterpriseSites List. */ public final class HcxEnterpriseSitesListSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2021-12-01/examples/HcxEnterpriseSites_List.json + * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2022-05-01/examples/HcxEnterpriseSites_List.json */ /** * Sample code: HcxEnterpriseSites_List. diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/LocationsCheckQuotaAvailabilitySamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/LocationsCheckQuotaAvailabilitySamples.java index 15920e815cfa..0dd37d0a6bf4 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,7 +9,7 @@ /** Samples for Locations CheckQuotaAvailability. */ public final class LocationsCheckQuotaAvailabilitySamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2021-12-01/examples/Locations_CheckQuotaAvailability.json + * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2022-05-01/examples/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 e90bdd50760f..6c7a3deb4188 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 @@ -5,11 +5,12 @@ package com.azure.resourcemanager.avs.generated; import com.azure.core.util.Context; +import com.azure.resourcemanager.avs.models.Sku; /** Samples for Locations CheckTrialAvailability. */ public final class LocationsCheckTrialAvailabilitySamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2021-12-01/examples/Locations_CheckTrialAvailability.json + * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2022-05-01/examples/Locations_CheckTrialAvailability.json */ /** * Sample code: Locations_CheckTrialAvailability. @@ -17,6 +18,18 @@ public final class LocationsCheckTrialAvailabilitySamples { * @param manager Entry point to AvsManager. */ public static void locationsCheckTrialAvailability(com.azure.resourcemanager.avs.AvsManager manager) { - manager.locations().checkTrialAvailabilityWithResponse("eastus", Context.NONE); + manager.locations().checkTrialAvailabilityWithResponse("eastus", null, Context.NONE); + } + + /* + * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2022-05-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"), 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 42ca3e6d71d7..fd6f58643e45 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 @@ /** Samples for Operations List. */ public final class OperationsListSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2021-12-01/examples/Operations_List.json + * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2022-05-01/examples/Operations_List.json */ /** * Sample code: Operations_List. diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/PlacementPoliciesCreateOrUpdateSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/PlacementPoliciesCreateOrUpdateSamples.java index b85f8de5f36e..cce7e0d77144 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 @@ -4,14 +4,16 @@ 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/resource-manager/Microsoft.AVS/stable/2021-12-01/examples/PlacementPolicies_CreateOrUpdate.json + * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2022-05-01/examples/PlacementPolicies_CreateOrUpdate.json */ /** * Sample code: PlacementPolicies_CreateOrUpdate. @@ -28,15 +30,17 @@ public static void placementPoliciesCreateOrUpdate(com.azure.resourcemanager.avs .withVmMembers( Arrays .asList( - "/subscriptions/{subscription-id}/resourceGroups/group1/providers/Microsoft.AVS/privateClouds/cloud1/clusters/cluster1/virtualMachines/vm-128", - "/subscriptions/{subscription-id}/resourceGroups/group1/providers/Microsoft.AVS/privateClouds/cloud1/clusters/cluster1/virtualMachines/vm-256")) + "/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)) + .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 84ac1ca335ce..bf0f7ea29fd4 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,7 +9,7 @@ /** Samples for PlacementPolicies Delete. */ public final class PlacementPoliciesDeleteSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2021-12-01/examples/PlacementPolicies_Delete.json + * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2022-05-01/examples/PlacementPolicies_Delete.json */ /** * Sample code: PlacementPolicies_Delete. diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/PlacementPoliciesGetSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/PlacementPoliciesGetSamples.java index 56e676bb5d16..b41d68cfb822 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 @@ /** Samples for PlacementPolicies Get. */ public final class PlacementPoliciesGetSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2021-12-01/examples/PlacementPolicies_Get.json + * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2022-05-01/examples/PlacementPolicies_Get.json */ /** * Sample code: PlacementPolicies_Get. diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/PlacementPoliciesListSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/PlacementPoliciesListSamples.java index 4e660b3a85f1..75e1e8cb044a 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 @@ /** Samples for PlacementPolicies List. */ public final class PlacementPoliciesListSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2021-12-01/examples/PlacementPolicies_List.json + * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2022-05-01/examples/PlacementPolicies_List.json */ /** * Sample code: PlacementPolicies_List. diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/PlacementPoliciesUpdateSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/PlacementPoliciesUpdateSamples.java index b53bc2e47cd6..70f477f7fc3f 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 @@ -5,6 +5,8 @@ package com.azure.resourcemanager.avs.generated; import com.azure.core.util.Context; +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; @@ -12,7 +14,7 @@ /** Samples for PlacementPolicies Update. */ public final class PlacementPoliciesUpdateSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2021-12-01/examples/PlacementPolicies_Update.json + * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2022-05-01/examples/PlacementPolicies_Update.json */ /** * Sample code: PlacementPolicies_Update. @@ -31,14 +33,16 @@ public static void placementPoliciesUpdate(com.azure.resourcemanager.avs.AvsMana .withVmMembers( Arrays .asList( - "/subscriptions/{subscription-id}/resourceGroups/group1/providers/Microsoft.AVS/privateClouds/cloud1/clusters/cluster1/virtualMachines/vm-128", - "/subscriptions/{subscription-id}/resourceGroups/group1/providers/Microsoft.AVS/privateClouds/cloud1/clusters/cluster1/virtualMachines/vm-256")) + "/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 75ffb7757808..ac736ab56506 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 @@ -16,7 +16,7 @@ /** Samples for PrivateClouds CreateOrUpdate. */ public final class PrivateCloudsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2021-12-01/examples/PrivateClouds_CreateOrUpdate.json + * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2022-05-01/examples/PrivateClouds_CreateOrUpdate.json */ /** * Sample code: PrivateClouds_CreateOrUpdate. @@ -38,7 +38,7 @@ public static void privateCloudsCreateOrUpdate(com.azure.resourcemanager.avs.Avs } /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2021-12-01/examples/PrivateClouds_CreateOrUpdate_Stretched.json + * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2022-05-01/examples/PrivateClouds_CreateOrUpdate_Stretched.json */ /** * Sample code: PrivateClouds_CreateOrUpdate_Stretched. 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 a17e41ae98dd..b3725cf17874 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 @@ /** Samples for PrivateClouds Delete. */ public final class PrivateCloudsDeleteSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2021-12-01/examples/PrivateClouds_Delete.json + * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2022-05-01/examples/PrivateClouds_Delete.json */ /** * Sample code: PrivateClouds_Delete. diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/PrivateCloudsGetByResourceGroupSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/PrivateCloudsGetByResourceGroupSamples.java index 3f0ebc57ed04..81dd3209077c 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 @@ /** Samples for PrivateClouds GetByResourceGroup. */ public final class PrivateCloudsGetByResourceGroupSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2021-12-01/examples/PrivateClouds_Get.json + * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2022-05-01/examples/PrivateClouds_Get.json */ /** * Sample code: PrivateClouds_Get. @@ -21,7 +21,7 @@ public static void privateCloudsGet(com.azure.resourcemanager.avs.AvsManager man } /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2021-12-01/examples/PrivateClouds_Get_Stretched.json + * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2022-05-01/examples/PrivateClouds_Get_Stretched.json */ /** * Sample code: PrivateClouds_Get_Stretched. diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/PrivateCloudsListAdminCredentialsSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/PrivateCloudsListAdminCredentialsSamples.java index 12ca0fa0636e..cac58eba52ac 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,7 +9,7 @@ /** Samples for PrivateClouds ListAdminCredentials. */ public final class PrivateCloudsListAdminCredentialsSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2021-12-01/examples/PrivateClouds_ListAdminCredentials.json + * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2022-05-01/examples/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 e0c2e73e4e1c..e7359bd4d4c9 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 @@ /** Samples for PrivateClouds ListByResourceGroup. */ public final class PrivateCloudsListByResourceGroupSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2021-12-01/examples/PrivateClouds_List.json + * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2022-05-01/examples/PrivateClouds_List.json */ /** * Sample code: PrivateClouds_List. @@ -21,7 +21,7 @@ public static void privateCloudsList(com.azure.resourcemanager.avs.AvsManager ma } /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2021-12-01/examples/PrivateClouds_List_Stretched.json + * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2022-05-01/examples/PrivateClouds_List_Stretched.json */ /** * Sample code: PrivateClouds_List_Stretched. diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/PrivateCloudsListSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/PrivateCloudsListSamples.java index 0db14e821e56..3a626c19993b 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,7 +9,7 @@ /** Samples for PrivateClouds List. */ public final class PrivateCloudsListSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2021-12-01/examples/PrivateClouds_ListInSubscription.json + * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2022-05-01/examples/PrivateClouds_ListInSubscription.json */ /** * Sample code: PrivateClouds_ListInSubscription. @@ -21,7 +21,7 @@ public static void privateCloudsListInSubscription(com.azure.resourcemanager.avs } /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2021-12-01/examples/PrivateClouds_ListInSubscription_Stretched.json + * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2022-05-01/examples/PrivateClouds_ListInSubscription_Stretched.json */ /** * Sample code: PrivateClouds_ListInSubscription_Stretched. 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 860335a3a042..e0f0166bd209 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,7 +9,7 @@ /** Samples for PrivateClouds RotateNsxtPassword. */ public final class PrivateCloudsRotateNsxtPasswordSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2021-12-01/examples/PrivateClouds_RotateNsxtPassword.json + * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2022-05-01/examples/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 5bdfbfda56e0..9e4f3299cfe0 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/PrivateCloudsRotateVcenterPasswordSamples.java +++ b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/PrivateCloudsRotateVcenterPasswordSamples.java @@ -9,7 +9,7 @@ /** Samples for PrivateClouds RotateVcenterPassword. */ public final class PrivateCloudsRotateVcenterPasswordSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2021-12-01/examples/PrivateClouds_RotateVcenterPassword.json + * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2022-05-01/examples/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 6bd22c49c63c..cedec2eab7b8 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 @@ -16,7 +16,7 @@ /** Samples for PrivateClouds Update. */ public final class PrivateCloudsUpdateSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2021-12-01/examples/PrivateClouds_Update.json + * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2022-05-01/examples/PrivateClouds_Update.json */ /** * Sample code: PrivateClouds_Update. @@ -42,7 +42,7 @@ public static void privateCloudsUpdate(com.azure.resourcemanager.avs.AvsManager } /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2021-12-01/examples/PrivateClouds_Update_Stretched.json + * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2022-05-01/examples/PrivateClouds_Update_Stretched.json */ /** * Sample code: PrivateClouds_Update_Stretched. 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 a5f87a1cdcce..2d9767b74d29 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 @@ /** Samples for ScriptCmdlets Get. */ public final class ScriptCmdletsGetSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2021-12-01/examples/ScriptCmdlets_Get.json + * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2022-05-01/examples/ScriptCmdlets_Get.json */ /** * Sample code: ScriptCmdlets_Get. diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/ScriptCmdletsListSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/ScriptCmdletsListSamples.java index ac8eea57c577..fda8d41480f3 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 @@ /** Samples for ScriptCmdlets List. */ public final class ScriptCmdletsListSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2021-12-01/examples/ScriptCmdlets_List.json + * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2022-05-01/examples/ScriptCmdlets_List.json */ /** * Sample code: ScriptCmdlets_List. diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/ScriptExecutionsCreateOrUpdateSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/ScriptExecutionsCreateOrUpdateSamples.java index 090f77b60f6b..566526c60f55 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 @@ -11,7 +11,7 @@ /** Samples for ScriptExecutions CreateOrUpdate. */ public final class ScriptExecutionsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2021-12-01/examples/ScriptExecutions_CreateOrUpdate.json + * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2022-05-01/examples/ScriptExecutions_CreateOrUpdate.json */ /** * Sample code: ScriptExecutions_CreateOrUpdate. @@ -24,7 +24,7 @@ public static void scriptExecutionsCreateOrUpdate(com.azure.resourcemanager.avs. .define("addSsoServer") .withExistingPrivateCloud("group1", "cloud1") .withScriptCmdletId( - "/subscriptions/{subscription-id}/resourceGroups/group1/providers/Microsoft.AVS/privateClouds/cloud1/scriptPackages/AVS.PowerCommands@1.0.0/scriptCmdlets/New-SsoExternalIdentitySource") + "/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( 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 5327f6baeec8..8baedd2dc39b 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,7 +9,7 @@ /** Samples for ScriptExecutions Delete. */ public final class ScriptExecutionsDeleteSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2021-12-01/examples/ScriptExecutions_Delete.json + * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2022-05-01/examples/ScriptExecutions_Delete.json */ /** * Sample code: ScriptExecutions_Delete. diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/ScriptExecutionsGetExecutionLogsSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/ScriptExecutionsGetExecutionLogsSamples.java index b6ff77e2ab74..6b52789f64d4 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 @@ -11,7 +11,7 @@ /** Samples for ScriptExecutions GetExecutionLogs. */ public final class ScriptExecutionsGetExecutionLogsSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2021-12-01/examples/ScriptExecutions_GetExecutionLogs.json + * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2022-05-01/examples/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 b312f523eb89..82f82ec7f71c 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 @@ /** Samples for ScriptExecutions Get. */ public final class ScriptExecutionsGetSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2021-12-01/examples/ScriptExecutions_Get.json + * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2022-05-01/examples/ScriptExecutions_Get.json */ /** * Sample code: ScriptExecutions_Get. diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/ScriptExecutionsListSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/ScriptExecutionsListSamples.java index 493c1878a960..88944a391d57 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 @@ /** Samples for ScriptExecutions List. */ public final class ScriptExecutionsListSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2021-12-01/examples/ScriptExecutions_List.json + * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2022-05-01/examples/ScriptExecutions_List.json */ /** * Sample code: ScriptExecutions_List. diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/ScriptPackagesGetSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/ScriptPackagesGetSamples.java index 5972f2b26329..d42c2d9a86fe 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 @@ /** Samples for ScriptPackages Get. */ public final class ScriptPackagesGetSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2021-12-01/examples/ScriptPackages_Get.json + * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2022-05-01/examples/ScriptPackages_Get.json */ /** * Sample code: ScriptPackages_Get. diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/ScriptPackagesListSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/ScriptPackagesListSamples.java index be5b8d377be4..c5191a7a0310 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 @@ /** Samples for ScriptPackages List. */ public final class ScriptPackagesListSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2021-12-01/examples/ScriptPackages_List.json + * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2022-05-01/examples/ScriptPackages_List.json */ /** * Sample code: ScriptPackages_List. diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/VirtualMachinesGetSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/VirtualMachinesGetSamples.java index ec4152983836..eb48800a6ae2 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 @@ /** Samples for VirtualMachines Get. */ public final class VirtualMachinesGetSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2021-12-01/examples/VirtualMachines_Get.json + * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2022-05-01/examples/VirtualMachines_Get.json */ /** * Sample code: GetVirtualMachine. 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 3308b74be816..b3fdee3282d7 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 @@ /** Samples for VirtualMachines List. */ public final class VirtualMachinesListSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2021-12-01/examples/VirtualMachines_List.json + * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2022-05-01/examples/VirtualMachines_List.json */ /** * Sample code: ListClusterVirtualMachines. 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 32601741282c..bfa6d76384bb 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 @@ -11,7 +11,7 @@ /** Samples for VirtualMachines RestrictMovement. */ public final class VirtualMachinesRestrictMovementSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2021-12-01/examples/VirtualMachines_RestrictMovement.json + * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2022-05-01/examples/VirtualMachines_RestrictMovement.json */ /** * Sample code: VirtualMachine_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 026e433c113d..dadeec848679 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 @@ -9,7 +9,7 @@ /** Samples for WorkloadNetworks CreateDhcp. */ public final class WorkloadNetworksCreateDhcpSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2021-12-01/examples/WorkloadNetworks_CreateDhcpConfigurations.json + * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2022-05-01/examples/WorkloadNetworks_CreateDhcpConfigurations.json */ /** * Sample code: WorkloadNetworks_CreateDhcp. diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksCreateDnsServiceSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksCreateDnsServiceSamples.java index dd81498a5070..7f0d6f5c9595 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 @@ -10,7 +10,7 @@ /** Samples for WorkloadNetworks CreateDnsService. */ public final class WorkloadNetworksCreateDnsServiceSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2021-12-01/examples/WorkloadNetworks_CreateDnsServices.json + * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2022-05-01/examples/WorkloadNetworks_CreateDnsServices.json */ /** * Sample code: WorkloadNetworks_CreateDnsService. 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 2b47c67afa9b..d952d4f73260 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 @@ -9,7 +9,7 @@ /** Samples for WorkloadNetworks CreateDnsZone. */ public final class WorkloadNetworksCreateDnsZoneSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2021-12-01/examples/WorkloadNetworks_CreateDnsZones.json + * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2022-05-01/examples/WorkloadNetworks_CreateDnsZones.json */ /** * Sample code: WorkloadNetworks_CreateDnsZone. 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 45d6d1e41316..82efe1b6ae14 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 @@ -9,7 +9,7 @@ /** Samples for WorkloadNetworks CreatePortMirroring. */ public final class WorkloadNetworksCreatePortMirroringSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2021-12-01/examples/WorkloadNetworks_CreatePortMirroringProfiles.json + * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2022-05-01/examples/WorkloadNetworks_CreatePortMirroringProfiles.json */ /** * Sample code: WorkloadNetworks_CreatePortMirroring. 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 52be62c5523e..1fdd712ff9c6 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 @@ -7,7 +7,7 @@ /** Samples for WorkloadNetworks CreatePublicIp. */ public final class WorkloadNetworksCreatePublicIpSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2021-12-01/examples/WorkloadNetworks_CreatePublicIPs.json + * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2022-05-01/examples/WorkloadNetworks_CreatePublicIPs.json */ /** * Sample code: WorkloadNetworks_CreatePublicIP. diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksCreateSegmentsSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksCreateSegmentsSamples.java index 8a2606dd958d..de15c7b5f333 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksCreateSegmentsSamples.java +++ b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksCreateSegmentsSamples.java @@ -10,7 +10,7 @@ /** Samples for WorkloadNetworks CreateSegments. */ public final class WorkloadNetworksCreateSegmentsSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2021-12-01/examples/WorkloadNetworks_CreateSegments.json + * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2022-05-01/examples/WorkloadNetworks_CreateSegments.json */ /** * Sample code: WorkloadNetworks_CreateSegments. 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 67f4e269d8de..ee8849362c8d 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,7 +9,7 @@ /** Samples for WorkloadNetworks CreateVMGroup. */ public final class WorkloadNetworksCreateVMGroupSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2021-12-01/examples/WorkloadNetworks_CreateVMGroups.json + * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2022-05-01/examples/WorkloadNetworks_CreateVMGroups.json */ /** * Sample code: WorkloadNetworks_CreateVMGroup. 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 092189ef08ec..57bfb5a6664b 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,7 +9,7 @@ /** Samples for WorkloadNetworks DeleteDhcp. */ public final class WorkloadNetworksDeleteDhcpSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2021-12-01/examples/WorkloadNetworks_DeleteDhcpConfigurations.json + * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2022-05-01/examples/WorkloadNetworks_DeleteDhcpConfigurations.json */ /** * Sample code: WorkloadNetworks_DeleteDhcp. diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksDeleteDnsServiceSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksDeleteDnsServiceSamples.java index adf9c1348fb7..146c39f1994c 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,7 +9,7 @@ /** Samples for WorkloadNetworks DeleteDnsService. */ public final class WorkloadNetworksDeleteDnsServiceSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2021-12-01/examples/WorkloadNetworks_DeleteDnsServices.json + * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2022-05-01/examples/WorkloadNetworks_DeleteDnsServices.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 22b3a6808e29..faf6a548d69b 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,7 +9,7 @@ /** Samples for WorkloadNetworks DeleteDnsZone. */ public final class WorkloadNetworksDeleteDnsZoneSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2021-12-01/examples/WorkloadNetworks_DeleteDnsZones.json + * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2022-05-01/examples/WorkloadNetworks_DeleteDnsZones.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 1230554fd530..e923666ab013 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksDeletePortMirroringSamples.java +++ b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksDeletePortMirroringSamples.java @@ -9,7 +9,7 @@ /** Samples for WorkloadNetworks DeletePortMirroring. */ public final class WorkloadNetworksDeletePortMirroringSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2021-12-01/examples/WorkloadNetworks_DeletePortMirroringProfiles.json + * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2022-05-01/examples/WorkloadNetworks_DeletePortMirroringProfiles.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 ce4b6fae07e0..6ace25f5cf64 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 @@ -9,7 +9,7 @@ /** Samples for WorkloadNetworks DeletePublicIp. */ public final class WorkloadNetworksDeletePublicIpSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2021-12-01/examples/WorkloadNetworks_DeletePublicIPs.json + * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2022-05-01/examples/WorkloadNetworks_DeletePublicIPs.json */ /** * Sample code: WorkloadNetworks_DeletePublicIP. 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 71680f4e9b8d..f09abe5daac8 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,7 +9,7 @@ /** Samples for WorkloadNetworks DeleteSegment. */ public final class WorkloadNetworksDeleteSegmentSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2021-12-01/examples/WorkloadNetworks_DeleteSegments.json + * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2022-05-01/examples/WorkloadNetworks_DeleteSegments.json */ /** * Sample code: WorkloadNetworks_DeleteSegment. 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 91b5b3fd3f8b..eb381cbceb8f 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,7 +9,7 @@ /** Samples for WorkloadNetworks DeleteVMGroup. */ public final class WorkloadNetworksDeleteVMGroupSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2021-12-01/examples/WorkloadNetworks_DeleteVMGroups.json + * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2022-05-01/examples/WorkloadNetworks_DeleteVMGroups.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 191b47a68978..f9dc1efe3725 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,7 +9,7 @@ /** Samples for WorkloadNetworks GetDhcp. */ public final class WorkloadNetworksGetDhcpSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2021-12-01/examples/WorkloadNetworks_GetDhcpConfigurations.json + * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2022-05-01/examples/WorkloadNetworks_GetDhcpConfigurations.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 f13f0722f4d3..cd680ba8a58e 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,7 +9,7 @@ /** Samples for WorkloadNetworks GetDnsService. */ public final class WorkloadNetworksGetDnsServiceSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2021-12-01/examples/WorkloadNetworks_GetDnsServices.json + * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2022-05-01/examples/WorkloadNetworks_GetDnsServices.json */ /** * Sample code: WorkloadNetworks_GetDnsService. 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 1dd14b15532e..cbfd1bd14c32 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,7 +9,7 @@ /** Samples for WorkloadNetworks GetDnsZone. */ public final class WorkloadNetworksGetDnsZoneSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2021-12-01/examples/WorkloadNetworks_GetDnsZones.json + * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2022-05-01/examples/WorkloadNetworks_GetDnsZones.json */ /** * Sample code: WorkloadNetworks_GetDnsZone. diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksGetGatewaySamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksGetGatewaySamples.java index 0cfa6328e597..ee426880e83c 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,7 +9,7 @@ /** Samples for WorkloadNetworks GetGateway. */ public final class WorkloadNetworksGetGatewaySamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2021-12-01/examples/WorkloadNetworks_GetGateway.json + * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2022-05-01/examples/WorkloadNetworks_GetGateway.json */ /** * Sample code: WorkloadNetworks_GetGateway. diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksGetPortMirroringSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksGetPortMirroringSamples.java index 35bb68ecd3a1..dfed1cd38e03 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,7 +9,7 @@ /** Samples for WorkloadNetworks GetPortMirroring. */ public final class WorkloadNetworksGetPortMirroringSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2021-12-01/examples/WorkloadNetworks_GetPortMirroringProfiles.json + * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2022-05-01/examples/WorkloadNetworks_GetPortMirroringProfiles.json */ /** * Sample code: WorkloadNetworks_GetPortMirroring. 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 6c91142a3f9b..81c7cd2bb68e 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 @@ -9,7 +9,7 @@ /** Samples for WorkloadNetworks GetPublicIp. */ public final class WorkloadNetworksGetPublicIpSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2021-12-01/examples/WorkloadNetworks_GetPublicIPs.json + * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2022-05-01/examples/WorkloadNetworks_GetPublicIPs.json */ /** * Sample code: WorkloadNetworks_GetPublicIP. diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksGetSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksGetSamples.java new file mode 100644 index 000000000000..9204db606726 --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksGetSamples.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.avs.generated; + +import com.azure.core.util.Context; +import com.azure.resourcemanager.avs.models.WorkloadNetworkName; + +/** Samples for WorkloadNetworks Get. */ +public final class WorkloadNetworksGetSamples { + /* + * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2022-05-01/examples/WorkloadNetworks_Get.json + */ + /** + * Sample code: WorkloadNetworks_Get. + * + * @param manager Entry point to AvsManager. + */ + public static void workloadNetworksGet(com.azure.resourcemanager.avs.AvsManager manager) { + manager.workloadNetworks().getWithResponse("group1", "cloud1", WorkloadNetworkName.DEFAULT, 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 acefcf28356f..7ec54f2c0a79 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,7 +9,7 @@ /** Samples for WorkloadNetworks GetSegment. */ public final class WorkloadNetworksGetSegmentSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2021-12-01/examples/WorkloadNetworks_GetSegments.json + * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2022-05-01/examples/WorkloadNetworks_GetSegments.json */ /** * Sample code: WorkloadNetworks_GetSegment. diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksGetVMGroupSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksGetVMGroupSamples.java index 9f037ebe09c0..aae95e569cc2 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,7 +9,7 @@ /** Samples for WorkloadNetworks GetVMGroup. */ public final class WorkloadNetworksGetVMGroupSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2021-12-01/examples/WorkloadNetworks_GetVMGroups.json + * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2022-05-01/examples/WorkloadNetworks_GetVMGroups.json */ /** * Sample code: WorkloadNetworks_GetVMGroup. diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksGetVirtualMachineSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksGetVirtualMachineSamples.java index 1f43d47913cf..7960817a6431 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,7 +9,7 @@ /** Samples for WorkloadNetworks GetVirtualMachine. */ public final class WorkloadNetworksGetVirtualMachineSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2021-12-01/examples/WorkloadNetworks_GetVirtualMachine.json + * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2022-05-01/examples/WorkloadNetworks_GetVirtualMachine.json */ /** * Sample code: WorkloadNetworks_GetVirtualMachine. 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 c00ce2a2fb14..4735698e8ad0 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,7 +9,7 @@ /** Samples for WorkloadNetworks ListDhcp. */ public final class WorkloadNetworksListDhcpSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2021-12-01/examples/WorkloadNetworks_ListDhcpConfigurations.json + * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2022-05-01/examples/WorkloadNetworks_ListDhcpConfigurations.json */ /** * Sample code: WorkloadNetworks_ListDhcp. diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksListDnsServicesSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksListDnsServicesSamples.java index 6a78369c6c6b..500097d3a366 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,7 +9,7 @@ /** Samples for WorkloadNetworks ListDnsServices. */ public final class WorkloadNetworksListDnsServicesSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2021-12-01/examples/WorkloadNetworks_ListDnsServices.json + * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2022-05-01/examples/WorkloadNetworks_ListDnsServices.json */ /** * Sample code: WorkloadNetworks_ListDnsServices. 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 2efad25af9cd..af3c7175cc0b 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,7 +9,7 @@ /** Samples for WorkloadNetworks ListDnsZones. */ public final class WorkloadNetworksListDnsZonesSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2021-12-01/examples/WorkloadNetworks_ListDnsZones.json + * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2022-05-01/examples/WorkloadNetworks_ListDnsZones.json */ /** * Sample code: WorkloadNetworks_ListDnsZones. diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksListGatewaysSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksListGatewaysSamples.java index 0f0c28a5a630..993d0aa8dcf5 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,7 +9,7 @@ /** Samples for WorkloadNetworks ListGateways. */ public final class WorkloadNetworksListGatewaysSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2021-12-01/examples/WorkloadNetworks_ListGateways.json + * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2022-05-01/examples/WorkloadNetworks_ListGateways.json */ /** * Sample code: WorkloadNetworks_ListGateways. diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksListPortMirroringSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksListPortMirroringSamples.java index 5b31cd2fa244..cf19fcb394ff 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,7 +9,7 @@ /** Samples for WorkloadNetworks ListPortMirroring. */ public final class WorkloadNetworksListPortMirroringSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2021-12-01/examples/WorkloadNetworks_ListPortMirroringProfiles.json + * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2022-05-01/examples/WorkloadNetworks_ListPortMirroringProfiles.json */ /** * Sample code: WorkloadNetworks_ListPortMirroring. 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 8c1331dc0a64..29b81673ad39 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 @@ -9,7 +9,7 @@ /** Samples for WorkloadNetworks ListPublicIPs. */ public final class WorkloadNetworksListPublicIPsSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2021-12-01/examples/WorkloadNetworks_ListPublicIPs.json + * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2022-05-01/examples/WorkloadNetworks_ListPublicIPs.json */ /** * Sample code: WorkloadNetworks_ListPublicIPs. 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 new file mode 100644 index 000000000000..be2cc0ae6040 --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksListSamples.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.avs.generated; + +import com.azure.core.util.Context; + +/** Samples for WorkloadNetworks List. */ +public final class WorkloadNetworksListSamples { + /* + * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2022-05-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", 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 c6573dcaff75..5652474a189c 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,7 +9,7 @@ /** Samples for WorkloadNetworks ListSegments. */ public final class WorkloadNetworksListSegmentsSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2021-12-01/examples/WorkloadNetworks_ListSegments.json + * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2022-05-01/examples/WorkloadNetworks_ListSegments.json */ /** * Sample code: WorkloadNetworks_ListSegments. diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksListVMGroupsSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksListVMGroupsSamples.java index 550a298c2f9f..d1de876c65be 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,7 +9,7 @@ /** Samples for WorkloadNetworks ListVMGroups. */ public final class WorkloadNetworksListVMGroupsSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2021-12-01/examples/WorkloadNetworks_ListVMGroups.json + * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2022-05-01/examples/WorkloadNetworks_ListVMGroups.json */ /** * Sample code: WorkloadNetworks_ListVMGroups. diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksListVirtualMachinesSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksListVirtualMachinesSamples.java index 0dba0f61bd3d..ef8b5aced91b 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksListVirtualMachinesSamples.java +++ b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksListVirtualMachinesSamples.java @@ -9,7 +9,7 @@ /** Samples for WorkloadNetworks ListVirtualMachines. */ public final class WorkloadNetworksListVirtualMachinesSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2021-12-01/examples/WorkloadNetworks_ListVirtualMachines.json + * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2022-05-01/examples/WorkloadNetworks_ListVirtualMachines.json */ /** * Sample code: WorkloadNetworks_ListVirtualMachines. diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksUpdateDhcpSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksUpdateDhcpSamples.java index 17d287a1da00..5d74a10d0962 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksUpdateDhcpSamples.java +++ b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksUpdateDhcpSamples.java @@ -11,7 +11,7 @@ /** Samples for WorkloadNetworks UpdateDhcp. */ public final class WorkloadNetworksUpdateDhcpSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2021-12-01/examples/WorkloadNetworks_UpdateDhcpConfigurations.json + * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2022-05-01/examples/WorkloadNetworks_UpdateDhcpConfigurations.json */ /** * Sample code: WorkloadNetworks_UpdateDhcp. diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksUpdateDnsServiceSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksUpdateDnsServiceSamples.java index e4018209c8ff..8f9ceb0332ff 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 @@ -12,7 +12,7 @@ /** Samples for WorkloadNetworks UpdateDnsService. */ public final class WorkloadNetworksUpdateDnsServiceSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2021-12-01/examples/WorkloadNetworks_UpdateDnsServices.json + * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2022-05-01/examples/WorkloadNetworks_UpdateDnsServices.json */ /** * Sample code: WorkloadNetworks_UpdateDnsService. 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 3fb3c91bc27f..b2053fe75485 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 @@ -11,7 +11,7 @@ /** Samples for WorkloadNetworks UpdateDnsZone. */ public final class WorkloadNetworksUpdateDnsZoneSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2021-12-01/examples/WorkloadNetworks_UpdateDnsZones.json + * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2022-05-01/examples/WorkloadNetworks_UpdateDnsZones.json */ /** * Sample code: WorkloadNetworks_UpdateDnsZone. 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 85a9f46e9301..13f46168f9ff 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 @@ -11,7 +11,7 @@ /** Samples for WorkloadNetworks UpdatePortMirroring. */ public final class WorkloadNetworksUpdatePortMirroringSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2021-12-01/examples/WorkloadNetworks_UpdatePortMirroringProfiles.json + * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2022-05-01/examples/WorkloadNetworks_UpdatePortMirroringProfiles.json */ /** * Sample code: WorkloadNetworks_UpdatePortMirroring. diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksUpdateSegmentsSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksUpdateSegmentsSamples.java index b621c08ef923..b77dd09ed62b 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksUpdateSegmentsSamples.java +++ b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksUpdateSegmentsSamples.java @@ -12,7 +12,7 @@ /** Samples for WorkloadNetworks UpdateSegments. */ public final class WorkloadNetworksUpdateSegmentsSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2021-12-01/examples/WorkloadNetworks_UpdateSegments.json + * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2022-05-01/examples/WorkloadNetworks_UpdateSegments.json */ /** * Sample code: WorkloadNetworks_UpdateSegments. 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 7e4dbe1ae7e5..fcc52f193d87 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 @@ -11,7 +11,7 @@ /** Samples for WorkloadNetworks UpdateVMGroup. */ public final class WorkloadNetworksUpdateVMGroupSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2021-12-01/examples/WorkloadNetworks_UpdateVMGroups.json + * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2022-05-01/examples/WorkloadNetworks_UpdateVMGroups.json */ /** * Sample code: WorkloadNetworks_UpdateVMGroup.