From bbcb12f57b36669997fc6c04bc914c0d734517ce Mon Sep 17 00:00:00 2001 From: azure-sdk Date: Thu, 16 Oct 2025 02:11:26 +0000 Subject: [PATCH 1/4] Configurations: 'specification/vmware/resource-manager/Microsoft.AVS/AVS/tspconfig.yaml', API Version: 2025-09-01, SDK Release Type: stable, and CommitSHA: '76b0b83db710d3e15c4cba3cc96b9cb57f590eee' in SpecRepo: 'https://github.com/Azure/azure-rest-api-specs' Pipeline run: https://dev.azure.com/azure-sdk/internal/_build/results?buildId=5462158 Refer to https://eng.ms/docs/products/azure-developer-experience/develop/sdk-release/sdk-release-prerequisites to prepare for SDK release. --- eng/versioning/version_client.txt | 2 +- .../azure-resourcemanager-avs/CHANGELOG.md | 315 ++++++- sdk/avs/azure-resourcemanager-avs/README.md | 4 +- sdk/avs/azure-resourcemanager-avs/SAMPLE.md | 581 +++++++++--- sdk/avs/azure-resourcemanager-avs/pom.xml | 5 +- .../azure/resourcemanager/avs/AvsManager.java | 48 + .../resourcemanager/avs/fluent/AvsClient.java | 21 + .../avs/fluent/LicensesClient.java | 232 +++++ .../avs/fluent/MaintenancesClient.java | 181 ++++ .../avs/fluent/PrivateCloudsClient.java | 29 + .../avs/fluent/ServiceComponentsClient.java | 69 ++ .../avs/fluent/models/LicenseInner.java | 154 ++++ .../fluent/models/LicensePropertiesInner.java | 130 +++ .../avs/fluent/models/MaintenanceInner.java | 144 +++ .../avs/fluent/models/PrivateCloudInner.java | 55 +- ....java => PrivateCloudPropertiesInner.java} | 144 +-- .../avs/fluent/models/VcfLicenseInner.java | 130 +++ .../avs/implementation/AvsClientImpl.java | 50 +- .../avs/implementation/LicenseImpl.java | 146 +++ .../implementation/LicensePropertiesImpl.java | 37 + .../implementation/LicensesClientImpl.java | 858 ++++++++++++++++++ .../avs/implementation/LicensesImpl.java | 184 ++++ .../avs/implementation/MaintenanceImpl.java | 49 + .../MaintenancesClientImpl.java | 742 +++++++++++++++ .../avs/implementation/MaintenancesImpl.java | 143 +++ .../avs/implementation/PrivateCloudImpl.java | 24 + .../PrivateCloudPropertiesImpl.java | 154 ++++ .../PrivateCloudsClientImpl.java | 91 ++ .../avs/implementation/PrivateCloudsImpl.java | 23 + .../ServiceComponentsClientImpl.java | 232 +++++ .../implementation/ServiceComponentsImpl.java | 40 + .../avs/implementation/VcfLicenseImpl.java | 37 + .../models/LicenseListResult.java | 95 ++ .../models/MaintenanceListResult.java | 95 ++ ...orMaintenanceWhileRescheduleOperation.java | 115 +++ ...wForMaintenanceWhileScheduleOperation.java | 115 +++ .../BlockedDatesConstraintCategory.java | 56 ++ .../BlockedDatesConstraintTimeRange.java | 111 +++ .../BlockedWhileRescheduleOperation.java | 114 +++ .../models/BlockedWhileScheduleOperation.java | 113 +++ .../models/ImpactedMaintenanceResource.java | 92 ++ .../ImpactedMaintenanceResourceError.java | 141 +++ .../resourcemanager/avs/models/Label.java | 114 +++ .../resourcemanager/avs/models/License.java | 211 +++++ .../avs/models/LicenseKind.java | 46 + .../avs/models/LicenseName.java | 46 + .../avs/models/LicenseProperties.java | 33 + .../avs/models/LicenseProvisioningState.java | 56 ++ .../resourcemanager/avs/models/Licenses.java | 172 ++++ .../avs/models/Maintenance.java | 55 ++ .../avs/models/MaintenanceCheckType.java | 51 ++ .../avs/models/MaintenanceFailedCheck.java | 92 ++ .../MaintenanceManagementOperation.java | 106 +++ .../MaintenanceManagementOperationKind.java | 57 ++ .../avs/models/MaintenanceProperties.java | 258 ++++++ .../models/MaintenanceProvisioningState.java | 61 ++ .../avs/models/MaintenanceReadiness.java | 144 +++ .../MaintenanceReadinessRefreshOperation.java | 159 ++++ ...enanceReadinessRefreshOperationStatus.java | 62 ++ .../models/MaintenanceReadinessStatus.java | 61 ++ .../avs/models/MaintenanceReschedule.java | 118 +++ .../avs/models/MaintenanceSchedule.java | 118 +++ .../avs/models/MaintenanceState.java | 132 +++ .../avs/models/MaintenanceStateName.java | 71 ++ .../avs/models/MaintenanceStatusFilter.java | 51 ++ .../avs/models/MaintenanceType.java | 56 ++ .../avs/models/Maintenances.java | 163 ++++ .../avs/models/PrivateCloud.java | 43 +- .../avs/models/PrivateCloudProperties.java | 190 ++++ .../avs/models/PrivateClouds.java | 25 + .../avs/models/RescheduleOperation.java | 126 +++ .../models/RescheduleOperationConstraint.java | 104 +++ .../RescheduleOperationConstraintKind.java | 52 ++ .../avs/models/ScheduleOperation.java | 126 +++ .../models/ScheduleOperationConstraint.java | 105 +++ .../ScheduleOperationConstraintKind.java | 57 ++ .../avs/models/SchedulingWindow.java | 111 +++ .../avs/models/ServiceComponents.java | 35 + .../avs/models/Vcf5License.java | 268 ++++++ .../avs/models/VcfLicense.java | 33 + .../avs/models/VcfLicenseKind.java | 46 + .../VmwareFirewallLicenseProperties.java | 270 ++++++ ...esourcemanager-avs_apiview_properties.json | 71 +- .../azure-resourcemanager-avs_metadata.json | 2 +- .../proxy-config.json | 2 +- .../AddonsCreateOrUpdateSamples.java | 10 +- .../avs/generated/AddonsDeleteSamples.java | 2 +- .../avs/generated/AddonsGetSamples.java | 10 +- .../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 | 4 +- .../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 +- .../avs/generated/HostsGetSamples.java | 2 +- .../avs/generated/HostsListSamples.java | 2 +- .../IscsiPathsCreateOrUpdateSamples.java | 2 +- .../generated/IscsiPathsDeleteSamples.java | 2 +- .../avs/generated/IscsiPathsGetSamples.java | 2 +- .../IscsiPathsListByPrivateCloudSamples.java | 2 +- .../LicensesCreateOrUpdateSamples.java | 24 + .../avs/generated/LicensesDeleteSamples.java | 24 + .../LicensesGetPropertiesSamples.java | 26 + .../avs/generated/LicensesGetSamples.java | 25 + .../avs/generated/LicensesListSamples.java | 22 + ...ocationsCheckQuotaAvailabilitySamples.java | 2 +- ...ocationsCheckTrialAvailabilitySamples.java | 4 +- .../avs/generated/MaintenancesGetSamples.java | 22 + .../MaintenancesInitiateChecksSamples.java | 23 + .../generated/MaintenancesListSamples.java | 22 + .../MaintenancesRescheduleSamples.java | 29 + .../MaintenancesScheduleSamples.java | 29 + .../avs/generated/OperationsListSamples.java | 2 +- ...lacementPoliciesCreateOrUpdateSamples.java | 2 +- .../PlacementPoliciesDeleteSamples.java | 2 +- .../PlacementPoliciesGetSamples.java | 2 +- .../PlacementPoliciesListSamples.java | 2 +- .../PlacementPoliciesUpdateSamples.java | 2 +- .../PrivateCloudsCreateOrUpdateSamples.java | 30 +- .../generated/PrivateCloudsDeleteSamples.java | 2 +- ...rivateCloudsGetByResourceGroupSamples.java | 4 +- .../PrivateCloudsGetVcfLicenseSamples.java | 22 + ...vateCloudsListAdminCredentialsSamples.java | 2 +- ...ivateCloudsListByResourceGroupSamples.java | 4 +- .../generated/PrivateCloudsListSamples.java | 4 +- ...rivateCloudsRotateNsxtPasswordSamples.java | 2 +- ...ateCloudsRotateVcenterPasswordSamples.java | 2 +- .../generated/PrivateCloudsUpdateSamples.java | 4 +- .../ProvisionedNetworksGetSamples.java | 2 +- .../ProvisionedNetworksListSamples.java | 2 +- ...eStoragePoliciesCreateOrUpdateSamples.java | 2 +- .../PureStoragePoliciesDeleteSamples.java | 2 +- .../PureStoragePoliciesGetSamples.java | 2 +- .../PureStoragePoliciesListSamples.java | 2 +- .../generated/ScriptCmdletsGetSamples.java | 2 +- .../generated/ScriptCmdletsListSamples.java | 2 +- ...ScriptExecutionsCreateOrUpdateSamples.java | 2 +- .../ScriptExecutionsDeleteSamples.java | 2 +- ...riptExecutionsGetExecutionLogsSamples.java | 2 +- .../generated/ScriptExecutionsGetSamples.java | 2 +- .../ScriptExecutionsListSamples.java | 2 +- .../generated/ScriptPackagesGetSamples.java | 2 +- .../generated/ScriptPackagesListSamples.java | 2 +- ...iceComponentsCheckAvailabilitySamples.java | 23 + .../avs/generated/SkusListSamples.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 | 2 +- .../WorkloadNetworksGetSegmentSamples.java | 2 +- .../WorkloadNetworksGetVMGroupSamples.java | 2 +- ...kloadNetworksGetVirtualMachineSamples.java | 2 +- .../WorkloadNetworksListDhcpSamples.java | 2 +- ...orkloadNetworksListDnsServicesSamples.java | 2 +- .../WorkloadNetworksListDnsZonesSamples.java | 2 +- .../WorkloadNetworksListGatewaysSamples.java | 2 +- ...kloadNetworksListPortMirroringSamples.java | 2 +- .../WorkloadNetworksListPublicIPsSamples.java | 2 +- .../WorkloadNetworksListSamples.java | 2 +- .../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 +- .../AddonsCreateOrUpdateMockTests.java | 6 +- .../avs/generated/AddonsDeleteMockTests.java | 2 +- .../AddonsGetWithResponseMockTests.java | 4 +- .../avs/generated/AddonsListMockTests.java | 5 +- .../AuthorizationsDeleteMockTests.java | 2 +- .../AvailabilityPropertiesTests.java | 20 +- ...ntenanceWhileRescheduleOperationTests.java | 17 + ...aintenanceWhileScheduleOperationTests.java | 17 + .../BlockedDatesConstraintTimeRangeTests.java | 18 + .../BlockedWhileRescheduleOperationTests.java | 17 + .../BlockedWhileScheduleOperationTests.java | 17 + .../avs/generated/CircuitTests.java | 2 +- .../CloudLinksCreateOrUpdateMockTests.java | 10 +- .../generated/CloudLinksDeleteMockTests.java | 2 +- .../CloudLinksGetWithResponseMockTests.java | 6 +- .../generated/CloudLinksListMockTests.java | 6 +- .../ClustersCreateOrUpdateMockTests.java | 38 +- .../generated/ClustersDeleteMockTests.java | 2 +- .../ClustersGetWithResponseMockTests.java | 20 +- .../avs/generated/ClustersListMockTests.java | 20 +- ...lustersListZonesWithResponseMockTests.java | 4 +- .../DatastoresCreateOrUpdateMockTests.java | 30 +- .../generated/DatastoresDeleteMockTests.java | 2 +- .../DatastoresGetWithResponseMockTests.java | 16 +- .../generated/DatastoresListMockTests.java | 16 +- .../avs/generated/EndpointsTests.java | 2 +- ...GlobalReachConnectionsDeleteMockTests.java | 2 +- ...priseSitesDeleteWithResponseMockTests.java | 2 +- .../HostsGetWithResponseMockTests.java | 18 +- .../avs/generated/HostsListMockTests.java | 18 +- .../IscsiPathsCreateOrUpdateMockTests.java | 6 +- .../generated/IscsiPathsDeleteMockTests.java | 2 +- .../IscsiPathsGetWithResponseMockTests.java | 6 +- ...IscsiPathsListByPrivateCloudMockTests.java | 6 +- .../avs/generated/LicenseInnerTests.java | 24 + .../avs/generated/LicenseListResultTests.java | 19 + .../LicensePropertiesInnerTests.java | 23 + .../LicensesCreateOrUpdateMockTests.java | 41 + ...sesGetPropertiesWithResponseMockTests.java | 37 + .../LicensesGetWithResponseMockTests.java | 38 + .../avs/generated/LicensesListMockTests.java | 37 + ...uotaAvailabilityWithResponseMockTests.java | 4 +- ...rialAvailabilityWithResponseMockTests.java | 12 +- .../avs/generated/MaintenanceInnerTests.java | 17 + .../generated/MaintenanceListResultTests.java | 19 + .../MaintenanceManagementOperationTests.java | 16 + .../generated/MaintenancePropertiesTests.java | 17 + ...tenanceReadinessRefreshOperationTests.java | 17 + .../generated/MaintenanceReadinessTests.java | 17 + .../generated/MaintenanceRescheduleTests.java | 31 + .../generated/MaintenanceScheduleTests.java | 31 + .../avs/generated/MaintenanceStateTests.java | 24 + .../MaintenancesGetWithResponseMockTests.java | 37 + ...esInitiateChecksWithResponseMockTests.java | 37 + .../generated/MaintenancesListMockTests.java | 41 + ...nancesRescheduleWithResponseMockTests.java | 41 + ...tenancesScheduleWithResponseMockTests.java | 41 + .../avs/generated/ManagementClusterTests.java | 20 +- .../generated/OperationsListMockTests.java | 2 +- ...cementPoliciesCreateOrUpdateMockTests.java | 12 +- .../PlacementPoliciesDeleteMockTests.java | 2 +- ...ementPoliciesGetWithResponseMockTests.java | 6 +- .../PlacementPoliciesListMockTests.java | 10 +- .../generated/PlacementPoliciesListTests.java | 6 +- .../generated/PlacementPolicyInnerTests.java | 15 +- .../PlacementPolicyPropertiesTests.java | 12 +- .../PlacementPolicyUpdatePropertiesTests.java | 20 +- .../generated/PlacementPolicyUpdateTests.java | 26 +- .../generated/PrivateCloudIdentityTests.java | 6 +- .../PrivateCloudsDeleteMockTests.java | 2 +- ...udsGetVcfLicenseWithResponseMockTests.java | 36 + .../ProvisionedNetworkInnerTests.java | 2 +- .../ProvisionedNetworkListResultTests.java | 4 +- .../ProvisionedNetworkPropertiesTests.java | 2 +- ...ionedNetworksGetWithResponseMockTests.java | 4 +- .../ProvisionedNetworksListMockTests.java | 4 +- ...toragePoliciesCreateOrUpdateMockTests.java | 14 +- ...oragePoliciesGetWithResponseMockTests.java | 8 +- .../PureStoragePoliciesListMockTests.java | 8 +- .../PureStoragePolicyInnerTests.java | 12 +- .../PureStoragePolicyListResultTests.java | 8 +- .../PureStoragePolicyPropertiesTests.java | 12 +- .../avs/generated/QuotaInnerTests.java | 6 +- .../RescheduleOperationConstraintTests.java | 16 + .../generated/RescheduleOperationTests.java | 17 + .../ResourceSkuCapabilitiesTests.java | 6 +- .../ResourceSkuLocationInfoTests.java | 12 +- .../ResourceSkuRestrictionInfoTests.java | 6 +- .../ResourceSkuZoneDetailsTests.java | 11 +- .../ScheduleOperationConstraintTests.java | 16 + .../avs/generated/ScheduleOperationTests.java | 17 + .../avs/generated/SchedulingWindowTests.java | 17 + .../avs/generated/ScriptCmdletInnerTests.java | 2 +- .../ScriptCmdletPropertiesTests.java | 2 +- ...ScriptCmdletsGetWithResponseMockTests.java | 4 +- .../generated/ScriptCmdletsListMockTests.java | 4 +- .../avs/generated/ScriptCmdletsListTests.java | 4 +- .../generated/ScriptExecutionInnerTests.java | 53 +- .../ScriptExecutionParameterTests.java | 8 +- .../ScriptExecutionPropertiesTests.java | 53 +- ...riptExecutionsCreateOrUpdateMockTests.java | 44 +- .../ScriptExecutionsDeleteMockTests.java | 2 +- ...GetExecutionLogsWithResponseMockTests.java | 22 +- ...iptExecutionsGetWithResponseMockTests.java | 18 +- .../ScriptExecutionsListMockTests.java | 18 +- .../generated/ScriptExecutionsListTests.java | 18 +- .../generated/ScriptPackageInnerTests.java | 2 +- .../ScriptPackagePropertiesTests.java | 2 +- ...criptPackagesGetWithResponseMockTests.java | 4 +- .../ScriptPackagesListMockTests.java | 4 +- .../generated/ScriptPackagesListTests.java | 4 +- .../avs/generated/ScriptParameterTests.java | 4 +- ...ptSecureStringExecutionParameterTests.java | 16 +- .../ScriptStringExecutionParameterTests.java | 12 +- .../avs/generated/TrialInnerTests.java | 2 +- .../avs/generated/VcfLicenseInnerTests.java | 22 + .../generated/VirtualMachineInnerTests.java | 2 +- .../VirtualMachinePropertiesTests.java | 2 +- .../VirtualMachineRestrictMovementTests.java | 8 +- ...rtualMachinesGetWithResponseMockTests.java | 4 +- .../VirtualMachinesListMockTests.java | 4 +- .../generated/VirtualMachinesListTests.java | 4 +- .../VmHostPlacementPolicyPropertiesTests.java | 32 +- .../VmPlacementPolicyPropertiesTests.java | 26 +- .../WorkloadNetworkDhcpEntityTests.java | 12 +- .../WorkloadNetworkDhcpInnerTests.java | 12 +- .../WorkloadNetworkDhcpListTests.java | 8 +- .../WorkloadNetworkDhcpRelayTests.java | 20 +- .../WorkloadNetworkDhcpServerTests.java | 26 +- .../WorkloadNetworkDnsServiceInnerTests.java | 32 +- ...kloadNetworkDnsServicePropertiesTests.java | 39 +- .../WorkloadNetworkDnsServicesListTests.java | 14 +- .../WorkloadNetworkDnsZoneInnerTests.java | 38 +- ...WorkloadNetworkDnsZonePropertiesTests.java | 39 +- .../WorkloadNetworkDnsZonesListTests.java | 16 +- .../WorkloadNetworkGatewayInnerTests.java | 4 +- .../WorkloadNetworkGatewayListTests.java | 6 +- ...WorkloadNetworkGatewayPropertiesTests.java | 9 +- .../generated/WorkloadNetworkInnerTests.java | 2 +- .../generated/WorkloadNetworkListTests.java | 4 +- ...orkloadNetworkPortMirroringInnerTests.java | 32 +- ...WorkloadNetworkPortMirroringListTests.java | 14 +- ...adNetworkPortMirroringPropertiesTests.java | 26 +- .../WorkloadNetworkPropertiesTests.java | 2 +- .../WorkloadNetworkPublicIPsListTests.java | 8 +- .../WorkloadNetworkPublicIpInnerTests.java | 14 +- ...orkloadNetworkPublicIpPropertiesTests.java | 13 +- .../WorkloadNetworkSegmentInnerTests.java | 33 +- .../WorkloadNetworkSegmentPortVifTests.java | 4 +- ...WorkloadNetworkSegmentPropertiesTests.java | 33 +- .../WorkloadNetworkSegmentSubnetTests.java | 21 +- .../WorkloadNetworkSegmentsListTests.java | 14 +- .../WorkloadNetworkVMGroupInnerTests.java | 20 +- ...WorkloadNetworkVMGroupPropertiesTests.java | 20 +- .../WorkloadNetworkVMGroupsListTests.java | 10 +- ...rkloadNetworkVirtualMachineInnerTests.java | 4 +- ...dNetworkVirtualMachinePropertiesTests.java | 5 +- ...rkloadNetworkVirtualMachinesListTests.java | 6 +- .../WorkloadNetworksCreateDhcpMockTests.java | 13 +- ...loadNetworksCreateDnsServiceMockTests.java | 30 +- ...orkloadNetworksCreateDnsZoneMockTests.java | 30 +- ...dNetworksCreatePortMirroringMockTests.java | 26 +- ...rkloadNetworksCreatePublicIpMockTests.java | 14 +- ...rkloadNetworksCreateSegmentsMockTests.java | 26 +- ...orkloadNetworksCreateVMGroupMockTests.java | 18 +- .../WorkloadNetworksDeleteDhcpMockTests.java | 3 +- ...loadNetworksDeleteDnsServiceMockTests.java | 2 +- ...orkloadNetworksDeleteDnsZoneMockTests.java | 2 +- ...dNetworksDeletePortMirroringMockTests.java | 3 +- ...rkloadNetworksDeletePublicIpMockTests.java | 3 +- ...orkloadNetworksDeleteSegmentMockTests.java | 2 +- ...orkloadNetworksDeleteVMGroupMockTests.java | 3 +- ...dNetworksGetDhcpWithResponseMockTests.java | 8 +- ...rksGetDnsServiceWithResponseMockTests.java | 16 +- ...tworksGetDnsZoneWithResponseMockTests.java | 16 +- ...tworksGetGatewayWithResponseMockTests.java | 6 +- ...GetPortMirroringWithResponseMockTests.java | 12 +- ...worksGetPublicIpWithResponseMockTests.java | 8 +- ...tworksGetSegmentWithResponseMockTests.java | 14 +- ...tworksGetVMGroupWithResponseMockTests.java | 10 +- ...etVirtualMachineWithResponseMockTests.java | 6 +- ...kloadNetworksGetWithResponseMockTests.java | 4 +- .../WorkloadNetworksListDhcpMockTests.java | 8 +- ...kloadNetworksListDnsServicesMockTests.java | 16 +- ...WorkloadNetworksListDnsZonesMockTests.java | 18 +- ...WorkloadNetworksListGatewaysMockTests.java | 6 +- .../WorkloadNetworksListMockTests.java | 4 +- ...oadNetworksListPortMirroringMockTests.java | 14 +- ...orkloadNetworksListPublicIPsMockTests.java | 8 +- ...WorkloadNetworksListSegmentsMockTests.java | 16 +- ...WorkloadNetworksListVMGroupsMockTests.java | 10 +- ...dNetworksListVirtualMachinesMockTests.java | 6 +- .../tsp-location.yaml | 2 +- 402 files changed, 12256 insertions(+), 1283 deletions(-) create mode 100644 sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/LicensesClient.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/MaintenancesClient.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/ServiceComponentsClient.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/LicenseInner.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/LicensePropertiesInner.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/MaintenanceInner.java rename sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/{PrivateCloudProperties.java => PrivateCloudPropertiesInner.java} (75%) create mode 100644 sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/VcfLicenseInner.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/LicenseImpl.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/LicensePropertiesImpl.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/LicensesClientImpl.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/LicensesImpl.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/MaintenanceImpl.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/MaintenancesClientImpl.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/MaintenancesImpl.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/PrivateCloudPropertiesImpl.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/ServiceComponentsClientImpl.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/ServiceComponentsImpl.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/VcfLicenseImpl.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/models/LicenseListResult.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/models/MaintenanceListResult.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/AvailableWindowForMaintenanceWhileRescheduleOperation.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/AvailableWindowForMaintenanceWhileScheduleOperation.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/BlockedDatesConstraintCategory.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/BlockedDatesConstraintTimeRange.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/BlockedWhileRescheduleOperation.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/BlockedWhileScheduleOperation.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ImpactedMaintenanceResource.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ImpactedMaintenanceResourceError.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/Label.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/License.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/LicenseKind.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/LicenseName.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/LicenseProperties.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/LicenseProvisioningState.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/Licenses.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/Maintenance.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/MaintenanceCheckType.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/MaintenanceFailedCheck.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/MaintenanceManagementOperation.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/MaintenanceManagementOperationKind.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/MaintenanceProperties.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/MaintenanceProvisioningState.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/MaintenanceReadiness.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/MaintenanceReadinessRefreshOperation.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/MaintenanceReadinessRefreshOperationStatus.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/MaintenanceReadinessStatus.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/MaintenanceReschedule.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/MaintenanceSchedule.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/MaintenanceState.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/MaintenanceStateName.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/MaintenanceStatusFilter.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/MaintenanceType.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/Maintenances.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/PrivateCloudProperties.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/RescheduleOperation.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/RescheduleOperationConstraint.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/RescheduleOperationConstraintKind.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ScheduleOperation.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ScheduleOperationConstraint.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ScheduleOperationConstraintKind.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/SchedulingWindow.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ServiceComponents.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/Vcf5License.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/VcfLicense.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/VcfLicenseKind.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/VmwareFirewallLicenseProperties.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/LicensesCreateOrUpdateSamples.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/LicensesDeleteSamples.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/LicensesGetPropertiesSamples.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/LicensesGetSamples.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/LicensesListSamples.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/MaintenancesGetSamples.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/MaintenancesInitiateChecksSamples.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/MaintenancesListSamples.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/MaintenancesRescheduleSamples.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/MaintenancesScheduleSamples.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/PrivateCloudsGetVcfLicenseSamples.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/ServiceComponentsCheckAvailabilitySamples.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/AvailableWindowForMaintenanceWhileRescheduleOperationTests.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/AvailableWindowForMaintenanceWhileScheduleOperationTests.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/BlockedDatesConstraintTimeRangeTests.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/BlockedWhileRescheduleOperationTests.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/BlockedWhileScheduleOperationTests.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/LicenseInnerTests.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/LicenseListResultTests.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/LicensePropertiesInnerTests.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/LicensesCreateOrUpdateMockTests.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/LicensesGetPropertiesWithResponseMockTests.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/LicensesGetWithResponseMockTests.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/LicensesListMockTests.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/MaintenanceInnerTests.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/MaintenanceListResultTests.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/MaintenanceManagementOperationTests.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/MaintenancePropertiesTests.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/MaintenanceReadinessRefreshOperationTests.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/MaintenanceReadinessTests.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/MaintenanceRescheduleTests.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/MaintenanceScheduleTests.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/MaintenanceStateTests.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/MaintenancesGetWithResponseMockTests.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/MaintenancesInitiateChecksWithResponseMockTests.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/MaintenancesListMockTests.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/MaintenancesRescheduleWithResponseMockTests.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/MaintenancesScheduleWithResponseMockTests.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/PrivateCloudsGetVcfLicenseWithResponseMockTests.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/RescheduleOperationConstraintTests.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/RescheduleOperationTests.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ScheduleOperationConstraintTests.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ScheduleOperationTests.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/SchedulingWindowTests.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/VcfLicenseInnerTests.java diff --git a/eng/versioning/version_client.txt b/eng/versioning/version_client.txt index 29e9b5527f94..85eb6a3a1f0b 100644 --- a/eng/versioning/version_client.txt +++ b/eng/versioning/version_client.txt @@ -336,7 +336,7 @@ com.azure.resourcemanager:azure-resourcemanager-appconfiguration;1.1.0;1.2.0-bet com.azure.resourcemanager:azure-resourcemanager-attestation;1.0.0-beta.3;1.0.0-beta.4 com.azure.resourcemanager:azure-resourcemanager-azurestack;1.0.0;1.1.0-beta.1 com.azure.resourcemanager:azure-resourcemanager-azurestackhci;1.0.0-beta.5;1.0.0-beta.6 -com.azure.resourcemanager:azure-resourcemanager-avs;1.3.0;1.4.0-beta.1 +com.azure.resourcemanager:azure-resourcemanager-avs;1.3.0;1.4.0 com.azure.resourcemanager:azure-resourcemanager-consumption;1.0.0;1.1.0-beta.1 com.azure.resourcemanager:azure-resourcemanager-commerce;1.0.0-beta.2;1.0.0-beta.3 com.azure.resourcemanager:azure-resourcemanager-billing;1.0.0;1.1.0-beta.1 diff --git a/sdk/avs/azure-resourcemanager-avs/CHANGELOG.md b/sdk/avs/azure-resourcemanager-avs/CHANGELOG.md index 6465dbbd20e4..5c2ab3745d37 100644 --- a/sdk/avs/azure-resourcemanager-avs/CHANGELOG.md +++ b/sdk/avs/azure-resourcemanager-avs/CHANGELOG.md @@ -1,14 +1,321 @@ # Release History -## 1.4.0-beta.1 (Unreleased) +## 1.4.0 (2025-10-16) -### Features Added +- Azure Resource Manager Avs client library for Java. This package contains Microsoft Azure SDK for Avs Management SDK. Azure VMware Solution API. Package api-version 2025-09-01. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). ### Breaking Changes -### Bugs Fixed +#### `models.WorkloadNetworkSegmentPortVif` was modified + +* `validate()` was removed + +#### `models.ScriptStringExecutionParameter` was modified + +* `validate()` was removed + +#### `models.PureStoragePolicyProperties` was modified + +* `validate()` was removed + +#### `models.ResourceSkuRestrictionInfo` was modified + +* `validate()` was removed + +#### `models.WorkloadNetworkDhcpRelay` was modified + +* `validate()` was removed + +#### `models.SpecializedHostProperties` was modified + +* `validate()` was removed + +#### `models.ResourceSkuLocationInfo` was modified + +* `validate()` was removed + +#### `models.WorkloadNetworkSegmentSubnet` was modified + +* `validate()` was removed + +#### `models.AvailabilityProperties` was modified + +* `validate()` was removed + +#### `models.DiskPoolVolume` was modified + +* `validate()` was removed + +#### `models.GeneralHostProperties` was modified + +* `validate()` was removed + +#### `models.WorkloadNetworkDhcpEntity` was modified + +* `validate()` was removed + +#### `models.OperationDisplay` was modified + +* `validate()` was removed + +#### `models.AddonArcProperties` was modified + +* `validate()` was removed + +#### `models.VmPlacementPolicyProperties` was modified + +* `validate()` was removed + +#### `models.EncryptionKeyVaultProperties` was modified + +* `validate()` was removed + +#### `models.HostProperties` was modified + +* `validate()` was removed + +#### `models.ClusterZone` was modified + +* `validate()` was removed + +#### `models.AddonVrProperties` was modified + +* `validate()` was removed + +#### `models.ResourceSkuZoneDetails` was modified + +* `validate()` was removed + +#### `models.ScriptParameter` was modified + +* `validate()` was removed + +#### `models.IdentitySource` was modified + +* `validate()` was removed + +#### `models.PlacementPolicyUpdate` was modified + +* `validate()` was removed + +#### `models.AddonProperties` was modified + +* `validate()` was removed + +#### `models.ResourceSkuRestrictions` was modified + +* `validate()` was removed + +#### `models.Encryption` was modified + +* `validate()` was removed + +#### `models.NetAppVolume` was modified + +* `validate()` was removed + +#### `models.ManagementCluster` was modified + +* `validate()` was removed + +#### `models.VmHostPlacementPolicyProperties` was modified + +* `validate()` was removed + +#### `models.PureStorageVolume` was modified + +* `validate()` was removed + +#### `models.PrivateCloudUpdate` was modified + +* `validate()` was removed + +#### `models.ScriptSecureStringExecutionParameter` was modified + +* `validate()` was removed + +#### `models.ResourceSkuCapabilities` was modified + +* `validate()` was removed + +#### `models.AddonHcxProperties` was modified + +* `validate()` was removed + +#### `models.Endpoints` was modified + +* `validate()` was removed + +#### `models.ProvisionedNetworkProperties` was modified + +* `validate()` was removed + +#### `models.ElasticSanVolume` was modified + +* `validate()` was removed + +#### `models.PlacementPolicyProperties` was modified + +* `validate()` was removed + +#### `models.PSCredentialExecutionParameter` was modified + +* `validate()` was removed + +#### `models.PrivateCloudIdentity` was modified + +* `validate()` was removed + +#### `models.ClusterUpdate` was modified + +* `validate()` was removed + +#### `models.VirtualMachineRestrictMovement` was modified + +* `validate()` was removed + +#### `models.Sku` was modified + +* `validate()` was removed + +#### `models.ScriptExecutionParameter` was modified + +* `validate()` was removed + +#### `models.AddonSrmProperties` was modified + +* `validate()` was removed + +#### `models.Circuit` was modified + +* `validate()` was removed + +#### `models.WorkloadNetworkDhcpServer` was modified + +* `validate()` was removed + +### Features Added + +* `models.ImpactedMaintenanceResource` was added + +* `models.License` was added + +* `models.AvailableWindowForMaintenanceWhileScheduleOperation` was added + +* `models.MaintenanceStateName` was added + +* `models.MaintenanceSchedule` was added + +* `models.MaintenanceReadinessStatus` was added + +* `models.License$Update` was added + +* `models.BlockedDatesConstraintCategory` was added + +* `models.MaintenanceState` was added + +* `models.License$UpdateStages` was added + +* `models.SchedulingWindow` was added + +* `models.Licenses` was added + +* `models.MaintenanceType` was added + +* `models.LicenseKind` was added + +* `models.RescheduleOperationConstraint` was added + +* `models.MaintenanceProvisioningState` was added + +* `models.BlockedDatesConstraintTimeRange` was added + +* `models.RescheduleOperationConstraintKind` was added + +* `models.Vcf5License` was added + +* `models.MaintenanceReadinessRefreshOperationStatus` was added + +* `models.Maintenances` was added + +* `models.VmwareFirewallLicenseProperties` was added + +* `models.ScheduleOperationConstraintKind` was added + +* `models.ScheduleOperation` was added + +* `models.RescheduleOperation` was added + +* `models.VcfLicenseKind` was added + +* `models.LicenseName` was added + +* `models.License$DefinitionStages` was added + +* `models.ServiceComponents` was added + +* `models.Maintenance` was added + +* `models.MaintenanceCheckType` was added + +* `models.PrivateCloudProperties` was added + +* `models.MaintenanceReschedule` was added + +* `models.License$Definition` was added + +* `models.MaintenanceManagementOperationKind` was added + +* `models.BlockedWhileScheduleOperation` was added + +* `models.Label` was added + +* `models.MaintenanceManagementOperation` was added + +* `models.ScheduleOperationConstraint` was added + +* `models.VcfLicense` was added + +* `models.AvailableWindowForMaintenanceWhileRescheduleOperation` was added + +* `models.BlockedWhileRescheduleOperation` was added + +* `models.LicenseProperties` was added + +* `models.MaintenanceProperties` was added + +* `models.LicenseProvisioningState` was added + +* `models.MaintenanceReadinessRefreshOperation` was added + +* `models.MaintenanceStatusFilter` was added + +* `models.MaintenanceReadiness` was added + +* `models.MaintenanceFailedCheck` was added + +* `models.ImpactedMaintenanceResourceError` was added + +#### `models.PrivateClouds` was modified + +* `getVcfLicense(java.lang.String,java.lang.String)` was added +* `getVcfLicenseWithResponse(java.lang.String,java.lang.String,com.azure.core.util.Context)` was added + +#### `AvsManager` was modified + +* `serviceComponents()` was added +* `licenses()` was added +* `maintenances()` was added + +#### `models.PrivateCloud$Definition` was modified + +* `withVcfLicense(fluent.models.VcfLicenseInner)` was added + +#### `models.PrivateCloud` was modified -### Other Changes +* `getVcfLicenseWithResponse(com.azure.core.util.Context)` was added +* `getVcfLicense()` was added +* `vcfLicense()` was added ## 1.3.0 (2025-07-08) diff --git a/sdk/avs/azure-resourcemanager-avs/README.md b/sdk/avs/azure-resourcemanager-avs/README.md index 70caabe6fb0e..bc30048fa05a 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 api-version 2024-09-01. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). +This package contains Microsoft Azure SDK for Avs Management SDK. Azure VMware Solution API. Package api-version 2025-09-01. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). ## We'd love to hear your feedback @@ -32,7 +32,7 @@ Various documentation is available to help you get started com.azure.resourcemanager azure-resourcemanager-avs - 1.3.0 + 1.4.0 ``` [//]: # ({x-version-update-end}) diff --git a/sdk/avs/azure-resourcemanager-avs/SAMPLE.md b/sdk/avs/azure-resourcemanager-avs/SAMPLE.md index 35a74f3adff2..f13451c60b89 100644 --- a/sdk/avs/azure-resourcemanager-avs/SAMPLE.md +++ b/sdk/avs/azure-resourcemanager-avs/SAMPLE.md @@ -64,11 +64,27 @@ - [Get](#iscsipaths_get) - [ListByPrivateCloud](#iscsipaths_listbyprivatecloud) +## Licenses + +- [CreateOrUpdate](#licenses_createorupdate) +- [Delete](#licenses_delete) +- [Get](#licenses_get) +- [GetProperties](#licenses_getproperties) +- [List](#licenses_list) + ## Locations - [CheckQuotaAvailability](#locations_checkquotaavailability) - [CheckTrialAvailability](#locations_checktrialavailability) +## Maintenances + +- [Get](#maintenances_get) +- [InitiateChecks](#maintenances_initiatechecks) +- [List](#maintenances_list) +- [Reschedule](#maintenances_reschedule) +- [Schedule](#maintenances_schedule) + ## Operations - [List](#operations_list) @@ -86,6 +102,7 @@ - [CreateOrUpdate](#privateclouds_createorupdate) - [Delete](#privateclouds_delete) - [GetByResourceGroup](#privateclouds_getbyresourcegroup) +- [GetVcfLicense](#privateclouds_getvcflicense) - [List](#privateclouds_list) - [ListAdminCredentials](#privateclouds_listadmincredentials) - [ListByResourceGroup](#privateclouds_listbyresourcegroup) @@ -123,6 +140,10 @@ - [Get](#scriptpackages_get) - [List](#scriptpackages_list) +## ServiceComponents + +- [CheckAvailability](#servicecomponents_checkavailability) + ## Skus - [List](#skus_list) @@ -188,7 +209,7 @@ import com.azure.resourcemanager.avs.models.AddonVrProperties; */ public final class AddonsCreateOrUpdateSamples { /* - * x-ms-original-file: 2024-09-01/Addons_CreateOrUpdate_HCX.json + * x-ms-original-file: 2025-09-01/Addons_CreateOrUpdate_HCX.json */ /** * Sample code: Addons_CreateOrUpdate_HCX. @@ -204,7 +225,7 @@ public final class AddonsCreateOrUpdateSamples { } /* - * x-ms-original-file: 2024-09-01/Addons_CreateOrUpdate_SRM.json + * x-ms-original-file: 2025-09-01/Addons_CreateOrUpdate_SRM.json */ /** * Sample code: Addons_CreateOrUpdate_SRM. @@ -220,7 +241,7 @@ public final class AddonsCreateOrUpdateSamples { } /* - * x-ms-original-file: 2024-09-01/Addons_CreateOrUpdate_HCX_With_Networks.json + * x-ms-original-file: 2025-09-01/Addons_CreateOrUpdate_HCX_With_Networks.json */ /** * Sample code: Addons_CreateOrUpdate_HCX_With_Networks. @@ -238,7 +259,7 @@ public final class AddonsCreateOrUpdateSamples { } /* - * x-ms-original-file: 2024-09-01/Addons_CreateOrUpdate_ArcReg.json + * x-ms-original-file: 2025-09-01/Addons_CreateOrUpdate_ArcReg.json */ /** * Sample code: Addons_CreateOrUpdate_ArcReg. @@ -255,7 +276,7 @@ public final class AddonsCreateOrUpdateSamples { } /* - * x-ms-original-file: 2024-09-01/Addons_CreateOrUpdate_VR.json + * x-ms-original-file: 2025-09-01/Addons_CreateOrUpdate_VR.json */ /** * Sample code: Addons_CreateOrUpdate_VR. @@ -280,7 +301,7 @@ public final class AddonsCreateOrUpdateSamples { */ public final class AddonsDeleteSamples { /* - * x-ms-original-file: 2024-09-01/Addons_Delete.json + * x-ms-original-file: 2025-09-01/Addons_Delete.json */ /** * Sample code: Addons_Delete. @@ -301,7 +322,7 @@ public final class AddonsDeleteSamples { */ public final class AddonsGetSamples { /* - * x-ms-original-file: 2024-09-01/Addons_Get_HCX_With_Networks.json + * x-ms-original-file: 2025-09-01/Addons_Get_HCX_With_Networks.json */ /** * Sample code: Addons_Get_HCX_With_Networks. @@ -313,7 +334,7 @@ public final class AddonsGetSamples { } /* - * x-ms-original-file: 2024-09-01/Addons_Get_SRM.json + * x-ms-original-file: 2025-09-01/Addons_Get_SRM.json */ /** * Sample code: Addons_Get_SRM. @@ -325,7 +346,7 @@ public final class AddonsGetSamples { } /* - * x-ms-original-file: 2024-09-01/Addons_Get_VR.json + * x-ms-original-file: 2025-09-01/Addons_Get_VR.json */ /** * Sample code: Addons_Get_VR. @@ -337,7 +358,7 @@ public final class AddonsGetSamples { } /* - * x-ms-original-file: 2024-09-01/Addons_Get_HCX.json + * x-ms-original-file: 2025-09-01/Addons_Get_HCX.json */ /** * Sample code: Addons_Get_HCX. @@ -349,7 +370,7 @@ public final class AddonsGetSamples { } /* - * x-ms-original-file: 2024-09-01/Addons_Get_ArcReg.json + * x-ms-original-file: 2025-09-01/Addons_Get_ArcReg.json */ /** * Sample code: Addons_Get_ArcReg. @@ -370,7 +391,7 @@ public final class AddonsGetSamples { */ public final class AddonsListSamples { /* - * x-ms-original-file: 2024-09-01/Addons_List.json + * x-ms-original-file: 2025-09-01/Addons_List.json */ /** * Sample code: Addons_List. @@ -391,7 +412,7 @@ public final class AddonsListSamples { */ public final class AuthorizationsCreateOrUpdateSamples { /* - * x-ms-original-file: 2024-09-01/Authorizations_CreateOrUpdate.json + * x-ms-original-file: 2025-09-01/Authorizations_CreateOrUpdate.json */ /** * Sample code: Authorizations_CreateOrUpdate. @@ -412,7 +433,7 @@ public final class AuthorizationsCreateOrUpdateSamples { */ public final class AuthorizationsDeleteSamples { /* - * x-ms-original-file: 2024-09-01/Authorizations_Delete.json + * x-ms-original-file: 2025-09-01/Authorizations_Delete.json */ /** * Sample code: Authorizations_Delete. @@ -433,7 +454,7 @@ public final class AuthorizationsDeleteSamples { */ public final class AuthorizationsGetSamples { /* - * x-ms-original-file: 2024-09-01/Authorizations_Get.json + * x-ms-original-file: 2025-09-01/Authorizations_Get.json */ /** * Sample code: Authorizations_Get. @@ -455,7 +476,7 @@ public final class AuthorizationsGetSamples { */ public final class AuthorizationsListSamples { /* - * x-ms-original-file: 2024-09-01/Authorizations_List.json + * x-ms-original-file: 2025-09-01/Authorizations_List.json */ /** * Sample code: Authorizations_List. @@ -476,7 +497,7 @@ public final class AuthorizationsListSamples { */ public final class CloudLinksCreateOrUpdateSamples { /* - * x-ms-original-file: 2024-09-01/CloudLinks_CreateOrUpdate.json + * x-ms-original-file: 2025-09-01/CloudLinks_CreateOrUpdate.json */ /** * Sample code: CloudLinks_CreateOrUpdate. @@ -502,7 +523,7 @@ public final class CloudLinksCreateOrUpdateSamples { */ public final class CloudLinksDeleteSamples { /* - * x-ms-original-file: 2024-09-01/CloudLinks_Delete.json + * x-ms-original-file: 2025-09-01/CloudLinks_Delete.json */ /** * Sample code: CloudLinks_Delete. @@ -523,7 +544,7 @@ public final class CloudLinksDeleteSamples { */ public final class CloudLinksGetSamples { /* - * x-ms-original-file: 2024-09-01/CloudLinks_Get.json + * x-ms-original-file: 2025-09-01/CloudLinks_Get.json */ /** * Sample code: CloudLinks_Get. @@ -544,7 +565,7 @@ public final class CloudLinksGetSamples { */ public final class CloudLinksListSamples { /* - * x-ms-original-file: 2024-09-01/CloudLinks_List.json + * x-ms-original-file: 2025-09-01/CloudLinks_List.json */ /** * Sample code: CloudLinks_List. @@ -567,7 +588,7 @@ import com.azure.resourcemanager.avs.models.Sku; */ public final class ClustersCreateOrUpdateSamples { /* - * x-ms-original-file: 2024-09-01/Clusters_CreateOrUpdate.json + * x-ms-original-file: 2025-09-01/Clusters_CreateOrUpdate.json */ /** * Sample code: Clusters_CreateOrUpdate. @@ -593,7 +614,7 @@ public final class ClustersCreateOrUpdateSamples { */ public final class ClustersDeleteSamples { /* - * x-ms-original-file: 2024-09-01/Clusters_Delete.json + * x-ms-original-file: 2025-09-01/Clusters_Delete.json */ /** * Sample code: Clusters_Delete. @@ -614,7 +635,7 @@ public final class ClustersDeleteSamples { */ public final class ClustersGetSamples { /* - * x-ms-original-file: 2024-09-01/Clusters_Get.json + * x-ms-original-file: 2025-09-01/Clusters_Get.json */ /** * Sample code: Clusters_Get. @@ -635,7 +656,7 @@ public final class ClustersGetSamples { */ public final class ClustersListSamples { /* - * x-ms-original-file: 2024-09-01/Clusters_List.json + * x-ms-original-file: 2025-09-01/Clusters_List.json */ /** * Sample code: Clusters_List. @@ -656,7 +677,7 @@ public final class ClustersListSamples { */ public final class ClustersListZonesSamples { /* - * x-ms-original-file: 2024-09-01/Clusters_ListZones.json + * x-ms-original-file: 2025-09-01/Clusters_ListZones.json */ /** * Sample code: Clusters_ListZones. @@ -668,7 +689,7 @@ public final class ClustersListZonesSamples { } /* - * x-ms-original-file: 2024-09-01/Clusters_ListZones_Stretched.json + * x-ms-original-file: 2025-09-01/Clusters_ListZones_Stretched.json */ /** * Sample code: Clusters_ListZones_Stretched. @@ -691,7 +712,7 @@ import com.azure.resourcemanager.avs.models.Cluster; */ public final class ClustersUpdateSamples { /* - * x-ms-original-file: 2024-09-01/Clusters_Update.json + * x-ms-original-file: 2025-09-01/Clusters_Update.json */ /** * Sample code: Clusters_Update. @@ -717,7 +738,7 @@ import com.azure.resourcemanager.avs.models.NetAppVolume; */ public final class DatastoresCreateOrUpdateSamples { /* - * x-ms-original-file: 2024-09-01/Datastores_CreateOrUpdate.json + * x-ms-original-file: 2025-09-01/Datastores_CreateOrUpdate.json */ /** * Sample code: Datastores_CreateOrUpdate. @@ -743,7 +764,7 @@ public final class DatastoresCreateOrUpdateSamples { */ public final class DatastoresDeleteSamples { /* - * x-ms-original-file: 2024-09-01/Datastores_Delete.json + * x-ms-original-file: 2025-09-01/Datastores_Delete.json */ /** * Sample code: Datastores_Delete. @@ -764,7 +785,7 @@ public final class DatastoresDeleteSamples { */ public final class DatastoresGetSamples { /* - * x-ms-original-file: 2024-09-01/Datastores_Get.json + * x-ms-original-file: 2025-09-01/Datastores_Get.json */ /** * Sample code: Datastores_Get. @@ -786,7 +807,7 @@ public final class DatastoresGetSamples { */ public final class DatastoresListSamples { /* - * x-ms-original-file: 2024-09-01/Datastores_List.json + * x-ms-original-file: 2025-09-01/Datastores_List.json */ /** * Sample code: Datastores_List. @@ -807,7 +828,7 @@ public final class DatastoresListSamples { */ public final class GlobalReachConnectionsCreateOrUpdateSamples { /* - * x-ms-original-file: 2024-09-01/GlobalReachConnections_CreateOrUpdate.json + * x-ms-original-file: 2025-09-01/GlobalReachConnections_CreateOrUpdate.json */ /** * Sample code: GlobalReachConnections_CreateOrUpdate. @@ -834,7 +855,7 @@ public final class GlobalReachConnectionsCreateOrUpdateSamples { */ public final class GlobalReachConnectionsDeleteSamples { /* - * x-ms-original-file: 2024-09-01/GlobalReachConnections_Delete.json + * x-ms-original-file: 2025-09-01/GlobalReachConnections_Delete.json */ /** * Sample code: GlobalReachConnections_Delete. @@ -855,7 +876,7 @@ public final class GlobalReachConnectionsDeleteSamples { */ public final class GlobalReachConnectionsGetSamples { /* - * x-ms-original-file: 2024-09-01/GlobalReachConnections_Get.json + * x-ms-original-file: 2025-09-01/GlobalReachConnections_Get.json */ /** * Sample code: GlobalReachConnections_Get. @@ -877,7 +898,7 @@ public final class GlobalReachConnectionsGetSamples { */ public final class GlobalReachConnectionsListSamples { /* - * x-ms-original-file: 2024-09-01/GlobalReachConnections_List.json + * x-ms-original-file: 2025-09-01/GlobalReachConnections_List.json */ /** * Sample code: GlobalReachConnections_List. @@ -898,7 +919,7 @@ public final class GlobalReachConnectionsListSamples { */ public final class HcxEnterpriseSitesCreateOrUpdateSamples { /* - * x-ms-original-file: 2024-09-01/HcxEnterpriseSites_CreateOrUpdate.json + * x-ms-original-file: 2025-09-01/HcxEnterpriseSites_CreateOrUpdate.json */ /** * Sample code: HcxEnterpriseSites_CreateOrUpdate. @@ -919,7 +940,7 @@ public final class HcxEnterpriseSitesCreateOrUpdateSamples { */ public final class HcxEnterpriseSitesDeleteSamples { /* - * x-ms-original-file: 2024-09-01/HcxEnterpriseSites_Delete.json + * x-ms-original-file: 2025-09-01/HcxEnterpriseSites_Delete.json */ /** * Sample code: HcxEnterpriseSites_Delete. @@ -940,7 +961,7 @@ public final class HcxEnterpriseSitesDeleteSamples { */ public final class HcxEnterpriseSitesGetSamples { /* - * x-ms-original-file: 2024-09-01/HcxEnterpriseSites_Get.json + * x-ms-original-file: 2025-09-01/HcxEnterpriseSites_Get.json */ /** * Sample code: HcxEnterpriseSites_Get. @@ -961,7 +982,7 @@ public final class HcxEnterpriseSitesGetSamples { */ public final class HcxEnterpriseSitesListSamples { /* - * x-ms-original-file: 2024-09-01/HcxEnterpriseSites_List.json + * x-ms-original-file: 2025-09-01/HcxEnterpriseSites_List.json */ /** * Sample code: HcxEnterpriseSites_List. @@ -982,7 +1003,7 @@ public final class HcxEnterpriseSitesListSamples { */ public final class HostsGetSamples { /* - * x-ms-original-file: 2024-09-01/Hosts_Get.json + * x-ms-original-file: 2025-09-01/Hosts_Get.json */ /** * Sample code: Hosts_Get. @@ -1005,7 +1026,7 @@ public final class HostsGetSamples { */ public final class HostsListSamples { /* - * x-ms-original-file: 2024-09-01/Hosts_List.json + * x-ms-original-file: 2025-09-01/Hosts_List.json */ /** * Sample code: Hosts_List. @@ -1028,7 +1049,7 @@ import com.azure.resourcemanager.avs.fluent.models.IscsiPathInner; */ public final class IscsiPathsCreateOrUpdateSamples { /* - * x-ms-original-file: 2024-09-01/IscsiPaths_CreateOrUpdate.json + * x-ms-original-file: 2025-09-01/IscsiPaths_CreateOrUpdate.json */ /** * Sample code: IscsiPaths_CreateOrUpdate. @@ -1051,7 +1072,7 @@ public final class IscsiPathsCreateOrUpdateSamples { */ public final class IscsiPathsDeleteSamples { /* - * x-ms-original-file: 2024-09-01/IscsiPaths_Delete.json + * x-ms-original-file: 2025-09-01/IscsiPaths_Delete.json */ /** * Sample code: IscsiPaths_Delete. @@ -1072,7 +1093,7 @@ public final class IscsiPathsDeleteSamples { */ public final class IscsiPathsGetSamples { /* - * x-ms-original-file: 2024-09-01/IscsiPaths_Get.json + * x-ms-original-file: 2025-09-01/IscsiPaths_Get.json */ /** * Sample code: IscsiPaths_Get. @@ -1093,7 +1114,7 @@ public final class IscsiPathsGetSamples { */ public final class IscsiPathsListByPrivateCloudSamples { /* - * x-ms-original-file: 2024-09-01/IscsiPaths_List.json + * x-ms-original-file: 2025-09-01/IscsiPaths_List.json */ /** * Sample code: IscsiPaths_ListByPrivateCloud. @@ -1106,6 +1127,122 @@ public final class IscsiPathsListByPrivateCloudSamples { } ``` +### Licenses_CreateOrUpdate + +```java +import com.azure.resourcemanager.avs.models.LicenseName; + +/** + * Samples for Licenses CreateOrUpdate. + */ +public final class LicensesCreateOrUpdateSamples { + /* + * x-ms-original-file: 2025-09-01/Licenses_CreateOrUpdate.json + */ + /** + * Sample code: Licenses_CreateOrUpdate. + * + * @param manager Entry point to AvsManager. + */ + public static void licensesCreateOrUpdate(com.azure.resourcemanager.avs.AvsManager manager) { + manager.licenses().define(LicenseName.VMWARE_FIREWALL).withExistingPrivateCloud("group1", "cloud1").create(); + } +} +``` + +### Licenses_Delete + +```java +import com.azure.resourcemanager.avs.models.LicenseName; + +/** + * Samples for Licenses Delete. + */ +public final class LicensesDeleteSamples { + /* + * x-ms-original-file: 2025-09-01/Licenses_Delete.json + */ + /** + * Sample code: Licenses_Delete. + * + * @param manager Entry point to AvsManager. + */ + public static void licensesDelete(com.azure.resourcemanager.avs.AvsManager manager) { + manager.licenses().delete("group1", "cloud1", LicenseName.VMWARE_FIREWALL, com.azure.core.util.Context.NONE); + } +} +``` + +### Licenses_Get + +```java +import com.azure.resourcemanager.avs.models.LicenseName; + +/** + * Samples for Licenses Get. + */ +public final class LicensesGetSamples { + /* + * x-ms-original-file: 2025-09-01/Licenses_Get.json + */ + /** + * Sample code: Licenses_Get. + * + * @param manager Entry point to AvsManager. + */ + public static void licensesGet(com.azure.resourcemanager.avs.AvsManager manager) { + manager.licenses() + .getWithResponse("group1", "cloud1", LicenseName.VMWARE_FIREWALL, com.azure.core.util.Context.NONE); + } +} +``` + +### Licenses_GetProperties + +```java +import com.azure.resourcemanager.avs.models.LicenseName; + +/** + * Samples for Licenses GetProperties. + */ +public final class LicensesGetPropertiesSamples { + /* + * x-ms-original-file: 2025-09-01/Licenses_GetProperties.json + */ + /** + * Sample code: Licenses_GetProperties. + * + * @param manager Entry point to AvsManager. + */ + public static void licensesGetProperties(com.azure.resourcemanager.avs.AvsManager manager) { + manager.licenses() + .getPropertiesWithResponse("group1", "cloud1", LicenseName.VMWARE_FIREWALL, + com.azure.core.util.Context.NONE); + } +} +``` + +### Licenses_List + +```java +/** + * Samples for Licenses List. + */ +public final class LicensesListSamples { + /* + * x-ms-original-file: 2025-09-01/Licenses_List.json + */ + /** + * Sample code: Licenses_List. + * + * @param manager Entry point to AvsManager. + */ + public static void licensesList(com.azure.resourcemanager.avs.AvsManager manager) { + manager.licenses().list("group1", "cloud1", com.azure.core.util.Context.NONE); + } +} +``` + ### Locations_CheckQuotaAvailability ```java @@ -1114,7 +1251,7 @@ public final class IscsiPathsListByPrivateCloudSamples { */ public final class LocationsCheckQuotaAvailabilitySamples { /* - * x-ms-original-file: 2024-09-01/Locations_CheckQuotaAvailability.json + * x-ms-original-file: 2025-09-01/Locations_CheckQuotaAvailability.json */ /** * Sample code: Locations_CheckQuotaAvailability. @@ -1137,7 +1274,7 @@ import com.azure.resourcemanager.avs.models.Sku; */ public final class LocationsCheckTrialAvailabilitySamples { /* - * x-ms-original-file: 2024-09-01/Locations_CheckTrialAvailability.json + * x-ms-original-file: 2025-09-01/Locations_CheckTrialAvailability.json */ /** * Sample code: Locations_CheckTrialAvailability. @@ -1149,7 +1286,7 @@ public final class LocationsCheckTrialAvailabilitySamples { } /* - * x-ms-original-file: 2024-09-01/Locations_CheckTrialAvailabilityWithSku.json + * x-ms-original-file: 2025-09-01/Locations_CheckTrialAvailabilityWithSku.json */ /** * Sample code: Locations_CheckTrialAvailabilityWithSku. @@ -1164,6 +1301,127 @@ public final class LocationsCheckTrialAvailabilitySamples { } ``` +### Maintenances_Get + +```java +/** + * Samples for Maintenances Get. + */ +public final class MaintenancesGetSamples { + /* + * x-ms-original-file: 2025-09-01/Maintenances_Get.json + */ + /** + * Sample code: Maintenances_Get. + * + * @param manager Entry point to AvsManager. + */ + public static void maintenancesGet(com.azure.resourcemanager.avs.AvsManager manager) { + manager.maintenances().getWithResponse("group1", "cloud1", "maintenance1", com.azure.core.util.Context.NONE); + } +} +``` + +### Maintenances_InitiateChecks + +```java +/** + * Samples for Maintenances InitiateChecks. + */ +public final class MaintenancesInitiateChecksSamples { + /* + * x-ms-original-file: 2025-09-01/Maintenances_InitiateChecks.json + */ + /** + * Sample code: Maintenances_InitiateChecks. + * + * @param manager Entry point to AvsManager. + */ + public static void maintenancesInitiateChecks(com.azure.resourcemanager.avs.AvsManager manager) { + manager.maintenances() + .initiateChecksWithResponse("group1", "cloud1", "maintenance1", com.azure.core.util.Context.NONE); + } +} +``` + +### Maintenances_List + +```java + +/** + * Samples for Maintenances List. + */ +public final class MaintenancesListSamples { + /* + * x-ms-original-file: 2025-09-01/Maintenances_List.json + */ + /** + * Sample code: Maintenances_List. + * + * @param manager Entry point to AvsManager. + */ + public static void maintenancesList(com.azure.resourcemanager.avs.AvsManager manager) { + manager.maintenances().list("group1", "cloud1", null, null, null, null, com.azure.core.util.Context.NONE); + } +} +``` + +### Maintenances_Reschedule + +```java +import com.azure.resourcemanager.avs.models.MaintenanceReschedule; +import java.time.OffsetDateTime; + +/** + * Samples for Maintenances Reschedule. + */ +public final class MaintenancesRescheduleSamples { + /* + * x-ms-original-file: 2025-09-01/Maintenances_Reschedule.json + */ + /** + * Sample code: Maintenances_Reschedule. + * + * @param manager Entry point to AvsManager. + */ + public static void maintenancesReschedule(com.azure.resourcemanager.avs.AvsManager manager) { + manager.maintenances() + .rescheduleWithResponse("group1", "cloud1", "maintenance1", + new MaintenanceReschedule().withRescheduleTime(OffsetDateTime.parse("2023-01-12T16:17:55.237Z")) + .withMessage("Rescheduled due to xyz"), + com.azure.core.util.Context.NONE); + } +} +``` + +### Maintenances_Schedule + +```java +import com.azure.resourcemanager.avs.models.MaintenanceSchedule; +import java.time.OffsetDateTime; + +/** + * Samples for Maintenances Schedule. + */ +public final class MaintenancesScheduleSamples { + /* + * x-ms-original-file: 2025-09-01/Maintenances_Schedule.json + */ + /** + * Sample code: Maintenances_Schedule. + * + * @param manager Entry point to AvsManager. + */ + public static void maintenancesSchedule(com.azure.resourcemanager.avs.AvsManager manager) { + manager.maintenances() + .scheduleWithResponse("group1", "cloud1", "maintenance1", + new MaintenanceSchedule().withScheduleTime(OffsetDateTime.parse("2025-09-12T16:17:55.237Z")) + .withMessage("scheduled due to xyz"), + com.azure.core.util.Context.NONE); + } +} +``` + ### Operations_List ```java @@ -1172,7 +1430,7 @@ public final class LocationsCheckTrialAvailabilitySamples { */ public final class OperationsListSamples { /* - * x-ms-original-file: 2024-09-01/Operations_List.json + * x-ms-original-file: 2025-09-01/Operations_List.json */ /** * Sample code: Operations_List. @@ -1199,7 +1457,7 @@ import java.util.Arrays; */ public final class PlacementPoliciesCreateOrUpdateSamples { /* - * x-ms-original-file: 2024-09-01/PlacementPolicies_CreateOrUpdate.json + * x-ms-original-file: 2025-09-01/PlacementPolicies_CreateOrUpdate.json */ /** * Sample code: PlacementPolicies_CreateOrUpdate. @@ -1231,7 +1489,7 @@ public final class PlacementPoliciesCreateOrUpdateSamples { */ public final class PlacementPoliciesDeleteSamples { /* - * x-ms-original-file: 2024-09-01/PlacementPolicies_Delete.json + * x-ms-original-file: 2025-09-01/PlacementPolicies_Delete.json */ /** * Sample code: PlacementPolicies_Delete. @@ -1252,7 +1510,7 @@ public final class PlacementPoliciesDeleteSamples { */ public final class PlacementPoliciesGetSamples { /* - * x-ms-original-file: 2024-09-01/PlacementPolicies_Get.json + * x-ms-original-file: 2025-09-01/PlacementPolicies_Get.json */ /** * Sample code: PlacementPolicies_Get. @@ -1274,7 +1532,7 @@ public final class PlacementPoliciesGetSamples { */ public final class PlacementPoliciesListSamples { /* - * x-ms-original-file: 2024-09-01/PlacementPolicies_List.json + * x-ms-original-file: 2025-09-01/PlacementPolicies_List.json */ /** * Sample code: PlacementPolicies_List. @@ -1301,7 +1559,7 @@ import java.util.Arrays; */ public final class PlacementPoliciesUpdateSamples { /* - * x-ms-original-file: 2024-09-01/PlacementPolicies_Update.json + * x-ms-original-file: 2025-09-01/PlacementPolicies_Update.json */ /** * Sample code: PlacementPolicies_Update. @@ -1336,6 +1594,8 @@ import com.azure.resourcemanager.avs.models.ManagementCluster; import com.azure.resourcemanager.avs.models.PrivateCloudIdentity; import com.azure.resourcemanager.avs.models.ResourceIdentityType; import com.azure.resourcemanager.avs.models.Sku; +import com.azure.resourcemanager.avs.models.Vcf5License; +import java.time.OffsetDateTime; import java.util.Arrays; import java.util.HashMap; import java.util.Map; @@ -1345,7 +1605,7 @@ import java.util.Map; */ public final class PrivateCloudsCreateOrUpdateSamples { /* - * x-ms-original-file: 2024-09-01/PrivateClouds_CreateOrUpdate.json + * x-ms-original-file: 2025-09-01/PrivateClouds_CreateOrUpdate.json */ /** * Sample code: PrivateClouds_CreateOrUpdate. @@ -1362,11 +1622,16 @@ public final class PrivateCloudsCreateOrUpdateSamples { .withIdentity(new PrivateCloudIdentity().withType(ResourceIdentityType.SYSTEM_ASSIGNED)) .withManagementCluster(new ManagementCluster().withClusterSize(4)) .withNetworkBlock("192.168.48.0/22") + .withVcfLicense(new Vcf5License().withLicenseKey("fakeTokenPlaceholder") + .withCores(16) + .withEndDate(OffsetDateTime.parse("2025-12-31T23:59:59Z")) + .withBroadcomSiteId("123456") + .withBroadcomContractNumber("123456")) .create(); } /* - * x-ms-original-file: 2024-09-01/PrivateClouds_CreateOrUpdate_StretchedZones.json + * x-ms-original-file: 2025-09-01/PrivateClouds_CreateOrUpdate_StretchedZones.json */ /** * Sample code: PrivateClouds_CreateOrUpdate_StretchedZones. @@ -1383,11 +1648,16 @@ public final class PrivateCloudsCreateOrUpdateSamples { .withZones(Arrays.asList("1", "2")) .withManagementCluster(new ManagementCluster().withClusterSize(4)) .withNetworkBlock("192.168.48.0/22") + .withVcfLicense(new Vcf5License().withLicenseKey("fakeTokenPlaceholder") + .withCores(16) + .withEndDate(OffsetDateTime.parse("2025-12-31T23:59:59Z")) + .withBroadcomSiteId("123456") + .withBroadcomContractNumber("123456")) .create(); } /* - * x-ms-original-file: 2024-09-01/PrivateClouds_CreateOrUpdate_FleetNative.json + * x-ms-original-file: 2025-09-01/PrivateClouds_CreateOrUpdate_FleetNative.json */ /** * Sample code: PrivateClouds_CreateOrUpdate_FleetNative. @@ -1406,11 +1676,16 @@ public final class PrivateCloudsCreateOrUpdateSamples { .withVirtualNetworkId( "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.Network/virtualNetworks/vnet") .withDnsZoneType(DnsZoneType.PRIVATE) + .withVcfLicense(new Vcf5License().withLicenseKey("fakeTokenPlaceholder") + .withCores(16) + .withEndDate(OffsetDateTime.parse("2025-12-31T23:59:59Z")) + .withBroadcomSiteId("123456") + .withBroadcomContractNumber("123456")) .create(); } /* - * x-ms-original-file: 2024-09-01/PrivateClouds_CreateOrUpdate_Stretched.json + * x-ms-original-file: 2025-09-01/PrivateClouds_CreateOrUpdate_Stretched.json */ /** * Sample code: PrivateClouds_CreateOrUpdate_Stretched. @@ -1429,6 +1704,11 @@ public final class PrivateCloudsCreateOrUpdateSamples { .withZone(1) .withSecondaryZone(2)) .withNetworkBlock("192.168.48.0/22") + .withVcfLicense(new Vcf5License().withLicenseKey("fakeTokenPlaceholder") + .withCores(16) + .withEndDate(OffsetDateTime.parse("2025-12-31T23:59:59Z")) + .withBroadcomSiteId("123456") + .withBroadcomContractNumber("123456")) .create(); } @@ -1454,7 +1734,7 @@ public final class PrivateCloudsCreateOrUpdateSamples { */ public final class PrivateCloudsDeleteSamples { /* - * x-ms-original-file: 2024-09-01/PrivateClouds_Delete.json + * x-ms-original-file: 2025-09-01/PrivateClouds_Delete.json */ /** * Sample code: PrivateClouds_Delete. @@ -1475,7 +1755,7 @@ public final class PrivateCloudsDeleteSamples { */ public final class PrivateCloudsGetByResourceGroupSamples { /* - * x-ms-original-file: 2024-09-01/PrivateClouds_Get.json + * x-ms-original-file: 2025-09-01/PrivateClouds_Get.json */ /** * Sample code: PrivateClouds_Get. @@ -1487,7 +1767,7 @@ public final class PrivateCloudsGetByResourceGroupSamples { } /* - * x-ms-original-file: 2024-09-01/PrivateClouds_Get_Stretched.json + * x-ms-original-file: 2025-09-01/PrivateClouds_Get_Stretched.json */ /** * Sample code: PrivateClouds_Get_Stretched. @@ -1500,6 +1780,27 @@ public final class PrivateCloudsGetByResourceGroupSamples { } ``` +### PrivateClouds_GetVcfLicense + +```java +/** + * Samples for PrivateClouds GetVcfLicense. + */ +public final class PrivateCloudsGetVcfLicenseSamples { + /* + * x-ms-original-file: 2025-09-01/PrivateClouds_GetVcfLicense.json + */ + /** + * Sample code: PrivateClouds_GetVcfLicense. + * + * @param manager Entry point to AvsManager. + */ + public static void privateCloudsGetVcfLicense(com.azure.resourcemanager.avs.AvsManager manager) { + manager.privateClouds().getVcfLicenseWithResponse("group1", "cloud1", com.azure.core.util.Context.NONE); + } +} +``` + ### PrivateClouds_List ```java @@ -1508,7 +1809,7 @@ public final class PrivateCloudsGetByResourceGroupSamples { */ public final class PrivateCloudsListSamples { /* - * x-ms-original-file: 2024-09-01/PrivateClouds_ListInSubscription.json + * x-ms-original-file: 2025-09-01/PrivateClouds_ListInSubscription.json */ /** * Sample code: PrivateClouds_ListInSubscription. @@ -1520,7 +1821,7 @@ public final class PrivateCloudsListSamples { } /* - * x-ms-original-file: 2024-09-01/PrivateClouds_ListInSubscription_Stretched.json + * x-ms-original-file: 2025-09-01/PrivateClouds_ListInSubscription_Stretched.json */ /** * Sample code: PrivateClouds_ListInSubscription_Stretched. @@ -1541,7 +1842,7 @@ public final class PrivateCloudsListSamples { */ public final class PrivateCloudsListAdminCredentialsSamples { /* - * x-ms-original-file: 2024-09-01/PrivateClouds_ListAdminCredentials.json + * x-ms-original-file: 2025-09-01/PrivateClouds_ListAdminCredentials.json */ /** * Sample code: PrivateClouds_ListAdminCredentials. @@ -1562,7 +1863,7 @@ public final class PrivateCloudsListAdminCredentialsSamples { */ public final class PrivateCloudsListByResourceGroupSamples { /* - * x-ms-original-file: 2024-09-01/PrivateClouds_List.json + * x-ms-original-file: 2025-09-01/PrivateClouds_List.json */ /** * Sample code: PrivateClouds_List. @@ -1574,7 +1875,7 @@ public final class PrivateCloudsListByResourceGroupSamples { } /* - * x-ms-original-file: 2024-09-01/PrivateClouds_List_Stretched.json + * x-ms-original-file: 2025-09-01/PrivateClouds_List_Stretched.json */ /** * Sample code: PrivateClouds_List_Stretched. @@ -1595,7 +1896,7 @@ public final class PrivateCloudsListByResourceGroupSamples { */ public final class PrivateCloudsRotateNsxtPasswordSamples { /* - * x-ms-original-file: 2024-09-01/PrivateClouds_RotateNsxtPassword.json + * x-ms-original-file: 2025-09-01/PrivateClouds_RotateNsxtPassword.json */ /** * Sample code: PrivateClouds_RotateNsxtPassword. @@ -1616,7 +1917,7 @@ public final class PrivateCloudsRotateNsxtPasswordSamples { */ public final class PrivateCloudsRotateVcenterPasswordSamples { /* - * x-ms-original-file: 2024-09-01/PrivateClouds_RotateVcenterPassword.json + * x-ms-original-file: 2025-09-01/PrivateClouds_RotateVcenterPassword.json */ /** * Sample code: PrivateClouds_RotateVcenterPassword. @@ -1645,7 +1946,7 @@ import com.azure.resourcemanager.avs.models.ResourceIdentityType; */ public final class PrivateCloudsUpdateSamples { /* - * x-ms-original-file: 2024-09-01/PrivateClouds_Update.json + * x-ms-original-file: 2025-09-01/PrivateClouds_Update.json */ /** * Sample code: PrivateClouds_Update. @@ -1667,7 +1968,7 @@ public final class PrivateCloudsUpdateSamples { } /* - * x-ms-original-file: 2024-09-01/PrivateClouds_Update_Stretched.json + * x-ms-original-file: 2025-09-01/PrivateClouds_Update_Stretched.json */ /** * Sample code: PrivateClouds_Update_Stretched. @@ -1691,7 +1992,7 @@ public final class PrivateCloudsUpdateSamples { */ public final class ProvisionedNetworksGetSamples { /* - * x-ms-original-file: 2024-09-01/ProvisionedNetworks_Get.json + * x-ms-original-file: 2025-09-01/ProvisionedNetworks_Get.json */ /** * Sample code: ProvisionedNetworks_Get. @@ -1712,7 +2013,7 @@ public final class ProvisionedNetworksGetSamples { */ public final class ProvisionedNetworksListSamples { /* - * x-ms-original-file: 2024-09-01/ProvisionedNetworks_List.json + * x-ms-original-file: 2025-09-01/ProvisionedNetworks_List.json */ /** * Sample code: ProvisionedNetworks_List. @@ -1735,7 +2036,7 @@ import com.azure.resourcemanager.avs.models.PureStoragePolicyProperties; */ public final class PureStoragePoliciesCreateOrUpdateSamples { /* - * x-ms-original-file: 2024-09-01/PureStoragePolicies_CreateOrUpdate.json + * x-ms-original-file: 2025-09-01/PureStoragePolicies_CreateOrUpdate.json */ /** * Sample code: PureStoragePolicies_CreateOrUpdate. @@ -1762,7 +2063,7 @@ public final class PureStoragePoliciesCreateOrUpdateSamples { */ public final class PureStoragePoliciesDeleteSamples { /* - * x-ms-original-file: 2024-09-01/PureStoragePolicies_Delete.json + * x-ms-original-file: 2025-09-01/PureStoragePolicies_Delete.json */ /** * Sample code: PureStoragePolicies_Delete. @@ -1783,7 +2084,7 @@ public final class PureStoragePoliciesDeleteSamples { */ public final class PureStoragePoliciesGetSamples { /* - * x-ms-original-file: 2024-09-01/PureStoragePolicies_Get.json + * x-ms-original-file: 2025-09-01/PureStoragePolicies_Get.json */ /** * Sample code: PureStoragePolicies_Get. @@ -1805,7 +2106,7 @@ public final class PureStoragePoliciesGetSamples { */ public final class PureStoragePoliciesListSamples { /* - * x-ms-original-file: 2024-09-01/PureStoragePolicies_List.json + * x-ms-original-file: 2025-09-01/PureStoragePolicies_List.json */ /** * Sample code: PureStoragePolicies_List. @@ -1826,7 +2127,7 @@ public final class PureStoragePoliciesListSamples { */ public final class ScriptCmdletsGetSamples { /* - * x-ms-original-file: 2024-09-01/ScriptCmdlets_Get.json + * x-ms-original-file: 2025-09-01/ScriptCmdlets_Get.json */ /** * Sample code: ScriptCmdlets_Get. @@ -1849,7 +2150,7 @@ public final class ScriptCmdletsGetSamples { */ public final class ScriptCmdletsListSamples { /* - * x-ms-original-file: 2024-09-01/ScriptCmdlets_List.json + * x-ms-original-file: 2025-09-01/ScriptCmdlets_List.json */ /** * Sample code: ScriptCmdlets_List. @@ -1874,7 +2175,7 @@ import java.util.Arrays; */ public final class ScriptExecutionsCreateOrUpdateSamples { /* - * x-ms-original-file: 2024-09-01/ScriptExecutions_CreateOrUpdate.json + * x-ms-original-file: 2025-09-01/ScriptExecutions_CreateOrUpdate.json */ /** * Sample code: ScriptExecutions_CreateOrUpdate. @@ -1908,7 +2209,7 @@ public final class ScriptExecutionsCreateOrUpdateSamples { */ public final class ScriptExecutionsDeleteSamples { /* - * x-ms-original-file: 2024-09-01/ScriptExecutions_Delete.json + * x-ms-original-file: 2025-09-01/ScriptExecutions_Delete.json */ /** * Sample code: ScriptExecutions_Delete. @@ -1929,7 +2230,7 @@ public final class ScriptExecutionsDeleteSamples { */ public final class ScriptExecutionsGetSamples { /* - * x-ms-original-file: 2024-09-01/ScriptExecutions_Get.json + * x-ms-original-file: 2025-09-01/ScriptExecutions_Get.json */ /** * Sample code: ScriptExecutions_Get. @@ -1954,7 +2255,7 @@ import java.util.Arrays; */ public final class ScriptExecutionsGetExecutionLogsSamples { /* - * x-ms-original-file: 2024-09-01/ScriptExecutions_GetExecutionLogs.json + * x-ms-original-file: 2025-09-01/ScriptExecutions_GetExecutionLogs.json */ /** * Sample code: ScriptExecutions_GetExecutionLogs. @@ -1979,7 +2280,7 @@ public final class ScriptExecutionsGetExecutionLogsSamples { */ public final class ScriptExecutionsListSamples { /* - * x-ms-original-file: 2024-09-01/ScriptExecutions_List.json + * x-ms-original-file: 2025-09-01/ScriptExecutions_List.json */ /** * Sample code: ScriptExecutions_List. @@ -2000,7 +2301,7 @@ public final class ScriptExecutionsListSamples { */ public final class ScriptPackagesGetSamples { /* - * x-ms-original-file: 2024-09-01/ScriptPackages_Get.json + * x-ms-original-file: 2025-09-01/ScriptPackages_Get.json */ /** * Sample code: ScriptPackages_Get. @@ -2022,7 +2323,7 @@ public final class ScriptPackagesGetSamples { */ public final class ScriptPackagesListSamples { /* - * x-ms-original-file: 2024-09-01/ScriptPackages_List.json + * x-ms-original-file: 2025-09-01/ScriptPackages_List.json */ /** * Sample code: ScriptPackages_List. @@ -2035,6 +2336,28 @@ public final class ScriptPackagesListSamples { } ``` +### ServiceComponents_CheckAvailability + +```java +/** + * Samples for ServiceComponents CheckAvailability. + */ +public final class ServiceComponentsCheckAvailabilitySamples { + /* + * x-ms-original-file: 2025-09-01/ServiceComponents_CheckAvailability.json + */ + /** + * Sample code: ServiceComponents_CheckAvailability_SpecificComponent. + * + * @param manager Entry point to AvsManager. + */ + public static void + serviceComponentsCheckAvailabilitySpecificComponent(com.azure.resourcemanager.avs.AvsManager manager) { + manager.serviceComponents().checkAvailability("westus2", "all", com.azure.core.util.Context.NONE); + } +} +``` + ### Skus_List ```java @@ -2043,7 +2366,7 @@ public final class ScriptPackagesListSamples { */ public final class SkusListSamples { /* - * x-ms-original-file: 2024-09-01/Skus_List.json + * x-ms-original-file: 2025-09-01/Skus_List.json */ /** * Sample code: Skus_List. @@ -2064,7 +2387,7 @@ public final class SkusListSamples { */ public final class VirtualMachinesGetSamples { /* - * x-ms-original-file: 2024-09-01/VirtualMachines_Get.json + * x-ms-original-file: 2025-09-01/VirtualMachines_Get.json */ /** * Sample code: VirtualMachines_Get. @@ -2086,7 +2409,7 @@ public final class VirtualMachinesGetSamples { */ public final class VirtualMachinesListSamples { /* - * x-ms-original-file: 2024-09-01/VirtualMachines_List.json + * x-ms-original-file: 2025-09-01/VirtualMachines_List.json */ /** * Sample code: VirtualMachines_List. @@ -2110,7 +2433,7 @@ import com.azure.resourcemanager.avs.models.VirtualMachineRestrictMovementState; */ public final class VirtualMachinesRestrictMovementSamples { /* - * x-ms-original-file: 2024-09-01/VirtualMachines_RestrictMovement.json + * x-ms-original-file: 2025-09-01/VirtualMachines_RestrictMovement.json */ /** * Sample code: VirtualMachines_RestrictMovement. @@ -2136,7 +2459,7 @@ import com.azure.resourcemanager.avs.models.WorkloadNetworkDhcpServer; */ public final class WorkloadNetworksCreateDhcpSamples { /* - * x-ms-original-file: 2024-09-01/WorkloadNetworks_CreateDhcp.json + * x-ms-original-file: 2025-09-01/WorkloadNetworks_CreateDhcp.json */ /** * Sample code: WorkloadNetworks_CreateDhcp. @@ -2167,7 +2490,7 @@ import java.util.Arrays; */ public final class WorkloadNetworksCreateDnsServiceSamples { /* - * x-ms-original-file: 2024-09-01/WorkloadNetworks_CreateDnsService.json + * x-ms-original-file: 2025-09-01/WorkloadNetworks_CreateDnsService.json */ /** * Sample code: WorkloadNetworks_CreateDnsService. @@ -2199,7 +2522,7 @@ import java.util.Arrays; */ public final class WorkloadNetworksCreateDnsZoneSamples { /* - * x-ms-original-file: 2024-09-01/WorkloadNetworks_CreateDnsZone.json + * x-ms-original-file: 2025-09-01/WorkloadNetworks_CreateDnsZone.json */ /** * Sample code: WorkloadNetworks_CreateDnsZone. @@ -2230,7 +2553,7 @@ import com.azure.resourcemanager.avs.models.PortMirroringDirectionEnum; */ public final class WorkloadNetworksCreatePortMirroringSamples { /* - * x-ms-original-file: 2024-09-01/WorkloadNetworks_CreatePortMirroring.json + * x-ms-original-file: 2025-09-01/WorkloadNetworks_CreatePortMirroring.json */ /** * Sample code: WorkloadNetworks_CreatePortMirroring. @@ -2259,7 +2582,7 @@ public final class WorkloadNetworksCreatePortMirroringSamples { */ public final class WorkloadNetworksCreatePublicIpSamples { /* - * x-ms-original-file: 2024-09-01/WorkloadNetworks_CreatePublicIP.json + * x-ms-original-file: 2025-09-01/WorkloadNetworks_CreatePublicIP.json */ /** * Sample code: WorkloadNetworks_CreatePublicIP. @@ -2288,7 +2611,7 @@ import java.util.Arrays; */ public final class WorkloadNetworksCreateSegmentsSamples { /* - * x-ms-original-file: 2024-09-01/WorkloadNetworks_CreateSegments.json + * x-ms-original-file: 2025-09-01/WorkloadNetworks_CreateSegments.json */ /** * Sample code: WorkloadNetworks_CreateSegments. @@ -2319,7 +2642,7 @@ import java.util.Arrays; */ public final class WorkloadNetworksCreateVMGroupSamples { /* - * x-ms-original-file: 2024-09-01/WorkloadNetworks_CreateVMGroup.json + * x-ms-original-file: 2025-09-01/WorkloadNetworks_CreateVMGroup.json */ /** * Sample code: WorkloadNetworks_CreateVMGroup. @@ -2346,7 +2669,7 @@ public final class WorkloadNetworksCreateVMGroupSamples { */ public final class WorkloadNetworksDeleteDhcpSamples { /* - * x-ms-original-file: 2024-09-01/WorkloadNetworks_DeleteDhcp.json + * x-ms-original-file: 2025-09-01/WorkloadNetworks_DeleteDhcp.json */ /** * Sample code: WorkloadNetworks_DeleteDhcp. @@ -2367,7 +2690,7 @@ public final class WorkloadNetworksDeleteDhcpSamples { */ public final class WorkloadNetworksDeleteDnsServiceSamples { /* - * x-ms-original-file: 2024-09-01/WorkloadNetworks_DeleteDnsService.json + * x-ms-original-file: 2025-09-01/WorkloadNetworks_DeleteDnsService.json */ /** * Sample code: WorkloadNetworks_DeleteDnsService. @@ -2389,7 +2712,7 @@ public final class WorkloadNetworksDeleteDnsServiceSamples { */ public final class WorkloadNetworksDeleteDnsZoneSamples { /* - * x-ms-original-file: 2024-09-01/WorkloadNetworks_DeleteDnsZone.json + * x-ms-original-file: 2025-09-01/WorkloadNetworks_DeleteDnsZone.json */ /** * Sample code: WorkloadNetworks_DeleteDnsZone. @@ -2410,7 +2733,7 @@ public final class WorkloadNetworksDeleteDnsZoneSamples { */ public final class WorkloadNetworksDeletePortMirroringSamples { /* - * x-ms-original-file: 2024-09-01/WorkloadNetworks_DeletePortMirroring.json + * x-ms-original-file: 2025-09-01/WorkloadNetworks_DeletePortMirroring.json */ /** * Sample code: WorkloadNetworks_DeletePortMirroring. @@ -2432,7 +2755,7 @@ public final class WorkloadNetworksDeletePortMirroringSamples { */ public final class WorkloadNetworksDeletePublicIpSamples { /* - * x-ms-original-file: 2024-09-01/WorkloadNetworks_DeletePublicIP.json + * x-ms-original-file: 2025-09-01/WorkloadNetworks_DeletePublicIP.json */ /** * Sample code: WorkloadNetworks_DeletePublicIP. @@ -2453,7 +2776,7 @@ public final class WorkloadNetworksDeletePublicIpSamples { */ public final class WorkloadNetworksDeleteSegmentSamples { /* - * x-ms-original-file: 2024-09-01/WorkloadNetworks_DeleteSegment.json + * x-ms-original-file: 2025-09-01/WorkloadNetworks_DeleteSegment.json */ /** * Sample code: WorkloadNetworks_DeleteSegment. @@ -2474,7 +2797,7 @@ public final class WorkloadNetworksDeleteSegmentSamples { */ public final class WorkloadNetworksDeleteVMGroupSamples { /* - * x-ms-original-file: 2024-09-01/WorkloadNetworks_DeleteVMGroup.json + * x-ms-original-file: 2025-09-01/WorkloadNetworks_DeleteVMGroup.json */ /** * Sample code: WorkloadNetworks_DeleteVMGroup. @@ -2495,7 +2818,7 @@ public final class WorkloadNetworksDeleteVMGroupSamples { */ public final class WorkloadNetworksGetSamples { /* - * x-ms-original-file: 2024-09-01/WorkloadNetworks_Get.json + * x-ms-original-file: 2025-09-01/WorkloadNetworks_Get.json */ /** * Sample code: WorkloadNetworks_Get. @@ -2516,7 +2839,7 @@ public final class WorkloadNetworksGetSamples { */ public final class WorkloadNetworksGetDhcpSamples { /* - * x-ms-original-file: 2024-09-01/WorkloadNetworks_GetDhcp.json + * x-ms-original-file: 2025-09-01/WorkloadNetworks_GetDhcp.json */ /** * Sample code: WorkloadNetworks_GetDhcp. @@ -2537,7 +2860,7 @@ public final class WorkloadNetworksGetDhcpSamples { */ public final class WorkloadNetworksGetDnsServiceSamples { /* - * x-ms-original-file: 2024-09-01/WorkloadNetworks_GetDnsService.json + * x-ms-original-file: 2025-09-01/WorkloadNetworks_GetDnsService.json */ /** * Sample code: WorkloadNetworks_GetDnsService. @@ -2559,7 +2882,7 @@ public final class WorkloadNetworksGetDnsServiceSamples { */ public final class WorkloadNetworksGetDnsZoneSamples { /* - * x-ms-original-file: 2024-09-01/WorkloadNetworks_GetDnsZone.json + * x-ms-original-file: 2025-09-01/WorkloadNetworks_GetDnsZone.json */ /** * Sample code: WorkloadNetworks_GetDnsZone. @@ -2581,7 +2904,7 @@ public final class WorkloadNetworksGetDnsZoneSamples { */ public final class WorkloadNetworksGetGatewaySamples { /* - * x-ms-original-file: 2024-09-01/WorkloadNetworks_GetGateway.json + * x-ms-original-file: 2025-09-01/WorkloadNetworks_GetGateway.json */ /** * Sample code: WorkloadNetworks_GetGateway. @@ -2603,7 +2926,7 @@ public final class WorkloadNetworksGetGatewaySamples { */ public final class WorkloadNetworksGetPortMirroringSamples { /* - * x-ms-original-file: 2024-09-01/WorkloadNetworks_GetPortMirroring.json + * x-ms-original-file: 2025-09-01/WorkloadNetworks_GetPortMirroring.json */ /** * Sample code: WorkloadNetworks_GetPortMirroring. @@ -2625,7 +2948,7 @@ public final class WorkloadNetworksGetPortMirroringSamples { */ public final class WorkloadNetworksGetPublicIpSamples { /* - * x-ms-original-file: 2024-09-01/WorkloadNetworks_GetPublicIP.json + * x-ms-original-file: 2025-09-01/WorkloadNetworks_GetPublicIP.json */ /** * Sample code: WorkloadNetworks_GetPublicIP. @@ -2647,7 +2970,7 @@ public final class WorkloadNetworksGetPublicIpSamples { */ public final class WorkloadNetworksGetSegmentSamples { /* - * x-ms-original-file: 2024-09-01/WorkloadNetworks_GetSegment.json + * x-ms-original-file: 2025-09-01/WorkloadNetworks_GetSegment.json */ /** * Sample code: WorkloadNetworks_GetSegment. @@ -2669,7 +2992,7 @@ public final class WorkloadNetworksGetSegmentSamples { */ public final class WorkloadNetworksGetVMGroupSamples { /* - * x-ms-original-file: 2024-09-01/WorkloadNetworks_GetVMGroup.json + * x-ms-original-file: 2025-09-01/WorkloadNetworks_GetVMGroup.json */ /** * Sample code: WorkloadNetworks_GetVMGroup. @@ -2691,7 +3014,7 @@ public final class WorkloadNetworksGetVMGroupSamples { */ public final class WorkloadNetworksGetVirtualMachineSamples { /* - * x-ms-original-file: 2024-09-01/WorkloadNetworks_GetVirtualMachine.json + * x-ms-original-file: 2025-09-01/WorkloadNetworks_GetVirtualMachine.json */ /** * Sample code: WorkloadNetworks_GetVirtualMachine. @@ -2713,7 +3036,7 @@ public final class WorkloadNetworksGetVirtualMachineSamples { */ public final class WorkloadNetworksListSamples { /* - * x-ms-original-file: 2024-09-01/WorkloadNetworks_List.json + * x-ms-original-file: 2025-09-01/WorkloadNetworks_List.json */ /** * Sample code: WorkloadNetworks_List. @@ -2734,7 +3057,7 @@ public final class WorkloadNetworksListSamples { */ public final class WorkloadNetworksListDhcpSamples { /* - * x-ms-original-file: 2024-09-01/WorkloadNetworks_ListDhcp.json + * x-ms-original-file: 2025-09-01/WorkloadNetworks_ListDhcp.json */ /** * Sample code: WorkloadNetworks_ListDhcp. @@ -2755,7 +3078,7 @@ public final class WorkloadNetworksListDhcpSamples { */ public final class WorkloadNetworksListDnsServicesSamples { /* - * x-ms-original-file: 2024-09-01/WorkloadNetworks_ListDnsServices.json + * x-ms-original-file: 2025-09-01/WorkloadNetworks_ListDnsServices.json */ /** * Sample code: WorkloadNetworks_ListDnsServices. @@ -2776,7 +3099,7 @@ public final class WorkloadNetworksListDnsServicesSamples { */ public final class WorkloadNetworksListDnsZonesSamples { /* - * x-ms-original-file: 2024-09-01/WorkloadNetworks_ListDnsZones.json + * x-ms-original-file: 2025-09-01/WorkloadNetworks_ListDnsZones.json */ /** * Sample code: WorkloadNetworks_ListDnsZones. @@ -2797,7 +3120,7 @@ public final class WorkloadNetworksListDnsZonesSamples { */ public final class WorkloadNetworksListGatewaysSamples { /* - * x-ms-original-file: 2024-09-01/WorkloadNetworks_ListGateways.json + * x-ms-original-file: 2025-09-01/WorkloadNetworks_ListGateways.json */ /** * Sample code: WorkloadNetworks_ListGateways. @@ -2818,7 +3141,7 @@ public final class WorkloadNetworksListGatewaysSamples { */ public final class WorkloadNetworksListPortMirroringSamples { /* - * x-ms-original-file: 2024-09-01/WorkloadNetworks_ListPortMirroring.json + * x-ms-original-file: 2025-09-01/WorkloadNetworks_ListPortMirroring.json */ /** * Sample code: WorkloadNetworks_ListPortMirroring. @@ -2839,7 +3162,7 @@ public final class WorkloadNetworksListPortMirroringSamples { */ public final class WorkloadNetworksListPublicIPsSamples { /* - * x-ms-original-file: 2024-09-01/WorkloadNetworks_ListPublicIPs.json + * x-ms-original-file: 2025-09-01/WorkloadNetworks_ListPublicIPs.json */ /** * Sample code: WorkloadNetworks_ListPublicIPs. @@ -2860,7 +3183,7 @@ public final class WorkloadNetworksListPublicIPsSamples { */ public final class WorkloadNetworksListSegmentsSamples { /* - * x-ms-original-file: 2024-09-01/WorkloadNetworks_ListSegments.json + * x-ms-original-file: 2025-09-01/WorkloadNetworks_ListSegments.json */ /** * Sample code: WorkloadNetworks_ListSegments. @@ -2881,7 +3204,7 @@ public final class WorkloadNetworksListSegmentsSamples { */ public final class WorkloadNetworksListVMGroupsSamples { /* - * x-ms-original-file: 2024-09-01/WorkloadNetworks_ListVMGroups.json + * x-ms-original-file: 2025-09-01/WorkloadNetworks_ListVMGroups.json */ /** * Sample code: WorkloadNetworks_ListVMGroups. @@ -2902,7 +3225,7 @@ public final class WorkloadNetworksListVMGroupsSamples { */ public final class WorkloadNetworksListVirtualMachinesSamples { /* - * x-ms-original-file: 2024-09-01/WorkloadNetworks_ListVirtualMachines.json + * x-ms-original-file: 2025-09-01/WorkloadNetworks_ListVirtualMachines.json */ /** * Sample code: WorkloadNetworks_ListVirtualMachines. @@ -2926,7 +3249,7 @@ import com.azure.resourcemanager.avs.models.WorkloadNetworkDhcpServer; */ public final class WorkloadNetworksUpdateDhcpSamples { /* - * x-ms-original-file: 2024-09-01/WorkloadNetworks_UpdateDhcp.json + * x-ms-original-file: 2025-09-01/WorkloadNetworks_UpdateDhcp.json */ /** * Sample code: WorkloadNetworks_UpdateDhcp. @@ -2957,7 +3280,7 @@ import java.util.Arrays; */ public final class WorkloadNetworksUpdateDnsServiceSamples { /* - * x-ms-original-file: 2024-09-01/WorkloadNetworks_UpdateDnsService.json + * x-ms-original-file: 2025-09-01/WorkloadNetworks_UpdateDnsService.json */ /** * Sample code: WorkloadNetworks_UpdateDnsService. @@ -2991,7 +3314,7 @@ import java.util.Arrays; */ public final class WorkloadNetworksUpdateDnsZoneSamples { /* - * x-ms-original-file: 2024-09-01/WorkloadNetworks_UpdateDnsZone.json + * x-ms-original-file: 2025-09-01/WorkloadNetworks_UpdateDnsZone.json */ /** * Sample code: WorkloadNetworks_UpdateDnsZone. @@ -3024,7 +3347,7 @@ import com.azure.resourcemanager.avs.models.WorkloadNetworkPortMirroring; */ public final class WorkloadNetworksUpdatePortMirroringSamples { /* - * x-ms-original-file: 2024-09-01/WorkloadNetworks_UpdatePortMirroring.json + * x-ms-original-file: 2025-09-01/WorkloadNetworks_UpdatePortMirroring.json */ /** * Sample code: WorkloadNetworks_UpdatePortMirroring. @@ -3057,7 +3380,7 @@ import java.util.Arrays; */ public final class WorkloadNetworksUpdateSegmentsSamples { /* - * x-ms-original-file: 2024-09-01/WorkloadNetworks_UpdateSegments.json + * x-ms-original-file: 2025-09-01/WorkloadNetworks_UpdateSegments.json */ /** * Sample code: WorkloadNetworks_UpdateSegments. @@ -3089,7 +3412,7 @@ import java.util.Arrays; */ public final class WorkloadNetworksUpdateVMGroupSamples { /* - * x-ms-original-file: 2024-09-01/WorkloadNetworks_UpdateVMGroup.json + * x-ms-original-file: 2025-09-01/WorkloadNetworks_UpdateVMGroup.json */ /** * Sample code: WorkloadNetworks_UpdateVMGroup. diff --git a/sdk/avs/azure-resourcemanager-avs/pom.xml b/sdk/avs/azure-resourcemanager-avs/pom.xml index 042363739ca8..cb6dd6b28b26 100644 --- a/sdk/avs/azure-resourcemanager-avs/pom.xml +++ b/sdk/avs/azure-resourcemanager-avs/pom.xml @@ -14,11 +14,11 @@ com.azure.resourcemanager azure-resourcemanager-avs - 1.4.0-beta.1 + 1.4.0 jar Microsoft Azure SDK for Avs Management - This package contains Microsoft Azure SDK for Avs Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. Azure VMware Solution API. Package api-version 2024-09-01. + This package contains Microsoft Azure SDK for Avs Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. Azure VMware Solution API. Package api-version 2025-09-01. https://github.com/Azure/azure-sdk-for-java @@ -45,7 +45,6 @@ UTF-8 0 0 - true 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 b54e622b6464..26491d02530d 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 @@ -35,7 +35,9 @@ import com.azure.resourcemanager.avs.implementation.HcxEnterpriseSitesImpl; import com.azure.resourcemanager.avs.implementation.HostsImpl; import com.azure.resourcemanager.avs.implementation.IscsiPathsImpl; +import com.azure.resourcemanager.avs.implementation.LicensesImpl; import com.azure.resourcemanager.avs.implementation.LocationsImpl; +import com.azure.resourcemanager.avs.implementation.MaintenancesImpl; import com.azure.resourcemanager.avs.implementation.OperationsImpl; import com.azure.resourcemanager.avs.implementation.PlacementPoliciesImpl; import com.azure.resourcemanager.avs.implementation.PrivateCloudsImpl; @@ -44,6 +46,7 @@ import com.azure.resourcemanager.avs.implementation.ScriptCmdletsImpl; import com.azure.resourcemanager.avs.implementation.ScriptExecutionsImpl; import com.azure.resourcemanager.avs.implementation.ScriptPackagesImpl; +import com.azure.resourcemanager.avs.implementation.ServiceComponentsImpl; import com.azure.resourcemanager.avs.implementation.SkusImpl; import com.azure.resourcemanager.avs.implementation.VirtualMachinesImpl; import com.azure.resourcemanager.avs.implementation.WorkloadNetworksImpl; @@ -56,7 +59,9 @@ import com.azure.resourcemanager.avs.models.HcxEnterpriseSites; import com.azure.resourcemanager.avs.models.Hosts; import com.azure.resourcemanager.avs.models.IscsiPaths; +import com.azure.resourcemanager.avs.models.Licenses; import com.azure.resourcemanager.avs.models.Locations; +import com.azure.resourcemanager.avs.models.Maintenances; import com.azure.resourcemanager.avs.models.Operations; import com.azure.resourcemanager.avs.models.PlacementPolicies; import com.azure.resourcemanager.avs.models.PrivateClouds; @@ -65,6 +70,7 @@ import com.azure.resourcemanager.avs.models.ScriptCmdlets; import com.azure.resourcemanager.avs.models.ScriptExecutions; import com.azure.resourcemanager.avs.models.ScriptPackages; +import com.azure.resourcemanager.avs.models.ServiceComponents; import com.azure.resourcemanager.avs.models.Skus; import com.azure.resourcemanager.avs.models.VirtualMachines; import com.azure.resourcemanager.avs.models.WorkloadNetworks; @@ -101,8 +107,12 @@ public final class AvsManager { private IscsiPaths iscsiPaths; + private Licenses licenses; + private Locations locations; + private Maintenances maintenances; + private PlacementPolicies placementPolicies; private PrivateClouds privateClouds; @@ -117,6 +127,8 @@ public final class AvsManager { private ScriptPackages scriptPackages; + private ServiceComponents serviceComponents; + private Skus skus; private VirtualMachines virtualMachines; @@ -459,6 +471,18 @@ public IscsiPaths iscsiPaths() { return iscsiPaths; } + /** + * Gets the resource collection API of Licenses. It manages License. + * + * @return Resource collection API of Licenses. + */ + public Licenses licenses() { + if (this.licenses == null) { + this.licenses = new LicensesImpl(clientObject.getLicenses(), this); + } + return licenses; + } + /** * Gets the resource collection API of Locations. * @@ -471,6 +495,18 @@ public Locations locations() { return locations; } + /** + * Gets the resource collection API of Maintenances. + * + * @return Resource collection API of Maintenances. + */ + public Maintenances maintenances() { + if (this.maintenances == null) { + this.maintenances = new MaintenancesImpl(clientObject.getMaintenances(), this); + } + return maintenances; + } + /** * Gets the resource collection API of PlacementPolicies. It manages PlacementPolicy. * @@ -555,6 +591,18 @@ public ScriptPackages scriptPackages() { return scriptPackages; } + /** + * Gets the resource collection API of ServiceComponents. + * + * @return Resource collection API of ServiceComponents. + */ + public ServiceComponents serviceComponents() { + if (this.serviceComponents == null) { + this.serviceComponents = new ServiceComponentsImpl(clientObject.getServiceComponents(), this); + } + return serviceComponents; + } + /** * Gets the resource collection API of Skus. * diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/AvsClient.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/AvsClient.java index 1e2b56a6186b..94574c898a3b 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/AvsClient.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/AvsClient.java @@ -116,6 +116,13 @@ public interface AvsClient { */ IscsiPathsClient getIscsiPaths(); + /** + * Gets the LicensesClient object to access its operations. + * + * @return the LicensesClient object. + */ + LicensesClient getLicenses(); + /** * Gets the LocationsClient object to access its operations. * @@ -123,6 +130,13 @@ public interface AvsClient { */ LocationsClient getLocations(); + /** + * Gets the MaintenancesClient object to access its operations. + * + * @return the MaintenancesClient object. + */ + MaintenancesClient getMaintenances(); + /** * Gets the PlacementPoliciesClient object to access its operations. * @@ -172,6 +186,13 @@ public interface AvsClient { */ ScriptPackagesClient getScriptPackages(); + /** + * Gets the ServiceComponentsClient object to access its operations. + * + * @return the ServiceComponentsClient object. + */ + ServiceComponentsClient getServiceComponents(); + /** * Gets the SkusClient object to access its operations. * diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/LicensesClient.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/LicensesClient.java new file mode 100644 index 000000000000..b935976181bf --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/LicensesClient.java @@ -0,0 +1,232 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.avs.fluent; + +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.management.polling.PollResult; +import com.azure.core.util.Context; +import com.azure.core.util.polling.SyncPoller; +import com.azure.resourcemanager.avs.fluent.models.LicenseInner; +import com.azure.resourcemanager.avs.fluent.models.LicensePropertiesInner; +import com.azure.resourcemanager.avs.models.LicenseName; + +/** + * An instance of this class provides access to all the operations defined in LicensesClient. + */ +public interface LicensesClient { + /** + * List License resources by PrivateCloud. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a License list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, String privateCloudName); + + /** + * List License resources by PrivateCloud. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a License list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, String privateCloudName, Context context); + + /** + * Get a License. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param licenseName Name of the license. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a License along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse(String resourceGroupName, String privateCloudName, LicenseName licenseName, + Context context); + + /** + * Get a License. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param licenseName Name of the license. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a License. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + LicenseInner get(String resourceGroupName, String privateCloudName, LicenseName licenseName); + + /** + * Create a License. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param licenseName Name of the license. + * @param resource Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of a license resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, LicenseInner> beginCreateOrUpdate(String resourceGroupName, + String privateCloudName, LicenseName licenseName, LicenseInner resource); + + /** + * Create a License. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param licenseName Name of the license. + * @param resource Resource create parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of a license resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, LicenseInner> beginCreateOrUpdate(String resourceGroupName, + String privateCloudName, LicenseName licenseName, LicenseInner resource, Context context); + + /** + * Create a License. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param licenseName Name of the license. + * @param resource Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a license resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + LicenseInner createOrUpdate(String resourceGroupName, String privateCloudName, LicenseName licenseName, + LicenseInner resource); + + /** + * Create a License. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param licenseName Name of the license. + * @param resource Resource create parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a license resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + LicenseInner createOrUpdate(String resourceGroupName, String privateCloudName, LicenseName licenseName, + LicenseInner resource, Context context); + + /** + * Delete a License. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param licenseName Name of the license. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDelete(String resourceGroupName, String privateCloudName, + LicenseName licenseName); + + /** + * Delete a License. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param licenseName Name of the license. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDelete(String resourceGroupName, String privateCloudName, + LicenseName licenseName, Context context); + + /** + * Delete a License. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param licenseName Name of the license. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String privateCloudName, LicenseName licenseName); + + /** + * Delete a License. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param licenseName Name of the license. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String privateCloudName, LicenseName licenseName, Context context); + + /** + * Just like ArmResourceActionSync, but with no request body. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param licenseName Name of the license. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the properties of a license along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getPropertiesWithResponse(String resourceGroupName, String privateCloudName, + LicenseName licenseName, Context context); + + /** + * Just like ArmResourceActionSync, but with no request body. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param licenseName Name of the license. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the properties of a license. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + LicensePropertiesInner getProperties(String resourceGroupName, String privateCloudName, LicenseName licenseName); +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/MaintenancesClient.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/MaintenancesClient.java new file mode 100644 index 000000000000..b50d464b59ba --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/MaintenancesClient.java @@ -0,0 +1,181 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.avs.fluent; + +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; +import com.azure.resourcemanager.avs.fluent.models.MaintenanceInner; +import com.azure.resourcemanager.avs.models.MaintenanceReschedule; +import com.azure.resourcemanager.avs.models.MaintenanceSchedule; +import com.azure.resourcemanager.avs.models.MaintenanceStateName; +import com.azure.resourcemanager.avs.models.MaintenanceStatusFilter; +import java.time.OffsetDateTime; + +/** + * An instance of this class provides access to all the operations defined in MaintenancesClient. + */ +public interface MaintenancesClient { + /** + * List Maintenance resources by subscription ID. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a Maintenance list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, String privateCloudName); + + /** + * List Maintenance resources by subscription ID. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param stateName Filter maintenances based on state. + * @param status Filter active or inactive maintenances. + * @param from date from which result should be returned. ie. scheduledStartTime >= from. + * @param to date till which result should be returned. i.e. scheduledStartTime <= to. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a Maintenance list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, String privateCloudName, + MaintenanceStateName stateName, MaintenanceStatusFilter status, OffsetDateTime from, OffsetDateTime to, + Context context); + + /** + * Get a Maintenance. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param maintenanceName Name of the maintenance. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a Maintenance along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse(String resourceGroupName, String privateCloudName, + String maintenanceName, Context context); + + /** + * Get a Maintenance. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param maintenanceName Name of the maintenance. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a Maintenance. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + MaintenanceInner get(String resourceGroupName, String privateCloudName, String maintenanceName); + + /** + * Reschedule a maintenance. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param maintenanceName Name of the maintenance. + * @param body The content of the action request. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a cluster resource along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response rescheduleWithResponse(String resourceGroupName, String privateCloudName, + String maintenanceName, MaintenanceReschedule body, Context context); + + /** + * Reschedule a maintenance. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param maintenanceName Name of the maintenance. + * @param body The content of the action request. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a cluster resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + MaintenanceInner reschedule(String resourceGroupName, String privateCloudName, String maintenanceName, + MaintenanceReschedule body); + + /** + * Schedule a maintenance. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param maintenanceName Name of the maintenance. + * @param body The content of the action request. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a cluster resource along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response scheduleWithResponse(String resourceGroupName, String privateCloudName, + String maintenanceName, MaintenanceSchedule body, Context context); + + /** + * Schedule a maintenance. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param maintenanceName Name of the maintenance. + * @param body The content of the action request. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a cluster resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + MaintenanceInner schedule(String resourceGroupName, String privateCloudName, String maintenanceName, + MaintenanceSchedule body); + + /** + * Initiate maintenance readiness checks. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param maintenanceName Name of the maintenance. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a cluster resource along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response initiateChecksWithResponse(String resourceGroupName, String privateCloudName, + String maintenanceName, Context context); + + /** + * Initiate maintenance readiness checks. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param maintenanceName Name of the maintenance. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a cluster resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + MaintenanceInner initiateChecks(String resourceGroupName, String privateCloudName, String maintenanceName); +} 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 dfcb28233ee6..675f2e7cf5f5 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/PrivateCloudsClient.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/PrivateCloudsClient.java @@ -13,6 +13,7 @@ import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.avs.fluent.models.AdminCredentialsInner; import com.azure.resourcemanager.avs.fluent.models.PrivateCloudInner; +import com.azure.resourcemanager.avs.fluent.models.VcfLicenseInner; import com.azure.resourcemanager.avs.models.PrivateCloudUpdate; /** @@ -401,4 +402,32 @@ Response listAdminCredentialsWithResponse(String resource */ @ServiceMethod(returns = ReturnType.SINGLE) AdminCredentialsInner listAdminCredentials(String resourceGroupName, String privateCloudName); + + /** + * Get the license for the private cloud. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the license for the private cloud along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getVcfLicenseWithResponse(String resourceGroupName, String privateCloudName, + Context context); + + /** + * Get the license for the private cloud. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the license for the private cloud. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + VcfLicenseInner getVcfLicense(String resourceGroupName, String privateCloudName); } diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/ServiceComponentsClient.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/ServiceComponentsClient.java new file mode 100644 index 000000000000..1ec29c00a19a --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/ServiceComponentsClient.java @@ -0,0 +1,69 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.avs.fluent; + +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.management.polling.PollResult; +import com.azure.core.util.Context; +import com.azure.core.util.polling.SyncPoller; + +/** + * An instance of this class provides access to all the operations defined in ServiceComponentsClient. + */ +public interface ServiceComponentsClient { + /** + * Return service component availability. + * + * @param location A location in a subscription. + * @param serviceComponentName A service component. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginCheckAvailability(String location, String serviceComponentName); + + /** + * Return service component availability. + * + * @param location A location in a subscription. + * @param serviceComponentName A service component. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginCheckAvailability(String location, String serviceComponentName, + Context context); + + /** + * Return service component availability. + * + * @param location A location in a subscription. + * @param serviceComponentName A service component. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void checkAvailability(String location, String serviceComponentName); + + /** + * Return service component availability. + * + * @param location A location in a subscription. + * @param serviceComponentName A service component. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void checkAvailability(String location, String serviceComponentName, Context context); +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/LicenseInner.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/LicenseInner.java new file mode 100644 index 000000000000..b1af17522752 --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/LicenseInner.java @@ -0,0 +1,154 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.avs.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.management.ProxyResource; +import com.azure.core.management.SystemData; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * A license resource. + */ +@Fluent +public final class LicenseInner extends ProxyResource { + /* + * The resource-specific properties for this resource. + */ + private LicensePropertiesInner properties; + + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + private SystemData systemData; + + /* + * The type of the resource. + */ + private String type; + + /* + * The name of the resource. + */ + private String name; + + /* + * Fully qualified resource Id for the resource. + */ + private String id; + + /** + * Creates an instance of LicenseInner class. + */ + public LicenseInner() { + } + + /** + * Get the properties property: The resource-specific properties for this resource. + * + * @return the properties value. + */ + public LicensePropertiesInner properties() { + return this.properties; + } + + /** + * Set the properties property: The resource-specific properties for this resource. + * + * @param properties the properties value to set. + * @return the LicenseInner object itself. + */ + public LicenseInner withProperties(LicensePropertiesInner properties) { + this.properties = properties; + return this; + } + + /** + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + + /** + * Get the type property: The type of the resource. + * + * @return the type value. + */ + @Override + public String type() { + return this.type; + } + + /** + * Get the name property: The name of the resource. + * + * @return the name value. + */ + @Override + public String name() { + return this.name; + } + + /** + * Get the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + @Override + public String id() { + return this.id; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("properties", this.properties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of LicenseInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of LicenseInner if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the LicenseInner. + */ + public static LicenseInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + LicenseInner deserializedLicenseInner = new LicenseInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedLicenseInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedLicenseInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedLicenseInner.type = reader.getString(); + } else if ("properties".equals(fieldName)) { + deserializedLicenseInner.properties = LicensePropertiesInner.fromJson(reader); + } else if ("systemData".equals(fieldName)) { + deserializedLicenseInner.systemData = SystemData.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedLicenseInner; + }); + } +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/LicensePropertiesInner.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/LicensePropertiesInner.java new file mode 100644 index 000000000000..986755ded492 --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/LicensePropertiesInner.java @@ -0,0 +1,130 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.avs.fluent.models; + +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.avs.models.LicenseKind; +import com.azure.resourcemanager.avs.models.LicenseProvisioningState; +import com.azure.resourcemanager.avs.models.VmwareFirewallLicenseProperties; +import java.io.IOException; + +/** + * The properties of a license. + */ +@Immutable +public class LicensePropertiesInner implements JsonSerializable { + /* + * License kind + */ + private LicenseKind kind = LicenseKind.fromString("LicenseProperties"); + + /* + * The state of the license provisioning + */ + private LicenseProvisioningState provisioningState; + + /** + * Creates an instance of LicensePropertiesInner class. + */ + public LicensePropertiesInner() { + } + + /** + * Get the kind property: License kind. + * + * @return the kind value. + */ + public LicenseKind kind() { + return this.kind; + } + + /** + * Get the provisioningState property: The state of the license provisioning. + * + * @return the provisioningState value. + */ + public LicenseProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Set the provisioningState property: The state of the license provisioning. + * + * @param provisioningState the provisioningState value to set. + * @return the LicensePropertiesInner object itself. + */ + LicensePropertiesInner withProvisioningState(LicenseProvisioningState provisioningState) { + this.provisioningState = provisioningState; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("kind", this.kind == null ? null : this.kind.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of LicensePropertiesInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of LicensePropertiesInner if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IOException If an error occurs while reading the LicensePropertiesInner. + */ + public static LicensePropertiesInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + String discriminatorValue = null; + try (JsonReader readerToUse = reader.bufferObject()) { + readerToUse.nextToken(); // Prepare for reading + while (readerToUse.nextToken() != JsonToken.END_OBJECT) { + String fieldName = readerToUse.getFieldName(); + readerToUse.nextToken(); + if ("kind".equals(fieldName)) { + discriminatorValue = readerToUse.getString(); + break; + } else { + readerToUse.skipChildren(); + } + } + // Use the discriminator value to determine which subtype should be deserialized. + if ("VmwareFirewall".equals(discriminatorValue)) { + return VmwareFirewallLicenseProperties.fromJson(readerToUse.reset()); + } else { + return fromJsonKnownDiscriminator(readerToUse.reset()); + } + } + }); + } + + static LicensePropertiesInner fromJsonKnownDiscriminator(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + LicensePropertiesInner deserializedLicensePropertiesInner = new LicensePropertiesInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("kind".equals(fieldName)) { + deserializedLicensePropertiesInner.kind = LicenseKind.fromString(reader.getString()); + } else if ("provisioningState".equals(fieldName)) { + deserializedLicensePropertiesInner.provisioningState + = LicenseProvisioningState.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedLicensePropertiesInner; + }); + } +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/MaintenanceInner.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/MaintenanceInner.java new file mode 100644 index 000000000000..bb396c9d5e7b --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/MaintenanceInner.java @@ -0,0 +1,144 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.avs.fluent.models; + +import com.azure.core.annotation.Immutable; +import com.azure.core.management.ProxyResource; +import com.azure.core.management.SystemData; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.avs.models.MaintenanceProperties; +import java.io.IOException; + +/** + * A cluster resource. + */ +@Immutable +public final class MaintenanceInner extends ProxyResource { + /* + * The resource-specific properties for this resource. + */ + private MaintenanceProperties properties; + + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + private SystemData systemData; + + /* + * The type of the resource. + */ + private String type; + + /* + * The name of the resource. + */ + private String name; + + /* + * Fully qualified resource Id for the resource. + */ + private String id; + + /** + * Creates an instance of MaintenanceInner class. + */ + private MaintenanceInner() { + } + + /** + * Get the properties property: The resource-specific properties for this resource. + * + * @return the properties value. + */ + public MaintenanceProperties properties() { + return this.properties; + } + + /** + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + + /** + * Get the type property: The type of the resource. + * + * @return the type value. + */ + @Override + public String type() { + return this.type; + } + + /** + * Get the name property: The name of the resource. + * + * @return the name value. + */ + @Override + public String name() { + return this.name; + } + + /** + * Get the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + @Override + public String id() { + return this.id; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("properties", this.properties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of MaintenanceInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of MaintenanceInner if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the MaintenanceInner. + */ + public static MaintenanceInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + MaintenanceInner deserializedMaintenanceInner = new MaintenanceInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedMaintenanceInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedMaintenanceInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedMaintenanceInner.type = reader.getString(); + } else if ("properties".equals(fieldName)) { + deserializedMaintenanceInner.properties = MaintenanceProperties.fromJson(reader); + } else if ("systemData".equals(fieldName)) { + deserializedMaintenanceInner.systemData = SystemData.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedMaintenanceInner; + }); + } +} 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 4811027999d4..c81292ab4c89 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 @@ -34,7 +34,7 @@ public final class PrivateCloudInner extends Resource { /* * The resource-specific properties for this resource. */ - private PrivateCloudProperties innerProperties; + private PrivateCloudPropertiesInner innerProperties; /* * The SKU (Stock Keeping Unit) assigned to this resource. @@ -82,7 +82,7 @@ public PrivateCloudInner() { * * @return the innerProperties value. */ - private PrivateCloudProperties innerProperties() { + private PrivateCloudPropertiesInner innerProperties() { return this.innerProperties; } @@ -220,7 +220,7 @@ public ManagementCluster managementCluster() { */ public PrivateCloudInner withManagementCluster(ManagementCluster managementCluster) { if (this.innerProperties() == null) { - this.innerProperties = new PrivateCloudProperties(); + this.innerProperties = new PrivateCloudPropertiesInner(); } this.innerProperties().withManagementCluster(managementCluster); return this; @@ -243,7 +243,7 @@ public InternetEnum internet() { */ public PrivateCloudInner withInternet(InternetEnum internet) { if (this.innerProperties() == null) { - this.innerProperties = new PrivateCloudProperties(); + this.innerProperties = new PrivateCloudPropertiesInner(); } this.innerProperties().withInternet(internet); return this; @@ -266,7 +266,7 @@ public List identitySources() { */ public PrivateCloudInner withIdentitySources(List identitySources) { if (this.innerProperties() == null) { - this.innerProperties = new PrivateCloudProperties(); + this.innerProperties = new PrivateCloudPropertiesInner(); } this.innerProperties().withIdentitySources(identitySources); return this; @@ -289,7 +289,7 @@ public AvailabilityProperties availability() { */ public PrivateCloudInner withAvailability(AvailabilityProperties availability) { if (this.innerProperties() == null) { - this.innerProperties = new PrivateCloudProperties(); + this.innerProperties = new PrivateCloudPropertiesInner(); } this.innerProperties().withAvailability(availability); return this; @@ -312,7 +312,7 @@ public Encryption encryption() { */ public PrivateCloudInner withEncryption(Encryption encryption) { if (this.innerProperties() == null) { - this.innerProperties = new PrivateCloudProperties(); + this.innerProperties = new PrivateCloudPropertiesInner(); } this.innerProperties().withEncryption(encryption); return this; @@ -343,7 +343,7 @@ public List extendedNetworkBlocks() { */ public PrivateCloudInner withExtendedNetworkBlocks(List extendedNetworkBlocks) { if (this.innerProperties() == null) { - this.innerProperties = new PrivateCloudProperties(); + this.innerProperties = new PrivateCloudPropertiesInner(); } this.innerProperties().withExtendedNetworkBlocks(extendedNetworkBlocks); return this; @@ -375,7 +375,7 @@ public Circuit circuit() { */ public PrivateCloudInner withCircuit(Circuit circuit) { if (this.innerProperties() == null) { - this.innerProperties = new PrivateCloudProperties(); + this.innerProperties = new PrivateCloudPropertiesInner(); } this.innerProperties().withCircuit(circuit); return this; @@ -411,7 +411,7 @@ public String networkBlock() { */ public PrivateCloudInner withNetworkBlock(String networkBlock) { if (this.innerProperties() == null) { - this.innerProperties = new PrivateCloudProperties(); + this.innerProperties = new PrivateCloudPropertiesInner(); } this.innerProperties().withNetworkBlock(networkBlock); return this; @@ -461,7 +461,7 @@ public String vcenterPassword() { */ public PrivateCloudInner withVcenterPassword(String vcenterPassword) { if (this.innerProperties() == null) { - this.innerProperties = new PrivateCloudProperties(); + this.innerProperties = new PrivateCloudPropertiesInner(); } this.innerProperties().withVcenterPassword(vcenterPassword); return this; @@ -484,7 +484,7 @@ public String nsxtPassword() { */ public PrivateCloudInner withNsxtPassword(String nsxtPassword) { if (this.innerProperties() == null) { - this.innerProperties = new PrivateCloudProperties(); + this.innerProperties = new PrivateCloudPropertiesInner(); } this.innerProperties().withNsxtPassword(nsxtPassword); return this; @@ -536,7 +536,7 @@ public Circuit secondaryCircuit() { */ public PrivateCloudInner withSecondaryCircuit(Circuit secondaryCircuit) { if (this.innerProperties() == null) { - this.innerProperties = new PrivateCloudProperties(); + this.innerProperties = new PrivateCloudPropertiesInner(); } this.innerProperties().withSecondaryCircuit(secondaryCircuit); return this; @@ -570,7 +570,7 @@ public String virtualNetworkId() { */ public PrivateCloudInner withVirtualNetworkId(String virtualNetworkId) { if (this.innerProperties() == null) { - this.innerProperties = new PrivateCloudProperties(); + this.innerProperties = new PrivateCloudPropertiesInner(); } this.innerProperties().withVirtualNetworkId(virtualNetworkId); return this; @@ -593,12 +593,35 @@ public DnsZoneType dnsZoneType() { */ public PrivateCloudInner withDnsZoneType(DnsZoneType dnsZoneType) { if (this.innerProperties() == null) { - this.innerProperties = new PrivateCloudProperties(); + this.innerProperties = new PrivateCloudPropertiesInner(); } this.innerProperties().withDnsZoneType(dnsZoneType); return this; } + /** + * Get the vcfLicense property: The private cloud license. + * + * @return the vcfLicense value. + */ + public VcfLicenseInner vcfLicense() { + return this.innerProperties() == null ? null : this.innerProperties().vcfLicense(); + } + + /** + * Set the vcfLicense property: The private cloud license. + * + * @param vcfLicense the vcfLicense value to set. + * @return the PrivateCloudInner object itself. + */ + public PrivateCloudInner withVcfLicense(VcfLicenseInner vcfLicense) { + if (this.innerProperties() == null) { + this.innerProperties = new PrivateCloudPropertiesInner(); + } + this.innerProperties().withVcfLicense(vcfLicense); + return this; + } + /** * {@inheritDoc} */ @@ -644,7 +667,7 @@ public static PrivateCloudInner fromJson(JsonReader jsonReader) throws IOExcepti } else if ("sku".equals(fieldName)) { deserializedPrivateCloudInner.sku = Sku.fromJson(reader); } else if ("properties".equals(fieldName)) { - deserializedPrivateCloudInner.innerProperties = PrivateCloudProperties.fromJson(reader); + deserializedPrivateCloudInner.innerProperties = PrivateCloudPropertiesInner.fromJson(reader); } else if ("identity".equals(fieldName)) { deserializedPrivateCloudInner.identity = PrivateCloudIdentity.fromJson(reader); } else if ("zones".equals(fieldName)) { 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/PrivateCloudPropertiesInner.java similarity index 75% rename from sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/PrivateCloudProperties.java rename to sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/PrivateCloudPropertiesInner.java index c640750b6654..ef06fd0b15c0 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/PrivateCloudPropertiesInner.java @@ -26,7 +26,7 @@ * The properties of a private cloud resource. */ @Fluent -public final class PrivateCloudProperties implements JsonSerializable { +public final class PrivateCloudPropertiesInner implements JsonSerializable { /* * The default cluster used for management */ @@ -144,10 +144,15 @@ public final class PrivateCloudProperties implements JsonSerializable identitySources() { * Set the identitySources property: vCenter Single Sign On Identity Sources. * * @param identitySources the identitySources value to set. - * @return the PrivateCloudProperties object itself. + * @return the PrivateCloudPropertiesInner object itself. */ - public PrivateCloudProperties withIdentitySources(List identitySources) { + public PrivateCloudPropertiesInner withIdentitySources(List identitySources) { this.identitySources = identitySources; return this; } @@ -223,9 +228,9 @@ public AvailabilityProperties availability() { * Set the availability property: Properties describing how the cloud is distributed across availability zones. * * @param availability the availability value to set. - * @return the PrivateCloudProperties object itself. + * @return the PrivateCloudPropertiesInner object itself. */ - public PrivateCloudProperties withAvailability(AvailabilityProperties availability) { + public PrivateCloudPropertiesInner withAvailability(AvailabilityProperties availability) { this.availability = availability; return this; } @@ -243,9 +248,9 @@ public Encryption encryption() { * Set the encryption property: Customer managed key encryption, can be enabled or disabled. * * @param encryption the encryption value to set. - * @return the PrivateCloudProperties object itself. + * @return the PrivateCloudPropertiesInner object itself. */ - public PrivateCloudProperties withEncryption(Encryption encryption) { + public PrivateCloudPropertiesInner withEncryption(Encryption encryption) { this.encryption = encryption; return this; } @@ -271,9 +276,9 @@ public List extendedNetworkBlocks() { * (A.B.C.D/X). * * @param extendedNetworkBlocks the extendedNetworkBlocks value to set. - * @return the PrivateCloudProperties object itself. + * @return the PrivateCloudPropertiesInner object itself. */ - public PrivateCloudProperties withExtendedNetworkBlocks(List extendedNetworkBlocks) { + public PrivateCloudPropertiesInner withExtendedNetworkBlocks(List extendedNetworkBlocks) { this.extendedNetworkBlocks = extendedNetworkBlocks; return this; } @@ -300,9 +305,9 @@ public Circuit circuit() { * Set the circuit property: An ExpressRoute Circuit. * * @param circuit the circuit value to set. - * @return the PrivateCloudProperties object itself. + * @return the PrivateCloudPropertiesInner object itself. */ - public PrivateCloudProperties withCircuit(Circuit circuit) { + public PrivateCloudPropertiesInner withCircuit(Circuit circuit) { this.circuit = circuit; return this; } @@ -333,9 +338,9 @@ public String networkBlock() { * A,B,C,D are between 0 and 255, and X is between 0 and 22. * * @param networkBlock the networkBlock value to set. - * @return the PrivateCloudProperties object itself. + * @return the PrivateCloudPropertiesInner object itself. */ - public PrivateCloudProperties withNetworkBlock(String networkBlock) { + public PrivateCloudPropertiesInner withNetworkBlock(String networkBlock) { this.networkBlock = networkBlock; return this; } @@ -380,9 +385,9 @@ public String vcenterPassword() { * Set the vcenterPassword property: Optionally, set the vCenter admin password when the private cloud is created. * * @param vcenterPassword the vcenterPassword value to set. - * @return the PrivateCloudProperties object itself. + * @return the PrivateCloudPropertiesInner object itself. */ - public PrivateCloudProperties withVcenterPassword(String vcenterPassword) { + public PrivateCloudPropertiesInner withVcenterPassword(String vcenterPassword) { this.vcenterPassword = vcenterPassword; return this; } @@ -400,9 +405,9 @@ public String nsxtPassword() { * Set the nsxtPassword property: Optionally, set the NSX-T Manager password when the private cloud is created. * * @param nsxtPassword the nsxtPassword value to set. - * @return the PrivateCloudProperties object itself. + * @return the PrivateCloudPropertiesInner object itself. */ - public PrivateCloudProperties withNsxtPassword(String nsxtPassword) { + public PrivateCloudPropertiesInner withNsxtPassword(String nsxtPassword) { this.nsxtPassword = nsxtPassword; return this; } @@ -449,9 +454,9 @@ public Circuit secondaryCircuit() { * stretched private cloud. * * @param secondaryCircuit the secondaryCircuit value to set. - * @return the PrivateCloudProperties object itself. + * @return the PrivateCloudPropertiesInner object itself. */ - public PrivateCloudProperties withSecondaryCircuit(Circuit secondaryCircuit) { + public PrivateCloudPropertiesInner withSecondaryCircuit(Circuit secondaryCircuit) { this.secondaryCircuit = secondaryCircuit; return this; } @@ -480,9 +485,9 @@ public String virtualNetworkId() { * Set the virtualNetworkId property: Azure resource ID of the virtual network. * * @param virtualNetworkId the virtualNetworkId value to set. - * @return the PrivateCloudProperties object itself. + * @return the PrivateCloudPropertiesInner object itself. */ - public PrivateCloudProperties withVirtualNetworkId(String virtualNetworkId) { + public PrivateCloudPropertiesInner withVirtualNetworkId(String virtualNetworkId) { this.virtualNetworkId = virtualNetworkId; return this; } @@ -500,13 +505,33 @@ public DnsZoneType dnsZoneType() { * Set the dnsZoneType property: The type of DNS zone to use. * * @param dnsZoneType the dnsZoneType value to set. - * @return the PrivateCloudProperties object itself. + * @return the PrivateCloudPropertiesInner object itself. */ - public PrivateCloudProperties withDnsZoneType(DnsZoneType dnsZoneType) { + public PrivateCloudPropertiesInner withDnsZoneType(DnsZoneType dnsZoneType) { this.dnsZoneType = dnsZoneType; return this; } + /** + * Get the vcfLicense property: The private cloud license. + * + * @return the vcfLicense value. + */ + public VcfLicenseInner vcfLicense() { + return this.vcfLicense; + } + + /** + * Set the vcfLicense property: The private cloud license. + * + * @param vcfLicense the vcfLicense value to set. + * @return the PrivateCloudPropertiesInner object itself. + */ + public PrivateCloudPropertiesInner withVcfLicense(VcfLicenseInner vcfLicense) { + this.vcfLicense = vcfLicense; + return this; + } + /** * {@inheritDoc} */ @@ -528,81 +553,84 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeJsonField("secondaryCircuit", this.secondaryCircuit); jsonWriter.writeStringField("virtualNetworkId", this.virtualNetworkId); jsonWriter.writeStringField("dnsZoneType", this.dnsZoneType == null ? null : this.dnsZoneType.toString()); + jsonWriter.writeJsonField("vcfLicense", this.vcfLicense); return jsonWriter.writeEndObject(); } /** - * Reads an instance of PrivateCloudProperties from the JsonReader. + * Reads an instance of PrivateCloudPropertiesInner from the JsonReader. * * @param jsonReader The JsonReader being read. - * @return An instance of PrivateCloudProperties if the JsonReader was pointing to an instance of it, or null if it - * was pointing to JSON null. + * @return An instance of PrivateCloudPropertiesInner if the JsonReader was pointing to an instance of it, or null + * if it was pointing to JSON null. * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the PrivateCloudProperties. + * @throws IOException If an error occurs while reading the PrivateCloudPropertiesInner. */ - public static PrivateCloudProperties fromJson(JsonReader jsonReader) throws IOException { + public static PrivateCloudPropertiesInner fromJson(JsonReader jsonReader) throws IOException { return jsonReader.readObject(reader -> { - PrivateCloudProperties deserializedPrivateCloudProperties = new PrivateCloudProperties(); + PrivateCloudPropertiesInner deserializedPrivateCloudPropertiesInner = new PrivateCloudPropertiesInner(); while (reader.nextToken() != JsonToken.END_OBJECT) { String fieldName = reader.getFieldName(); reader.nextToken(); if ("managementCluster".equals(fieldName)) { - deserializedPrivateCloudProperties.managementCluster = ManagementCluster.fromJson(reader); + deserializedPrivateCloudPropertiesInner.managementCluster = ManagementCluster.fromJson(reader); } else if ("networkBlock".equals(fieldName)) { - deserializedPrivateCloudProperties.networkBlock = reader.getString(); + deserializedPrivateCloudPropertiesInner.networkBlock = reader.getString(); } else if ("internet".equals(fieldName)) { - deserializedPrivateCloudProperties.internet = InternetEnum.fromString(reader.getString()); + deserializedPrivateCloudPropertiesInner.internet = InternetEnum.fromString(reader.getString()); } else if ("identitySources".equals(fieldName)) { List identitySources = reader.readArray(reader1 -> IdentitySource.fromJson(reader1)); - deserializedPrivateCloudProperties.identitySources = identitySources; + deserializedPrivateCloudPropertiesInner.identitySources = identitySources; } else if ("availability".equals(fieldName)) { - deserializedPrivateCloudProperties.availability = AvailabilityProperties.fromJson(reader); + deserializedPrivateCloudPropertiesInner.availability = AvailabilityProperties.fromJson(reader); } else if ("encryption".equals(fieldName)) { - deserializedPrivateCloudProperties.encryption = Encryption.fromJson(reader); + deserializedPrivateCloudPropertiesInner.encryption = Encryption.fromJson(reader); } else if ("extendedNetworkBlocks".equals(fieldName)) { List extendedNetworkBlocks = reader.readArray(reader1 -> reader1.getString()); - deserializedPrivateCloudProperties.extendedNetworkBlocks = extendedNetworkBlocks; + deserializedPrivateCloudPropertiesInner.extendedNetworkBlocks = extendedNetworkBlocks; } else if ("provisioningState".equals(fieldName)) { - deserializedPrivateCloudProperties.provisioningState + deserializedPrivateCloudPropertiesInner.provisioningState = PrivateCloudProvisioningState.fromString(reader.getString()); } else if ("circuit".equals(fieldName)) { - deserializedPrivateCloudProperties.circuit = Circuit.fromJson(reader); + deserializedPrivateCloudPropertiesInner.circuit = Circuit.fromJson(reader); } else if ("endpoints".equals(fieldName)) { - deserializedPrivateCloudProperties.endpoints = Endpoints.fromJson(reader); + deserializedPrivateCloudPropertiesInner.endpoints = Endpoints.fromJson(reader); } else if ("managementNetwork".equals(fieldName)) { - deserializedPrivateCloudProperties.managementNetwork = reader.getString(); + deserializedPrivateCloudPropertiesInner.managementNetwork = reader.getString(); } else if ("provisioningNetwork".equals(fieldName)) { - deserializedPrivateCloudProperties.provisioningNetwork = reader.getString(); + deserializedPrivateCloudPropertiesInner.provisioningNetwork = reader.getString(); } else if ("vmotionNetwork".equals(fieldName)) { - deserializedPrivateCloudProperties.vmotionNetwork = reader.getString(); + deserializedPrivateCloudPropertiesInner.vmotionNetwork = reader.getString(); } else if ("vcenterPassword".equals(fieldName)) { - deserializedPrivateCloudProperties.vcenterPassword = reader.getString(); + deserializedPrivateCloudPropertiesInner.vcenterPassword = reader.getString(); } else if ("nsxtPassword".equals(fieldName)) { - deserializedPrivateCloudProperties.nsxtPassword = reader.getString(); + deserializedPrivateCloudPropertiesInner.nsxtPassword = reader.getString(); } else if ("vcenterCertificateThumbprint".equals(fieldName)) { - deserializedPrivateCloudProperties.vcenterCertificateThumbprint = reader.getString(); + deserializedPrivateCloudPropertiesInner.vcenterCertificateThumbprint = reader.getString(); } else if ("nsxtCertificateThumbprint".equals(fieldName)) { - deserializedPrivateCloudProperties.nsxtCertificateThumbprint = reader.getString(); + deserializedPrivateCloudPropertiesInner.nsxtCertificateThumbprint = reader.getString(); } else if ("externalCloudLinks".equals(fieldName)) { List externalCloudLinks = reader.readArray(reader1 -> reader1.getString()); - deserializedPrivateCloudProperties.externalCloudLinks = externalCloudLinks; + deserializedPrivateCloudPropertiesInner.externalCloudLinks = externalCloudLinks; } else if ("secondaryCircuit".equals(fieldName)) { - deserializedPrivateCloudProperties.secondaryCircuit = Circuit.fromJson(reader); + deserializedPrivateCloudPropertiesInner.secondaryCircuit = Circuit.fromJson(reader); } else if ("nsxPublicIpQuotaRaised".equals(fieldName)) { - deserializedPrivateCloudProperties.nsxPublicIpQuotaRaised + deserializedPrivateCloudPropertiesInner.nsxPublicIpQuotaRaised = NsxPublicIpQuotaRaisedEnum.fromString(reader.getString()); } else if ("virtualNetworkId".equals(fieldName)) { - deserializedPrivateCloudProperties.virtualNetworkId = reader.getString(); + deserializedPrivateCloudPropertiesInner.virtualNetworkId = reader.getString(); } else if ("dnsZoneType".equals(fieldName)) { - deserializedPrivateCloudProperties.dnsZoneType = DnsZoneType.fromString(reader.getString()); + deserializedPrivateCloudPropertiesInner.dnsZoneType = DnsZoneType.fromString(reader.getString()); + } else if ("vcfLicense".equals(fieldName)) { + deserializedPrivateCloudPropertiesInner.vcfLicense = VcfLicenseInner.fromJson(reader); } else { reader.skipChildren(); } } - return deserializedPrivateCloudProperties; + return deserializedPrivateCloudPropertiesInner; }); } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/VcfLicenseInner.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/VcfLicenseInner.java new file mode 100644 index 000000000000..64da2899528e --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/VcfLicenseInner.java @@ -0,0 +1,130 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.avs.fluent.models; + +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.avs.models.LicenseProvisioningState; +import com.azure.resourcemanager.avs.models.Vcf5License; +import com.azure.resourcemanager.avs.models.VcfLicenseKind; +import java.io.IOException; + +/** + * A VMware Cloud Foundation license. + */ +@Immutable +public class VcfLicenseInner implements JsonSerializable { + /* + * License kind + */ + private VcfLicenseKind kind = VcfLicenseKind.fromString("VcfLicense"); + + /* + * The state of the license provisioning + */ + private LicenseProvisioningState provisioningState; + + /** + * Creates an instance of VcfLicenseInner class. + */ + public VcfLicenseInner() { + } + + /** + * Get the kind property: License kind. + * + * @return the kind value. + */ + public VcfLicenseKind kind() { + return this.kind; + } + + /** + * Get the provisioningState property: The state of the license provisioning. + * + * @return the provisioningState value. + */ + public LicenseProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Set the provisioningState property: The state of the license provisioning. + * + * @param provisioningState the provisioningState value to set. + * @return the VcfLicenseInner object itself. + */ + VcfLicenseInner withProvisioningState(LicenseProvisioningState provisioningState) { + this.provisioningState = provisioningState; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("kind", this.kind == null ? null : this.kind.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of VcfLicenseInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of VcfLicenseInner if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IOException If an error occurs while reading the VcfLicenseInner. + */ + public static VcfLicenseInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + String discriminatorValue = null; + try (JsonReader readerToUse = reader.bufferObject()) { + readerToUse.nextToken(); // Prepare for reading + while (readerToUse.nextToken() != JsonToken.END_OBJECT) { + String fieldName = readerToUse.getFieldName(); + readerToUse.nextToken(); + if ("kind".equals(fieldName)) { + discriminatorValue = readerToUse.getString(); + break; + } else { + readerToUse.skipChildren(); + } + } + // Use the discriminator value to determine which subtype should be deserialized. + if ("vcf5".equals(discriminatorValue)) { + return Vcf5License.fromJson(readerToUse.reset()); + } else { + return fromJsonKnownDiscriminator(readerToUse.reset()); + } + } + }); + } + + static VcfLicenseInner fromJsonKnownDiscriminator(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + VcfLicenseInner deserializedVcfLicenseInner = new VcfLicenseInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("kind".equals(fieldName)) { + deserializedVcfLicenseInner.kind = VcfLicenseKind.fromString(reader.getString()); + } else if ("provisioningState".equals(fieldName)) { + deserializedVcfLicenseInner.provisioningState + = LicenseProvisioningState.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedVcfLicenseInner; + }); + } +} 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 d079ff94279d..f70a8d95fdab 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 @@ -36,7 +36,9 @@ import com.azure.resourcemanager.avs.fluent.HcxEnterpriseSitesClient; import com.azure.resourcemanager.avs.fluent.HostsClient; import com.azure.resourcemanager.avs.fluent.IscsiPathsClient; +import com.azure.resourcemanager.avs.fluent.LicensesClient; import com.azure.resourcemanager.avs.fluent.LocationsClient; +import com.azure.resourcemanager.avs.fluent.MaintenancesClient; import com.azure.resourcemanager.avs.fluent.OperationsClient; import com.azure.resourcemanager.avs.fluent.PlacementPoliciesClient; import com.azure.resourcemanager.avs.fluent.PrivateCloudsClient; @@ -45,6 +47,7 @@ import com.azure.resourcemanager.avs.fluent.ScriptCmdletsClient; import com.azure.resourcemanager.avs.fluent.ScriptExecutionsClient; import com.azure.resourcemanager.avs.fluent.ScriptPackagesClient; +import com.azure.resourcemanager.avs.fluent.ServiceComponentsClient; import com.azure.resourcemanager.avs.fluent.SkusClient; import com.azure.resourcemanager.avs.fluent.VirtualMachinesClient; import com.azure.resourcemanager.avs.fluent.WorkloadNetworksClient; @@ -286,6 +289,20 @@ public IscsiPathsClient getIscsiPaths() { return this.iscsiPaths; } + /** + * The LicensesClient object to access its operations. + */ + private final LicensesClient licenses; + + /** + * Gets the LicensesClient object to access its operations. + * + * @return the LicensesClient object. + */ + public LicensesClient getLicenses() { + return this.licenses; + } + /** * The LocationsClient object to access its operations. */ @@ -300,6 +317,20 @@ public LocationsClient getLocations() { return this.locations; } + /** + * The MaintenancesClient object to access its operations. + */ + private final MaintenancesClient maintenances; + + /** + * Gets the MaintenancesClient object to access its operations. + * + * @return the MaintenancesClient object. + */ + public MaintenancesClient getMaintenances() { + return this.maintenances; + } + /** * The PlacementPoliciesClient object to access its operations. */ @@ -398,6 +429,20 @@ public ScriptPackagesClient getScriptPackages() { return this.scriptPackages; } + /** + * The ServiceComponentsClient object to access its operations. + */ + private final ServiceComponentsClient serviceComponents; + + /** + * Gets the ServiceComponentsClient object to access its operations. + * + * @return the ServiceComponentsClient object. + */ + public ServiceComponentsClient getServiceComponents() { + return this.serviceComponents; + } + /** * The SkusClient object to access its operations. */ @@ -457,7 +502,7 @@ public WorkloadNetworksClient getWorkloadNetworks() { this.defaultPollInterval = defaultPollInterval; this.endpoint = endpoint; this.subscriptionId = subscriptionId; - this.apiVersion = "2024-09-01"; + this.apiVersion = "2025-09-01"; this.operations = new OperationsClientImpl(this); this.addons = new AddonsClientImpl(this); this.authorizations = new AuthorizationsClientImpl(this); @@ -468,7 +513,9 @@ public WorkloadNetworksClient getWorkloadNetworks() { this.hcxEnterpriseSites = new HcxEnterpriseSitesClientImpl(this); this.hosts = new HostsClientImpl(this); this.iscsiPaths = new IscsiPathsClientImpl(this); + this.licenses = new LicensesClientImpl(this); this.locations = new LocationsClientImpl(this); + this.maintenances = new MaintenancesClientImpl(this); this.placementPolicies = new PlacementPoliciesClientImpl(this); this.privateClouds = new PrivateCloudsClientImpl(this); this.provisionedNetworks = new ProvisionedNetworksClientImpl(this); @@ -476,6 +523,7 @@ public WorkloadNetworksClient getWorkloadNetworks() { this.scriptCmdlets = new ScriptCmdletsClientImpl(this); this.scriptExecutions = new ScriptExecutionsClientImpl(this); this.scriptPackages = new ScriptPackagesClientImpl(this); + this.serviceComponents = new ServiceComponentsClientImpl(this); this.skus = new SkusClientImpl(this); this.virtualMachines = new VirtualMachinesClientImpl(this); this.workloadNetworks = new WorkloadNetworksClientImpl(this); diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/LicenseImpl.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/LicenseImpl.java new file mode 100644 index 000000000000..844a37c5229a --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/LicenseImpl.java @@ -0,0 +1,146 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.avs.implementation; + +import com.azure.core.http.rest.Response; +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.avs.fluent.models.LicenseInner; +import com.azure.resourcemanager.avs.fluent.models.LicensePropertiesInner; +import com.azure.resourcemanager.avs.models.License; +import com.azure.resourcemanager.avs.models.LicenseName; +import com.azure.resourcemanager.avs.models.LicenseProperties; + +public final class LicenseImpl implements License, License.Definition, License.Update { + private LicenseInner innerObject; + + private final com.azure.resourcemanager.avs.AvsManager serviceManager; + + public String id() { + return this.innerModel().id(); + } + + public String name() { + return this.innerModel().name(); + } + + public String type() { + return this.innerModel().type(); + } + + public LicenseProperties properties() { + LicensePropertiesInner inner = this.innerModel().properties(); + if (inner != null) { + return new LicensePropertiesImpl(inner, this.manager()); + } else { + return null; + } + } + + public SystemData systemData() { + return this.innerModel().systemData(); + } + + public String resourceGroupName() { + return resourceGroupName; + } + + public LicenseInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.avs.AvsManager manager() { + return this.serviceManager; + } + + private String resourceGroupName; + + private String privateCloudName; + + private LicenseName licenseName; + + public LicenseImpl withExistingPrivateCloud(String resourceGroupName, String privateCloudName) { + this.resourceGroupName = resourceGroupName; + this.privateCloudName = privateCloudName; + return this; + } + + public License create() { + this.innerObject = serviceManager.serviceClient() + .getLicenses() + .createOrUpdate(resourceGroupName, privateCloudName, licenseName, this.innerModel(), Context.NONE); + return this; + } + + public License create(Context context) { + this.innerObject = serviceManager.serviceClient() + .getLicenses() + .createOrUpdate(resourceGroupName, privateCloudName, licenseName, this.innerModel(), context); + return this; + } + + LicenseImpl(LicenseName name, com.azure.resourcemanager.avs.AvsManager serviceManager) { + this.innerObject = new LicenseInner(); + this.serviceManager = serviceManager; + this.licenseName = name; + } + + public LicenseImpl update() { + return this; + } + + public License apply() { + this.innerObject = serviceManager.serviceClient() + .getLicenses() + .createOrUpdate(resourceGroupName, privateCloudName, licenseName, this.innerModel(), Context.NONE); + return this; + } + + public License apply(Context context) { + this.innerObject = serviceManager.serviceClient() + .getLicenses() + .createOrUpdate(resourceGroupName, privateCloudName, licenseName, this.innerModel(), context); + return this; + } + + LicenseImpl(LicenseInner innerObject, com.azure.resourcemanager.avs.AvsManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); + this.privateCloudName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "privateClouds"); + this.licenseName + = LicenseName.fromString(ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "licenses")); + } + + public License refresh() { + this.innerObject = serviceManager.serviceClient() + .getLicenses() + .getWithResponse(resourceGroupName, privateCloudName, licenseName, Context.NONE) + .getValue(); + return this; + } + + public License refresh(Context context) { + this.innerObject = serviceManager.serviceClient() + .getLicenses() + .getWithResponse(resourceGroupName, privateCloudName, licenseName, context) + .getValue(); + return this; + } + + public Response getPropertiesWithResponse(Context context) { + return serviceManager.licenses() + .getPropertiesWithResponse(resourceGroupName, privateCloudName, licenseName, context); + } + + public LicenseProperties getProperties() { + return serviceManager.licenses().getProperties(resourceGroupName, privateCloudName, licenseName); + } + + public LicenseImpl withProperties(LicensePropertiesInner properties) { + this.innerModel().withProperties(properties); + return this; + } +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/LicensePropertiesImpl.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/LicensePropertiesImpl.java new file mode 100644 index 000000000000..04978490b6ef --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/LicensePropertiesImpl.java @@ -0,0 +1,37 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.avs.implementation; + +import com.azure.resourcemanager.avs.fluent.models.LicensePropertiesInner; +import com.azure.resourcemanager.avs.models.LicenseKind; +import com.azure.resourcemanager.avs.models.LicenseProperties; +import com.azure.resourcemanager.avs.models.LicenseProvisioningState; + +public final class LicensePropertiesImpl implements LicenseProperties { + private LicensePropertiesInner innerObject; + + private final com.azure.resourcemanager.avs.AvsManager serviceManager; + + LicensePropertiesImpl(LicensePropertiesInner innerObject, com.azure.resourcemanager.avs.AvsManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + } + + public LicenseKind kind() { + return this.innerModel().kind(); + } + + public LicenseProvisioningState provisioningState() { + return this.innerModel().provisioningState(); + } + + public LicensePropertiesInner 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/LicensesClientImpl.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/LicensesClientImpl.java new file mode 100644 index 000000000000..c8b9290accb0 --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/LicensesClientImpl.java @@ -0,0 +1,858 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.avs.implementation; + +import com.azure.core.annotation.BodyParam; +import com.azure.core.annotation.Delete; +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.Get; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Headers; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.Post; +import com.azure.core.annotation.Put; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.PagedResponse; +import com.azure.core.http.rest.PagedResponseBase; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.management.exception.ManagementException; +import com.azure.core.management.polling.PollResult; +import com.azure.core.util.BinaryData; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.core.util.polling.PollerFlux; +import com.azure.core.util.polling.SyncPoller; +import com.azure.resourcemanager.avs.fluent.LicensesClient; +import com.azure.resourcemanager.avs.fluent.models.LicenseInner; +import com.azure.resourcemanager.avs.fluent.models.LicensePropertiesInner; +import com.azure.resourcemanager.avs.implementation.models.LicenseListResult; +import com.azure.resourcemanager.avs.models.LicenseName; +import java.nio.ByteBuffer; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; + +/** + * An instance of this class provides access to all the operations defined in LicensesClient. + */ +public final class LicensesClientImpl implements LicensesClient { + /** + * The proxy service used to perform REST calls. + */ + private final LicensesService service; + + /** + * The service client containing this operation class. + */ + private final AvsClientImpl client; + + /** + * Initializes an instance of LicensesClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + LicensesClientImpl(AvsClientImpl client) { + this.service = RestProxy.create(LicensesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for AvsClientLicenses to be used by the proxy service to perform REST + * calls. + */ + @Host("{endpoint}") + @ServiceInterface(name = "AvsClientLicenses") + public interface LicensesService { + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/licenses") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> list(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("privateCloudName") String privateCloudName, @HeaderParam("Accept") String accept, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/licenses") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("privateCloudName") String privateCloudName, @HeaderParam("Accept") String accept, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/licenses/{licenseName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> get(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("privateCloudName") String privateCloudName, @PathParam("licenseName") LicenseName licenseName, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/licenses/{licenseName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response getSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("privateCloudName") String privateCloudName, @PathParam("licenseName") LicenseName licenseName, + @HeaderParam("Accept") String accept, Context context); + + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/licenses/{licenseName}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> createOrUpdate(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("privateCloudName") String privateCloudName, @PathParam("licenseName") LicenseName licenseName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") LicenseInner resource, Context context); + + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/licenses/{licenseName}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response createOrUpdateSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("privateCloudName") String privateCloudName, @PathParam("licenseName") LicenseName licenseName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") LicenseInner resource, Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/licenses/{licenseName}") + @ExpectedResponses({ 202, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> delete(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("privateCloudName") String privateCloudName, @PathParam("licenseName") LicenseName licenseName, + Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/licenses/{licenseName}") + @ExpectedResponses({ 202, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response deleteSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("privateCloudName") String privateCloudName, @PathParam("licenseName") LicenseName licenseName, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/licenses/{licenseName}/getProperties") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> getProperties(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("privateCloudName") String privateCloudName, @PathParam("licenseName") LicenseName licenseName, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/licenses/{licenseName}/getProperties") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response getPropertiesSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("privateCloudName") String privateCloudName, @PathParam("licenseName") LicenseName licenseName, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listNext(@PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listNextSync(@PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); + } + + /** + * List License resources by PrivateCloud. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a License list operation along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync(String resourceGroupName, String privateCloudName) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * List License resources by PrivateCloud. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a License list operation as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String resourceGroupName, String privateCloudName) { + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, privateCloudName), + nextLink -> listNextSinglePageAsync(nextLink)); + } + + /** + * List License resources by PrivateCloud. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a License list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listSinglePage(String resourceGroupName, String privateCloudName) { + final String accept = "application/json"; + Response res = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * List License resources by PrivateCloud. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a License list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listSinglePage(String resourceGroupName, String privateCloudName, + Context context) { + final String accept = "application/json"; + Response res = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * List License resources by PrivateCloud. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a License list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String resourceGroupName, String privateCloudName) { + return new PagedIterable<>(() -> listSinglePage(resourceGroupName, privateCloudName), + nextLink -> listNextSinglePage(nextLink)); + } + + /** + * List License resources by PrivateCloud. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a License list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String resourceGroupName, String privateCloudName, Context context) { + return new PagedIterable<>(() -> listSinglePage(resourceGroupName, privateCloudName, context), + nextLink -> listNextSinglePage(nextLink, context)); + } + + /** + * Get a License. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param licenseName Name of the license. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a License along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync(String resourceGroupName, String privateCloudName, + LicenseName licenseName) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, licenseName, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get a License. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param licenseName Name of the license. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a License on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getAsync(String resourceGroupName, String privateCloudName, LicenseName licenseName) { + return getWithResponseAsync(resourceGroupName, privateCloudName, licenseName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Get a License. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param licenseName Name of the license. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a License along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse(String resourceGroupName, String privateCloudName, + LicenseName licenseName, Context context) { + final String accept = "application/json"; + return service.getSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, privateCloudName, licenseName, accept, context); + } + + /** + * Get a License. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param licenseName Name of the license. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a License. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public LicenseInner get(String resourceGroupName, String privateCloudName, LicenseName licenseName) { + return getWithResponse(resourceGroupName, privateCloudName, licenseName, Context.NONE).getValue(); + } + + /** + * Create a License. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param licenseName Name of the license. + * @param resource Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a license resource along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, + String privateCloudName, LicenseName licenseName, LicenseInner resource) { + final String contentType = "application/json"; + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, licenseName, contentType, accept, + resource, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Create a License. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param licenseName Name of the license. + * @param resource Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a license resource along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response createOrUpdateWithResponse(String resourceGroupName, String privateCloudName, + LicenseName licenseName, LicenseInner resource) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, licenseName, contentType, accept, + resource, Context.NONE); + } + + /** + * Create a License. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param licenseName Name of the license. + * @param resource Resource create parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a license resource along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response createOrUpdateWithResponse(String resourceGroupName, String privateCloudName, + LicenseName licenseName, LicenseInner resource, Context context) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, licenseName, contentType, accept, + resource, context); + } + + /** + * Create a License. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param licenseName Name of the license. + * @param resource Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of a license resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, LicenseInner> beginCreateOrUpdateAsync(String resourceGroupName, + String privateCloudName, LicenseName licenseName, LicenseInner resource) { + Mono>> mono + = createOrUpdateWithResponseAsync(resourceGroupName, privateCloudName, licenseName, resource); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + LicenseInner.class, LicenseInner.class, this.client.getContext()); + } + + /** + * Create a License. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param licenseName Name of the license. + * @param resource Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of a license resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, LicenseInner> beginCreateOrUpdate(String resourceGroupName, + String privateCloudName, LicenseName licenseName, LicenseInner resource) { + Response response + = createOrUpdateWithResponse(resourceGroupName, privateCloudName, licenseName, resource); + return this.client.getLroResult(response, LicenseInner.class, LicenseInner.class, + Context.NONE); + } + + /** + * Create a License. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param licenseName Name of the license. + * @param resource Resource create parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of a license resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, LicenseInner> beginCreateOrUpdate(String resourceGroupName, + String privateCloudName, LicenseName licenseName, LicenseInner resource, Context context) { + Response response + = createOrUpdateWithResponse(resourceGroupName, privateCloudName, licenseName, resource, context); + return this.client.getLroResult(response, LicenseInner.class, LicenseInner.class, + context); + } + + /** + * Create a License. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param licenseName Name of the license. + * @param resource Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a license resource on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateAsync(String resourceGroupName, String privateCloudName, + LicenseName licenseName, LicenseInner resource) { + return beginCreateOrUpdateAsync(resourceGroupName, privateCloudName, licenseName, resource).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Create a License. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param licenseName Name of the license. + * @param resource Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a license resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public LicenseInner createOrUpdate(String resourceGroupName, String privateCloudName, LicenseName licenseName, + LicenseInner resource) { + return beginCreateOrUpdate(resourceGroupName, privateCloudName, licenseName, resource).getFinalResult(); + } + + /** + * Create a License. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param licenseName Name of the license. + * @param resource Resource create parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a license resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public LicenseInner createOrUpdate(String resourceGroupName, String privateCloudName, LicenseName licenseName, + LicenseInner resource, Context context) { + return beginCreateOrUpdate(resourceGroupName, privateCloudName, licenseName, resource, context) + .getFinalResult(); + } + + /** + * Delete a License. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param licenseName Name of the license. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> deleteWithResponseAsync(String resourceGroupName, String privateCloudName, + LicenseName licenseName) { + return FluxUtil + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, licenseName, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Delete a License. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param licenseName Name of the license. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response deleteWithResponse(String resourceGroupName, String privateCloudName, + LicenseName licenseName) { + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, licenseName, Context.NONE); + } + + /** + * Delete a License. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param licenseName Name of the license. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response deleteWithResponse(String resourceGroupName, String privateCloudName, + LicenseName licenseName, Context context) { + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, licenseName, context); + } + + /** + * Delete a License. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param licenseName Name of the license. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String privateCloudName, + LicenseName licenseName) { + Mono>> mono + = deleteWithResponseAsync(resourceGroupName, privateCloudName, licenseName); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); + } + + /** + * Delete a License. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param licenseName Name of the license. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDelete(String resourceGroupName, String privateCloudName, + LicenseName licenseName) { + Response response = deleteWithResponse(resourceGroupName, privateCloudName, licenseName); + return this.client.getLroResult(response, Void.class, Void.class, Context.NONE); + } + + /** + * Delete a License. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param licenseName Name of the license. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDelete(String resourceGroupName, String privateCloudName, + LicenseName licenseName, Context context) { + Response response = deleteWithResponse(resourceGroupName, privateCloudName, licenseName, context); + return this.client.getLroResult(response, Void.class, Void.class, context); + } + + /** + * Delete a License. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param licenseName Name of the license. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteAsync(String resourceGroupName, String privateCloudName, LicenseName licenseName) { + return beginDeleteAsync(resourceGroupName, privateCloudName, licenseName).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Delete a License. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param licenseName Name of the license. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String resourceGroupName, String privateCloudName, LicenseName licenseName) { + beginDelete(resourceGroupName, privateCloudName, licenseName).getFinalResult(); + } + + /** + * Delete a License. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param licenseName Name of the license. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String resourceGroupName, String privateCloudName, LicenseName licenseName, Context context) { + beginDelete(resourceGroupName, privateCloudName, licenseName, context).getFinalResult(); + } + + /** + * Just like ArmResourceActionSync, but with no request body. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param licenseName Name of the license. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the properties of a license along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getPropertiesWithResponseAsync(String resourceGroupName, + String privateCloudName, LicenseName licenseName) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.getProperties(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, licenseName, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Just like ArmResourceActionSync, but with no request body. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param licenseName Name of the license. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the properties of a license on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getPropertiesAsync(String resourceGroupName, String privateCloudName, + LicenseName licenseName) { + return getPropertiesWithResponseAsync(resourceGroupName, privateCloudName, licenseName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Just like ArmResourceActionSync, but with no request body. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param licenseName Name of the license. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the properties of a license along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getPropertiesWithResponse(String resourceGroupName, String privateCloudName, + LicenseName licenseName, Context context) { + final String accept = "application/json"; + return service.getPropertiesSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, licenseName, accept, context); + } + + /** + * Just like ArmResourceActionSync, but with no request body. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param licenseName Name of the license. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the properties of a license. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public LicensePropertiesInner getProperties(String resourceGroupName, String privateCloudName, + LicenseName licenseName) { + return getPropertiesWithResponse(resourceGroupName, privateCloudName, licenseName, Context.NONE).getValue(); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a License list operation along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listNextSinglePageAsync(String nextLink) { + 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. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a License list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listNextSinglePage(String nextLink) { + final String accept = "application/json"; + Response res + = service.listNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); + return 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. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a License list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listNextSinglePage(String nextLink, Context context) { + final String accept = "application/json"; + Response res = service.listNextSync(nextLink, this.client.getEndpoint(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/LicensesImpl.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/LicensesImpl.java new file mode 100644 index 000000000000..fce9a37039ee --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/LicensesImpl.java @@ -0,0 +1,184 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.avs.implementation; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.SimpleResponse; +import com.azure.core.util.Context; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.avs.fluent.LicensesClient; +import com.azure.resourcemanager.avs.fluent.models.LicenseInner; +import com.azure.resourcemanager.avs.fluent.models.LicensePropertiesInner; +import com.azure.resourcemanager.avs.models.License; +import com.azure.resourcemanager.avs.models.LicenseName; +import com.azure.resourcemanager.avs.models.LicenseProperties; +import com.azure.resourcemanager.avs.models.Licenses; + +public final class LicensesImpl implements Licenses { + private static final ClientLogger LOGGER = new ClientLogger(LicensesImpl.class); + + private final LicensesClient innerClient; + + private final com.azure.resourcemanager.avs.AvsManager serviceManager; + + public LicensesImpl(LicensesClient innerClient, com.azure.resourcemanager.avs.AvsManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public PagedIterable list(String resourceGroupName, String privateCloudName) { + PagedIterable inner = this.serviceClient().list(resourceGroupName, privateCloudName); + return ResourceManagerUtils.mapPage(inner, inner1 -> new LicenseImpl(inner1, this.manager())); + } + + public PagedIterable list(String resourceGroupName, String privateCloudName, Context context) { + PagedIterable inner = this.serviceClient().list(resourceGroupName, privateCloudName, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new LicenseImpl(inner1, this.manager())); + } + + public Response getWithResponse(String resourceGroupName, String privateCloudName, LicenseName licenseName, + Context context) { + Response inner + = this.serviceClient().getWithResponse(resourceGroupName, privateCloudName, licenseName, context); + if (inner != null) { + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new LicenseImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public License get(String resourceGroupName, String privateCloudName, LicenseName licenseName) { + LicenseInner inner = this.serviceClient().get(resourceGroupName, privateCloudName, licenseName); + if (inner != null) { + return new LicenseImpl(inner, this.manager()); + } else { + return null; + } + } + + public void delete(String resourceGroupName, String privateCloudName, LicenseName licenseName) { + this.serviceClient().delete(resourceGroupName, privateCloudName, licenseName); + } + + public void delete(String resourceGroupName, String privateCloudName, LicenseName licenseName, Context context) { + this.serviceClient().delete(resourceGroupName, privateCloudName, licenseName, context); + } + + public Response getPropertiesWithResponse(String resourceGroupName, String privateCloudName, + LicenseName licenseName, Context context) { + Response inner + = this.serviceClient().getPropertiesWithResponse(resourceGroupName, privateCloudName, licenseName, context); + if (inner != null) { + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new LicensePropertiesImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public LicenseProperties getProperties(String resourceGroupName, String privateCloudName, LicenseName licenseName) { + LicensePropertiesInner inner + = this.serviceClient().getProperties(resourceGroupName, privateCloudName, licenseName); + if (inner != null) { + return new LicensePropertiesImpl(inner, this.manager()); + } else { + return null; + } + } + + public License getById(String id) { + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String privateCloudName = ResourceManagerUtils.getValueFromIdByName(id, "privateClouds"); + if (privateCloudName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'privateClouds'.", id))); + } + String licenseNameLocal = ResourceManagerUtils.getValueFromIdByName(id, "licenses"); + if (licenseNameLocal == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'licenses'.", id))); + } + LicenseName licenseName = LicenseName.fromString(licenseNameLocal); + return this.getWithResponse(resourceGroupName, privateCloudName, licenseName, Context.NONE).getValue(); + } + + public Response getByIdWithResponse(String id, Context context) { + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String privateCloudName = ResourceManagerUtils.getValueFromIdByName(id, "privateClouds"); + if (privateCloudName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'privateClouds'.", id))); + } + String licenseNameLocal = ResourceManagerUtils.getValueFromIdByName(id, "licenses"); + if (licenseNameLocal == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'licenses'.", id))); + } + LicenseName licenseName = LicenseName.fromString(licenseNameLocal); + return this.getWithResponse(resourceGroupName, privateCloudName, licenseName, context); + } + + public void deleteById(String id) { + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String privateCloudName = ResourceManagerUtils.getValueFromIdByName(id, "privateClouds"); + if (privateCloudName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'privateClouds'.", id))); + } + String licenseNameLocal = ResourceManagerUtils.getValueFromIdByName(id, "licenses"); + if (licenseNameLocal == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'licenses'.", id))); + } + LicenseName licenseName = LicenseName.fromString(licenseNameLocal); + this.delete(resourceGroupName, privateCloudName, licenseName, Context.NONE); + } + + public void deleteByIdWithResponse(String id, Context context) { + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String privateCloudName = ResourceManagerUtils.getValueFromIdByName(id, "privateClouds"); + if (privateCloudName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'privateClouds'.", id))); + } + String licenseNameLocal = ResourceManagerUtils.getValueFromIdByName(id, "licenses"); + if (licenseNameLocal == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'licenses'.", id))); + } + LicenseName licenseName = LicenseName.fromString(licenseNameLocal); + this.delete(resourceGroupName, privateCloudName, licenseName, context); + } + + private LicensesClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.avs.AvsManager manager() { + return this.serviceManager; + } + + public LicenseImpl define(LicenseName name) { + return new LicenseImpl(name, this.manager()); + } +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/MaintenanceImpl.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/MaintenanceImpl.java new file mode 100644 index 000000000000..f84c6f30c135 --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/MaintenanceImpl.java @@ -0,0 +1,49 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.avs.implementation; + +import com.azure.core.management.SystemData; +import com.azure.resourcemanager.avs.fluent.models.MaintenanceInner; +import com.azure.resourcemanager.avs.models.Maintenance; +import com.azure.resourcemanager.avs.models.MaintenanceProperties; + +public final class MaintenanceImpl implements Maintenance { + private MaintenanceInner innerObject; + + private final com.azure.resourcemanager.avs.AvsManager serviceManager; + + MaintenanceImpl(MaintenanceInner 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 MaintenanceProperties properties() { + return this.innerModel().properties(); + } + + public SystemData systemData() { + return this.innerModel().systemData(); + } + + public MaintenanceInner 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/MaintenancesClientImpl.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/MaintenancesClientImpl.java new file mode 100644 index 000000000000..371bd11e5606 --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/MaintenancesClientImpl.java @@ -0,0 +1,742 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.avs.implementation; + +import com.azure.core.annotation.BodyParam; +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.Get; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Headers; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.Post; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.PagedResponse; +import com.azure.core.http.rest.PagedResponseBase; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.management.exception.ManagementException; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.resourcemanager.avs.fluent.MaintenancesClient; +import com.azure.resourcemanager.avs.fluent.models.MaintenanceInner; +import com.azure.resourcemanager.avs.implementation.models.MaintenanceListResult; +import com.azure.resourcemanager.avs.models.MaintenanceReschedule; +import com.azure.resourcemanager.avs.models.MaintenanceSchedule; +import com.azure.resourcemanager.avs.models.MaintenanceStateName; +import com.azure.resourcemanager.avs.models.MaintenanceStatusFilter; +import java.time.OffsetDateTime; +import reactor.core.publisher.Mono; + +/** + * An instance of this class provides access to all the operations defined in MaintenancesClient. + */ +public final class MaintenancesClientImpl implements MaintenancesClient { + /** + * The proxy service used to perform REST calls. + */ + private final MaintenancesService service; + + /** + * The service client containing this operation class. + */ + private final AvsClientImpl client; + + /** + * Initializes an instance of MaintenancesClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + MaintenancesClientImpl(AvsClientImpl client) { + this.service + = RestProxy.create(MaintenancesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for AvsClientMaintenances to be used by the proxy service to perform REST + * calls. + */ + @Host("{endpoint}") + @ServiceInterface(name = "AvsClientMaintenances") + public interface MaintenancesService { + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/maintenances") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> list(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("privateCloudName") String privateCloudName, + @QueryParam("stateName") MaintenanceStateName stateName, + @QueryParam("status") MaintenanceStatusFilter status, @QueryParam("from") OffsetDateTime from, + @QueryParam("to") OffsetDateTime to, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/maintenances") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("privateCloudName") String privateCloudName, + @QueryParam("stateName") MaintenanceStateName stateName, + @QueryParam("status") MaintenanceStatusFilter status, @QueryParam("from") OffsetDateTime from, + @QueryParam("to") OffsetDateTime to, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/maintenances/{maintenanceName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> get(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("privateCloudName") String privateCloudName, + @PathParam("maintenanceName") String maintenanceName, @HeaderParam("Accept") String accept, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/maintenances/{maintenanceName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response getSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("privateCloudName") String privateCloudName, + @PathParam("maintenanceName") String maintenanceName, @HeaderParam("Accept") String accept, + Context context); + + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/maintenances/{maintenanceName}/reschedule") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> reschedule(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("privateCloudName") String privateCloudName, + @PathParam("maintenanceName") String maintenanceName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") MaintenanceReschedule body, + Context context); + + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/maintenances/{maintenanceName}/reschedule") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response rescheduleSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("privateCloudName") String privateCloudName, + @PathParam("maintenanceName") String maintenanceName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") MaintenanceReschedule body, + Context context); + + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/maintenances/{maintenanceName}/schedule") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> schedule(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("privateCloudName") String privateCloudName, + @PathParam("maintenanceName") String maintenanceName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") MaintenanceSchedule body, + Context context); + + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/maintenances/{maintenanceName}/schedule") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response scheduleSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("privateCloudName") String privateCloudName, + @PathParam("maintenanceName") String maintenanceName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") MaintenanceSchedule body, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/maintenances/{maintenanceName}/initiateChecks") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> initiateChecks(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("privateCloudName") String privateCloudName, + @PathParam("maintenanceName") String maintenanceName, @HeaderParam("Accept") String accept, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/maintenances/{maintenanceName}/initiateChecks") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response initiateChecksSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("privateCloudName") String privateCloudName, + @PathParam("maintenanceName") String maintenanceName, @HeaderParam("Accept") String accept, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listNext(@PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listNextSync(@PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); + } + + /** + * List Maintenance resources by subscription ID. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param stateName Filter maintenances based on state. + * @param status Filter active or inactive maintenances. + * @param from date from which result should be returned. ie. scheduledStartTime >= from. + * @param to date till which result should be returned. i.e. scheduledStartTime <= to. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a Maintenance list operation along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync(String resourceGroupName, String privateCloudName, + MaintenanceStateName stateName, MaintenanceStatusFilter status, OffsetDateTime from, OffsetDateTime to) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, stateName, status, from, to, + 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 Maintenance resources by subscription ID. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param stateName Filter maintenances based on state. + * @param status Filter active or inactive maintenances. + * @param from date from which result should be returned. ie. scheduledStartTime >= from. + * @param to date till which result should be returned. i.e. scheduledStartTime <= to. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a Maintenance list operation as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String resourceGroupName, String privateCloudName, + MaintenanceStateName stateName, MaintenanceStatusFilter status, OffsetDateTime from, OffsetDateTime to) { + return new PagedFlux<>( + () -> listSinglePageAsync(resourceGroupName, privateCloudName, stateName, status, from, to), + nextLink -> listNextSinglePageAsync(nextLink)); + } + + /** + * List Maintenance resources by subscription ID. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a Maintenance list operation as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String resourceGroupName, String privateCloudName) { + final MaintenanceStateName stateName = null; + final MaintenanceStatusFilter status = null; + final OffsetDateTime from = null; + final OffsetDateTime to = null; + return new PagedFlux<>( + () -> listSinglePageAsync(resourceGroupName, privateCloudName, stateName, status, from, to), + nextLink -> listNextSinglePageAsync(nextLink)); + } + + /** + * List Maintenance resources by subscription ID. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param stateName Filter maintenances based on state. + * @param status Filter active or inactive maintenances. + * @param from date from which result should be returned. ie. scheduledStartTime >= from. + * @param to date till which result should be returned. i.e. scheduledStartTime <= to. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a Maintenance list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listSinglePage(String resourceGroupName, String privateCloudName, + MaintenanceStateName stateName, MaintenanceStatusFilter status, OffsetDateTime from, OffsetDateTime to) { + final String accept = "application/json"; + Response res + = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, privateCloudName, stateName, status, from, to, accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * List Maintenance resources by subscription ID. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param stateName Filter maintenances based on state. + * @param status Filter active or inactive maintenances. + * @param from date from which result should be returned. ie. scheduledStartTime >= from. + * @param to date till which result should be returned. i.e. scheduledStartTime <= to. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a Maintenance list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listSinglePage(String resourceGroupName, String privateCloudName, + MaintenanceStateName stateName, MaintenanceStatusFilter status, OffsetDateTime from, OffsetDateTime to, + Context context) { + final String accept = "application/json"; + Response res + = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, privateCloudName, stateName, status, from, to, accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * List Maintenance resources by subscription ID. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a Maintenance list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String resourceGroupName, String privateCloudName) { + final MaintenanceStateName stateName = null; + final MaintenanceStatusFilter status = null; + final OffsetDateTime from = null; + final OffsetDateTime to = null; + return new PagedIterable<>( + () -> listSinglePage(resourceGroupName, privateCloudName, stateName, status, from, to), + nextLink -> listNextSinglePage(nextLink)); + } + + /** + * List Maintenance resources by subscription ID. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param stateName Filter maintenances based on state. + * @param status Filter active or inactive maintenances. + * @param from date from which result should be returned. ie. scheduledStartTime >= from. + * @param to date till which result should be returned. i.e. scheduledStartTime <= to. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a Maintenance list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String resourceGroupName, String privateCloudName, + MaintenanceStateName stateName, MaintenanceStatusFilter status, OffsetDateTime from, OffsetDateTime to, + Context context) { + return new PagedIterable<>( + () -> listSinglePage(resourceGroupName, privateCloudName, stateName, status, from, to, context), + nextLink -> listNextSinglePage(nextLink, context)); + } + + /** + * Get a Maintenance. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param maintenanceName Name of the maintenance. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a Maintenance along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync(String resourceGroupName, String privateCloudName, + String maintenanceName) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, maintenanceName, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get a Maintenance. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param maintenanceName Name of the maintenance. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a Maintenance on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getAsync(String resourceGroupName, String privateCloudName, String maintenanceName) { + return getWithResponseAsync(resourceGroupName, privateCloudName, maintenanceName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Get a Maintenance. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param maintenanceName Name of the maintenance. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a Maintenance along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse(String resourceGroupName, String privateCloudName, + String maintenanceName, Context context) { + final String accept = "application/json"; + return service.getSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, privateCloudName, maintenanceName, accept, context); + } + + /** + * Get a Maintenance. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param maintenanceName Name of the maintenance. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a Maintenance. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public MaintenanceInner get(String resourceGroupName, String privateCloudName, String maintenanceName) { + return getWithResponse(resourceGroupName, privateCloudName, maintenanceName, Context.NONE).getValue(); + } + + /** + * Reschedule a maintenance. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param maintenanceName Name of the maintenance. + * @param body The content of the action request. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a cluster resource along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> rescheduleWithResponseAsync(String resourceGroupName, + String privateCloudName, String maintenanceName, MaintenanceReschedule body) { + final String contentType = "application/json"; + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.reschedule(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, maintenanceName, contentType, + accept, body, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Reschedule a maintenance. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param maintenanceName Name of the maintenance. + * @param body The content of the action request. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a cluster resource on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono rescheduleAsync(String resourceGroupName, String privateCloudName, + String maintenanceName, MaintenanceReschedule body) { + return rescheduleWithResponseAsync(resourceGroupName, privateCloudName, maintenanceName, body) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Reschedule a maintenance. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param maintenanceName Name of the maintenance. + * @param body The content of the action request. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a cluster resource along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response rescheduleWithResponse(String resourceGroupName, String privateCloudName, + String maintenanceName, MaintenanceReschedule body, Context context) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.rescheduleSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, maintenanceName, contentType, accept, + body, context); + } + + /** + * Reschedule a maintenance. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param maintenanceName Name of the maintenance. + * @param body The content of the action request. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a cluster resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public MaintenanceInner reschedule(String resourceGroupName, String privateCloudName, String maintenanceName, + MaintenanceReschedule body) { + return rescheduleWithResponse(resourceGroupName, privateCloudName, maintenanceName, body, Context.NONE) + .getValue(); + } + + /** + * Schedule a maintenance. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param maintenanceName Name of the maintenance. + * @param body The content of the action request. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a cluster resource along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> scheduleWithResponseAsync(String resourceGroupName, + String privateCloudName, String maintenanceName, MaintenanceSchedule body) { + final String contentType = "application/json"; + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.schedule(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, maintenanceName, contentType, + accept, body, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Schedule a maintenance. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param maintenanceName Name of the maintenance. + * @param body The content of the action request. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a cluster resource on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono scheduleAsync(String resourceGroupName, String privateCloudName, + String maintenanceName, MaintenanceSchedule body) { + return scheduleWithResponseAsync(resourceGroupName, privateCloudName, maintenanceName, body) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Schedule a maintenance. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param maintenanceName Name of the maintenance. + * @param body The content of the action request. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a cluster resource along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response scheduleWithResponse(String resourceGroupName, String privateCloudName, + String maintenanceName, MaintenanceSchedule body, Context context) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.scheduleSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, maintenanceName, contentType, accept, + body, context); + } + + /** + * Schedule a maintenance. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param maintenanceName Name of the maintenance. + * @param body The content of the action request. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a cluster resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public MaintenanceInner schedule(String resourceGroupName, String privateCloudName, String maintenanceName, + MaintenanceSchedule body) { + return scheduleWithResponse(resourceGroupName, privateCloudName, maintenanceName, body, Context.NONE) + .getValue(); + } + + /** + * Initiate maintenance readiness checks. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param maintenanceName Name of the maintenance. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a cluster resource along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> initiateChecksWithResponseAsync(String resourceGroupName, + String privateCloudName, String maintenanceName) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.initiateChecks(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, maintenanceName, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Initiate maintenance readiness checks. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param maintenanceName Name of the maintenance. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a cluster resource on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono initiateChecksAsync(String resourceGroupName, String privateCloudName, + String maintenanceName) { + return initiateChecksWithResponseAsync(resourceGroupName, privateCloudName, maintenanceName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Initiate maintenance readiness checks. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param maintenanceName Name of the maintenance. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a cluster resource along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response initiateChecksWithResponse(String resourceGroupName, String privateCloudName, + String maintenanceName, Context context) { + final String accept = "application/json"; + return service.initiateChecksSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, maintenanceName, accept, context); + } + + /** + * Initiate maintenance readiness checks. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param maintenanceName Name of the maintenance. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a cluster resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public MaintenanceInner initiateChecks(String resourceGroupName, String privateCloudName, String maintenanceName) { + return initiateChecksWithResponse(resourceGroupName, privateCloudName, maintenanceName, Context.NONE) + .getValue(); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a Maintenance list operation along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listNextSinglePageAsync(String nextLink) { + 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. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a Maintenance list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listNextSinglePage(String nextLink) { + final String accept = "application/json"; + Response res + = service.listNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); + return 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. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a Maintenance list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listNextSinglePage(String nextLink, Context context) { + final String accept = "application/json"; + Response res + = service.listNextSync(nextLink, this.client.getEndpoint(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/MaintenancesImpl.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/MaintenancesImpl.java new file mode 100644 index 000000000000..7a535dbfe18d --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/MaintenancesImpl.java @@ -0,0 +1,143 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.avs.implementation; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.SimpleResponse; +import com.azure.core.util.Context; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.avs.fluent.MaintenancesClient; +import com.azure.resourcemanager.avs.fluent.models.MaintenanceInner; +import com.azure.resourcemanager.avs.models.Maintenance; +import com.azure.resourcemanager.avs.models.MaintenanceReschedule; +import com.azure.resourcemanager.avs.models.MaintenanceSchedule; +import com.azure.resourcemanager.avs.models.MaintenanceStateName; +import com.azure.resourcemanager.avs.models.MaintenanceStatusFilter; +import com.azure.resourcemanager.avs.models.Maintenances; +import java.time.OffsetDateTime; + +public final class MaintenancesImpl implements Maintenances { + private static final ClientLogger LOGGER = new ClientLogger(MaintenancesImpl.class); + + private final MaintenancesClient innerClient; + + private final com.azure.resourcemanager.avs.AvsManager serviceManager; + + public MaintenancesImpl(MaintenancesClient innerClient, com.azure.resourcemanager.avs.AvsManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public PagedIterable list(String resourceGroupName, String privateCloudName) { + PagedIterable inner = this.serviceClient().list(resourceGroupName, privateCloudName); + return ResourceManagerUtils.mapPage(inner, inner1 -> new MaintenanceImpl(inner1, this.manager())); + } + + public PagedIterable list(String resourceGroupName, String privateCloudName, + MaintenanceStateName stateName, MaintenanceStatusFilter status, OffsetDateTime from, OffsetDateTime to, + Context context) { + PagedIterable inner + = this.serviceClient().list(resourceGroupName, privateCloudName, stateName, status, from, to, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new MaintenanceImpl(inner1, this.manager())); + } + + public Response getWithResponse(String resourceGroupName, String privateCloudName, + String maintenanceName, Context context) { + Response inner + = this.serviceClient().getWithResponse(resourceGroupName, privateCloudName, maintenanceName, context); + if (inner != null) { + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new MaintenanceImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public Maintenance get(String resourceGroupName, String privateCloudName, String maintenanceName) { + MaintenanceInner inner = this.serviceClient().get(resourceGroupName, privateCloudName, maintenanceName); + if (inner != null) { + return new MaintenanceImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response rescheduleWithResponse(String resourceGroupName, String privateCloudName, + String maintenanceName, MaintenanceReschedule body, Context context) { + Response inner = this.serviceClient() + .rescheduleWithResponse(resourceGroupName, privateCloudName, maintenanceName, body, context); + if (inner != null) { + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new MaintenanceImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public Maintenance reschedule(String resourceGroupName, String privateCloudName, String maintenanceName, + MaintenanceReschedule body) { + MaintenanceInner inner + = this.serviceClient().reschedule(resourceGroupName, privateCloudName, maintenanceName, body); + if (inner != null) { + return new MaintenanceImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response scheduleWithResponse(String resourceGroupName, String privateCloudName, + String maintenanceName, MaintenanceSchedule body, Context context) { + Response inner = this.serviceClient() + .scheduleWithResponse(resourceGroupName, privateCloudName, maintenanceName, body, context); + if (inner != null) { + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new MaintenanceImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public Maintenance schedule(String resourceGroupName, String privateCloudName, String maintenanceName, + MaintenanceSchedule body) { + MaintenanceInner inner + = this.serviceClient().schedule(resourceGroupName, privateCloudName, maintenanceName, body); + if (inner != null) { + return new MaintenanceImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response initiateChecksWithResponse(String resourceGroupName, String privateCloudName, + String maintenanceName, Context context) { + Response inner = this.serviceClient() + .initiateChecksWithResponse(resourceGroupName, privateCloudName, maintenanceName, context); + if (inner != null) { + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new MaintenanceImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public Maintenance initiateChecks(String resourceGroupName, String privateCloudName, String maintenanceName) { + MaintenanceInner inner + = this.serviceClient().initiateChecks(resourceGroupName, privateCloudName, maintenanceName); + if (inner != null) { + return new MaintenanceImpl(inner, this.manager()); + } else { + return null; + } + } + + private MaintenancesClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.avs.AvsManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/PrivateCloudImpl.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/PrivateCloudImpl.java index b0c23572d024..830cbad8ca8e 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 @@ -9,6 +9,7 @@ import com.azure.core.management.SystemData; import com.azure.core.util.Context; import com.azure.resourcemanager.avs.fluent.models.PrivateCloudInner; +import com.azure.resourcemanager.avs.fluent.models.VcfLicenseInner; import com.azure.resourcemanager.avs.models.AdminCredentials; import com.azure.resourcemanager.avs.models.AvailabilityProperties; import com.azure.resourcemanager.avs.models.Circuit; @@ -24,6 +25,7 @@ import com.azure.resourcemanager.avs.models.PrivateCloudProvisioningState; import com.azure.resourcemanager.avs.models.PrivateCloudUpdate; import com.azure.resourcemanager.avs.models.Sku; +import com.azure.resourcemanager.avs.models.VcfLicense; import java.util.Collections; import java.util.List; import java.util.Map; @@ -182,6 +184,15 @@ public DnsZoneType dnsZoneType() { return this.innerModel().dnsZoneType(); } + public VcfLicense vcfLicense() { + VcfLicenseInner inner = this.innerModel().vcfLicense(); + if (inner != null) { + return new VcfLicenseImpl(inner, this.manager()); + } else { + return null; + } + } + public Region region() { return Region.fromName(this.regionName()); } @@ -300,6 +311,14 @@ public AdminCredentials listAdminCredentials() { return serviceManager.privateClouds().listAdminCredentials(resourceGroupName, privateCloudName); } + public Response getVcfLicenseWithResponse(Context context) { + return serviceManager.privateClouds().getVcfLicenseWithResponse(resourceGroupName, privateCloudName, context); + } + + public VcfLicense getVcfLicense() { + return serviceManager.privateClouds().getVcfLicense(resourceGroupName, privateCloudName); + } + public PrivateCloudImpl withRegion(Region location) { this.innerModel().withLocation(location.toString()); return this; @@ -440,6 +459,11 @@ public PrivateCloudImpl withDnsZoneType(DnsZoneType dnsZoneType) { } } + public PrivateCloudImpl withVcfLicense(VcfLicenseInner vcfLicense) { + this.innerModel().withVcfLicense(vcfLicense); + return this; + } + private boolean isInCreateMode() { return this.innerModel() == null || this.innerModel().id() == null; } diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/PrivateCloudPropertiesImpl.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/PrivateCloudPropertiesImpl.java new file mode 100644 index 000000000000..bf114e8ab953 --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/PrivateCloudPropertiesImpl.java @@ -0,0 +1,154 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.avs.implementation; + +import com.azure.resourcemanager.avs.fluent.models.PrivateCloudPropertiesInner; +import com.azure.resourcemanager.avs.fluent.models.VcfLicenseInner; +import com.azure.resourcemanager.avs.models.AvailabilityProperties; +import com.azure.resourcemanager.avs.models.Circuit; +import com.azure.resourcemanager.avs.models.DnsZoneType; +import com.azure.resourcemanager.avs.models.Encryption; +import com.azure.resourcemanager.avs.models.Endpoints; +import com.azure.resourcemanager.avs.models.IdentitySource; +import com.azure.resourcemanager.avs.models.InternetEnum; +import com.azure.resourcemanager.avs.models.ManagementCluster; +import com.azure.resourcemanager.avs.models.NsxPublicIpQuotaRaisedEnum; +import com.azure.resourcemanager.avs.models.PrivateCloudProperties; +import com.azure.resourcemanager.avs.models.PrivateCloudProvisioningState; +import com.azure.resourcemanager.avs.models.VcfLicense; +import java.util.Collections; +import java.util.List; + +public final class PrivateCloudPropertiesImpl implements PrivateCloudProperties { + private PrivateCloudPropertiesInner innerObject; + + private final com.azure.resourcemanager.avs.AvsManager serviceManager; + + PrivateCloudPropertiesImpl(PrivateCloudPropertiesInner innerObject, + com.azure.resourcemanager.avs.AvsManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + } + + public ManagementCluster managementCluster() { + return this.innerModel().managementCluster(); + } + + public InternetEnum internet() { + return this.innerModel().internet(); + } + + public List identitySources() { + List inner = this.innerModel().identitySources(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + + public AvailabilityProperties availability() { + return this.innerModel().availability(); + } + + public Encryption encryption() { + return this.innerModel().encryption(); + } + + public List extendedNetworkBlocks() { + List inner = this.innerModel().extendedNetworkBlocks(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + + public PrivateCloudProvisioningState provisioningState() { + return this.innerModel().provisioningState(); + } + + public Circuit circuit() { + return this.innerModel().circuit(); + } + + public Endpoints endpoints() { + return this.innerModel().endpoints(); + } + + public String networkBlock() { + return this.innerModel().networkBlock(); + } + + public String managementNetwork() { + return this.innerModel().managementNetwork(); + } + + public String provisioningNetwork() { + return this.innerModel().provisioningNetwork(); + } + + public String vmotionNetwork() { + return this.innerModel().vmotionNetwork(); + } + + public String vcenterPassword() { + return this.innerModel().vcenterPassword(); + } + + public String nsxtPassword() { + return this.innerModel().nsxtPassword(); + } + + public String vcenterCertificateThumbprint() { + return this.innerModel().vcenterCertificateThumbprint(); + } + + public String nsxtCertificateThumbprint() { + return this.innerModel().nsxtCertificateThumbprint(); + } + + public List externalCloudLinks() { + List inner = this.innerModel().externalCloudLinks(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + + public Circuit secondaryCircuit() { + return this.innerModel().secondaryCircuit(); + } + + public NsxPublicIpQuotaRaisedEnum nsxPublicIpQuotaRaised() { + return this.innerModel().nsxPublicIpQuotaRaised(); + } + + public String virtualNetworkId() { + return this.innerModel().virtualNetworkId(); + } + + public DnsZoneType dnsZoneType() { + return this.innerModel().dnsZoneType(); + } + + public VcfLicense vcfLicense() { + VcfLicenseInner inner = this.innerModel().vcfLicense(); + if (inner != null) { + return new VcfLicenseImpl(inner, this.manager()); + } else { + return null; + } + } + + public PrivateCloudPropertiesInner 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/PrivateCloudsClientImpl.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/PrivateCloudsClientImpl.java index afaa7b4ed336..19e7797a2ee2 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/PrivateCloudsClientImpl.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/PrivateCloudsClientImpl.java @@ -37,6 +37,7 @@ import com.azure.resourcemanager.avs.fluent.PrivateCloudsClient; import com.azure.resourcemanager.avs.fluent.models.AdminCredentialsInner; import com.azure.resourcemanager.avs.fluent.models.PrivateCloudInner; +import com.azure.resourcemanager.avs.fluent.models.VcfLicenseInner; import com.azure.resourcemanager.avs.implementation.models.PrivateCloudList; import com.azure.resourcemanager.avs.models.PrivateCloudUpdate; import java.nio.ByteBuffer; @@ -243,6 +244,26 @@ Response listAdminCredentialsSync(@HostParam("endpoint") @PathParam("privateCloudName") String privateCloudName, @HeaderParam("Accept") String accept, Context context); + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/getVcfLicense") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> getVcfLicense(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("privateCloudName") String privateCloudName, @HeaderParam("Accept") String accept, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/getVcfLicense") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response getVcfLicenseSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("privateCloudName") String privateCloudName, @HeaderParam("Accept") String accept, + Context context); + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") @ExpectedResponses({ 200 }) @@ -1424,6 +1445,76 @@ public AdminCredentialsInner listAdminCredentials(String resourceGroupName, Stri return listAdminCredentialsWithResponse(resourceGroupName, privateCloudName, Context.NONE).getValue(); } + /** + * Get the license for the private cloud. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the license for the private cloud along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getVcfLicenseWithResponseAsync(String resourceGroupName, + String privateCloudName) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.getVcfLicense(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the license for the private cloud. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the license for the private cloud on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getVcfLicenseAsync(String resourceGroupName, String privateCloudName) { + return getVcfLicenseWithResponseAsync(resourceGroupName, privateCloudName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Get the license for the private cloud. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the license for the private cloud along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getVcfLicenseWithResponse(String resourceGroupName, String privateCloudName, + Context context) { + final String accept = "application/json"; + return service.getVcfLicenseSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, accept, context); + } + + /** + * Get the license for the private cloud. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the license for the private cloud. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public VcfLicenseInner getVcfLicense(String resourceGroupName, String privateCloudName) { + return getVcfLicenseWithResponse(resourceGroupName, privateCloudName, Context.NONE).getValue(); + } + /** * Get the next page of items. * 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 b06033b8fb3b..ac55af5aed3f 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 @@ -12,9 +12,11 @@ import com.azure.resourcemanager.avs.fluent.PrivateCloudsClient; import com.azure.resourcemanager.avs.fluent.models.AdminCredentialsInner; import com.azure.resourcemanager.avs.fluent.models.PrivateCloudInner; +import com.azure.resourcemanager.avs.fluent.models.VcfLicenseInner; import com.azure.resourcemanager.avs.models.AdminCredentials; import com.azure.resourcemanager.avs.models.PrivateCloud; import com.azure.resourcemanager.avs.models.PrivateClouds; +import com.azure.resourcemanager.avs.models.VcfLicense; public final class PrivateCloudsImpl implements PrivateClouds { private static final ClientLogger LOGGER = new ClientLogger(PrivateCloudsImpl.class); @@ -114,6 +116,27 @@ public AdminCredentials listAdminCredentials(String resourceGroupName, String pr } } + public Response getVcfLicenseWithResponse(String resourceGroupName, String privateCloudName, + Context context) { + Response inner + = this.serviceClient().getVcfLicenseWithResponse(resourceGroupName, privateCloudName, context); + if (inner != null) { + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new VcfLicenseImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public VcfLicense getVcfLicense(String resourceGroupName, String privateCloudName) { + VcfLicenseInner inner = this.serviceClient().getVcfLicense(resourceGroupName, privateCloudName); + if (inner != null) { + return new VcfLicenseImpl(inner, this.manager()); + } else { + return null; + } + } + public PrivateCloud getById(String id) { String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/ServiceComponentsClientImpl.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/ServiceComponentsClientImpl.java new file mode 100644 index 000000000000..2c2829ca9183 --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/ServiceComponentsClientImpl.java @@ -0,0 +1,232 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.avs.implementation; + +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.Headers; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.Post; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.management.exception.ManagementException; +import com.azure.core.management.polling.PollResult; +import com.azure.core.util.BinaryData; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.core.util.polling.PollerFlux; +import com.azure.core.util.polling.SyncPoller; +import com.azure.resourcemanager.avs.fluent.ServiceComponentsClient; +import java.nio.ByteBuffer; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; + +/** + * An instance of this class provides access to all the operations defined in ServiceComponentsClient. + */ +public final class ServiceComponentsClientImpl implements ServiceComponentsClient { + /** + * The proxy service used to perform REST calls. + */ + private final ServiceComponentsService service; + + /** + * The service client containing this operation class. + */ + private final AvsClientImpl client; + + /** + * Initializes an instance of ServiceComponentsClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + ServiceComponentsClientImpl(AvsClientImpl client) { + this.service + = RestProxy.create(ServiceComponentsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for AvsClientServiceComponents to be used by the proxy service to perform + * REST calls. + */ + @Host("{endpoint}") + @ServiceInterface(name = "AvsClientServiceComponents") + public interface ServiceComponentsService { + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/providers/Microsoft.AVS/locations/{location}/serviceComponents/{serviceComponentName}/checkAvailability") + @ExpectedResponses({ 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> checkAvailability(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("location") String location, @PathParam("serviceComponentName") String serviceComponentName, + Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/providers/Microsoft.AVS/locations/{location}/serviceComponents/{serviceComponentName}/checkAvailability") + @ExpectedResponses({ 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response checkAvailabilitySync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("location") String location, @PathParam("serviceComponentName") String serviceComponentName, + Context context); + } + + /** + * Return service component availability. + * + * @param location A location in a subscription. + * @param serviceComponentName A service component. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> checkAvailabilityWithResponseAsync(String location, + String serviceComponentName) { + return FluxUtil + .withContext(context -> service.checkAvailability(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), location, serviceComponentName, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Return service component availability. + * + * @param location A location in a subscription. + * @param serviceComponentName A service component. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response checkAvailabilityWithResponse(String location, String serviceComponentName) { + return service.checkAvailabilitySync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), location, serviceComponentName, Context.NONE); + } + + /** + * Return service component availability. + * + * @param location A location in a subscription. + * @param serviceComponentName A service component. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response checkAvailabilityWithResponse(String location, String serviceComponentName, + Context context) { + return service.checkAvailabilitySync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), location, serviceComponentName, context); + } + + /** + * Return service component availability. + * + * @param location A location in a subscription. + * @param serviceComponentName A service component. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginCheckAvailabilityAsync(String location, + String serviceComponentName) { + Mono>> mono = checkAvailabilityWithResponseAsync(location, serviceComponentName); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); + } + + /** + * Return service component availability. + * + * @param location A location in a subscription. + * @param serviceComponentName A service component. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginCheckAvailability(String location, String serviceComponentName) { + Response response = checkAvailabilityWithResponse(location, serviceComponentName); + return this.client.getLroResult(response, Void.class, Void.class, Context.NONE); + } + + /** + * Return service component availability. + * + * @param location A location in a subscription. + * @param serviceComponentName A service component. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginCheckAvailability(String location, String serviceComponentName, + Context context) { + Response response = checkAvailabilityWithResponse(location, serviceComponentName, context); + return this.client.getLroResult(response, Void.class, Void.class, context); + } + + /** + * Return service component availability. + * + * @param location A location in a subscription. + * @param serviceComponentName A service component. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono checkAvailabilityAsync(String location, String serviceComponentName) { + return beginCheckAvailabilityAsync(location, serviceComponentName).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Return service component availability. + * + * @param location A location in a subscription. + * @param serviceComponentName A service component. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void checkAvailability(String location, String serviceComponentName) { + beginCheckAvailability(location, serviceComponentName).getFinalResult(); + } + + /** + * Return service component availability. + * + * @param location A location in a subscription. + * @param serviceComponentName A service component. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void checkAvailability(String location, String serviceComponentName, Context context) { + beginCheckAvailability(location, serviceComponentName, context).getFinalResult(); + } +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/ServiceComponentsImpl.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/ServiceComponentsImpl.java new file mode 100644 index 000000000000..fdeb45e25980 --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/ServiceComponentsImpl.java @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.avs.implementation; + +import com.azure.core.util.Context; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.avs.fluent.ServiceComponentsClient; +import com.azure.resourcemanager.avs.models.ServiceComponents; + +public final class ServiceComponentsImpl implements ServiceComponents { + private static final ClientLogger LOGGER = new ClientLogger(ServiceComponentsImpl.class); + + private final ServiceComponentsClient innerClient; + + private final com.azure.resourcemanager.avs.AvsManager serviceManager; + + public ServiceComponentsImpl(ServiceComponentsClient innerClient, + com.azure.resourcemanager.avs.AvsManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public void checkAvailability(String location, String serviceComponentName) { + this.serviceClient().checkAvailability(location, serviceComponentName); + } + + public void checkAvailability(String location, String serviceComponentName, Context context) { + this.serviceClient().checkAvailability(location, serviceComponentName, context); + } + + private ServiceComponentsClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.avs.AvsManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/VcfLicenseImpl.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/VcfLicenseImpl.java new file mode 100644 index 000000000000..afc5b63d63b1 --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/VcfLicenseImpl.java @@ -0,0 +1,37 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.avs.implementation; + +import com.azure.resourcemanager.avs.fluent.models.VcfLicenseInner; +import com.azure.resourcemanager.avs.models.LicenseProvisioningState; +import com.azure.resourcemanager.avs.models.VcfLicense; +import com.azure.resourcemanager.avs.models.VcfLicenseKind; + +public final class VcfLicenseImpl implements VcfLicense { + private VcfLicenseInner innerObject; + + private final com.azure.resourcemanager.avs.AvsManager serviceManager; + + VcfLicenseImpl(VcfLicenseInner innerObject, com.azure.resourcemanager.avs.AvsManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + } + + public VcfLicenseKind kind() { + return this.innerModel().kind(); + } + + public LicenseProvisioningState provisioningState() { + return this.innerModel().provisioningState(); + } + + public VcfLicenseInner 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/models/LicenseListResult.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/models/LicenseListResult.java new file mode 100644 index 000000000000..3f2f72be13d3 --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/models/LicenseListResult.java @@ -0,0 +1,95 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.avs.implementation.models; + +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.avs.fluent.models.LicenseInner; +import java.io.IOException; +import java.util.List; + +/** + * The response of a License list operation. + */ +@Immutable +public final class LicenseListResult implements JsonSerializable { + /* + * The License items on this page + */ + private List value; + + /* + * The link to the next page of items + */ + private String nextLink; + + /** + * Creates an instance of LicenseListResult class. + */ + private LicenseListResult() { + } + + /** + * Get the value property: The License items on this page. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Get the nextLink property: The link to the next page of items. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeStringField("nextLink", this.nextLink); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of LicenseListResult from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of LicenseListResult if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the LicenseListResult. + */ + public static LicenseListResult fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + LicenseListResult deserializedLicenseListResult = new LicenseListResult(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value = reader.readArray(reader1 -> LicenseInner.fromJson(reader1)); + deserializedLicenseListResult.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedLicenseListResult.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedLicenseListResult; + }); + } +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/models/MaintenanceListResult.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/models/MaintenanceListResult.java new file mode 100644 index 000000000000..0104b4c88d98 --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/models/MaintenanceListResult.java @@ -0,0 +1,95 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.avs.implementation.models; + +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.avs.fluent.models.MaintenanceInner; +import java.io.IOException; +import java.util.List; + +/** + * The response of a Maintenance list operation. + */ +@Immutable +public final class MaintenanceListResult implements JsonSerializable { + /* + * The Maintenance items on this page + */ + private List value; + + /* + * The link to the next page of items + */ + private String nextLink; + + /** + * Creates an instance of MaintenanceListResult class. + */ + private MaintenanceListResult() { + } + + /** + * Get the value property: The Maintenance items on this page. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Get the nextLink property: The link to the next page of items. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeStringField("nextLink", this.nextLink); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of MaintenanceListResult from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of MaintenanceListResult if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the MaintenanceListResult. + */ + public static MaintenanceListResult fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + MaintenanceListResult deserializedMaintenanceListResult = new MaintenanceListResult(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value = reader.readArray(reader1 -> MaintenanceInner.fromJson(reader1)); + deserializedMaintenanceListResult.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedMaintenanceListResult.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedMaintenanceListResult; + }); + } +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/AvailableWindowForMaintenanceWhileRescheduleOperation.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/AvailableWindowForMaintenanceWhileRescheduleOperation.java new file mode 100644 index 000000000000..83275db55794 --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/AvailableWindowForMaintenanceWhileRescheduleOperation.java @@ -0,0 +1,115 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.avs.models; + +import com.azure.core.annotation.Immutable; +import com.azure.core.util.CoreUtils; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.time.OffsetDateTime; + +/** + * Time window in which Customer can reschedule maintenance. + */ +@Immutable +public final class AvailableWindowForMaintenanceWhileRescheduleOperation extends RescheduleOperationConstraint { + /* + * The kind of operation + */ + private RescheduleOperationConstraintKind kind + = RescheduleOperationConstraintKind.AVAILABLE_WINDOW_FOR_MAINTENANCE_WHILE_RESCHEDULE_OPERATION; + + /* + * Start date time + */ + private OffsetDateTime startsAt; + + /* + * End date Time + */ + private OffsetDateTime endsAt; + + /** + * Creates an instance of AvailableWindowForMaintenanceWhileRescheduleOperation class. + */ + private AvailableWindowForMaintenanceWhileRescheduleOperation() { + } + + /** + * Get the kind property: The kind of operation. + * + * @return the kind value. + */ + @Override + public RescheduleOperationConstraintKind kind() { + return this.kind; + } + + /** + * Get the startsAt property: Start date time. + * + * @return the startsAt value. + */ + public OffsetDateTime startsAt() { + return this.startsAt; + } + + /** + * Get the endsAt property: End date Time. + * + * @return the endsAt value. + */ + public OffsetDateTime endsAt() { + return this.endsAt; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("kind", this.kind == null ? null : this.kind.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of AvailableWindowForMaintenanceWhileRescheduleOperation from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of AvailableWindowForMaintenanceWhileRescheduleOperation if the JsonReader was pointing to an + * instance of it, or null if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the AvailableWindowForMaintenanceWhileRescheduleOperation. + */ + public static AvailableWindowForMaintenanceWhileRescheduleOperation fromJson(JsonReader jsonReader) + throws IOException { + return jsonReader.readObject(reader -> { + AvailableWindowForMaintenanceWhileRescheduleOperation deserializedAvailableWindowForMaintenanceWhileRescheduleOperation + = new AvailableWindowForMaintenanceWhileRescheduleOperation(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("startsAt".equals(fieldName)) { + deserializedAvailableWindowForMaintenanceWhileRescheduleOperation.startsAt = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("endsAt".equals(fieldName)) { + deserializedAvailableWindowForMaintenanceWhileRescheduleOperation.endsAt = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("kind".equals(fieldName)) { + deserializedAvailableWindowForMaintenanceWhileRescheduleOperation.kind + = RescheduleOperationConstraintKind.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedAvailableWindowForMaintenanceWhileRescheduleOperation; + }); + } +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/AvailableWindowForMaintenanceWhileScheduleOperation.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/AvailableWindowForMaintenanceWhileScheduleOperation.java new file mode 100644 index 000000000000..c06e79b00996 --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/AvailableWindowForMaintenanceWhileScheduleOperation.java @@ -0,0 +1,115 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.avs.models; + +import com.azure.core.annotation.Immutable; +import com.azure.core.util.CoreUtils; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.time.OffsetDateTime; + +/** + * Time window in which Customer can to schedule maintenance. + */ +@Immutable +public final class AvailableWindowForMaintenanceWhileScheduleOperation extends ScheduleOperationConstraint { + /* + * The kind of operation + */ + private ScheduleOperationConstraintKind kind + = ScheduleOperationConstraintKind.AVAILABLE_WINDOW_FOR_MAINTENANCE_WHILE_SCHEDULE_OPERATION; + + /* + * Start date time + */ + private OffsetDateTime startsAt; + + /* + * End date Time + */ + private OffsetDateTime endsAt; + + /** + * Creates an instance of AvailableWindowForMaintenanceWhileScheduleOperation class. + */ + private AvailableWindowForMaintenanceWhileScheduleOperation() { + } + + /** + * Get the kind property: The kind of operation. + * + * @return the kind value. + */ + @Override + public ScheduleOperationConstraintKind kind() { + return this.kind; + } + + /** + * Get the startsAt property: Start date time. + * + * @return the startsAt value. + */ + public OffsetDateTime startsAt() { + return this.startsAt; + } + + /** + * Get the endsAt property: End date Time. + * + * @return the endsAt value. + */ + public OffsetDateTime endsAt() { + return this.endsAt; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("kind", this.kind == null ? null : this.kind.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of AvailableWindowForMaintenanceWhileScheduleOperation from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of AvailableWindowForMaintenanceWhileScheduleOperation if the JsonReader was pointing to an + * instance of it, or null if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the AvailableWindowForMaintenanceWhileScheduleOperation. + */ + public static AvailableWindowForMaintenanceWhileScheduleOperation fromJson(JsonReader jsonReader) + throws IOException { + return jsonReader.readObject(reader -> { + AvailableWindowForMaintenanceWhileScheduleOperation deserializedAvailableWindowForMaintenanceWhileScheduleOperation + = new AvailableWindowForMaintenanceWhileScheduleOperation(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("startsAt".equals(fieldName)) { + deserializedAvailableWindowForMaintenanceWhileScheduleOperation.startsAt = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("endsAt".equals(fieldName)) { + deserializedAvailableWindowForMaintenanceWhileScheduleOperation.endsAt = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("kind".equals(fieldName)) { + deserializedAvailableWindowForMaintenanceWhileScheduleOperation.kind + = ScheduleOperationConstraintKind.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedAvailableWindowForMaintenanceWhileScheduleOperation; + }); + } +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/BlockedDatesConstraintCategory.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/BlockedDatesConstraintCategory.java new file mode 100644 index 000000000000..22ee82dc905a --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/BlockedDatesConstraintCategory.java @@ -0,0 +1,56 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.avs.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Reason for blocking operation on maintenance. + */ +public final class BlockedDatesConstraintCategory extends ExpandableStringEnum { + /** + * Hi-Priority Event. + */ + public static final BlockedDatesConstraintCategory HI_PRIORITY_EVENT = fromString("HiPriorityEvent"); + + /** + * Quota Exhausted. + */ + public static final BlockedDatesConstraintCategory QUOTA_EXHAUSTED = fromString("QuotaExhausted"); + + /** + * Holidays. + */ + public static final BlockedDatesConstraintCategory HOLIDAY = fromString("Holiday"); + + /** + * Creates a new instance of BlockedDatesConstraintCategory value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public BlockedDatesConstraintCategory() { + } + + /** + * Creates or finds a BlockedDatesConstraintCategory from its string representation. + * + * @param name a name to look for. + * @return the corresponding BlockedDatesConstraintCategory. + */ + public static BlockedDatesConstraintCategory fromString(String name) { + return fromString(name, BlockedDatesConstraintCategory.class); + } + + /** + * Gets known BlockedDatesConstraintCategory values. + * + * @return known BlockedDatesConstraintCategory values. + */ + public static Collection values() { + return values(BlockedDatesConstraintCategory.class); + } +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/BlockedDatesConstraintTimeRange.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/BlockedDatesConstraintTimeRange.java new file mode 100644 index 000000000000..19494302f5ba --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/BlockedDatesConstraintTimeRange.java @@ -0,0 +1,111 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.avs.models; + +import com.azure.core.annotation.Immutable; +import com.azure.core.util.CoreUtils; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.time.OffsetDateTime; + +/** + * Blocked Time range Constraints for maintenance. + */ +@Immutable +public final class BlockedDatesConstraintTimeRange implements JsonSerializable { + /* + * Start date time + */ + private OffsetDateTime startsAt; + + /* + * End date Time + */ + private OffsetDateTime endsAt; + + /* + * Reason category for blocking maintenance reschedule + */ + private String reason; + + /** + * Creates an instance of BlockedDatesConstraintTimeRange class. + */ + private BlockedDatesConstraintTimeRange() { + } + + /** + * Get the startsAt property: Start date time. + * + * @return the startsAt value. + */ + public OffsetDateTime startsAt() { + return this.startsAt; + } + + /** + * Get the endsAt property: End date Time. + * + * @return the endsAt value. + */ + public OffsetDateTime endsAt() { + return this.endsAt; + } + + /** + * Get the reason property: Reason category for blocking maintenance reschedule. + * + * @return the reason value. + */ + public String reason() { + return this.reason; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of BlockedDatesConstraintTimeRange from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of BlockedDatesConstraintTimeRange if the JsonReader was pointing to an instance of it, or + * null if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the BlockedDatesConstraintTimeRange. + */ + public static BlockedDatesConstraintTimeRange fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + BlockedDatesConstraintTimeRange deserializedBlockedDatesConstraintTimeRange + = new BlockedDatesConstraintTimeRange(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("startsAt".equals(fieldName)) { + deserializedBlockedDatesConstraintTimeRange.startsAt = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("endsAt".equals(fieldName)) { + deserializedBlockedDatesConstraintTimeRange.endsAt = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("reason".equals(fieldName)) { + deserializedBlockedDatesConstraintTimeRange.reason = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedBlockedDatesConstraintTimeRange; + }); + } +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/BlockedWhileRescheduleOperation.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/BlockedWhileRescheduleOperation.java new file mode 100644 index 000000000000..d0178475e5a5 --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/BlockedWhileRescheduleOperation.java @@ -0,0 +1,114 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.avs.models; + +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.List; + +/** + * Time ranges blocked for rescheduling maintenance. + */ +@Immutable +public final class BlockedWhileRescheduleOperation extends RescheduleOperationConstraint { + /* + * The kind of operation + */ + private RescheduleOperationConstraintKind kind + = RescheduleOperationConstraintKind.BLOCKED_WHILE_RESCHEDULE_OPERATION; + + /* + * Category of blocked date + */ + private BlockedDatesConstraintCategory category; + + /* + * Date ranges blocked for schedule + */ + private List timeRanges; + + /** + * Creates an instance of BlockedWhileRescheduleOperation class. + */ + private BlockedWhileRescheduleOperation() { + } + + /** + * Get the kind property: The kind of operation. + * + * @return the kind value. + */ + @Override + public RescheduleOperationConstraintKind kind() { + return this.kind; + } + + /** + * Get the category property: Category of blocked date. + * + * @return the category value. + */ + public BlockedDatesConstraintCategory category() { + return this.category; + } + + /** + * Get the timeRanges property: Date ranges blocked for schedule. + * + * @return the timeRanges value. + */ + public List timeRanges() { + return this.timeRanges; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("kind", this.kind == null ? null : this.kind.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of BlockedWhileRescheduleOperation from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of BlockedWhileRescheduleOperation if the JsonReader was pointing to an instance of it, or + * null if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the BlockedWhileRescheduleOperation. + */ + public static BlockedWhileRescheduleOperation fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + BlockedWhileRescheduleOperation deserializedBlockedWhileRescheduleOperation + = new BlockedWhileRescheduleOperation(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("category".equals(fieldName)) { + deserializedBlockedWhileRescheduleOperation.category + = BlockedDatesConstraintCategory.fromString(reader.getString()); + } else if ("kind".equals(fieldName)) { + deserializedBlockedWhileRescheduleOperation.kind + = RescheduleOperationConstraintKind.fromString(reader.getString()); + } else if ("timeRanges".equals(fieldName)) { + List timeRanges + = reader.readArray(reader1 -> BlockedDatesConstraintTimeRange.fromJson(reader1)); + deserializedBlockedWhileRescheduleOperation.timeRanges = timeRanges; + } else { + reader.skipChildren(); + } + } + + return deserializedBlockedWhileRescheduleOperation; + }); + } +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/BlockedWhileScheduleOperation.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/BlockedWhileScheduleOperation.java new file mode 100644 index 000000000000..6a6bcb73acba --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/BlockedWhileScheduleOperation.java @@ -0,0 +1,113 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.avs.models; + +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.List; + +/** + * Time ranges blocked for scheduling maintenance. + */ +@Immutable +public final class BlockedWhileScheduleOperation extends ScheduleOperationConstraint { + /* + * The kind of operation + */ + private ScheduleOperationConstraintKind kind = ScheduleOperationConstraintKind.BLOCKED_WHILE_SCHEDULE_OPERATION; + + /* + * Category of blocked date + */ + private BlockedDatesConstraintCategory category; + + /* + * Date ranges blocked for schedule + */ + private List timeRanges; + + /** + * Creates an instance of BlockedWhileScheduleOperation class. + */ + private BlockedWhileScheduleOperation() { + } + + /** + * Get the kind property: The kind of operation. + * + * @return the kind value. + */ + @Override + public ScheduleOperationConstraintKind kind() { + return this.kind; + } + + /** + * Get the category property: Category of blocked date. + * + * @return the category value. + */ + public BlockedDatesConstraintCategory category() { + return this.category; + } + + /** + * Get the timeRanges property: Date ranges blocked for schedule. + * + * @return the timeRanges value. + */ + public List timeRanges() { + return this.timeRanges; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("kind", this.kind == null ? null : this.kind.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of BlockedWhileScheduleOperation from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of BlockedWhileScheduleOperation if the JsonReader was pointing to an instance of it, or null + * if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the BlockedWhileScheduleOperation. + */ + public static BlockedWhileScheduleOperation fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + BlockedWhileScheduleOperation deserializedBlockedWhileScheduleOperation + = new BlockedWhileScheduleOperation(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("category".equals(fieldName)) { + deserializedBlockedWhileScheduleOperation.category + = BlockedDatesConstraintCategory.fromString(reader.getString()); + } else if ("kind".equals(fieldName)) { + deserializedBlockedWhileScheduleOperation.kind + = ScheduleOperationConstraintKind.fromString(reader.getString()); + } else if ("timeRanges".equals(fieldName)) { + List timeRanges + = reader.readArray(reader1 -> BlockedDatesConstraintTimeRange.fromJson(reader1)); + deserializedBlockedWhileScheduleOperation.timeRanges = timeRanges; + } else { + reader.skipChildren(); + } + } + + return deserializedBlockedWhileScheduleOperation; + }); + } +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ImpactedMaintenanceResource.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ImpactedMaintenanceResource.java new file mode 100644 index 000000000000..ca124218c3db --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ImpactedMaintenanceResource.java @@ -0,0 +1,92 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.avs.models; + +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.List; + +/** + * Details about a resource impacted by a failed check. + */ +@Immutable +public final class ImpactedMaintenanceResource implements JsonSerializable { + /* + * The ID of the impacted resource + */ + private String id; + + /* + * A list of errors associated with the impacted resource + */ + private List errors; + + /** + * Creates an instance of ImpactedMaintenanceResource class. + */ + private ImpactedMaintenanceResource() { + } + + /** + * Get the id property: The ID of the impacted resource. + * + * @return the id value. + */ + public String id() { + return this.id; + } + + /** + * Get the errors property: A list of errors associated with the impacted resource. + * + * @return the errors value. + */ + public List errors() { + return this.errors; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ImpactedMaintenanceResource from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ImpactedMaintenanceResource if the JsonReader was pointing to an instance of it, or null + * if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the ImpactedMaintenanceResource. + */ + public static ImpactedMaintenanceResource fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ImpactedMaintenanceResource deserializedImpactedMaintenanceResource = new ImpactedMaintenanceResource(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedImpactedMaintenanceResource.id = reader.getString(); + } else if ("errors".equals(fieldName)) { + List errors + = reader.readArray(reader1 -> ImpactedMaintenanceResourceError.fromJson(reader1)); + deserializedImpactedMaintenanceResource.errors = errors; + } else { + reader.skipChildren(); + } + } + + return deserializedImpactedMaintenanceResource; + }); + } +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ImpactedMaintenanceResourceError.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ImpactedMaintenanceResourceError.java new file mode 100644 index 000000000000..cd5b43a03e1c --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ImpactedMaintenanceResourceError.java @@ -0,0 +1,141 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.avs.models; + +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.List; + +/** + * Details about an error affecting a resource. + */ +@Immutable +public final class ImpactedMaintenanceResourceError implements JsonSerializable { + /* + * The error code + */ + private String errorCode; + + /* + * The name of the error + */ + private String name; + + /* + * Additional details about the error + */ + private String details; + + /* + * Steps to resolve the error + */ + private List resolutionSteps; + + /* + * Indicates whether action is required by the customer + */ + private Boolean actionRequired; + + /** + * Creates an instance of ImpactedMaintenanceResourceError class. + */ + private ImpactedMaintenanceResourceError() { + } + + /** + * Get the errorCode property: The error code. + * + * @return the errorCode value. + */ + public String errorCode() { + return this.errorCode; + } + + /** + * Get the name property: The name of the error. + * + * @return the name value. + */ + public String name() { + return this.name; + } + + /** + * Get the details property: Additional details about the error. + * + * @return the details value. + */ + public String details() { + return this.details; + } + + /** + * Get the resolutionSteps property: Steps to resolve the error. + * + * @return the resolutionSteps value. + */ + public List resolutionSteps() { + return this.resolutionSteps; + } + + /** + * Get the actionRequired property: Indicates whether action is required by the customer. + * + * @return the actionRequired value. + */ + public Boolean actionRequired() { + return this.actionRequired; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ImpactedMaintenanceResourceError from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ImpactedMaintenanceResourceError if the JsonReader was pointing to an instance of it, or + * null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the ImpactedMaintenanceResourceError. + */ + public static ImpactedMaintenanceResourceError fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ImpactedMaintenanceResourceError deserializedImpactedMaintenanceResourceError + = new ImpactedMaintenanceResourceError(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("errorCode".equals(fieldName)) { + deserializedImpactedMaintenanceResourceError.errorCode = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedImpactedMaintenanceResourceError.name = reader.getString(); + } else if ("details".equals(fieldName)) { + deserializedImpactedMaintenanceResourceError.details = reader.getString(); + } else if ("resolutionSteps".equals(fieldName)) { + List resolutionSteps = reader.readArray(reader1 -> reader1.getString()); + deserializedImpactedMaintenanceResourceError.resolutionSteps = resolutionSteps; + } else if ("actionRequired".equals(fieldName)) { + deserializedImpactedMaintenanceResourceError.actionRequired + = reader.getNullable(JsonReader::getBoolean); + } else { + reader.skipChildren(); + } + } + + return deserializedImpactedMaintenanceResourceError; + }); + } +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/Label.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/Label.java new file mode 100644 index 000000000000..a3117282e296 --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/Label.java @@ -0,0 +1,114 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.avs.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * A key-value pair representing a label. + */ +@Fluent +public final class Label implements JsonSerializable