From 410b06c45d5403407876e951f32fd8060150801f Mon Sep 17 00:00:00 2001 From: azure-sdk Date: Wed, 4 Feb 2026 11:08:09 +0000 Subject: [PATCH] Configurations: 'specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/StackHCI/tspconfig.yaml', API Version: 2026-02-01, SDK Release Type: stable, and CommitSHA: '2daa450f8eaef939165415ce90178334568eacfd' in SpecRepo: 'https://github.com/Azure/azure-rest-api-specs' Pipeline run: https://dev.azure.com/azure-sdk/internal/_build/results?buildId=5836685 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 +- .../CHANGELOG.md | 701 ++++++- .../README.md | 14 +- .../SAMPLE.md | 682 +++--- .../pom.xml | 19 +- .../azurestackhci/AzureStackHciManager.java | 184 +- .../fluent/ArcSettingsClient.java | 132 +- ...ava => AzureStackHciManagementClient.java} | 85 +- .../azurestackhci/fluent/ClustersClient.java | 191 +- .../fluent/DeploymentSettingsClient.java | 56 +- .../fluent/EdgeDeviceJobsClient.java | 199 ++ .../fluent/EdgeDevicesClient.java | 60 +- .../fluent/ExtensionsClient.java | 62 +- .../azurestackhci/fluent/OffersClient.java | 68 +- .../fluent/OperationsClient.java | 28 +- .../fluent/SecuritySettingsClient.java | 56 +- .../azurestackhci/fluent/SkusClient.java | 56 +- .../fluent/UpdateRunsClient.java | 98 +- .../UpdateSummariesOperationsClient.java | 86 +- .../azurestackhci/fluent/UpdatesClient.java | 120 +- ...va => ValidatedSolutionRecipesClient.java} | 64 +- .../models/ArcIdentityResponseInner.java | 71 +- .../models/ArcIdentityResponseProperties.java | 60 +- .../fluent/models/ArcSettingInner.java | 42 +- .../fluent/models/ArcSettingProperties.java | 28 +- .../models/ArcSettingsPatchProperties.java | 22 +- .../models/ClusterIdentityResponseInner.java | 71 +- .../ClusterIdentityResponseProperties.java | 60 +- .../fluent/models/ClusterInner.java | 287 ++- .../fluent/models/ClusterPatchProperties.java | 13 +- .../fluent/models/ClusterProperties.java | 158 +- .../fluent/models/DeploymentSettingInner.java | 37 +- .../models/DeploymentSettingsProperties.java | 33 +- .../fluent/models/EdgeDeviceInner.java | 42 +- .../fluent/models/EdgeDeviceJobInner.java | 185 ++ .../fluent/models/ExtensionInner.java | 47 +- .../fluent/models/ExtensionParameters.java | 18 +- .../models/ExtensionPatchProperties.java | 13 +- .../fluent/models/ExtensionProperties.java | 35 +- .../fluent/models/HciUpdateInner.java | 100 +- .../fluent/models/ManagedServiceIdentity.java | 62 +- .../fluent/models/OfferInner.java | 99 +- .../fluent/models/OfferProperties.java | 63 +- .../fluent/models/OperationInner.java | 150 ++ .../models/OperationListResultInner.java | 104 - .../models/PasswordCredentialInner.java | 60 +- .../fluent/models/PublisherProperties.java | 81 - .../fluent/models/SecurityProperties.java | 26 +- .../fluent/models/SecuritySettingInner.java | 51 +- .../azurestackhci/fluent/models/SkuInner.java | 113 +- .../fluent/models/SkuProperties.java | 74 +- .../azurestackhci/fluent/models/Step.java | 13 +- .../fluent/models/UpdateProperties.java | 70 +- .../fluent/models/UpdateRunInner.java | 78 +- .../fluent/models/UpdateRunProperties.java | 28 +- .../fluent/models/UpdateStateProperties.java | 18 +- .../fluent/models/UpdateSummariesInner.java | 79 +- .../models/UpdateSummariesProperties.java | 32 +- .../fluent/models/ValidateResponseInner.java | 12 +- ...java => ValidatedSolutionRecipeInner.java} | 94 +- .../fluent/models/package-info.java | 6 +- .../azurestackhci/fluent/package-info.java | 6 +- .../ArcIdentityResponseImpl.java | 2 +- .../implementation/ArcSettingImpl.java | 20 +- .../implementation/ArcSettingsClientImpl.java | 1329 +++++------- .../implementation/ArcSettingsImpl.java | 47 +- ...AzureStackHciManagementClientBuilder.java} | 62 +- ...=> AzureStackHciManagementClientImpl.java} | 218 +- .../ClusterIdentityResponseImpl.java | 2 +- .../implementation/ClusterImpl.java | 133 +- .../implementation/ClustersClientImpl.java | 1827 ++++++++--------- .../implementation/ClustersImpl.java | 63 +- .../implementation/DeploymentSettingImpl.java | 2 +- .../DeploymentSettingsClientImpl.java | 682 +++--- .../DeploymentSettingsImpl.java | 28 +- .../implementation/EdgeDeviceImpl.java | 2 +- ...lisherImpl.java => EdgeDeviceJobImpl.java} | 23 +- .../EdgeDeviceJobsClientImpl.java | 756 +++++++ .../implementation/EdgeDeviceJobsImpl.java | 98 + .../implementation/EdgeDevicesClientImpl.java | 695 +++---- .../implementation/EdgeDevicesImpl.java | 22 +- .../implementation/ExtensionImpl.java | 2 +- .../implementation/ExtensionsClientImpl.java | 1066 ++++------ .../implementation/ExtensionsImpl.java | 32 +- .../implementation/HciUpdateImpl.java | 10 +- .../implementation/OfferImpl.java | 2 +- .../implementation/OffersClientImpl.java | 578 +++--- .../implementation/OffersImpl.java | 44 +- .../implementation/OperationImpl.java | 51 + .../OperationListResultImpl.java | 44 - .../implementation/OperationsClientImpl.java | 175 +- .../implementation/OperationsImpl.java | 30 +- .../PasswordCredentialImpl.java | 2 +- .../implementation/PublishersClientImpl.java | 418 ---- .../implementation/PublishersImpl.java | 69 - .../implementation/ResourceManagerUtils.java | 2 +- .../implementation/SecuritySettingImpl.java | 7 +- .../SecuritySettingsClientImpl.java | 673 +++--- .../implementation/SecuritySettingsImpl.java | 26 +- .../azurestackhci/implementation/SkuImpl.java | 2 +- .../implementation/SkusClientImpl.java | 402 ++-- .../implementation/SkusImpl.java | 30 +- .../implementation/UpdateRunImpl.java | 2 +- .../implementation/UpdateRunsClientImpl.java | 700 +++---- .../implementation/UpdateRunsImpl.java | 44 +- .../implementation/UpdateSummariesImpl.java | 2 +- .../UpdateSummariesOperationsClientImpl.java | 600 ++---- .../UpdateSummariesOperationsImpl.java | 58 +- .../implementation/UpdatesClientImpl.java | 843 +++----- .../implementation/UpdatesImpl.java | 54 +- .../implementation/ValidateResponseImpl.java | 2 +- .../ValidatedSolutionRecipeImpl.java | 50 + .../ValidatedSolutionRecipesClientImpl.java | 361 ++++ .../ValidatedSolutionRecipesImpl.java | 70 + .../models/ArcSettingList.java | 28 +- .../models/ClusterList.java | 42 +- .../models/DeploymentSettingListResult.java | 50 +- .../models/EdgeDeviceJobListResult.java | 95 + .../models/EdgeDeviceListResult.java | 49 +- .../models/ExtensionList.java | 28 +- .../models/OfferList.java | 28 +- .../models/OperationListResult.java | 96 + .../models/SecuritySettingListResult.java | 50 +- .../{ => implementation}/models/SkuList.java | 28 +- .../models/UpdateList.java | 42 +- .../models/UpdateRunList.java | 42 +- .../models/UpdateSummariesList.java | 42 +- .../ValidatedSolutionRecipeListResult.java | 97 + .../implementation/package-info.java | 6 +- .../azurestackhci/models/AccessLevel.java | 6 +- .../azurestackhci/models/ActionType.java | 6 +- .../models/ArcConnectivityProperties.java | 120 ++ .../models/ArcExtensionState.java | 22 +- .../models/ArcIdentityResponse.java | 2 +- .../azurestackhci/models/ArcSetting.java | 35 +- .../models/ArcSettingAggregateState.java | 38 +- .../azurestackhci/models/ArcSettings.java | 79 +- .../models/ArcSettingsPatch.java | 17 +- .../azurestackhci/models/AssemblyInfo.java | 93 + .../models/AssemblyInfoPayload.java | 121 ++ .../models/AvailabilityType.java | 11 +- .../azurestackhci/models/Cluster.java | 263 ++- .../models/ClusterDesiredProperties.java | 10 +- .../models/ClusterIdentityResponse.java | 2 +- .../azurestackhci/models/ClusterNode.java | 30 +- .../azurestackhci/models/ClusterNodeType.java | 9 +- .../azurestackhci/models/ClusterPatch.java | 37 +- .../azurestackhci/models/ClusterPattern.java | 51 + .../models/ClusterReportedProperties.java | 61 +- .../azurestackhci/models/Clusters.java | 90 +- .../models/ComplianceAssignmentType.java | 7 +- .../models/ComplianceStatus.java | 8 +- .../models/ConnectivityStatus.java | 17 +- .../models/DefaultExtensionDetails.java | 12 +- .../models/DeploymentCluster.java | 45 +- .../models/DeploymentConfiguration.java | 20 +- .../azurestackhci/models/DeploymentData.java | 158 +- .../azurestackhci/models/DeploymentMode.java | 8 +- .../models/DeploymentSecuritySettings.java | 10 +- .../models/DeploymentSetting.java | 2 +- ...oymentSettingAdapterPropertyOverrides.java | 10 +- .../models/DeploymentSettingHostNetwork.java | 16 +- .../models/DeploymentSettingIntents.java | 19 +- ...DeploymentSettingStorageAdapterIpInfo.java | 10 +- .../DeploymentSettingStorageNetworks.java | 13 +- ...ngVirtualSwitchConfigurationOverrides.java | 10 +- .../models/DeploymentSettings.java | 44 +- .../azurestackhci/models/DeploymentStep.java | 15 +- .../models/DeviceConfiguration.java | 13 +- .../azurestackhci/models/DeviceKind.java | 4 +- .../models/DeviceLogCollectionStatus.java | 66 + .../azurestackhci/models/DeviceState.java | 18 +- .../azurestackhci/models/DiagnosticLevel.java | 8 +- .../azurestackhci/models/DnsServerConfig.java | 52 + .../azurestackhci/models/DnsZones.java | 115 ++ .../azurestackhci/models/EceActionStatus.java | 15 +- .../models/EceDeploymentSecrets.java | 10 +- .../models/EceReportedProperties.java | 18 +- .../azurestackhci/models/EceSecrets.java | 10 +- .../azurestackhci/models/EdgeDevice.java | 6 +- .../azurestackhci/models/EdgeDeviceJob.java | 57 + .../azurestackhci/models/EdgeDeviceJobs.java | 124 ++ .../azurestackhci/models/EdgeDeviceKind.java | 46 + .../models/EdgeDeviceProperties.java | 13 +- .../azurestackhci/models/EdgeDevices.java | 52 +- .../azurestackhci/models/Extension.java | 12 +- .../models/ExtensionAggregateState.java | 41 +- .../models/ExtensionInstanceView.java | 63 +- .../models/ExtensionInstanceViewStatus.java | 75 +- .../models/ExtensionManagedBy.java | 8 +- .../azurestackhci/models/ExtensionPatch.java | 13 +- .../models/ExtensionPatchParameters.java | 18 +- .../models/ExtensionProfile.java | 15 +- .../models/ExtensionUpgradeParameters.java | 10 +- .../azurestackhci/models/Extensions.java | 46 +- .../azurestackhci/models/HardwareClass.java | 56 + .../models/HciCollectLogJobProperties.java | 199 ++ .../azurestackhci/models/HciEdgeDevice.java | 63 +- ...HciEdgeDeviceAdapterPropertyOverrides.java | 12 +- .../models/HciEdgeDeviceArcExtension.java | 19 +- .../models/HciEdgeDeviceHostNetwork.java | 18 +- .../models/HciEdgeDeviceIntents.java | 21 +- .../models/HciEdgeDeviceJob.java | 177 ++ .../models/HciEdgeDeviceJobProperties.java | 272 +++ .../models/HciEdgeDeviceJobType.java | 51 + .../models/HciEdgeDeviceProperties.java | 15 +- .../HciEdgeDeviceStorageAdapterIpInfo.java | 12 +- .../models/HciEdgeDeviceStorageNetworks.java | 15 +- ...ceVirtualSwitchConfigurationOverrides.java | 12 +- .../models/HciHardwareProfile.java | 73 + .../models/HciNetworkProfile.java | 21 +- .../azurestackhci/models/HciNicDetail.java | 18 +- .../azurestackhci/models/HciOsProfile.java | 12 +- .../models/HciRemoteSupportJobProperties.java | 212 ++ .../models/HciReportedProperties.java | 57 +- .../models/HciStorageProfile.java | 73 + .../azurestackhci/models/HciUpdate.java | 73 +- .../models/HciValidationFailureDetail.java | 12 +- .../azurestackhci/models/HealthState.java | 17 +- .../models/IdentityProvider.java | 53 + .../azurestackhci/models/ImdsAttestation.java | 6 +- .../models/InfrastructureNetwork.java | 74 +- .../azurestackhci/models/IpPools.java | 10 +- .../IsolatedVmAttestationConfiguration.java | 12 +- .../azurestackhci/models/JobStatus.java | 101 + .../models/LocalAvailabilityZones.java | 115 ++ .../models/LogCollectionError.java | 12 +- .../models/LogCollectionJobSession.java | 155 ++ .../models/LogCollectionJobType.java | 9 +- .../models/LogCollectionProperties.java | 13 +- .../LogCollectionReportedProperties.java | 127 ++ .../models/LogCollectionRequest.java | 13 +- .../LogCollectionRequestProperties.java | 23 +- .../models/LogCollectionSession.java | 45 +- .../models/LogCollectionStatus.java | 10 +- .../models/ManagedServiceIdentityType.java | 12 +- .../models/NetworkController.java | 10 +- .../azurestackhci/models/NicDetail.java | 10 +- .../azurestackhci/models/NodeArcState.java | 41 +- .../models/NodeExtensionState.java | 39 +- .../azurestackhci/models/Observability.java | 10 +- .../azurestackhci/models/OemActivation.java | 6 +- .../azurestackhci/models/Offer.java | 2 +- .../azurestackhci/models/Offers.java | 58 +- .../azurestackhci/models/Operation.java | 149 +- .../models/OperationDisplay.java | 14 +- .../models/OperationListResult.java | 34 - .../azurestackhci/models/OperationType.java | 6 +- .../azurestackhci/models/Operations.java | 22 +- .../models/OptionalServices.java | 10 +- .../azurestackhci/models/Origin.java | 8 +- .../models/PackageVersionInfo.java | 10 +- .../models/PasswordCredential.java | 2 +- .../models/PerNodeExtensionState.java | 22 +- .../models/PerNodeRemoteSupportSession.java | 12 +- .../azurestackhci/models/PerNodeState.java | 18 +- .../azurestackhci/models/PhysicalNodes.java | 10 +- .../azurestackhci/models/PrecheckResult.java | 41 +- .../models/PrecheckResultTags.java | 10 +- .../models/ProvisioningState.java | 38 +- .../azurestackhci/models/PublisherList.java | 103 - .../azurestackhci/models/Publishers.java | 67 - .../models/QosPolicyOverrides.java | 10 +- .../models/RawCertificateData.java | 10 +- .../azurestackhci/models/RdmaCapability.java | 51 + .../models/RebootRequirement.java | 11 +- .../models/ReconcileArcSettingsRequest.java | 86 + ...ReconcileArcSettingsRequestProperties.java | 89 + .../models/RemoteSupportAccessLevel.java | 56 + .../models/RemoteSupportJobNodeSettings.java | 141 ++ .../RemoteSupportJobReportedProperties.java | 143 ++ .../models/RemoteSupportNodeSettings.java | 12 +- .../models/RemoteSupportProperties.java | 16 +- .../models/RemoteSupportRequest.java | 13 +- .../RemoteSupportRequestProperties.java | 10 +- .../models/RemoteSupportSession.java | 142 ++ .../models/RemoteSupportType.java | 6 +- .../models/ReportedProperties.java | 15 +- .../azurestackhci/models/SbeCredentials.java | 10 +- .../models/SbeDeploymentInfo.java | 10 +- .../models/SbeDeploymentPackageInfo.java | 12 +- .../azurestackhci/models/SbePartnerInfo.java | 19 +- .../models/SbePartnerProperties.java | 10 +- .../azurestackhci/models/ScaleUnits.java | 22 +- .../azurestackhci/models/SdnIntegration.java | 13 +- .../models/SecretsLocationDetails.java | 114 + .../models/SecretsLocationsChangeRequest.java | 89 + .../azurestackhci/models/SecretsType.java | 46 + .../models/SecurityComplianceStatus.java | 12 +- .../azurestackhci/models/SecuritySetting.java | 33 +- .../models/SecuritySettings.java | 44 +- .../models/ServiceConfiguration.java | 117 ++ .../azurestackhci/models/ServiceName.java | 47 + .../azurestackhci/models/Severity.java | 14 +- .../azurestackhci/models/Sku.java | 2 +- .../azurestackhci/models/SkuMappings.java | 49 +- .../azurestackhci/models/Skus.java | 48 +- .../SoftwareAssuranceChangeRequest.java | 13 +- ...twareAssuranceChangeRequestProperties.java | 21 +- .../models/SoftwareAssuranceIntent.java | 6 +- .../models/SoftwareAssuranceProperties.java | 10 +- .../models/SoftwareAssuranceStatus.java | 6 +- .../azurestackhci/models/State.java | 43 +- .../azurestackhci/models/Status.java | 44 +- .../models/StatusLevelTypes.java | 10 +- .../azurestackhci/models/Storage.java | 10 +- .../azurestackhci/models/SwitchDetail.java | 15 +- .../azurestackhci/models/SwitchExtension.java | 12 +- .../models/UpdatePrerequisite.java | 10 +- .../azurestackhci/models/UpdateRun.java | 20 +- .../models/UpdateRunPropertiesState.java | 13 +- .../azurestackhci/models/UpdateRuns.java | 36 +- .../azurestackhci/models/UpdateSummaries.java | 9 +- .../models/UpdateSummariesOperations.java | 60 +- .../UpdateSummariesPropertiesState.java | 21 +- .../azurestackhci/models/Updates.java | 52 +- .../models/UploadCertificateRequest.java | 13 +- .../models/UserAssignedIdentity.java | 25 +- .../azurestackhci/models/ValidateRequest.java | 17 +- .../models/ValidateResponse.java | 2 +- ...sher.java => ValidatedSolutionRecipe.java} | 24 +- .../ValidatedSolutionRecipeCapabilities.java | 101 + .../ValidatedSolutionRecipeCapability.java | 76 + .../ValidatedSolutionRecipeComponent.java | 183 ++ ...idatedSolutionRecipeComponentMetadata.java | 248 +++ ...lidatedSolutionRecipeComponentPayload.java | 128 ++ .../ValidatedSolutionRecipeContent.java | 114 + .../models/ValidatedSolutionRecipeInfo.java | 93 + .../ValidatedSolutionRecipeProperties.java | 94 + .../models/ValidatedSolutionRecipes.java | 65 + .../models/WindowsServerSubscription.java | 6 +- .../azurestackhci/models/package-info.java | 6 +- .../azurestackhci/package-info.java | 6 +- .../src/main/java/module-info.java | 3 +- ...ager-azurestackhci_apiview_properties.json | 355 ++++ ...esourcemanager-azurestackhci_metadata.json | 1 + .../proxy-config.json | 2 +- ...e-resourcemanager-azurestackhci.properties | 1 + ...entAndInstallDefaultExtensionsSamples.java | 6 +- .../ArcSettingsCreateIdentitySamples.java | 6 +- .../generated/ArcSettingsCreateSamples.java | 6 +- .../generated/ArcSettingsDeleteSamples.java | 6 +- .../ArcSettingsGeneratePasswordSamples.java | 6 +- .../generated/ArcSettingsGetSamples.java | 6 +- ...ttingsInitializeDisableProcessSamples.java | 6 +- .../ArcSettingsListByClusterSamples.java | 6 +- .../ArcSettingsReconcileSamples.java | 32 + .../generated/ArcSettingsUpdateSamples.java | 22 +- ...ClustersConfigureRemoteSupportSamples.java | 6 +- .../ClustersCreateIdentitySamples.java | 6 +- .../generated/ClustersCreateSamples.java | 8 +- .../generated/ClustersDeleteSamples.java | 6 +- ...ExtendSoftwareAssuranceBenefitSamples.java | 6 +- .../ClustersGetByResourceGroupSamples.java | 6 +- .../ClustersListByResourceGroupSamples.java | 6 +- .../generated/ClustersListSamples.java | 6 +- .../ClustersTriggerLogCollectionSamples.java | 6 +- .../generated/ClustersUpdateSamples.java | 6 +- ...ClustersUpdateSecretsLocationsSamples.java | 33 + .../ClustersUploadCertificateSamples.java | 6 +- ...ploymentSettingsCreateOrUpdateSamples.java | 124 +- .../DeploymentSettingsDeleteSamples.java | 6 +- .../DeploymentSettingsGetSamples.java | 6 +- ...ploymentSettingsListByClustersSamples.java | 6 +- .../EdgeDeviceJobsCreateOrUpdateSamples.java | 58 + .../EdgeDeviceJobsDeleteSamples.java | 25 + .../generated/EdgeDeviceJobsGetSamples.java | 26 + ...EdgeDeviceJobsListByEdgeDeviceSamples.java | 26 + .../EdgeDevicesCreateOrUpdateSamples.java | 6 +- .../generated/EdgeDevicesDeleteSamples.java | 6 +- .../generated/EdgeDevicesGetSamples.java | 6 +- .../generated/EdgeDevicesListSamples.java | 6 +- .../generated/EdgeDevicesValidateSamples.java | 6 +- .../generated/ExtensionsCreateSamples.java | 6 +- .../generated/ExtensionsDeleteSamples.java | 6 +- .../generated/ExtensionsGetSamples.java | 6 +- .../ExtensionsListByArcSettingSamples.java | 6 +- .../generated/ExtensionsUpdateSamples.java | 6 +- .../generated/ExtensionsUpgradeSamples.java | 6 +- .../generated/OffersGetSamples.java | 6 +- .../generated/OffersListByClusterSamples.java | 6 +- .../OffersListByPublisherSamples.java | 6 +- .../generated/OperationsListSamples.java | 13 +- .../generated/PublishersGetSamples.java | 24 - .../PublishersListByClusterSamples.java | 25 - ...SecuritySettingsCreateOrUpdateSamples.java | 6 +- .../SecuritySettingsDeleteSamples.java | 6 +- .../generated/SecuritySettingsGetSamples.java | 6 +- ...SecuritySettingsListByClustersSamples.java | 6 +- .../generated/SkusGetSamples.java | 6 +- .../generated/SkusListByOfferSamples.java | 6 +- .../generated/UpdateRunsDeleteSamples.java | 6 +- .../generated/UpdateRunsGetSamples.java | 6 +- .../generated/UpdateRunsListSamples.java | 6 +- .../generated/UpdateRunsPutSamples.java | 6 +- ...UpdateSummariesOperationDeleteSamples.java | 6 +- .../UpdateSummariesOperationGetSamples.java | 6 +- .../UpdateSummariesOperationListSamples.java | 6 +- .../UpdateSummariesOperationPutSamples.java | 6 +- .../generated/UpdatesDeleteSamples.java | 6 +- .../generated/UpdatesGetSamples.java | 6 +- .../generated/UpdatesListSamples.java | 6 +- .../generated/UpdatesPostSamples.java | 6 +- .../generated/UpdatesPutSamples.java | 10 +- .../ValidatedSolutionRecipesGetSamples.java | 23 + ...BySubscriptionLocationResourceSamples.java | 24 + .../ArcConnectivityPropertiesTests.java | 36 + .../ArcIdentityResponseInnerTests.java | 10 +- .../ArcIdentityResponsePropertiesTests.java | 26 +- .../generated/ArcSettingInnerTests.java | 52 +- .../generated/ArcSettingListTests.java | 25 +- .../generated/ArcSettingPropertiesTests.java | 55 +- ...efaultExtensionsWithResponseMockTests.java | 27 +- .../ArcSettingsCreateIdentityMockTests.java | 10 +- ...rcSettingsCreateWithResponseMockTests.java | 45 +- .../generated/ArcSettingsDeleteMockTests.java | 8 +- .../ArcSettingsGetWithResponseMockTests.java | 26 +- ...ingsInitializeDisableProcessMockTests.java | 8 +- .../ArcSettingsListByClusterMockTests.java | 26 +- .../ArcSettingsPatchPropertiesTests.java | 25 +- .../generated/ArcSettingsPatchTests.java | 31 +- .../ArcSettingsReconcileMockTests.java | 54 + .../generated/AssemblyInfoPayloadTests.java | 17 + .../generated/AssemblyInfoTests.java | 23 + .../ClusterDesiredPropertiesTests.java | 10 +- .../ClusterIdentityResponseInnerTests.java | 10 +- ...lusterIdentityResponsePropertiesTests.java | 25 +- .../generated/ClusterListTests.java | 149 -- .../generated/ClusterNodeTests.java | 10 +- .../ClusterPatchPropertiesTests.java | 28 +- .../generated/ClusterPatchTests.java | 39 +- .../ClusterReportedPropertiesTests.java | 13 +- ...ustersConfigureRemoteSupportMockTests.java | 61 - .../ClustersCreateIdentityMockTests.java | 10 +- .../ClustersCreateWithResponseMockTests.java | 92 - .../generated/ClustersDeleteMockTests.java | 8 +- ...tendSoftwareAssuranceBenefitMockTests.java | 60 - ...tByResourceGroupWithResponseMockTests.java | 55 - .../ClustersListByResourceGroupMockTests.java | 56 - .../generated/ClustersListMockTests.java | 55 - ...ClustersTriggerLogCollectionMockTests.java | 60 - .../DefaultExtensionDetailsTests.java | 10 +- .../generated/DeploymentClusterTests.java | 38 +- ...tSettingAdapterPropertyOverridesTests.java | 22 +- .../DeploymentSettingHostNetworkTests.java | 252 ++- .../DeploymentSettingIntentsTests.java | 87 +- .../DeploymentSettingListResultTests.java | 43 +- ...ymentSettingStorageAdapterIpInfoTests.java | 27 +- ...DeploymentSettingStorageNetworksTests.java | 52 +- ...tualSwitchConfigurationOverridesTests.java | 10 +- ...oymentSettingsCreateOrUpdateMockTests.java | 26 +- ...ymentSettingsGetWithResponseMockTests.java | 14 +- ...oymentSettingsListByClustersMockTests.java | 16 +- .../generated/DeploymentStepTests.java | 10 +- .../generated/DeviceConfigurationTests.java | 74 +- .../generated/DnsZonesTests.java | 30 + .../generated/EceActionStatusTests.java | 10 +- .../generated/EceReportedPropertiesTests.java | 10 +- .../generated/EdgeDeviceInnerTests.java | 5 +- .../generated/EdgeDeviceJobInnerTests.java | 24 + .../EdgeDeviceJobListResultTests.java | 19 + ...EdgeDeviceJobsCreateOrUpdateMockTests.java | 37 + ...geDeviceJobsGetWithResponseMockTests.java} | 16 +- ...eDeviceJobsListByEdgeDeviceMockTests.java} | 18 +- .../generated/EdgeDeviceListResultTests.java | 18 +- .../generated/EdgeDevicePropertiesTests.java | 62 +- .../EdgeDevicesCreateOrUpdateMockTests.java | 10 +- .../EdgeDevicesGetWithResponseMockTests.java | 14 +- .../generated/EdgeDevicesListMockTests.java | 10 +- .../EdgeDevicesValidateMockTests.java | 13 +- .../generated/ExtensionListTests.java | 20 +- .../generated/ExtensionParametersTests.java | 42 +- .../ExtensionPatchParametersTests.java | 18 +- .../ExtensionPatchPropertiesTests.java | 18 +- .../generated/ExtensionPatchTests.java | 20 +- .../generated/ExtensionProfileTests.java | 10 +- .../ExtensionUpgradeParametersTests.java | 10 +- .../generated/ExtensionsCreateMockTests.java | 36 +- .../generated/ExtensionsDeleteMockTests.java | 8 +- .../ExtensionsGetWithResponseMockTests.java | 22 +- .../ExtensionsListByArcSettingMockTests.java | 24 +- .../HciCollectLogJobPropertiesTests.java | 34 + ...geDeviceAdapterPropertyOverridesTests.java | 13 +- .../HciEdgeDeviceArcExtensionTests.java | 10 +- .../HciEdgeDeviceHostNetworkTests.java | 10 +- .../generated/HciEdgeDeviceIntentsTests.java | 10 +- .../HciEdgeDeviceJobPropertiesTests.java | 27 + .../generated/HciEdgeDeviceJobTests.java | 29 + ...ciEdgeDeviceStorageAdapterIpInfoTests.java | 11 +- .../HciEdgeDeviceStorageNetworksTests.java | 10 +- ...tualSwitchConfigurationOverridesTests.java | 10 +- .../generated/HciHardwareProfileTests.java | 16 + .../generated/HciNetworkProfileTests.java | 10 +- .../generated/HciNicDetailTests.java | 10 +- .../generated/HciOsProfileTests.java | 12 +- .../HciRemoteSupportJobPropertiesTests.java | 40 + .../generated/HciStorageProfileTests.java | 16 + .../HciValidationFailureDetailTests.java | 10 +- .../generated/InfrastructureNetworkTests.java | 53 +- .../azurestackhci/generated/IpPoolsTests.java | 14 +- ...olatedVmAttestationConfigurationTests.java | 10 +- .../LocalAvailabilityZonesTests.java | 31 + .../LogCollectionJobSessionTests.java | 17 + .../LogCollectionReportedPropertiesTests.java | 17 + .../LogCollectionRequestPropertiesTests.java | 16 +- .../generated/LogCollectionRequestTests.java | 16 +- .../ManagedServiceIdentityTests.java | 7 +- .../generated/NetworkControllerTests.java | 23 +- .../generated/NicDetailTests.java | 58 +- .../generated/ObservabilityTests.java | 18 +- .../generated/OfferInnerTests.java | 42 +- .../generated/OfferListTests.java | 21 +- .../generated/OfferPropertiesTests.java | 43 +- .../OffersGetWithResponseMockTests.java | 22 +- .../OffersListByClusterMockTests.java | 24 +- .../OffersListByPublisherMockTests.java | 23 +- .../generated/OperationDisplayTests.java | 10 +- .../generated/OperationInnerTests.java | 17 + .../OperationListResultInnerTests.java | 23 - .../generated/OperationListResultTests.java | 19 + .../generated/OperationTests.java | 24 - ...ests.java => OperationsListMockTests.java} | 18 +- .../generated/OptionalServicesTests.java | 10 +- .../generated/PackageVersionInfoTests.java | 23 +- .../PerNodeRemoteSupportSessionTests.java | 10 +- .../generated/PerNodeStateTests.java | 10 +- .../generated/PhysicalNodesTests.java | 14 +- .../generated/PublisherInnerTests.java | 23 - .../generated/PublisherListTests.java | 23 - .../generated/PublisherPropertiesTests.java | 22 - .../generated/QosPolicyOverridesTests.java | 22 +- .../generated/RawCertificateDataTests.java | 15 +- ...cileArcSettingsRequestPropertiesTests.java | 28 + .../ReconcileArcSettingsRequestTests.java | 31 + .../RemoteSupportJobNodeSettingsTests.java | 17 + ...moteSupportJobReportedPropertiesTests.java | 17 + .../RemoteSupportNodeSettingsTests.java | 10 +- .../RemoteSupportPropertiesTests.java | 4 +- .../RemoteSupportRequestPropertiesTests.java | 10 +- .../generated/RemoteSupportRequestTests.java | 16 +- .../generated/RemoteSupportSessionTests.java | 17 + .../generated/ReportedPropertiesTests.java | 10 +- .../generated/SbeDeploymentInfoTests.java | 34 +- .../generated/SbePartnerPropertiesTests.java | 18 +- .../generated/SdnIntegrationTests.java | 22 +- .../SecurityComplianceStatusTests.java | 10 +- .../generated/SecurityPropertiesTests.java | 27 +- .../generated/SecuritySettingInnerTests.java | 10 +- .../SecuritySettingListResultTests.java | 42 +- ...curitySettingsCreateOrUpdateMockTests.java | 17 +- ...uritySettingsGetWithResponseMockTests.java | 12 +- ...curitySettingsListByClustersMockTests.java | 21 +- .../generated/ServiceConfigurationTests.java | 29 + .../generated/SkuInnerTests.java | 49 +- .../azurestackhci/generated/SkuListTests.java | 21 +- .../generated/SkuMappingsTests.java | 22 +- .../generated/SkuPropertiesTests.java | 49 +- .../SkusGetWithResponseMockTests.java | 26 +- .../generated/SkusListByOfferMockTests.java | 25 +- ...AssuranceChangeRequestPropertiesTests.java | 10 +- .../SoftwareAssuranceChangeRequestTests.java | 2 +- .../SoftwareAssurancePropertiesTests.java | 4 +- .../azurestackhci/generated/StepTests.java | 301 +-- .../azurestackhci/generated/StorageTests.java | 10 +- .../generated/SwitchDetailTests.java | 10 +- .../generated/SwitchExtensionTests.java | 14 +- .../generated/UpdateListTests.java | 267 +-- .../generated/UpdatePrerequisiteTests.java | 22 +- .../generated/UpdateRunInnerTests.java | 154 +- .../generated/UpdateRunListTests.java | 69 +- .../generated/UpdateRunPropertiesTests.java | 261 ++- .../generated/UpdateRunsDeleteMockTests.java | 8 +- .../UpdateRunsGetWithResponseMockTests.java | 53 +- .../generated/UpdateRunsListMockTests.java | 51 +- .../UpdateRunsPutWithResponseMockTests.java | 126 +- .../generated/UpdateStatePropertiesTests.java | 16 +- .../generated/UpdateSummariesListTests.java | 260 +-- ...ateSummariesOperationsDeleteMockTests.java | 8 +- .../generated/UpdatesDeleteMockTests.java | 8 +- .../generated/UpdatesPostMockTests.java | 8 +- .../UploadCertificateRequestTests.java | 10 +- .../generated/UserAssignedIdentityTests.java | 5 +- .../generated/ValidateRequestTests.java | 19 +- .../generated/ValidateResponseInnerTests.java | 10 +- ...idatedSolutionRecipeCapabilitiesTests.java | 20 + ...alidatedSolutionRecipeCapabilityTests.java | 18 + ...dSolutionRecipeComponentMetadataTests.java | 29 + ...edSolutionRecipeComponentPayloadTests.java | 22 + ...ValidatedSolutionRecipeComponentTests.java | 38 + .../ValidatedSolutionRecipeContentTests.java | 42 + .../ValidatedSolutionRecipeInfoTests.java | 20 + .../ValidatedSolutionRecipeInnerTests.java | 56 + ...alidatedSolutionRecipeListResultTests.java | 45 + ...alidatedSolutionRecipePropertiesTests.java | 48 + ...lutionRecipesGetWithResponseMockTests.java | 60 + ...SubscriptionLocationResourceMockTests.java | 79 + .../tsp-location.yaml | 4 + 597 files changed, 19373 insertions(+), 15457 deletions(-) rename sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/{AzureStackHciClient.java => AzureStackHciManagementClient.java} (83%) create mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/EdgeDeviceJobsClient.java rename sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/{PublishersClient.java => ValidatedSolutionRecipesClient.java} (51%) create mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/EdgeDeviceJobInner.java create mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/OperationInner.java delete mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/OperationListResultInner.java delete mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/PublisherProperties.java rename sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/{PublisherInner.java => ValidatedSolutionRecipeInner.java} (58%) rename sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/{AzureStackHciClientBuilder.java => AzureStackHciManagementClientBuilder.java} (65%) rename sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/{AzureStackHciClientImpl.java => AzureStackHciManagementClientImpl.java} (84%) rename sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/{PublisherImpl.java => EdgeDeviceJobImpl.java} (63%) create mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/EdgeDeviceJobsClientImpl.java create mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/EdgeDeviceJobsImpl.java create mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/OperationImpl.java delete mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/OperationListResultImpl.java delete mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/PublishersClientImpl.java delete mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/PublishersImpl.java create mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/ValidatedSolutionRecipeImpl.java create mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/ValidatedSolutionRecipesClientImpl.java create mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/ValidatedSolutionRecipesImpl.java rename sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/{ => implementation}/models/ArcSettingList.java (79%) rename sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/{ => implementation}/models/ClusterList.java (72%) rename sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/{ => implementation}/models/DeploymentSettingListResult.java (67%) create mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/models/EdgeDeviceJobListResult.java rename sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/{ => implementation}/models/EdgeDeviceListResult.java (67%) rename sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/{ => implementation}/models/ExtensionList.java (79%) rename sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/{ => implementation}/models/OfferList.java (78%) create mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/models/OperationListResult.java rename sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/{ => implementation}/models/SecuritySettingListResult.java (67%) rename sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/{ => implementation}/models/SkuList.java (78%) rename sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/{ => implementation}/models/UpdateList.java (72%) rename sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/{ => implementation}/models/UpdateRunList.java (72%) rename sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/{ => implementation}/models/UpdateSummariesList.java (73%) create mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/models/ValidatedSolutionRecipeListResult.java create mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/ArcConnectivityProperties.java create mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/AssemblyInfo.java create mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/AssemblyInfoPayload.java create mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/ClusterPattern.java create mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/DeviceLogCollectionStatus.java create mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/DnsServerConfig.java create mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/DnsZones.java create mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/EdgeDeviceJob.java create mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/EdgeDeviceJobs.java create mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/EdgeDeviceKind.java create mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/HardwareClass.java create mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/HciCollectLogJobProperties.java create mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/HciEdgeDeviceJob.java create mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/HciEdgeDeviceJobProperties.java create mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/HciEdgeDeviceJobType.java create mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/HciHardwareProfile.java create mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/HciRemoteSupportJobProperties.java create mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/HciStorageProfile.java create mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/IdentityProvider.java create mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/JobStatus.java create mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/LocalAvailabilityZones.java create mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/LogCollectionJobSession.java create mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/LogCollectionReportedProperties.java delete mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/OperationListResult.java delete mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/PublisherList.java delete mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/Publishers.java create mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/RdmaCapability.java create mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/ReconcileArcSettingsRequest.java create mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/ReconcileArcSettingsRequestProperties.java create mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/RemoteSupportAccessLevel.java create mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/RemoteSupportJobNodeSettings.java create mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/RemoteSupportJobReportedProperties.java create mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/RemoteSupportSession.java create mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/SecretsLocationDetails.java create mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/SecretsLocationsChangeRequest.java create mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/SecretsType.java create mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/ServiceConfiguration.java create mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/ServiceName.java rename sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/{Publisher.java => ValidatedSolutionRecipe.java} (64%) create mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/ValidatedSolutionRecipeCapabilities.java create mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/ValidatedSolutionRecipeCapability.java create mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/ValidatedSolutionRecipeComponent.java create mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/ValidatedSolutionRecipeComponentMetadata.java create mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/ValidatedSolutionRecipeComponentPayload.java create mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/ValidatedSolutionRecipeContent.java create mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/ValidatedSolutionRecipeInfo.java create mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/ValidatedSolutionRecipeProperties.java create mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/ValidatedSolutionRecipes.java create mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/resources/META-INF/azure-resourcemanager-azurestackhci_apiview_properties.json create mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/resources/META-INF/azure-resourcemanager-azurestackhci_metadata.json create mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/resources/azure-resourcemanager-azurestackhci.properties create mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/ArcSettingsReconcileSamples.java create mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/ClustersUpdateSecretsLocationsSamples.java create mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/EdgeDeviceJobsCreateOrUpdateSamples.java create mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/EdgeDeviceJobsDeleteSamples.java create mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/EdgeDeviceJobsGetSamples.java create mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/EdgeDeviceJobsListByEdgeDeviceSamples.java delete mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/PublishersGetSamples.java delete mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/PublishersListByClusterSamples.java create mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/ValidatedSolutionRecipesGetSamples.java create mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/ValidatedSolutionRecipesListBySubscriptionLocationResourceSamples.java create mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ArcConnectivityPropertiesTests.java create mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ArcSettingsReconcileMockTests.java create mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/AssemblyInfoPayloadTests.java create mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/AssemblyInfoTests.java delete mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ClusterListTests.java delete mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ClustersConfigureRemoteSupportMockTests.java delete mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ClustersCreateWithResponseMockTests.java delete mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ClustersExtendSoftwareAssuranceBenefitMockTests.java delete mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ClustersGetByResourceGroupWithResponseMockTests.java delete mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ClustersListByResourceGroupMockTests.java delete mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ClustersListMockTests.java delete mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ClustersTriggerLogCollectionMockTests.java create mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/DnsZonesTests.java create mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/EdgeDeviceJobInnerTests.java create mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/EdgeDeviceJobListResultTests.java create mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/EdgeDeviceJobsCreateOrUpdateMockTests.java rename sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/{PublishersGetWithResponseMockTests.java => EdgeDeviceJobsGetWithResponseMockTests.java} (64%) rename sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/{PublishersListByClusterMockTests.java => EdgeDeviceJobsListByEdgeDeviceMockTests.java} (61%) create mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/HciCollectLogJobPropertiesTests.java create mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/HciEdgeDeviceJobPropertiesTests.java create mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/HciEdgeDeviceJobTests.java create mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/HciHardwareProfileTests.java create mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/HciRemoteSupportJobPropertiesTests.java create mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/HciStorageProfileTests.java create mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/LocalAvailabilityZonesTests.java create mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/LogCollectionJobSessionTests.java create mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/LogCollectionReportedPropertiesTests.java create mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/OperationInnerTests.java delete mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/OperationListResultInnerTests.java create mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/OperationListResultTests.java delete mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/OperationTests.java rename sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/{OperationsListWithResponseMockTests.java => OperationsListMockTests.java} (55%) delete mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/PublisherInnerTests.java delete mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/PublisherListTests.java delete mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/PublisherPropertiesTests.java create mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ReconcileArcSettingsRequestPropertiesTests.java create mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ReconcileArcSettingsRequestTests.java create mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/RemoteSupportJobNodeSettingsTests.java create mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/RemoteSupportJobReportedPropertiesTests.java create mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/RemoteSupportSessionTests.java create mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ServiceConfigurationTests.java create mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ValidatedSolutionRecipeCapabilitiesTests.java create mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ValidatedSolutionRecipeCapabilityTests.java create mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ValidatedSolutionRecipeComponentMetadataTests.java create mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ValidatedSolutionRecipeComponentPayloadTests.java create mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ValidatedSolutionRecipeComponentTests.java create mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ValidatedSolutionRecipeContentTests.java create mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ValidatedSolutionRecipeInfoTests.java create mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ValidatedSolutionRecipeInnerTests.java create mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ValidatedSolutionRecipeListResultTests.java create mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ValidatedSolutionRecipePropertiesTests.java create mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ValidatedSolutionRecipesGetWithResponseMockTests.java create mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ValidatedSolutionRecipesListBySubscriptionLocationResourceMockTests.java create mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/tsp-location.yaml diff --git a/eng/versioning/version_client.txt b/eng/versioning/version_client.txt index e1790914a4e0..8c702f8158d6 100644 --- a/eng/versioning/version_client.txt +++ b/eng/versioning/version_client.txt @@ -339,7 +339,7 @@ com.azure.resourcemanager:azure-resourcemanager-advisor;1.0.0;1.1.0-beta.1 com.azure.resourcemanager:azure-resourcemanager-appconfiguration;1.1.0;1.2.0-beta.2 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-azurestackhci;1.0.0-beta.5;1.0.0 com.azure.resourcemanager:azure-resourcemanager-avs;1.4.0;1.5.0-beta.1 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 diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/CHANGELOG.md b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/CHANGELOG.md index cbb537d7d6e6..7a8975fd6924 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/CHANGELOG.md +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/CHANGELOG.md @@ -1,14 +1,707 @@ # Release History -## 1.0.0-beta.6 (Unreleased) +## 1.0.0 (2026-02-04) -### Features Added +- Azure Resource Manager Azure Stack Hci client library for Java. This package contains Microsoft Azure SDK for Azure Stack Hci Management SDK. Azure Stack HCI service. Package api-version 2026-02-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.SkuList` was removed + +#### `models.EdgeDeviceListResult` was removed + +#### `models.UpdateRunList` was removed + +#### `models.OperationListResult` was removed + +#### `models.ClusterList` was removed + +#### `models.UpdateSummariesList` was removed + +#### `models.ArcSettingList` was removed + +#### `models.SecuritySettingListResult` was removed + +#### `models.UpdateList` was removed + +#### `models.PublisherList` was removed + +#### `models.OfferList` was removed + +#### `models.ExtensionList` was removed + +#### `models.DeploymentSettingListResult` was removed + +#### `models.Publisher` was removed + +#### `models.Publishers` was removed + +#### `models.SoftwareAssuranceChangeRequestProperties` was modified + +* `validate()` was removed + +#### `models.IsolatedVmAttestationConfiguration` was modified + +* `IsolatedVmAttestationConfiguration()` was changed to private access +* `validate()` was removed + +#### `models.HciOsProfile` was modified + +* `HciOsProfile()` was changed to private access +* `validate()` was removed + +#### `models.SoftwareAssuranceChangeRequest` was modified + +* `validate()` was removed + +#### `models.ClusterNode` was modified + +* `ClusterNode()` was changed to private access +* `java.lang.Float memoryInGiB()` -> `java.lang.Double memoryInGiB()` +* `java.lang.Float coreCount()` -> `java.lang.Double coreCount()` +* `java.lang.Float id()` -> `java.lang.Double id()` +* `validate()` was removed + +#### `models.SwitchDetail` was modified + +* `SwitchDetail()` was changed to private access +* `validate()` was removed + +#### `models.PrecheckResultTags` was modified + +* `validate()` was removed + +#### `models.HciEdgeDevice` was modified + +* `validate()` was removed + +#### `models.DeploymentData` was modified + +* `validate()` was removed + +#### `models.HciReportedProperties` was modified + +* `HciReportedProperties()` was changed to private access +* `validate()` was removed + +#### `models.LogCollectionRequestProperties` was modified + +* `validate()` was removed + +#### `models.HciEdgeDeviceProperties` was modified + +* `validate()` was removed + +#### `models.SoftwareAssuranceProperties` was modified + +* `validate()` was removed + +#### `models.Operation` was modified + +* `Operation()` was removed +* `models.OperationDisplay display()` -> `models.OperationDisplay display()` +* `withDisplay(models.OperationDisplay)` was removed +* `models.ActionType actionType()` -> `models.ActionType actionType()` +* `java.lang.Boolean isDataAction()` -> `java.lang.Boolean isDataAction()` +* `models.Origin origin()` -> `models.Origin origin()` +* `toJson(com.azure.json.JsonWriter)` was removed +* `validate()` was removed +* `fromJson(com.azure.json.JsonReader)` was removed +* `java.lang.String name()` -> `java.lang.String name()` + +#### `models.ClusterDesiredProperties` was modified + +* `validate()` was removed + +#### `models.HciValidationFailureDetail` was modified + +* `HciValidationFailureDetail()` was changed to private access +* `validate()` was removed + +#### `models.SecuritySetting$Update` was modified + +* `withProvisioningState(models.ProvisioningState)` was removed + +#### `models.ArcSetting$Definition` was modified + +* `withConnectivityProperties(java.lang.Object)` was removed + +#### `models.ClusterReportedProperties` was modified + +* `ClusterReportedProperties()` was changed to private access +* `validate()` was removed +* `withDiagnosticLevel(models.DiagnosticLevel)` was removed + +#### `models.PhysicalNodes` was modified + +* `validate()` was removed + +#### `models.Storage` was modified + +* `validate()` was removed + +#### `models.EceDeploymentSecrets` was modified + +* `validate()` was removed + +#### `models.DeviceConfiguration` was modified + +* `validate()` was removed + +#### `models.ExtensionUpgradeParameters` was modified + +* `validate()` was removed + +#### `models.DeploymentCluster` was modified + +* `validate()` was removed + +#### `models.ExtensionPatchParameters` was modified + +* `validate()` was removed + +#### `models.DeploymentSettingHostNetwork` was modified + +* `validate()` was removed + +#### `models.DeploymentStep` was modified + +* `DeploymentStep()` was changed to private access +* `validate()` was removed + +#### `models.EceActionStatus` was modified + +* `EceActionStatus()` was changed to private access +* `validate()` was removed + +#### `models.Cluster` was modified + +* `java.util.UUID tenantId()` -> `java.lang.String tenantId()` +* `java.util.UUID principalId()` -> `java.lang.String principalId()` +* `java.lang.Float trialDaysRemaining()` -> `java.lang.Double trialDaysRemaining()` + +#### `models.UploadCertificateRequest` was modified + +* `validate()` was removed + +#### `models.LogCollectionRequest` was modified + +* `validate()` was removed + +#### `models.PerNodeState` was modified + +* `PerNodeState()` was changed to private access +* `validate()` was removed + +#### `models.ScaleUnits` was modified + +* `validate()` was removed + +#### `models.ExtensionPatch` was modified + +* `validate()` was removed + +#### `models.OptionalServices` was modified + +* `validate()` was removed + +#### `models.HciEdgeDeviceAdapterPropertyOverrides` was modified + +* `HciEdgeDeviceAdapterPropertyOverrides()` was changed to private access +* `validate()` was removed + +#### `models.DeploymentSettingStorageAdapterIpInfo` was modified + +* `validate()` was removed + +#### `models.SkuMappings` was modified + +* `SkuMappings()` was changed to private access +* `withCatalogPlanId(java.lang.String)` was removed +* `validate()` was removed +* `withMarketplaceSkuVersions(java.util.List)` was removed +* `withMarketplaceSkuId(java.lang.String)` was removed + +#### `models.ValidateRequest` was modified + +* `validate()` was removed + +#### `models.SdnIntegration` was modified + +* `validate()` was removed + +#### `models.HciNetworkProfile` was modified + +* `HciNetworkProfile()` was changed to private access +* `validate()` was removed + +#### `models.LogCollectionProperties` was modified + +* `validate()` was removed + +#### `models.OperationDisplay` was modified + +* `OperationDisplay()` was changed to private access +* `validate()` was removed + +#### `models.InfrastructureNetwork` was modified + +* `validate()` was removed + +#### `models.HciEdgeDeviceArcExtension` was modified + +* `HciEdgeDeviceArcExtension()` was changed to private access +* `validate()` was removed + +#### `models.ExtensionInstanceViewStatus` was modified + +* `ExtensionInstanceViewStatus()` was changed to private access +* `validate()` was removed +* `withCode(java.lang.String)` was removed +* `withDisplayStatus(java.lang.String)` was removed +* `withMessage(java.lang.String)` was removed +* `withLevel(models.StatusLevelTypes)` was removed +* `withTime(java.time.OffsetDateTime)` was removed + +#### `models.NetworkController` was modified + +* `validate()` was removed + +#### `models.HciEdgeDeviceIntents` was modified + +* `HciEdgeDeviceIntents()` was changed to private access +* `validate()` was removed + +#### `models.LogCollectionSession` was modified + +* `LogCollectionSession()` was changed to private access +* `validate()` was removed + +#### `models.SwitchExtension` was modified + +* `SwitchExtension()` was changed to private access +* `validate()` was removed + +#### `models.PerNodeRemoteSupportSession` was modified + +* `PerNodeRemoteSupportSession()` was changed to private access +* `validate()` was removed + +#### `models.SbeDeploymentPackageInfo` was modified + +* `SbeDeploymentPackageInfo()` was changed to private access +* `validate()` was removed + +#### `models.SecurityComplianceStatus` was modified + +* `SecurityComplianceStatus()` was changed to private access +* `validate()` was removed + +#### `models.IpPools` was modified + +* `validate()` was removed + +#### `models.ReportedProperties` was modified + +* `validate()` was removed + +#### `models.RemoteSupportProperties` was modified + +* `validate()` was removed + +#### `models.QosPolicyOverrides` was modified + +* `validate()` was removed + +#### `models.DeploymentSettingVirtualSwitchConfigurationOverrides` was modified + +* `validate()` was removed + +#### `models.SbePartnerProperties` was modified + +* `validate()` was removed + +#### `models.NicDetail` was modified + +* `validate()` was removed + +#### `models.RawCertificateData` was modified + +* `validate()` was removed + +#### `models.HciNicDetail` was modified + +* `HciNicDetail()` was changed to private access +* `validate()` was removed + +#### `models.EdgeDeviceProperties` was modified + +* `validate()` was removed + +#### `models.UpdatePrerequisite` was modified + +* `validate()` was removed + +#### `models.EceReportedProperties` was modified + +* `EceReportedProperties()` was changed to private access +* `validate()` was removed + +#### `models.HciEdgeDeviceStorageNetworks` was modified + +* `HciEdgeDeviceStorageNetworks()` was changed to private access +* `validate()` was removed + +#### `models.HciUpdate$Update` was modified + +* `withProgressPercentage(java.lang.Float)` was removed +* `withPackageSizeInMb(java.lang.Float)` was removed + +#### `models.ArcSetting` was modified + +* `java.lang.Object connectivityProperties()` -> `models.ArcConnectivityProperties connectivityProperties()` + +#### `models.DeploymentSettingAdapterPropertyOverrides` was modified + +* `validate()` was removed + +#### `models.SbePartnerInfo` was modified + +* `validate()` was removed + +#### `models.DeploymentSettingIntents` was modified + +* `validate()` was removed + +#### `models.DefaultExtensionDetails` was modified + +* `DefaultExtensionDetails()` was changed to private access +* `validate()` was removed + +#### `models.DeploymentSecuritySettings` was modified + +* `validate()` was removed + +#### `models.RemoteSupportRequest` was modified + +* `validate()` was removed + +#### `models.SecuritySetting$Definition` was modified + +* `withProvisioningState(models.ProvisioningState)` was removed + +#### `models.SbeCredentials` was modified + +* `validate()` was removed + +#### `models.ClusterPatch` was modified + +* `java.util.UUID tenantId()` -> `java.lang.String tenantId()` +* `java.util.UUID principalId()` -> `java.lang.String principalId()` +* `validate()` was removed + +#### `models.HciUpdate$Definition` was modified + +* `withProgressPercentage(java.lang.Float)` was removed +* `withPackageSizeInMb(java.lang.Float)` was removed + +#### `models.HciUpdate` was modified + +* `java.lang.Float packageSizeInMb()` -> `java.lang.Double packageSizeInMb()` +* `java.lang.Float progressPercentage()` -> `java.lang.Double progressPercentage()` + +#### `models.ArcSetting$Update` was modified + +* `withConnectivityProperties(java.lang.Object)` was removed + +#### `models.UserAssignedIdentity` was modified + +* `validate()` was removed +* `java.util.UUID clientId()` -> `java.lang.String clientId()` +* `java.util.UUID principalId()` -> `java.lang.String principalId()` + +#### `models.Operations` was modified + +* `listWithResponse(com.azure.core.util.Context)` was removed +* `models.OperationListResult list()` -> `com.azure.core.http.rest.PagedIterable list()` + +#### `models.ExtensionProfile` was modified + +* `ExtensionProfile()` was changed to private access +* `validate()` was removed + +#### `models.HciEdgeDeviceHostNetwork` was modified + +* `HciEdgeDeviceHostNetwork()` was changed to private access +* `validate()` was removed + +#### `models.HciEdgeDeviceStorageAdapterIpInfo` was modified + +* `HciEdgeDeviceStorageAdapterIpInfo()` was changed to private access +* `validate()` was removed + +#### `models.SbeDeploymentInfo` was modified + +* `validate()` was removed + +#### `models.RemoteSupportNodeSettings` was modified + +* `RemoteSupportNodeSettings()` was changed to private access +* `validate()` was removed + +#### `models.PrecheckResult` was modified + +* `validate()` was removed + +#### `AzureStackHciManager` was modified + +* `publishers()` was removed +* `fluent.AzureStackHciClient serviceClient()` -> `fluent.AzureStackHciManagementClient serviceClient()` + +#### `models.DeploymentConfiguration` was modified + +* `validate()` was removed + +#### `models.HciEdgeDeviceVirtualSwitchConfigurationOverrides` was modified + +* `HciEdgeDeviceVirtualSwitchConfigurationOverrides()` was changed to private access +* `validate()` was removed + +#### `models.RemoteSupportRequestProperties` was modified + +* `validate()` was removed + +#### `models.LogCollectionError` was modified + +* `LogCollectionError()` was changed to private access +* `validate()` was removed + +#### `models.ArcSettingsPatch` was modified + +* `java.lang.Object connectivityProperties()` -> `models.ArcConnectivityProperties connectivityProperties()` +* `validate()` was removed +* `withConnectivityProperties(java.lang.Object)` was removed + +#### `models.PerNodeExtensionState` was modified + +* `PerNodeExtensionState()` was changed to private access +* `validate()` was removed + +#### `models.ExtensionInstanceView` was modified + +* `ExtensionInstanceView()` was changed to private access +* `withTypeHandlerVersion(java.lang.String)` was removed +* `validate()` was removed +* `withStatus(models.ExtensionInstanceViewStatus)` was removed +* `withType(java.lang.String)` was removed +* `withName(java.lang.String)` was removed + +#### `models.PackageVersionInfo` was modified + +* `validate()` was removed + +#### `models.DeploymentSettingStorageNetworks` was modified + +* `validate()` was removed + +#### `models.Observability` was modified + +* `validate()` was removed + +### Features Added + +* `models.RemoteSupportSession` was added + +* `models.JobStatus` was added + +* `models.DnsServerConfig` was added + +* `models.HciEdgeDeviceJobProperties` was added + +* `models.HciHardwareProfile` was added + +* `models.ValidatedSolutionRecipes` was added + +* `models.HciEdgeDeviceJobType` was added + +* `models.ValidatedSolutionRecipeComponent` was added + +* `models.ReconcileArcSettingsRequest` was added + +* `models.ReconcileArcSettingsRequestProperties` was added + +* `models.LocalAvailabilityZones` was added + +* `models.EdgeDeviceJobs` was added + +* `models.ValidatedSolutionRecipeComponentMetadata` was added + +* `models.DnsZones` was added + +* `models.HciStorageProfile` was added + +* `models.ValidatedSolutionRecipeComponentPayload` was added + +* `models.ClusterPattern` was added + +* `models.ValidatedSolutionRecipeInfo` was added + +* `models.AssemblyInfo` was added + +* `models.SecretsLocationsChangeRequest` was added + +* `models.RemoteSupportAccessLevel` was added + +* `models.LogCollectionJobSession` was added + +* `models.ValidatedSolutionRecipeCapabilities` was added + +* `models.SecretsType` was added + +* `models.AssemblyInfoPayload` was added + +* `models.RemoteSupportJobReportedProperties` was added + +* `models.RemoteSupportJobNodeSettings` was added + +* `models.RdmaCapability` was added + +* `models.DeviceLogCollectionStatus` was added + +* `models.ValidatedSolutionRecipeContent` was added + +* `models.ServiceConfiguration` was added + +* `models.SecretsLocationDetails` was added + +* `models.ArcConnectivityProperties` was added + +* `models.HciRemoteSupportJobProperties` was added + +* `models.IdentityProvider` was added + +* `models.HardwareClass` was added + +* `models.ValidatedSolutionRecipeCapability` was added + +* `models.ServiceName` was added + +* `models.EdgeDeviceJob` was added + +* `models.LogCollectionReportedProperties` was added + +* `models.EdgeDeviceKind` was added + +* `models.ValidatedSolutionRecipeProperties` was added + +* `models.HciEdgeDeviceJob` was added + +* `models.ValidatedSolutionRecipe` was added + +* `models.HciCollectLogJobProperties` was added + +#### `models.DeploymentData` was modified + +* `withAssemblyInfo(models.AssemblyInfo)` was added +* `identityProvider()` was added +* `withLocalAvailabilityZones(java.util.List)` was added +* `localAvailabilityZones()` was added +* `isManagementCluster()` was added +* `withIsManagementCluster(java.lang.Boolean)` was added +* `withIdentityProvider(models.IdentityProvider)` was added +* `assemblyInfo()` was added + +#### `models.HciReportedProperties` was modified + +* `storageProfile()` was added +* `hardwareProfile()` was added + +#### `models.Operation` was modified + +* `innerModel()` was added + +#### `models.ArcSetting$Definition` was modified + +* `withConnectivityProperties(models.ArcConnectivityProperties)` was added + +#### `models.Clusters` was modified + +* `updateSecretsLocations(java.lang.String,java.lang.String,models.SecretsLocationsChangeRequest,com.azure.core.util.Context)` was added +* `updateSecretsLocations(java.lang.String,java.lang.String,models.SecretsLocationsChangeRequest)` was added + +#### `models.ClusterReportedProperties` was modified + +* `msiExpirationTimeStamp()` was added +* `hardwareClass()` was added + +#### `models.DeploymentCluster` was modified + +* `clusterPattern()` was added +* `hardwareClass()` was added +* `withClusterPattern(models.ClusterPattern)` was added + +#### `models.Cluster` was modified + +* `updateSecretsLocations(models.SecretsLocationsChangeRequest,com.azure.core.util.Context)` was added +* `isManagementCluster()` was added +* `identityProvider()` was added +* `clusterPattern()` was added +* `localAvailabilityZones()` was added +* `updateSecretsLocations(models.SecretsLocationsChangeRequest)` was added +* `secretsLocations()` was added + +#### `models.InfrastructureNetwork` was modified + +* `dnsZones()` was added +* `withDnsZones(java.util.List)` was added +* `dnsServerConfig()` was added +* `withDnsServerConfig(models.DnsServerConfig)` was added + +#### `models.ArcSettings` was modified + +* `reconcile(java.lang.String,java.lang.String,java.lang.String,models.ReconcileArcSettingsRequest,com.azure.core.util.Context)` was added +* `reconcile(java.lang.String,java.lang.String,java.lang.String,models.ReconcileArcSettingsRequest)` was added + +#### `models.HciNicDetail` was modified + +* `rdmaCapability()` was added + +#### `models.HciUpdate$Update` was modified + +* `withPackageSizeInMb(java.lang.Double)` was added +* `withProgressPercentage(java.lang.Double)` was added + +#### `models.ArcSetting` was modified + +* `reconcile(models.ReconcileArcSettingsRequest)` was added +* `reconcile(models.ReconcileArcSettingsRequest,com.azure.core.util.Context)` was added + +#### `models.HciUpdate$Definition` was modified + +* `withProgressPercentage(java.lang.Double)` was added +* `withPackageSizeInMb(java.lang.Double)` was added + +#### `models.ArcSetting$Update` was modified + +* `withConnectivityProperties(models.ArcConnectivityProperties)` was added + +#### `models.Operations` was modified + +* `list(com.azure.core.util.Context)` was added + +#### `models.Cluster$Definition` was modified + +* `withSecretsLocations(java.util.List)` was added +* `withLocalAvailabilityZones(java.util.List)` was added + +#### `AzureStackHciManager` was modified + +* `edgeDeviceJobs()` was added +* `validatedSolutionRecipes()` was added + +#### `models.ArcSettingsPatch` was modified -### Other Changes +* `withConnectivityProperties(models.ArcConnectivityProperties)` was added ## 1.0.0-beta.5 (2024-08-26) diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/README.md b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/README.md index 7db00378283c..ed1e8af466cb 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/README.md +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/README.md @@ -1,8 +1,8 @@ -# Azure Resource Manager AzureStackHci client library for Java +# Azure Resource Manager Azure Stack Hci client library for Java -Azure Resource Manager AzureStackHci client library for Java. +Azure Resource Manager Azure Stack Hci client library for Java. -This package contains Microsoft Azure SDK for AzureStackHci Management SDK. Azure Stack HCI management service. Package tag package-2024-04. 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 Azure Stack Hci Management SDK. Azure Stack HCI service. Package api-version 2026-02-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-azurestackhci - 1.0.0-beta.6 + 1.0.0 ``` [//]: # ({x-version-update-end}) @@ -52,7 +52,7 @@ Azure subscription ID can be configured via `AZURE_SUBSCRIPTION_ID` environment Assuming the use of the `DefaultAzureCredential` credential class, the client can be authenticated using the following code: ```java -AzureProfile profile = new AzureProfile(AzureEnvironment.AZURE); +AzureProfile profile = new AzureProfile(AzureCloud.AZURE_PUBLIC_CLOUD); TokenCredential credential = new DefaultAzureCredentialBuilder() .authorityHost(profile.getEnvironment().getActiveDirectoryEndpoint()) .build(); @@ -60,7 +60,7 @@ AzureStackHciManager manager = AzureStackHciManager .authenticate(credential, profile); ``` -The sample code assumes global Azure. Please change `AzureEnvironment.AZURE` variable if otherwise. +The sample code assumes global Azure. Please change the `AzureCloud.AZURE_PUBLIC_CLOUD` variable if otherwise. See [Authentication][authenticate] for more options. @@ -100,5 +100,3 @@ This project has adopted the [Microsoft Open Source Code of Conduct][coc]. For m [cg]: https://github.com/Azure/azure-sdk-for-java/blob/main/CONTRIBUTING.md [coc]: https://opensource.microsoft.com/codeofconduct/ [coc_faq]: https://opensource.microsoft.com/codeofconduct/faq/ - - diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/SAMPLE.md b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/SAMPLE.md index 7554e89c4185..5874163ba157 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/SAMPLE.md +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/SAMPLE.md @@ -11,6 +11,7 @@ - [Get](#arcsettings_get) - [InitializeDisableProcess](#arcsettings_initializedisableprocess) - [ListByCluster](#arcsettings_listbycluster) +- [Reconcile](#arcsettings_reconcile) - [Update](#arcsettings_update) ## Clusters @@ -25,6 +26,7 @@ - [ListByResourceGroup](#clusters_listbyresourcegroup) - [TriggerLogCollection](#clusters_triggerlogcollection) - [Update](#clusters_update) +- [UpdateSecretsLocations](#clusters_updatesecretslocations) - [UploadCertificate](#clusters_uploadcertificate) ## DeploymentSettings @@ -34,6 +36,13 @@ - [Get](#deploymentsettings_get) - [ListByClusters](#deploymentsettings_listbyclusters) +## EdgeDeviceJobs + +- [CreateOrUpdate](#edgedevicejobs_createorupdate) +- [Delete](#edgedevicejobs_delete) +- [Get](#edgedevicejobs_get) +- [ListByEdgeDevice](#edgedevicejobs_listbyedgedevice) + ## EdgeDevices - [CreateOrUpdate](#edgedevices_createorupdate) @@ -61,11 +70,6 @@ - [List](#operations_list) -## Publishers - -- [Get](#publishers_get) -- [ListByCluster](#publishers_listbycluster) - ## SecuritySettings - [CreateOrUpdate](#securitysettings_createorupdate) @@ -99,6 +103,11 @@ - [List](#updates_list) - [Post](#updates_post) - [Put](#updates_put) + +## ValidatedSolutionRecipes + +- [Get](#validatedsolutionrecipes_get) +- [ListBySubscriptionLocationResource](#validatedsolutionrecipes_listbysubscriptionlocationresource) ### ArcSettings_ConsentAndInstallDefaultExtensions ```java @@ -107,9 +116,7 @@ */ public final class ArcSettingsConsentAndInstallDefaultExtensionsSamples { /* - * x-ms-original-file: - * specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/StackHCI/stable/2024-04-01/examples/ - * ConsentAndInstallDefaultExtensions.json + * x-ms-original-file: 2026-02-01/ConsentAndInstallDefaultExtensions.json */ /** * Sample code: Consent And Install Default Extensions. @@ -133,9 +140,7 @@ public final class ArcSettingsConsentAndInstallDefaultExtensionsSamples { */ public final class ArcSettingsCreateSamples { /* - * x-ms-original-file: - * specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/StackHCI/stable/2024-04-01/examples/ - * PutArcSetting.json + * x-ms-original-file: 2026-02-01/PutArcSetting.json */ /** * Sample code: Create ArcSetting. @@ -156,9 +161,7 @@ public final class ArcSettingsCreateSamples { */ public final class ArcSettingsCreateIdentitySamples { /* - * x-ms-original-file: - * specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/StackHCI/stable/2024-04-01/examples/ - * CreateArcIdentity.json + * x-ms-original-file: 2026-02-01/CreateArcIdentity.json */ /** * Sample code: Create Arc Identity. @@ -179,9 +182,7 @@ public final class ArcSettingsCreateIdentitySamples { */ public final class ArcSettingsDeleteSamples { /* - * x-ms-original-file: - * specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/StackHCI/stable/2024-04-01/examples/ - * DeleteArcSetting.json + * x-ms-original-file: 2026-02-01/DeleteArcSetting.json */ /** * Sample code: Delete ArcSetting. @@ -202,9 +203,7 @@ public final class ArcSettingsDeleteSamples { */ public final class ArcSettingsGeneratePasswordSamples { /* - * x-ms-original-file: - * specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/StackHCI/stable/2024-04-01/examples/ - * GeneratePassword.json + * x-ms-original-file: 2026-02-01/GeneratePassword.json */ /** * Sample code: Generate Password. @@ -226,9 +225,7 @@ public final class ArcSettingsGeneratePasswordSamples { */ public final class ArcSettingsGetSamples { /* - * x-ms-original-file: - * specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/StackHCI/stable/2024-04-01/examples/ - * GetArcSetting.json + * x-ms-original-file: 2026-02-01/GetArcSetting.json */ /** * Sample code: Get ArcSetting. @@ -249,9 +246,7 @@ public final class ArcSettingsGetSamples { */ public final class ArcSettingsInitializeDisableProcessSamples { /* - * x-ms-original-file: - * specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/StackHCI/stable/2024-04-01/examples/ - * InitializeDisableProcess.json + * x-ms-original-file: 2026-02-01/InitializeDisableProcess.json */ /** * Sample code: Trigger ARC Disable. @@ -273,9 +268,7 @@ public final class ArcSettingsInitializeDisableProcessSamples { */ public final class ArcSettingsListByClusterSamples { /* - * x-ms-original-file: - * specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/StackHCI/stable/2024-04-01/examples/ - * ListArcSettingsByCluster.json + * x-ms-original-file: 2026-02-01/ListArcSettingsByCluster.json */ /** * Sample code: List ArcSetting resources by HCI Cluster. @@ -289,37 +282,66 @@ public final class ArcSettingsListByClusterSamples { } ``` +### ArcSettings_Reconcile + +```java +import com.azure.resourcemanager.azurestackhci.models.ReconcileArcSettingsRequest; +import com.azure.resourcemanager.azurestackhci.models.ReconcileArcSettingsRequestProperties; +import java.util.Arrays; + +/** + * Samples for ArcSettings Reconcile. + */ +public final class ArcSettingsReconcileSamples { + /* + * x-ms-original-file: 2026-02-01/reconcileArcSettings.json + */ + /** + * Sample code: Reconcile Arc Settings. + * + * @param manager Entry point to AzureStackHciManager. + */ + public static void reconcileArcSettings(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { + manager.arcSettings() + .reconcile("test-rg", "myCluster", "default", + new ReconcileArcSettingsRequest() + .withProperties(new ReconcileArcSettingsRequestProperties().withClusterNodes(Arrays.asList( + "/subscriptions/sub1/resourceGroup/res1/providers/Microsoft.HybridCompute/machines/m1", + "/subscriptions/sub1/resourceGroup/res1/providers/Microsoft.HybridCompute/machines/m2"))), + com.azure.core.util.Context.NONE); + } +} +``` + ### ArcSettings_Update ```java -import com.azure.core.management.serializer.SerializerFactory; -import com.azure.core.util.serializer.SerializerEncoding; +import com.azure.resourcemanager.azurestackhci.models.ArcConnectivityProperties; import com.azure.resourcemanager.azurestackhci.models.ArcSetting; -import java.io.IOException; +import com.azure.resourcemanager.azurestackhci.models.ServiceConfiguration; +import com.azure.resourcemanager.azurestackhci.models.ServiceName; +import java.util.Arrays; /** * Samples for ArcSettings Update. */ public final class ArcSettingsUpdateSamples { /* - * x-ms-original-file: - * specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/StackHCI/stable/2024-04-01/examples/ - * PatchArcSetting.json + * x-ms-original-file: 2026-02-01/PatchArcSetting.json */ /** * Sample code: Patch ArcSetting. * * @param manager Entry point to AzureStackHciManager. */ - public static void patchArcSetting(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) - throws IOException { + public static void patchArcSetting(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { ArcSetting resource = manager.arcSettings() .getWithResponse("test-rg", "myCluster", "default", com.azure.core.util.Context.NONE) .getValue(); resource.update() - .withConnectivityProperties(SerializerFactory.createDefaultManagementSerializerAdapter() - .deserialize("{\"enabled\":true,\"serviceConfigurations\":[{\"port\":6516,\"serviceName\":\"WAC\"}]}", - Object.class, SerializerEncoding.JSON)) + .withConnectivityProperties(new ArcConnectivityProperties().withEnabled(true) + .withServiceConfigurations( + Arrays.asList(new ServiceConfiguration().withServiceName(ServiceName.WAC).withPort(6516L)))) .apply(); } } @@ -338,9 +360,7 @@ import java.time.OffsetDateTime; */ public final class ClustersConfigureRemoteSupportSamples { /* - * x-ms-original-file: - * specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/StackHCI/stable/2024-04-01/examples/ - * ConfigureRemoteSupport.json + * x-ms-original-file: 2026-02-01/ConfigureRemoteSupport.json */ /** * Sample code: Configure Remote Support. @@ -368,9 +388,7 @@ import com.azure.resourcemanager.azurestackhci.models.ManagedServiceIdentityType */ public final class ClustersCreateSamples { /* - * x-ms-original-file: - * specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/StackHCI/stable/2024-04-01/examples/ - * CreateCluster.json + * x-ms-original-file: 2026-02-01/CreateCluster.json */ /** * Sample code: Create cluster. @@ -382,10 +400,10 @@ public final class ClustersCreateSamples { .define("myCluster") .withRegion("East US") .withExistingResourceGroup("test-rg") - .withTypeIdentityType(ManagedServiceIdentityType.SYSTEM_ASSIGNED) .withCloudManagementEndpoint("https://98294836-31be-4668-aeae-698667faf99b.waconazure.com") .withAadClientId("24a6e53d-04e5-44d2-b7cc-1b732a847dfc") .withAadTenantId("7e589cc1-a8b6-4dff-91bd-5ec0fa18db94") + .withTypeIdentityType(ManagedServiceIdentityType.SYSTEM_ASSIGNED) .create(); } } @@ -399,9 +417,7 @@ public final class ClustersCreateSamples { */ public final class ClustersCreateIdentitySamples { /* - * x-ms-original-file: - * specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/StackHCI/stable/2024-04-01/examples/ - * CreateClusterIdentity.json + * x-ms-original-file: 2026-02-01/CreateClusterIdentity.json */ /** * Sample code: Create cluster Identity. @@ -422,9 +438,7 @@ public final class ClustersCreateIdentitySamples { */ public final class ClustersDeleteSamples { /* - * x-ms-original-file: - * specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/StackHCI/stable/2024-04-01/examples/ - * DeleteCluster.json + * x-ms-original-file: 2026-02-01/DeleteCluster.json */ /** * Sample code: Delete cluster. @@ -449,9 +463,7 @@ import com.azure.resourcemanager.azurestackhci.models.SoftwareAssuranceIntent; */ public final class ClustersExtendSoftwareAssuranceBenefitSamples { /* - * x-ms-original-file: - * specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/StackHCI/stable/2024-04-01/examples/ - * ExtendSoftwareAssuranceBenefit.json + * x-ms-original-file: 2026-02-01/ExtendSoftwareAssuranceBenefit.json */ /** * Sample code: Create cluster Identity. @@ -476,9 +488,7 @@ public final class ClustersExtendSoftwareAssuranceBenefitSamples { */ public final class ClustersGetByResourceGroupSamples { /* - * x-ms-original-file: - * specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/StackHCI/stable/2024-04-01/examples/ - * GetCluster.json + * x-ms-original-file: 2026-02-01/GetCluster.json */ /** * Sample code: Get cluster. @@ -499,9 +509,7 @@ public final class ClustersGetByResourceGroupSamples { */ public final class ClustersListSamples { /* - * x-ms-original-file: - * specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/StackHCI/stable/2024-04-01/examples/ - * ListClustersBySubscription.json + * x-ms-original-file: 2026-02-01/ListClustersBySubscription.json */ /** * Sample code: List clusters in a given subscription. @@ -523,9 +531,7 @@ public final class ClustersListSamples { */ public final class ClustersListByResourceGroupSamples { /* - * x-ms-original-file: - * specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/StackHCI/stable/2024-04-01/examples/ - * ListClustersByResourceGroup.json + * x-ms-original-file: 2026-02-01/ListClustersByResourceGroup.json */ /** * Sample code: List clusters in a given resource group. @@ -551,9 +557,7 @@ import java.time.OffsetDateTime; */ public final class ClustersTriggerLogCollectionSamples { /* - * x-ms-original-file: - * specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/StackHCI/stable/2024-04-01/examples/ - * TriggerLogCollection.json + * x-ms-original-file: 2026-02-01/TriggerLogCollection.json */ /** * Sample code: Trigger Log Collection. @@ -587,9 +591,7 @@ import java.util.Map; */ public final class ClustersUpdateSamples { /* - * x-ms-original-file: - * specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/StackHCI/stable/2024-04-01/examples/ - * UpdateCluster.json + * x-ms-original-file: 2026-02-01/UpdateCluster.json */ /** * Sample code: Update cluster. @@ -624,6 +626,38 @@ public final class ClustersUpdateSamples { } ``` +### Clusters_UpdateSecretsLocations + +```java +import com.azure.resourcemanager.azurestackhci.models.SecretsLocationDetails; +import com.azure.resourcemanager.azurestackhci.models.SecretsLocationsChangeRequest; +import com.azure.resourcemanager.azurestackhci.models.SecretsType; +import java.util.Arrays; + +/** + * Samples for Clusters UpdateSecretsLocations. + */ +public final class ClustersUpdateSecretsLocationsSamples { + /* + * x-ms-original-file: 2026-02-01/Clusters_UpdateSecretsLocations.json + */ + /** + * Sample code: Update secrets locations for a Cluster. + * + * @param manager Entry point to AzureStackHciManager. + */ + public static void + updateSecretsLocationsForACluster(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { + manager.clusters() + .updateSecretsLocations("test-rg", "myCluster", + new SecretsLocationsChangeRequest().withProperties( + Arrays.asList(new SecretsLocationDetails().withSecretsType(SecretsType.BACKUP_SECRETS) + .withSecretsLocation("fakeTokenPlaceholder"))), + com.azure.core.util.Context.NONE); + } +} +``` + ### Clusters_UploadCertificate ```java @@ -636,9 +670,7 @@ import java.util.Arrays; */ public final class ClustersUploadCertificateSamples { /* - * x-ms-original-file: - * specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/StackHCI/stable/2024-04-01/examples/ - * UploadCertificate.json + * x-ms-original-file: 2026-02-01/UploadCertificate.json */ /** * Sample code: Upload certificate. @@ -669,8 +701,11 @@ import com.azure.resourcemanager.azurestackhci.models.DeploymentSettingIntents; import com.azure.resourcemanager.azurestackhci.models.DeploymentSettingStorageAdapterIpInfo; import com.azure.resourcemanager.azurestackhci.models.DeploymentSettingStorageNetworks; import com.azure.resourcemanager.azurestackhci.models.DeploymentSettingVirtualSwitchConfigurationOverrides; +import com.azure.resourcemanager.azurestackhci.models.DnsServerConfig; +import com.azure.resourcemanager.azurestackhci.models.DnsZones; import com.azure.resourcemanager.azurestackhci.models.EceDeploymentSecrets; import com.azure.resourcemanager.azurestackhci.models.EceSecrets; +import com.azure.resourcemanager.azurestackhci.models.IdentityProvider; import com.azure.resourcemanager.azurestackhci.models.InfrastructureNetwork; import com.azure.resourcemanager.azurestackhci.models.IpPools; import com.azure.resourcemanager.azurestackhci.models.NetworkController; @@ -694,9 +729,120 @@ import java.util.Arrays; */ public final class DeploymentSettingsCreateOrUpdateSamples { /* - * x-ms-original-file: - * specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/StackHCI/stable/2024-04-01/examples/ - * PutDeploymentSettings.json + * x-ms-original-file: 2026-02-01/PutDeploymentSettingsWithADLess.json + */ + /** + * Sample code: Create Deployment Settings Without Active Directory Integration. + * + * @param manager Entry point to AzureStackHciManager. + */ + public static void createDeploymentSettingsWithoutActiveDirectoryIntegration( + com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { + manager.deploymentSettings() + .define("default") + .withExistingCluster("test-rg", "myCluster") + .withArcNodeResourceIds(Arrays.asList( + "/subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/ArcInstance-rg/providers/Microsoft.HybridCompute/machines/Node-1", + "/subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/ArcInstance-rg/providers/Microsoft.HybridCompute/machines/Node-2")) + .withDeploymentMode(DeploymentMode.DEPLOY) + .withOperationType(OperationType.CLUSTER_PROVISIONING) + .withDeploymentConfiguration( + new DeploymentConfiguration().withVersion("string") + .withScaleUnits(Arrays.asList(new ScaleUnits() + .withDeploymentData(new DeploymentData() + .withSecuritySettings(new DeploymentSecuritySettings().withHvciProtection(true) + .withDrtmProtection(true) + .withDriftControlEnforced(true) + .withCredentialGuardEnforced(false) + .withSmbSigningEnforced(true) + .withSmbClusterEncryption(false) + .withSideChannelMitigationEnforced(true) + .withBitlockerBootVolume(true) + .withBitlockerDataVolumes(true) + .withWdacEnforced(true)) + .withObservability(new Observability().withStreamingDataClient(true) + .withEuLocation(false) + .withEpisodicDataUpload(true)) + .withCluster(new DeploymentCluster().withName("testHCICluster") + .withWitnessType("Cloud") + .withWitnessPath("Cloud") + .withCloudAccountName("myasestoragacct") + .withAzureServiceEndpoint("core.windows.net")) + .withIdentityProvider(IdentityProvider.LOCAL_IDENTITY) + .withStorage(new Storage().withConfigurationMode("Express")) + .withNamingPrefix("ms169") + .withDomainFqdn("ASZ1PLab8.nttest.microsoft.com") + .withInfrastructureNetwork(Arrays.asList(new InfrastructureNetwork() + .withSubnetMask("255.255.248.0") + .withGateway("255.255.248.0") + .withIpPools(Arrays.asList( + new IpPools().withStartingAddress("10.57.48.60").withEndingAddress("10.57.48.66"))) + .withDnsZones(Arrays.asList(new DnsZones().withDnsZoneName("contoso.com") + .withDnsForwarder(Arrays.asList("192.168.1.1")))))) + .withPhysicalNodes(Arrays.asList( + new PhysicalNodes().withName("ms169host").withIpv4Address("10.57.51.224"), + new PhysicalNodes().withName("ms154host").withIpv4Address("10.57.53.236"))) + .withHostNetwork(new DeploymentSettingHostNetwork() + .withIntents(Arrays.asList(new DeploymentSettingIntents().withName("Compute_Management") + .withTrafficType(Arrays.asList("Compute", "Management")) + .withAdapter(Arrays.asList("Port2")) + .withOverrideVirtualSwitchConfiguration(false) + .withVirtualSwitchConfigurationOverrides( + new DeploymentSettingVirtualSwitchConfigurationOverrides().withEnableIov("True") + .withLoadBalancingAlgorithm("HyperVPort")) + .withOverrideQosPolicy(false) + .withQosPolicyOverrides( + new QosPolicyOverrides().withPriorityValue8021ActionCluster("7") + .withPriorityValue8021ActionSmb("3") + .withBandwidthPercentageSmb("50")) + .withOverrideAdapterProperty(false) + .withAdapterPropertyOverrides( + new DeploymentSettingAdapterPropertyOverrides().withJumboPacket("1514") + .withNetworkDirect("Enabled") + .withNetworkDirectTechnology("iWARP")))) + .withStorageNetworks( + Arrays.asList(new DeploymentSettingStorageNetworks().withName("Storage1Network") + .withNetworkAdapterName("Port3") + .withVlanId("5") + .withStorageAdapterIpInfo(Arrays.asList( + new DeploymentSettingStorageAdapterIpInfo().withPhysicalNode("string") + .withIpv4Address("10.57.48.60") + .withSubnetMask("255.255.248.0"))))) + .withStorageConnectivitySwitchless(true) + .withEnableStorageAutoIp(false)) + .withSdnIntegration(new SdnIntegration().withNetworkController( + new NetworkController().withMacAddressPoolStart("00-0D-3A-1B-C7-21") + .withMacAddressPoolStop("00-0D-3A-1B-C7-29") + .withNetworkVirtualizationEnabled(true))) + .withAdouPath("OU=ms169,DC=ASZ1PLab8,DC=nttest,DC=microsoft,DC=com") + .withSecretsLocation("fakeTokenPlaceholder") + .withSecrets(Arrays.asList( + new EceDeploymentSecrets().withSecretName("fakeTokenPlaceholder") + .withEceSecretName(EceSecrets.fromString("BMCAdminUserCred")) + .withSecretLocation("fakeTokenPlaceholder"), + new EceDeploymentSecrets().withSecretName("fakeTokenPlaceholder") + .withEceSecretName(EceSecrets.AZURE_STACK_LCMUSER_CREDENTIAL) + .withSecretLocation("fakeTokenPlaceholder"))) + .withOptionalServices(new OptionalServices().withCustomLocation("customLocationName"))) + .withSbePartnerInfo(new SbePartnerInfo() + .withSbeDeploymentInfo(new SbeDeploymentInfo().withVersion("4.0.2309.13") + .withFamily("Gen5") + .withPublisher("Contoso") + .withSbeManifestSource("default") + .withSbeManifestCreationDate(OffsetDateTime.parse("2023-07-25T02:40:33Z"))) + .withPartnerProperties( + Arrays.asList(new SbePartnerProperties().withName("EnableBMCIpV6").withValue("false"), + new SbePartnerProperties().withName("PhoneHomePort").withValue("1653"), + new SbePartnerProperties().withName("BMCSecurityState").withValue("HighSecurity"))) + .withCredentialList( + Arrays.asList(new SbeCredentials().withSecretName("fakeTokenPlaceholder") + .withEceSecretName("fakeTokenPlaceholder") + .withSecretLocation("fakeTokenPlaceholder"))))))) + .create(); + } + + /* + * x-ms-original-file: 2026-02-01/PutDeploymentSettings.json */ /** * Sample code: Create Deployment Settings. @@ -742,6 +888,7 @@ public final class DeploymentSettingsCreateOrUpdateSamples { .withGateway("255.255.248.0") .withIpPools(Arrays.asList( new IpPools().withStartingAddress("10.57.48.60").withEndingAddress("10.57.48.66"))) + .withDnsServerConfig(DnsServerConfig.USE_DNS_SERVER) .withDnsServers(Arrays.asList("10.57.50.90")))) .withPhysicalNodes(Arrays.asList( new PhysicalNodes().withName("ms169host").withIpv4Address("10.57.51.224"), @@ -778,6 +925,7 @@ public final class DeploymentSettingsCreateOrUpdateSamples { new NetworkController().withMacAddressPoolStart("00-0D-3A-1B-C7-21") .withMacAddressPoolStop("00-0D-3A-1B-C7-29") .withNetworkVirtualizationEnabled(true))) + .withIsManagementCluster(true) .withAdouPath("OU=ms169,DC=ASZ1PLab8,DC=nttest,DC=microsoft,DC=com") .withSecretsLocation("fakeTokenPlaceholder") .withSecrets(Arrays.asList( @@ -815,9 +963,7 @@ public final class DeploymentSettingsCreateOrUpdateSamples { */ public final class DeploymentSettingsDeleteSamples { /* - * x-ms-original-file: - * specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/StackHCI/stable/2024-04-01/examples/ - * DeleteDeploymentSettings.json + * x-ms-original-file: 2026-02-01/DeleteDeploymentSettings.json */ /** * Sample code: Delete Deployment Settings. @@ -838,9 +984,7 @@ public final class DeploymentSettingsDeleteSamples { */ public final class DeploymentSettingsGetSamples { /* - * x-ms-original-file: - * specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/StackHCI/stable/2024-04-01/examples/ - * GetDeploymentSettings.json + * x-ms-original-file: 2026-02-01/GetDeploymentSettings.json */ /** * Sample code: Get Deployment Settings. @@ -862,9 +1006,7 @@ public final class DeploymentSettingsGetSamples { */ public final class DeploymentSettingsListByClustersSamples { /* - * x-ms-original-file: - * specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/StackHCI/stable/2024-04-01/examples/ - * ListDeploymentSettingsByCluster.json + * x-ms-original-file: 2026-02-01/ListDeploymentSettingsByCluster.json */ /** * Sample code: List Deployment Settings. @@ -877,6 +1019,137 @@ public final class DeploymentSettingsListByClustersSamples { } ``` +### EdgeDeviceJobs_CreateOrUpdate + +```java +import com.azure.resourcemanager.azurestackhci.models.HciCollectLogJobProperties; +import com.azure.resourcemanager.azurestackhci.models.HciEdgeDeviceJob; +import com.azure.resourcemanager.azurestackhci.models.HciRemoteSupportJobProperties; +import com.azure.resourcemanager.azurestackhci.models.RemoteSupportAccessLevel; +import com.azure.resourcemanager.azurestackhci.models.RemoteSupportType; +import java.time.OffsetDateTime; + +/** + * Samples for EdgeDeviceJobs CreateOrUpdate. + */ +public final class EdgeDeviceJobsCreateOrUpdateSamples { + /* + * x-ms-original-file: 2026-02-01/EdgeDeviceJobs_CreateOrUpdate_RemoteSupport.json + */ + /** + * Sample code: EdgeDeviceJobs_CreateOrUpdate_RemoteSupport. + * + * @param manager Entry point to AzureStackHciManager. + */ + public static void edgeDeviceJobsCreateOrUpdateRemoteSupport( + com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { + manager.edgeDeviceJobs() + .createOrUpdate( + "subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/ArcInstance-rg/providers/Microsoft.HybridCompute/machines/Node-1", + "default", "collectLog", + new HciEdgeDeviceJob().withProperties( + new HciRemoteSupportJobProperties().withAccessLevel(RemoteSupportAccessLevel.DIAGNOSTICS) + .withExpirationTimestamp(OffsetDateTime.parse("2024-01-29T10:43:27.9471574Z")) + .withType(RemoteSupportType.ENABLE)), + com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: 2026-02-01/EdgeDeviceJobs_CreateOrUpdate_CollectLog.json + */ + /** + * Sample code: EdgeDeviceJobs_CreateOrUpdate_CollectLog. + * + * @param manager Entry point to AzureStackHciManager. + */ + public static void + edgeDeviceJobsCreateOrUpdateCollectLog(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { + manager.edgeDeviceJobs() + .createOrUpdate( + "subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/ArcInstance-rg/providers/Microsoft.HybridCompute/machines/Node-1", + "default", "collectLog", + new HciEdgeDeviceJob().withProperties( + new HciCollectLogJobProperties().withFromDate(OffsetDateTime.parse("2024-01-29T10:43:27.9471574Z")) + .withToDate(OffsetDateTime.parse("2024-01-29T10:43:27.9471574Z"))), + com.azure.core.util.Context.NONE); + } +} +``` + +### EdgeDeviceJobs_Delete + +```java +/** + * Samples for EdgeDeviceJobs Delete. + */ +public final class EdgeDeviceJobsDeleteSamples { + /* + * x-ms-original-file: 2026-02-01/EdgeDeviceJobs_Delete.json + */ + /** + * Sample code: EdgeDeviceJobs_Delete. + * + * @param manager Entry point to AzureStackHciManager. + */ + public static void edgeDeviceJobsDelete(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { + manager.edgeDeviceJobs() + .delete( + "subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/ArcInstance-rg/providers/Microsoft.HybridCompute/machines/Node-1", + "lAq", "Ihlm3R-bZ4vTC4ABA456", com.azure.core.util.Context.NONE); + } +} +``` + +### EdgeDeviceJobs_Get + +```java +/** + * Samples for EdgeDeviceJobs Get. + */ +public final class EdgeDeviceJobsGetSamples { + /* + * x-ms-original-file: 2026-02-01/EdgeDeviceJobs_Get_RemoteSupport.json + */ + /** + * Sample code: EdgeDeviceJobs_Get_RemoteSupport. + * + * @param manager Entry point to AzureStackHciManager. + */ + public static void + edgeDeviceJobsGetRemoteSupport(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { + manager.edgeDeviceJobs() + .getWithResponse( + "subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/ArcInstance-rg/providers/Microsoft.HybridCompute/machines/Node-1", + "-5M1G7G10OZ-o5b-HS3-c72", "-oUxs", com.azure.core.util.Context.NONE); + } +} +``` + +### EdgeDeviceJobs_ListByEdgeDevice + +```java +/** + * Samples for EdgeDeviceJobs ListByEdgeDevice. + */ +public final class EdgeDeviceJobsListByEdgeDeviceSamples { + /* + * x-ms-original-file: 2026-02-01/EdgeDeviceJobs_ListByEdgeDevice.json + */ + /** + * Sample code: EdgeDeviceJobs_ListByEdgeDevice. + * + * @param manager Entry point to AzureStackHciManager. + */ + public static void + edgeDeviceJobsListByEdgeDevice(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { + manager.edgeDeviceJobs() + .listByEdgeDevice( + "subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/ArcInstance-rg/providers/Microsoft.HybridCompute/machines/Node-1", + "YE-855IEIN585-", com.azure.core.util.Context.NONE); + } +} +``` + ### EdgeDevices_CreateOrUpdate ```java @@ -891,9 +1164,7 @@ import java.util.Arrays; */ public final class EdgeDevicesCreateOrUpdateSamples { /* - * x-ms-original-file: - * specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/StackHCI/stable/2024-04-01/examples/ - * CreateHciEdgeDevice.json + * x-ms-original-file: 2026-02-01/CreateHciEdgeDevice.json */ /** * Sample code: Create HCI Edge Device. @@ -928,9 +1199,7 @@ public final class EdgeDevicesCreateOrUpdateSamples { */ public final class EdgeDevicesDeleteSamples { /* - * x-ms-original-file: - * specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/StackHCI/stable/2024-04-01/examples/ - * DeleteEdgeDevices.json + * x-ms-original-file: 2026-02-01/DeleteEdgeDevices.json */ /** * Sample code: Delete Edge Devices. @@ -954,9 +1223,7 @@ public final class EdgeDevicesDeleteSamples { */ public final class EdgeDevicesGetSamples { /* - * x-ms-original-file: - * specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/StackHCI/stable/2024-04-01/examples/ - * GetEdgeDevices.json + * x-ms-original-file: 2026-02-01/GetEdgeDevices.json */ /** * Sample code: Get Edge Device. @@ -980,9 +1247,7 @@ public final class EdgeDevicesGetSamples { */ public final class EdgeDevicesListSamples { /* - * x-ms-original-file: - * specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/StackHCI/stable/2024-04-01/examples/ - * ListEdgeDevices.json + * x-ms-original-file: 2026-02-01/ListEdgeDevices.json */ /** * Sample code: List Edge Devices. @@ -1009,9 +1274,7 @@ import java.util.Arrays; */ public final class EdgeDevicesValidateSamples { /* - * x-ms-original-file: - * specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/StackHCI/stable/2024-04-01/examples/ - * ValidateEdgeDevices.json + * x-ms-original-file: 2026-02-01/ValidateEdgeDevices.json */ /** * Sample code: Validate Edge Devices. @@ -1044,9 +1307,7 @@ import java.io.IOException; */ public final class ExtensionsCreateSamples { /* - * x-ms-original-file: - * specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/StackHCI/stable/2024-04-01/examples/ - * PutExtension.json + * x-ms-original-file: 2026-02-01/PutExtension.json */ /** * Sample code: Create Arc Extension. @@ -1079,9 +1340,7 @@ public final class ExtensionsCreateSamples { */ public final class ExtensionsDeleteSamples { /* - * x-ms-original-file: - * specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/StackHCI/stable/2024-04-01/examples/ - * DeleteExtension.json + * x-ms-original-file: 2026-02-01/DeleteExtension.json */ /** * Sample code: Delete Arc Extension. @@ -1103,9 +1362,7 @@ public final class ExtensionsDeleteSamples { */ public final class ExtensionsGetSamples { /* - * x-ms-original-file: - * specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/StackHCI/stable/2024-04-01/examples/ - * GetExtension.json + * x-ms-original-file: 2026-02-01/GetExtension.json */ /** * Sample code: Get ArcSettings Extension. @@ -1128,9 +1385,7 @@ public final class ExtensionsGetSamples { */ public final class ExtensionsListByArcSettingSamples { /* - * x-ms-original-file: - * specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/StackHCI/stable/2024-04-01/examples/ - * ListExtensionsByArcSetting.json + * x-ms-original-file: 2026-02-01/ListExtensionsByArcSetting.json */ /** * Sample code: List Extensions under ArcSetting resource. @@ -1158,9 +1413,7 @@ import java.io.IOException; */ public final class ExtensionsUpdateSamples { /* - * x-ms-original-file: - * specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/StackHCI/stable/2024-04-01/examples/ - * PatchExtension.json + * x-ms-original-file: 2026-02-01/PatchExtension.json */ /** * Sample code: Update Arc Extension. @@ -1195,9 +1448,7 @@ import com.azure.resourcemanager.azurestackhci.models.ExtensionUpgradeParameters */ public final class ExtensionsUpgradeSamples { /* - * x-ms-original-file: - * specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/StackHCI/stable/2024-04-01/examples/ - * Extensions_Upgrade.json + * x-ms-original-file: 2026-02-01/Extensions_Upgrade.json */ /** * Sample code: Upgrade Machine Extensions. @@ -1220,9 +1471,7 @@ public final class ExtensionsUpgradeSamples { */ public final class OffersGetSamples { /* - * x-ms-original-file: - * specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/StackHCI/stable/2024-04-01/examples/GetOffer - * .json + * x-ms-original-file: 2026-02-01/GetOffer.json */ /** * Sample code: Get Offer. @@ -1244,9 +1493,7 @@ public final class OffersGetSamples { */ public final class OffersListByClusterSamples { /* - * x-ms-original-file: - * specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/StackHCI/stable/2024-04-01/examples/ - * ListOffersByCluster.json + * x-ms-original-file: 2026-02-01/ListOffersByCluster.json */ /** * Sample code: List Offer resources by HCI Cluster. @@ -1268,9 +1515,7 @@ public final class OffersListByClusterSamples { */ public final class OffersListByPublisherSamples { /* - * x-ms-original-file: - * specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/StackHCI/stable/2024-04-01/examples/ - * ListOffersByPublisher.json + * x-ms-original-file: 2026-02-01/ListOffersByPublisher.json */ /** * Sample code: List Offer resources by publisher for the HCI Cluster. @@ -1292,64 +1537,16 @@ public final class OffersListByPublisherSamples { */ public final class OperationsListSamples { /* - * x-ms-original-file: - * specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/operations/stable/2024-04-01/examples/ - * ListOperations.json - */ - /** - * Sample code: Create cluster. - * - * @param manager Entry point to AzureStackHciManager. - */ - public static void createCluster(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { - manager.operations().listWithResponse(com.azure.core.util.Context.NONE); - } -} -``` - -### Publishers_Get - -```java -/** - * Samples for Publishers Get. - */ -public final class PublishersGetSamples { - /* - * x-ms-original-file: - * specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/StackHCI/stable/2024-04-01/examples/ - * GetPublisher.json - */ - /** - * Sample code: Get Publisher. - * - * @param manager Entry point to AzureStackHciManager. - */ - public static void getPublisher(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { - manager.publishers().getWithResponse("test-rg", "myCluster", "publisher1", com.azure.core.util.Context.NONE); - } -} -``` - -### Publishers_ListByCluster - -```java -/** - * Samples for Publishers ListByCluster. - */ -public final class PublishersListByClusterSamples { - /* - * x-ms-original-file: - * specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/StackHCI/stable/2024-04-01/examples/ - * ListPublishersByCluster.json + * x-ms-original-file: 2026-02-01/Operations_List.json */ /** - * Sample code: List Publisher resources by HCI Cluster. + * Sample code: List the operations for the provider. * * @param manager Entry point to AzureStackHciManager. */ public static void - listPublisherResourcesByHCICluster(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { - manager.publishers().listByCluster("test-rg", "myCluster", com.azure.core.util.Context.NONE); + listTheOperationsForTheProvider(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { + manager.operations().list(com.azure.core.util.Context.NONE); } } ``` @@ -1364,9 +1561,7 @@ import com.azure.resourcemanager.azurestackhci.models.ComplianceAssignmentType; */ public final class SecuritySettingsCreateOrUpdateSamples { /* - * x-ms-original-file: - * specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/StackHCI/stable/2024-04-01/examples/ - * PutSecuritySettings.json + * x-ms-original-file: 2026-02-01/PutSecuritySettings.json */ /** * Sample code: Create Security Settings. @@ -1393,9 +1588,7 @@ public final class SecuritySettingsCreateOrUpdateSamples { */ public final class SecuritySettingsDeleteSamples { /* - * x-ms-original-file: - * specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/StackHCI/stable/2024-04-01/examples/ - * DeleteSecuritySettings.json + * x-ms-original-file: 2026-02-01/DeleteSecuritySettings.json */ /** * Sample code: Delete Security Settings. @@ -1416,9 +1609,7 @@ public final class SecuritySettingsDeleteSamples { */ public final class SecuritySettingsGetSamples { /* - * x-ms-original-file: - * specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/StackHCI/stable/2024-04-01/examples/ - * GetSecuritySettings.json + * x-ms-original-file: 2026-02-01/GetSecuritySettings.json */ /** * Sample code: Get Security Settings. @@ -1439,9 +1630,7 @@ public final class SecuritySettingsGetSamples { */ public final class SecuritySettingsListByClustersSamples { /* - * x-ms-original-file: - * specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/StackHCI/stable/2024-04-01/examples/ - * ListSecuritySettingsByCluster.json + * x-ms-original-file: 2026-02-01/ListSecuritySettingsByCluster.json */ /** * Sample code: List Security Settings. @@ -1462,9 +1651,7 @@ public final class SecuritySettingsListByClustersSamples { */ public final class SkusGetSamples { /* - * x-ms-original-file: - * specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/StackHCI/stable/2024-04-01/examples/GetSku. - * json + * x-ms-original-file: 2026-02-01/GetSku.json */ /** * Sample code: Get Sku. @@ -1487,9 +1674,7 @@ public final class SkusGetSamples { */ public final class SkusListByOfferSamples { /* - * x-ms-original-file: - * specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/StackHCI/stable/2024-04-01/examples/ - * ListSkusByOffer.json + * x-ms-original-file: 2026-02-01/ListSkusByOffer.json */ /** * Sample code: List SKU resources by offer for the HCI Cluster. @@ -1512,9 +1697,7 @@ public final class SkusListByOfferSamples { */ public final class UpdateRunsDeleteSamples { /* - * x-ms-original-file: - * specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/StackHCI/stable/2024-04-01/examples/ - * DeleteUpdateRuns.json + * x-ms-original-file: 2026-02-01/DeleteUpdateRuns.json */ /** * Sample code: Delete an Update. @@ -1537,9 +1720,7 @@ public final class UpdateRunsDeleteSamples { */ public final class UpdateRunsGetSamples { /* - * x-ms-original-file: - * specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/StackHCI/stable/2024-04-01/examples/ - * GetUpdateRuns.json + * x-ms-original-file: 2026-02-01/GetUpdateRuns.json */ /** * Sample code: Get Update runs under cluster resource. @@ -1563,9 +1744,7 @@ public final class UpdateRunsGetSamples { */ public final class UpdateRunsListSamples { /* - * x-ms-original-file: - * specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/StackHCI/stable/2024-04-01/examples/ - * ListUpdateRuns.json + * x-ms-original-file: 2026-02-01/ListUpdateRuns.json */ /** * Sample code: List Update runs under cluster resource. @@ -1592,9 +1771,7 @@ import java.util.Arrays; */ public final class UpdateRunsPutSamples { /* - * x-ms-original-file: - * specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/StackHCI/stable/2024-04-01/examples/ - * PutUpdateRuns.json + * x-ms-original-file: 2026-02-01/PutUpdateRuns.json */ /** * Sample code: Get Update runs under cluster resource. @@ -1636,9 +1813,7 @@ public final class UpdateRunsPutSamples { */ public final class UpdateSummariesOperationDeleteSamples { /* - * x-ms-original-file: - * specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/StackHCI/stable/2024-04-01/examples/ - * DeleteUpdateSummaries.json + * x-ms-original-file: 2026-02-01/DeleteUpdateSummaries.json */ /** * Sample code: Delete an Update. @@ -1659,9 +1834,7 @@ public final class UpdateSummariesOperationDeleteSamples { */ public final class UpdateSummariesOperationGetSamples { /* - * x-ms-original-file: - * specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/StackHCI/stable/2024-04-01/examples/ - * GetUpdateSummaries.json + * x-ms-original-file: 2026-02-01/GetUpdateSummaries.json */ /** * Sample code: Get Update summaries under cluster resource. @@ -1683,9 +1856,7 @@ public final class UpdateSummariesOperationGetSamples { */ public final class UpdateSummariesOperationListSamples { /* - * x-ms-original-file: - * specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/StackHCI/stable/2024-04-01/examples/ - * ListUpdateSummaries.json + * x-ms-original-file: 2026-02-01/ListUpdateSummaries.json */ /** * Sample code: Get Update summaries under cluster resource. @@ -1711,9 +1882,7 @@ import java.time.OffsetDateTime; */ public final class UpdateSummariesOperationPutSamples { /* - * x-ms-original-file: - * specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/StackHCI/stable/2024-04-01/examples/ - * PutUpdateSummaries.json + * x-ms-original-file: 2026-02-01/PutUpdateSummaries.json */ /** * Sample code: Put Update summaries under cluster resource. @@ -1743,9 +1912,7 @@ public final class UpdateSummariesOperationPutSamples { */ public final class UpdatesDeleteSamples { /* - * x-ms-original-file: - * specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/StackHCI/stable/2024-04-01/examples/ - * DeleteUpdates.json + * x-ms-original-file: 2026-02-01/DeleteUpdates.json */ /** * Sample code: Delete an Update. @@ -1766,9 +1933,7 @@ public final class UpdatesDeleteSamples { */ public final class UpdatesGetSamples { /* - * x-ms-original-file: - * specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/StackHCI/stable/2024-04-01/examples/ - * GetUpdates.json + * x-ms-original-file: 2026-02-01/GetUpdates.json */ /** * Sample code: Get a specific update. @@ -1790,9 +1955,7 @@ public final class UpdatesGetSamples { */ public final class UpdatesListSamples { /* - * x-ms-original-file: - * specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/StackHCI/stable/2024-04-01/examples/ - * ListUpdates.json + * x-ms-original-file: 2026-02-01/ListUpdates.json */ /** * Sample code: List available updates. @@ -1813,9 +1976,7 @@ public final class UpdatesListSamples { */ public final class UpdatesPostSamples { /* - * x-ms-original-file: - * specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/StackHCI/stable/2024-04-01/examples/ - * PostUpdates.json + * x-ms-original-file: 2026-02-01/PostUpdates.json */ /** * Sample code: List available updates. @@ -1843,9 +2004,7 @@ import java.util.Arrays; */ public final class UpdatesPutSamples { /* - * x-ms-original-file: - * specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/StackHCI/stable/2024-04-01/examples/ - * PutUpdates.json + * x-ms-original-file: 2026-02-01/PutUpdates.json */ /** * Sample code: Put a specific update. @@ -1864,7 +2023,7 @@ public final class UpdatesPutSamples { .withVersion("prerequisite version") .withPackageName("update package name"))) .withPackagePath("\\\\SU1FileServer\\SU1_Infrastructure_2\\Updates\\Packages\\Microsoft4.2203.2.32") - .withPackageSizeInMb(18858.0F) + .withPackageSizeInMb(18858.0D) .withDisplayName("AzS Update - 4.2203.2.32") .withVersion("4.2203.2.32") .withPublisher("Microsoft") @@ -1872,10 +2031,55 @@ public final class UpdatesPutSamples { .withAvailabilityType(AvailabilityType.LOCAL) .withPackageType("Infrastructure") .withAdditionalProperties("additional properties") - .withProgressPercentage(0.0F) + .withProgressPercentage(0.0D) .withNotifyMessage("Brief message with instructions for updates of AvailabilityType Notify") .apply(); } } ``` +### ValidatedSolutionRecipes_Get + +```java +/** + * Samples for ValidatedSolutionRecipes Get. + */ +public final class ValidatedSolutionRecipesGetSamples { + /* + * x-ms-original-file: 2026-02-01/ValidatedSolutionRecipes_Get.json + */ + /** + * Sample code: ValidatedSolutionRecipes_Get. + * + * @param manager Entry point to AzureStackHciManager. + */ + public static void + validatedSolutionRecipesGet(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { + manager.validatedSolutionRecipes().getWithResponse("westus2", "10.2408.0", com.azure.core.util.Context.NONE); + } +} +``` + +### ValidatedSolutionRecipes_ListBySubscriptionLocationResource + +```java +/** + * Samples for ValidatedSolutionRecipes ListBySubscriptionLocationResource. + */ +public final class ValidatedSolutionRecipesListBySubscriptionLocationResourceSamples { + /* + * x-ms-original-file: 2026-02-01/ValidatedSolutionRecipes_ListBySubscriptionLocationResource.json + */ + /** + * Sample code: ValidatedSolutionRecipes_ListBySubscriptionLocationResource. + * + * @param manager Entry point to AzureStackHciManager. + */ + public static void validatedSolutionRecipesListBySubscriptionLocationResource( + com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { + manager.validatedSolutionRecipes() + .listBySubscriptionLocationResource("westus2", com.azure.core.util.Context.NONE); + } +} +``` + diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/pom.xml b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/pom.xml index fb6751a936db..02fe0410b00f 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/pom.xml +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/pom.xml @@ -1,7 +1,7 @@ 4.0.0 @@ -14,11 +14,11 @@ com.azure.resourcemanager azure-resourcemanager-azurestackhci - 1.0.0-beta.6 + 1.0.0 jar - Microsoft Azure SDK for AzureStackHci Management - This package contains Microsoft Azure SDK for AzureStackHci Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. Azure Stack HCI management service. Package tag package-2024-04. + Microsoft Azure SDK for Azure Stack Hci Management + This package contains Microsoft Azure SDK for Azure Stack Hci Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. Azure Stack HCI service. Package api-version 2026-02-01. https://github.com/Azure/azure-sdk-for-java @@ -45,14 +45,8 @@ UTF-8 0 0 - true - - com.azure - azure-json - 1.5.1 - com.azure azure-core @@ -75,5 +69,10 @@ 1.18.2 test + + com.azure + azure-json + 1.5.1 + diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/AzureStackHciManager.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/AzureStackHciManager.java index 89f4053a15c9..dd081c548b7b 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/AzureStackHciManager.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/AzureStackHciManager.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci; @@ -11,90 +11,96 @@ import com.azure.core.http.HttpPipelinePosition; import com.azure.core.http.policy.AddDatePolicy; import com.azure.core.http.policy.AddHeadersFromContextPolicy; -import com.azure.core.http.policy.HttpLoggingPolicy; +import com.azure.core.http.policy.BearerTokenAuthenticationPolicy; import com.azure.core.http.policy.HttpLogOptions; +import com.azure.core.http.policy.HttpLoggingPolicy; import com.azure.core.http.policy.HttpPipelinePolicy; import com.azure.core.http.policy.HttpPolicyProviders; import com.azure.core.http.policy.RequestIdPolicy; import com.azure.core.http.policy.RetryOptions; import com.azure.core.http.policy.RetryPolicy; import com.azure.core.http.policy.UserAgentPolicy; -import com.azure.core.management.http.policy.ArmChallengeAuthenticationPolicy; import com.azure.core.management.profile.AzureProfile; import com.azure.core.util.Configuration; +import com.azure.core.util.CoreUtils; import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.azurestackhci.fluent.AzureStackHciClient; +import com.azure.resourcemanager.azurestackhci.fluent.AzureStackHciManagementClient; import com.azure.resourcemanager.azurestackhci.implementation.ArcSettingsImpl; -import com.azure.resourcemanager.azurestackhci.implementation.AzureStackHciClientBuilder; +import com.azure.resourcemanager.azurestackhci.implementation.AzureStackHciManagementClientBuilder; import com.azure.resourcemanager.azurestackhci.implementation.ClustersImpl; import com.azure.resourcemanager.azurestackhci.implementation.DeploymentSettingsImpl; +import com.azure.resourcemanager.azurestackhci.implementation.EdgeDeviceJobsImpl; import com.azure.resourcemanager.azurestackhci.implementation.EdgeDevicesImpl; import com.azure.resourcemanager.azurestackhci.implementation.ExtensionsImpl; import com.azure.resourcemanager.azurestackhci.implementation.OffersImpl; import com.azure.resourcemanager.azurestackhci.implementation.OperationsImpl; -import com.azure.resourcemanager.azurestackhci.implementation.PublishersImpl; import com.azure.resourcemanager.azurestackhci.implementation.SecuritySettingsImpl; import com.azure.resourcemanager.azurestackhci.implementation.SkusImpl; import com.azure.resourcemanager.azurestackhci.implementation.UpdateRunsImpl; -import com.azure.resourcemanager.azurestackhci.implementation.UpdatesImpl; import com.azure.resourcemanager.azurestackhci.implementation.UpdateSummariesOperationsImpl; +import com.azure.resourcemanager.azurestackhci.implementation.UpdatesImpl; +import com.azure.resourcemanager.azurestackhci.implementation.ValidatedSolutionRecipesImpl; import com.azure.resourcemanager.azurestackhci.models.ArcSettings; import com.azure.resourcemanager.azurestackhci.models.Clusters; import com.azure.resourcemanager.azurestackhci.models.DeploymentSettings; +import com.azure.resourcemanager.azurestackhci.models.EdgeDeviceJobs; import com.azure.resourcemanager.azurestackhci.models.EdgeDevices; import com.azure.resourcemanager.azurestackhci.models.Extensions; import com.azure.resourcemanager.azurestackhci.models.Offers; import com.azure.resourcemanager.azurestackhci.models.Operations; -import com.azure.resourcemanager.azurestackhci.models.Publishers; import com.azure.resourcemanager.azurestackhci.models.SecuritySettings; import com.azure.resourcemanager.azurestackhci.models.Skus; import com.azure.resourcemanager.azurestackhci.models.UpdateRuns; -import com.azure.resourcemanager.azurestackhci.models.Updates; import com.azure.resourcemanager.azurestackhci.models.UpdateSummariesOperations; +import com.azure.resourcemanager.azurestackhci.models.Updates; +import com.azure.resourcemanager.azurestackhci.models.ValidatedSolutionRecipes; import java.time.Duration; import java.time.temporal.ChronoUnit; import java.util.ArrayList; import java.util.List; +import java.util.Map; import java.util.Objects; import java.util.stream.Collectors; /** * Entry point to AzureStackHciManager. - * Azure Stack HCI management service. + * Azure Stack HCI service. */ public final class AzureStackHciManager { + private Operations operations; + private ArcSettings arcSettings; + private Offers offers; + private Clusters clusters; private DeploymentSettings deploymentSettings; + private EdgeDeviceJobs edgeDeviceJobs; + private EdgeDevices edgeDevices; private Extensions extensions; - private Offers offers; - - private Operations operations; - - private Publishers publishers; - private SecuritySettings securitySettings; private Skus skus; private UpdateRuns updateRuns; - private UpdateSummariesOperations updateSummariesOperations; - private Updates updates; - private final AzureStackHciClient clientObject; + private ValidatedSolutionRecipes validatedSolutionRecipes; + + private UpdateSummariesOperations updateSummariesOperations; + + private final AzureStackHciManagementClient clientObject; private AzureStackHciManager(HttpPipeline httpPipeline, AzureProfile profile, Duration defaultPollInterval) { Objects.requireNonNull(httpPipeline, "'httpPipeline' cannot be null."); Objects.requireNonNull(profile, "'profile' cannot be null."); - this.clientObject = new AzureStackHciClientBuilder().pipeline(httpPipeline) + this.clientObject = new AzureStackHciManagementClientBuilder().pipeline(httpPipeline) .endpoint(profile.getEnvironment().getResourceManagerEndpoint()) .subscriptionId(profile.getSubscriptionId()) .defaultPollInterval(defaultPollInterval) @@ -102,11 +108,11 @@ private AzureStackHciManager(HttpPipeline httpPipeline, AzureProfile profile, Du } /** - * Creates an instance of AzureStackHci service API entry point. + * Creates an instance of Azure Stack Hci service API entry point. * * @param credential the credential to use. * @param profile the Azure profile for client. - * @return the AzureStackHci service API instance. + * @return the Azure Stack Hci service API instance. */ public static AzureStackHciManager authenticate(TokenCredential credential, AzureProfile profile) { Objects.requireNonNull(credential, "'credential' cannot be null."); @@ -115,11 +121,11 @@ public static AzureStackHciManager authenticate(TokenCredential credential, Azur } /** - * Creates an instance of AzureStackHci service API entry point. + * Creates an instance of Azure Stack Hci service API entry point. * * @param httpPipeline the {@link HttpPipeline} configured with Azure authentication credential. * @param profile the Azure profile for client. - * @return the AzureStackHci service API instance. + * @return the Azure Stack Hci service API instance. */ public static AzureStackHciManager authenticate(HttpPipeline httpPipeline, AzureProfile profile) { Objects.requireNonNull(httpPipeline, "'httpPipeline' cannot be null."); @@ -141,6 +147,9 @@ public static Configurable configure() { */ public static final class Configurable { private static final ClientLogger LOGGER = new ClientLogger(Configurable.class); + private static final String SDK_VERSION = "version"; + private static final Map PROPERTIES + = CoreUtils.getProperties("azure-resourcemanager-azurestackhci.properties"); private HttpClient httpClient; private HttpLogOptions httpLogOptions; @@ -238,22 +247,24 @@ public Configurable withDefaultPollInterval(Duration defaultPollInterval) { } /** - * Creates an instance of AzureStackHci service API entry point. + * Creates an instance of Azure Stack Hci service API entry point. * * @param credential the credential to use. * @param profile the Azure profile for client. - * @return the AzureStackHci service API instance. + * @return the Azure Stack Hci service API instance. */ public AzureStackHciManager authenticate(TokenCredential credential, AzureProfile profile) { Objects.requireNonNull(credential, "'credential' cannot be null."); Objects.requireNonNull(profile, "'profile' cannot be null."); + String clientVersion = PROPERTIES.getOrDefault(SDK_VERSION, "UnknownVersion"); + StringBuilder userAgentBuilder = new StringBuilder(); userAgentBuilder.append("azsdk-java") .append("-") .append("com.azure.resourcemanager.azurestackhci") .append("/") - .append("1.0.0-beta.5"); + .append(clientVersion); if (!Configuration.getGlobalConfiguration().get("AZURE_TELEMETRY_DISABLED", false)) { userAgentBuilder.append(" (") .append(Configuration.getGlobalConfiguration().get("java.version")) @@ -286,7 +297,7 @@ public AzureStackHciManager authenticate(TokenCredential credential, AzureProfil HttpPolicyProviders.addBeforeRetryPolicies(policies); policies.add(retryPolicy); policies.add(new AddDatePolicy()); - policies.add(new ArmChallengeAuthenticationPolicy(credential, scopes.toArray(new String[0]))); + policies.add(new BearerTokenAuthenticationPolicy(credential, scopes.toArray(new String[0]))); policies.addAll(this.policies.stream() .filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_RETRY) .collect(Collectors.toList())); @@ -299,6 +310,18 @@ public AzureStackHciManager authenticate(TokenCredential credential, AzureProfil } } + /** + * Gets the resource collection API of Operations. + * + * @return Resource collection API of Operations. + */ + public Operations operations() { + if (this.operations == null) { + this.operations = new OperationsImpl(clientObject.getOperations(), this); + } + return operations; + } + /** * Gets the resource collection API of ArcSettings. It manages ArcSetting. * @@ -311,6 +334,18 @@ public ArcSettings arcSettings() { return arcSettings; } + /** + * Gets the resource collection API of Offers. + * + * @return Resource collection API of Offers. + */ + public Offers offers() { + if (this.offers == null) { + this.offers = new OffersImpl(clientObject.getOffers(), this); + } + return offers; + } + /** * Gets the resource collection API of Clusters. It manages Cluster. * @@ -335,6 +370,18 @@ public DeploymentSettings deploymentSettings() { return deploymentSettings; } + /** + * Gets the resource collection API of EdgeDeviceJobs. + * + * @return Resource collection API of EdgeDeviceJobs. + */ + public EdgeDeviceJobs edgeDeviceJobs() { + if (this.edgeDeviceJobs == null) { + this.edgeDeviceJobs = new EdgeDeviceJobsImpl(clientObject.getEdgeDeviceJobs(), this); + } + return edgeDeviceJobs; + } + /** * Gets the resource collection API of EdgeDevices. * @@ -359,42 +406,6 @@ public Extensions extensions() { return extensions; } - /** - * Gets the resource collection API of Offers. - * - * @return Resource collection API of Offers. - */ - public Offers offers() { - if (this.offers == null) { - this.offers = new OffersImpl(clientObject.getOffers(), this); - } - return offers; - } - - /** - * Gets the resource collection API of Operations. - * - * @return Resource collection API of Operations. - */ - public Operations operations() { - if (this.operations == null) { - this.operations = new OperationsImpl(clientObject.getOperations(), this); - } - return operations; - } - - /** - * Gets the resource collection API of Publishers. - * - * @return Resource collection API of Publishers. - */ - public Publishers publishers() { - if (this.publishers == null) { - this.publishers = new PublishersImpl(clientObject.getPublishers(), this); - } - return publishers; - } - /** * Gets the resource collection API of SecuritySettings. It manages SecuritySetting. * @@ -431,6 +442,31 @@ public UpdateRuns updateRuns() { return updateRuns; } + /** + * Gets the resource collection API of Updates. It manages HciUpdate. + * + * @return Resource collection API of Updates. + */ + public Updates updates() { + if (this.updates == null) { + this.updates = new UpdatesImpl(clientObject.getUpdates(), this); + } + return updates; + } + + /** + * Gets the resource collection API of ValidatedSolutionRecipes. + * + * @return Resource collection API of ValidatedSolutionRecipes. + */ + public ValidatedSolutionRecipes validatedSolutionRecipes() { + if (this.validatedSolutionRecipes == null) { + this.validatedSolutionRecipes + = new ValidatedSolutionRecipesImpl(clientObject.getValidatedSolutionRecipes(), this); + } + return validatedSolutionRecipes; + } + /** * Gets the resource collection API of UpdateSummariesOperations. * @@ -445,24 +481,12 @@ public UpdateSummariesOperations updateSummariesOperations() { } /** - * Gets the resource collection API of Updates. It manages HciUpdate. - * - * @return Resource collection API of Updates. - */ - public Updates updates() { - if (this.updates == null) { - this.updates = new UpdatesImpl(clientObject.getUpdates(), this); - } - return updates; - } - - /** - * Gets wrapped service client AzureStackHciClient providing direct access to the underlying auto-generated API - * implementation, based on Azure REST API. + * Gets wrapped service client AzureStackHciManagementClient providing direct access to the underlying + * auto-generated API implementation, based on Azure REST API. * - * @return Wrapped service client AzureStackHciClient. + * @return Wrapped service client AzureStackHciManagementClient. */ - public AzureStackHciClient serviceClient() { + public AzureStackHciManagementClient serviceClient() { return this.clientObject; } } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/ArcSettingsClient.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/ArcSettingsClient.java index b1ea2a3c20a3..574a6c0cf9e4 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/ArcSettingsClient.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/ArcSettingsClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.fluent; @@ -15,38 +15,12 @@ import com.azure.resourcemanager.azurestackhci.fluent.models.ArcSettingInner; import com.azure.resourcemanager.azurestackhci.fluent.models.PasswordCredentialInner; import com.azure.resourcemanager.azurestackhci.models.ArcSettingsPatch; +import com.azure.resourcemanager.azurestackhci.models.ReconcileArcSettingsRequest; /** * An instance of this class provides access to all the operations defined in ArcSettingsClient. */ public interface ArcSettingsClient { - /** - * Get ArcSetting resources of HCI Cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterName The name of the cluster. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return arcSetting resources of HCI Cluster as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByCluster(String resourceGroupName, String clusterName); - - /** - * Get ArcSetting resources of HCI Cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterName The name of the cluster. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return arcSetting resources of HCI Cluster as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByCluster(String resourceGroupName, String clusterName, Context context); - /** * Get ArcSetting resource details of HCI Cluster. * @@ -200,6 +174,33 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String @ServiceMethod(returns = ReturnType.SINGLE) void delete(String resourceGroupName, String clusterName, String arcSettingName, Context context); + /** + * Get ArcSetting resources of HCI Cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return arcSetting resources of HCI Cluster as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByCluster(String resourceGroupName, String clusterName); + + /** + * Get ArcSetting resources of HCI Cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return arcSetting resources of HCI Cluster as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByCluster(String resourceGroupName, String clusterName, Context context); + /** * Generate password for arc settings. * @@ -239,7 +240,7 @@ Response generatePasswordWithResponse(String resourceGr * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of arcIdentity details. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, ArcIdentityResponseInner> @@ -255,7 +256,7 @@ Response generatePasswordWithResponse(String resourceGr * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of arcIdentity details. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, ArcIdentityResponseInner> @@ -270,7 +271,7 @@ Response generatePasswordWithResponse(String resourceGr * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return arcIdentity details. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) ArcIdentityResponseInner createIdentity(String resourceGroupName, String clusterName, String arcSettingName); @@ -285,12 +286,79 @@ Response generatePasswordWithResponse(String resourceGr * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return arcIdentity details. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) ArcIdentityResponseInner createIdentity(String resourceGroupName, String clusterName, String arcSettingName, Context context); + /** + * Reconcile Arc Settings with information related to all nodes. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param arcSettingName The name of the proxy resource holding details of HCI ArcSetting information. + * @param reconcileArcSettingsRequest Request for reconciling Arc Settings. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is 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, ArcSettingInner> beginReconcile(String resourceGroupName, + String clusterName, String arcSettingName, ReconcileArcSettingsRequest reconcileArcSettingsRequest); + + /** + * Reconcile Arc Settings with information related to all nodes. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param arcSettingName The name of the proxy resource holding details of HCI ArcSetting information. + * @param reconcileArcSettingsRequest Request for reconciling Arc Settings. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is 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, ArcSettingInner> beginReconcile(String resourceGroupName, + String clusterName, String arcSettingName, ReconcileArcSettingsRequest reconcileArcSettingsRequest, + Context context); + + /** + * Reconcile Arc Settings with information related to all nodes. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param arcSettingName The name of the proxy resource holding details of HCI ArcSetting information. + * @param reconcileArcSettingsRequest Request for reconciling Arc Settings. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ArcSettingInner reconcile(String resourceGroupName, String clusterName, String arcSettingName, + ReconcileArcSettingsRequest reconcileArcSettingsRequest); + + /** + * Reconcile Arc Settings with information related to all nodes. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param arcSettingName The name of the proxy resource holding details of HCI ArcSetting information. + * @param reconcileArcSettingsRequest Request for reconciling Arc Settings. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ArcSettingInner reconcile(String resourceGroupName, String clusterName, String arcSettingName, + ReconcileArcSettingsRequest reconcileArcSettingsRequest, Context context); + /** * Add consent time for default extensions and initiate extensions installation. * diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/AzureStackHciClient.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/AzureStackHciManagementClient.java similarity index 83% rename from sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/AzureStackHciClient.java rename to sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/AzureStackHciManagementClient.java index 60bae890277c..26aed9515b19 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/AzureStackHciClient.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/AzureStackHciManagementClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.fluent; @@ -8,30 +8,30 @@ import java.time.Duration; /** - * The interface for AzureStackHciClient class. + * The interface for AzureStackHciManagementClient class. */ -public interface AzureStackHciClient { +public interface AzureStackHciManagementClient { /** - * Gets The ID of the target subscription. The value must be an UUID. - * - * @return the subscriptionId value. - */ - String getSubscriptionId(); - - /** - * Gets server parameter. + * Gets Service host. * * @return the endpoint value. */ String getEndpoint(); /** - * Gets Api Version. + * Gets Version parameter. * * @return the apiVersion value. */ String getApiVersion(); + /** + * Gets The ID of the target subscription. The value must be an UUID. + * + * @return the subscriptionId value. + */ + String getSubscriptionId(); + /** * Gets The HTTP pipeline to send requests through. * @@ -46,6 +46,13 @@ public interface AzureStackHciClient { */ Duration getDefaultPollInterval(); + /** + * Gets the OperationsClient object to access its operations. + * + * @return the OperationsClient object. + */ + OperationsClient getOperations(); + /** * Gets the ArcSettingsClient object to access its operations. * @@ -53,6 +60,13 @@ public interface AzureStackHciClient { */ ArcSettingsClient getArcSettings(); + /** + * Gets the OffersClient object to access its operations. + * + * @return the OffersClient object. + */ + OffersClient getOffers(); + /** * Gets the ClustersClient object to access its operations. * @@ -67,6 +81,13 @@ public interface AzureStackHciClient { */ DeploymentSettingsClient getDeploymentSettings(); + /** + * Gets the EdgeDeviceJobsClient object to access its operations. + * + * @return the EdgeDeviceJobsClient object. + */ + EdgeDeviceJobsClient getEdgeDeviceJobs(); + /** * Gets the EdgeDevicesClient object to access its operations. * @@ -81,27 +102,6 @@ public interface AzureStackHciClient { */ ExtensionsClient getExtensions(); - /** - * Gets the OffersClient object to access its operations. - * - * @return the OffersClient object. - */ - OffersClient getOffers(); - - /** - * Gets the OperationsClient object to access its operations. - * - * @return the OperationsClient object. - */ - OperationsClient getOperations(); - - /** - * Gets the PublishersClient object to access its operations. - * - * @return the PublishersClient object. - */ - PublishersClient getPublishers(); - /** * Gets the SecuritySettingsClient object to access its operations. * @@ -124,16 +124,23 @@ public interface AzureStackHciClient { UpdateRunsClient getUpdateRuns(); /** - * Gets the UpdateSummariesOperationsClient object to access its operations. + * Gets the UpdatesClient object to access its operations. * - * @return the UpdateSummariesOperationsClient object. + * @return the UpdatesClient object. */ - UpdateSummariesOperationsClient getUpdateSummariesOperations(); + UpdatesClient getUpdates(); /** - * Gets the UpdatesClient object to access its operations. + * Gets the ValidatedSolutionRecipesClient object to access its operations. * - * @return the UpdatesClient object. + * @return the ValidatedSolutionRecipesClient object. */ - UpdatesClient getUpdates(); + ValidatedSolutionRecipesClient getValidatedSolutionRecipes(); + + /** + * Gets the UpdateSummariesOperationsClient object to access its operations. + * + * @return the UpdateSummariesOperationsClient object. + */ + UpdateSummariesOperationsClient getUpdateSummariesOperations(); } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/ClustersClient.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/ClustersClient.java index 2dcf0710ebb4..b34e9656208e 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/ClustersClient.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/ClustersClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.fluent; @@ -16,6 +16,7 @@ import com.azure.resourcemanager.azurestackhci.models.ClusterPatch; import com.azure.resourcemanager.azurestackhci.models.LogCollectionRequest; import com.azure.resourcemanager.azurestackhci.models.RemoteSupportRequest; +import com.azure.resourcemanager.azurestackhci.models.SecretsLocationsChangeRequest; import com.azure.resourcemanager.azurestackhci.models.SoftwareAssuranceChangeRequest; import com.azure.resourcemanager.azurestackhci.models.UploadCertificateRequest; @@ -23,53 +24,6 @@ * An instance of this class provides access to all the operations defined in ClustersClient. */ public interface ClustersClient { - /** - * List all HCI clusters in a subscription. - * - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of clusters as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(); - - /** - * List all HCI clusters in a subscription. - * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of clusters as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(Context context); - - /** - * List all HCI clusters in a resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of clusters as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByResourceGroup(String resourceGroupName); - - /** - * List all HCI clusters in a resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of clusters as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByResourceGroup(String resourceGroupName, Context context); - /** * Get HCI cluster. * @@ -210,6 +164,115 @@ Response updateWithResponse(String resourceGroupName, String clust @ServiceMethod(returns = ReturnType.SINGLE) void delete(String resourceGroupName, String clusterName, Context context); + /** + * List all HCI clusters in a resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of clusters as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByResourceGroup(String resourceGroupName); + + /** + * List all HCI clusters in a resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of clusters as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByResourceGroup(String resourceGroupName, Context context); + + /** + * List all HCI clusters in a subscription. + * + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of clusters as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(); + + /** + * List all HCI clusters in a subscription. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of clusters as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(Context context); + + /** + * Update cluster secrets locations. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @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 the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, ClusterInner> beginUpdateSecretsLocations(String resourceGroupName, + String clusterName, SecretsLocationsChangeRequest body); + + /** + * Update cluster secrets locations. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @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 the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, ClusterInner> beginUpdateSecretsLocations(String resourceGroupName, + String clusterName, SecretsLocationsChangeRequest body, Context context); + + /** + * Update cluster secrets locations. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @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 the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ClusterInner updateSecretsLocations(String resourceGroupName, String clusterName, + SecretsLocationsChangeRequest body); + + /** + * Update cluster secrets locations. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @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 the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ClusterInner updateSecretsLocations(String resourceGroupName, String clusterName, + SecretsLocationsChangeRequest body, Context context); + /** * Upload certificate. * @@ -278,7 +341,7 @@ void uploadCertificate(String resourceGroupName, String clusterName, * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of cluster Identity details. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, ClusterIdentityResponseInner> @@ -293,7 +356,7 @@ void uploadCertificate(String resourceGroupName, String clusterName, * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of cluster Identity details. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, ClusterIdentityResponseInner> @@ -307,7 +370,7 @@ void uploadCertificate(String resourceGroupName, String clusterName, * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return cluster Identity details. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) ClusterIdentityResponseInner createIdentity(String resourceGroupName, String clusterName); @@ -321,7 +384,7 @@ void uploadCertificate(String resourceGroupName, String clusterName, * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return cluster Identity details. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) ClusterIdentityResponseInner createIdentity(String resourceGroupName, String clusterName, Context context); @@ -335,7 +398,7 @@ void uploadCertificate(String resourceGroupName, String clusterName, * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of cluster details. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, ClusterInner> beginExtendSoftwareAssuranceBenefit(String resourceGroupName, @@ -351,7 +414,7 @@ SyncPoller, ClusterInner> beginExtendSoftwareAssuranceB * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of cluster details. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, ClusterInner> beginExtendSoftwareAssuranceBenefit(String resourceGroupName, @@ -366,7 +429,7 @@ SyncPoller, ClusterInner> beginExtendSoftwareAssuranceB * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return cluster details. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) ClusterInner extendSoftwareAssuranceBenefit(String resourceGroupName, String clusterName, @@ -382,7 +445,7 @@ ClusterInner extendSoftwareAssuranceBenefit(String resourceGroupName, String clu * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return cluster details. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) ClusterInner extendSoftwareAssuranceBenefit(String resourceGroupName, String clusterName, @@ -397,7 +460,7 @@ ClusterInner extendSoftwareAssuranceBenefit(String resourceGroupName, String clu * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of cluster details. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, ClusterInner> beginTriggerLogCollection(String resourceGroupName, @@ -413,7 +476,7 @@ SyncPoller, ClusterInner> beginTriggerLogCollection(Str * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of cluster details. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, ClusterInner> beginTriggerLogCollection(String resourceGroupName, @@ -428,7 +491,7 @@ SyncPoller, ClusterInner> beginTriggerLogCollection(Str * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return cluster details. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) ClusterInner triggerLogCollection(String resourceGroupName, String clusterName, @@ -444,7 +507,7 @@ ClusterInner triggerLogCollection(String resourceGroupName, String clusterName, * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return cluster details. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) ClusterInner triggerLogCollection(String resourceGroupName, String clusterName, @@ -459,7 +522,7 @@ ClusterInner triggerLogCollection(String resourceGroupName, String clusterName, * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of cluster details. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, ClusterInner> beginConfigureRemoteSupport(String resourceGroupName, @@ -475,7 +538,7 @@ SyncPoller, ClusterInner> beginConfigureRemoteSupport(S * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of cluster details. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, ClusterInner> beginConfigureRemoteSupport(String resourceGroupName, @@ -490,7 +553,7 @@ SyncPoller, ClusterInner> beginConfigureRemoteSupport(S * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return cluster details. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) ClusterInner configureRemoteSupport(String resourceGroupName, String clusterName, @@ -506,7 +569,7 @@ ClusterInner configureRemoteSupport(String resourceGroupName, String clusterName * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return cluster details. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) ClusterInner configureRemoteSupport(String resourceGroupName, String clusterName, diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/DeploymentSettingsClient.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/DeploymentSettingsClient.java index 3ab4e14034eb..f4a5adaba5a9 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/DeploymentSettingsClient.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/DeploymentSettingsClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.fluent; @@ -17,33 +17,6 @@ * An instance of this class provides access to all the operations defined in DeploymentSettingsClient. */ public interface DeploymentSettingsClient { - /** - * List DeploymentSetting resources by Clusters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterName The name of the cluster. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a DeploymentSetting list operation as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByClusters(String resourceGroupName, String clusterName); - - /** - * List DeploymentSetting resources by Clusters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterName The name of the cluster. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a DeploymentSetting list operation as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByClusters(String resourceGroupName, String clusterName, Context context); - /** * Get a DeploymentSetting. * @@ -197,4 +170,31 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String */ @ServiceMethod(returns = ReturnType.SINGLE) void delete(String resourceGroupName, String clusterName, String deploymentSettingsName, Context context); + + /** + * List DeploymentSetting resources by Clusters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a DeploymentSetting list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByClusters(String resourceGroupName, String clusterName); + + /** + * List DeploymentSetting resources by Clusters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a DeploymentSetting list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByClusters(String resourceGroupName, String clusterName, Context context); } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/EdgeDeviceJobsClient.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/EdgeDeviceJobsClient.java new file mode 100644 index 000000000000..03a6b59161c2 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/EdgeDeviceJobsClient.java @@ -0,0 +1,199 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.azurestackhci.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.azurestackhci.fluent.models.EdgeDeviceJobInner; + +/** + * An instance of this class provides access to all the operations defined in EdgeDeviceJobsClient. + */ +public interface EdgeDeviceJobsClient { + /** + * Get a EdgeDeviceJob. + * + * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. + * @param edgeDeviceName Name of Device. + * @param jobsName Name of EdgeDevice Job. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a EdgeDeviceJob along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse(String resourceUri, String edgeDeviceName, String jobsName, + Context context); + + /** + * Get a EdgeDeviceJob. + * + * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. + * @param edgeDeviceName Name of Device. + * @param jobsName Name of EdgeDevice Job. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a EdgeDeviceJob. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + EdgeDeviceJobInner get(String resourceUri, String edgeDeviceName, String jobsName); + + /** + * Create a EdgeDeviceJob. + * + * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. + * @param edgeDeviceName Name of Device. + * @param jobsName Name of EdgeDevice Job. + * @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 edgeDevice Jobs resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, EdgeDeviceJobInner> beginCreateOrUpdate(String resourceUri, + String edgeDeviceName, String jobsName, EdgeDeviceJobInner resource); + + /** + * Create a EdgeDeviceJob. + * + * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. + * @param edgeDeviceName Name of Device. + * @param jobsName Name of EdgeDevice Job. + * @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 edgeDevice Jobs resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, EdgeDeviceJobInner> beginCreateOrUpdate(String resourceUri, + String edgeDeviceName, String jobsName, EdgeDeviceJobInner resource, Context context); + + /** + * Create a EdgeDeviceJob. + * + * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. + * @param edgeDeviceName Name of Device. + * @param jobsName Name of EdgeDevice Job. + * @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 edgeDevice Jobs resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + EdgeDeviceJobInner createOrUpdate(String resourceUri, String edgeDeviceName, String jobsName, + EdgeDeviceJobInner resource); + + /** + * Create a EdgeDeviceJob. + * + * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. + * @param edgeDeviceName Name of Device. + * @param jobsName Name of EdgeDevice Job. + * @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 edgeDevice Jobs resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + EdgeDeviceJobInner createOrUpdate(String resourceUri, String edgeDeviceName, String jobsName, + EdgeDeviceJobInner resource, Context context); + + /** + * Delete a EdgeDeviceJob. + * + * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. + * @param edgeDeviceName Name of Device. + * @param jobsName Name of EdgeDevice Job. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is 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 resourceUri, String edgeDeviceName, String jobsName); + + /** + * Delete a EdgeDeviceJob. + * + * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. + * @param edgeDeviceName Name of Device. + * @param jobsName Name of EdgeDevice Job. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is 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 resourceUri, String edgeDeviceName, String jobsName, + Context context); + + /** + * Delete a EdgeDeviceJob. + * + * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. + * @param edgeDeviceName Name of Device. + * @param jobsName Name of EdgeDevice Job. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.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 resourceUri, String edgeDeviceName, String jobsName); + + /** + * Delete a EdgeDeviceJob. + * + * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. + * @param edgeDeviceName Name of Device. + * @param jobsName Name of EdgeDevice Job. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.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 resourceUri, String edgeDeviceName, String jobsName, Context context); + + /** + * List EdgeDeviceJob resources by EdgeDevice. + * + * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. + * @param edgeDeviceName Name of Device. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a EdgeDeviceJob list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByEdgeDevice(String resourceUri, String edgeDeviceName); + + /** + * List EdgeDeviceJob resources by EdgeDevice. + * + * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. + * @param edgeDeviceName Name of Device. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a EdgeDeviceJob list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByEdgeDevice(String resourceUri, String edgeDeviceName, Context context); +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/EdgeDevicesClient.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/EdgeDevicesClient.java index f7d9780db850..2bf12927440a 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/EdgeDevicesClient.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/EdgeDevicesClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.fluent; @@ -19,31 +19,6 @@ * An instance of this class provides access to all the operations defined in EdgeDevicesClient. */ public interface EdgeDevicesClient { - /** - * List EdgeDevice resources by parent. - * - * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a EdgeDevice list operation as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceUri); - - /** - * List EdgeDevice resources by parent. - * - * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a EdgeDevice list operation as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceUri, Context context); - /** * Get a EdgeDevice. * @@ -184,6 +159,31 @@ EdgeDeviceInner createOrUpdate(String resourceUri, String edgeDeviceName, EdgeDe @ServiceMethod(returns = ReturnType.SINGLE) void delete(String resourceUri, String edgeDeviceName, Context context); + /** + * List EdgeDevice resources by parent. + * + * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a EdgeDevice list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceUri); + + /** + * List EdgeDevice resources by parent. + * + * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a EdgeDevice list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceUri, Context context); + /** * A long-running resource action. * @@ -193,7 +193,7 @@ EdgeDeviceInner createOrUpdate(String resourceUri, String edgeDeviceName, EdgeDe * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of an Accepted response with an Operation-Location header. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, ValidateResponseInner> beginValidate(String resourceUri, @@ -209,7 +209,7 @@ SyncPoller, ValidateResponseInner> beginValida * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of an Accepted response with an Operation-Location header. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, ValidateResponseInner> beginValidate(String resourceUri, @@ -224,7 +224,7 @@ SyncPoller, ValidateResponseInner> beginValida * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an Accepted response with an Operation-Location header. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) ValidateResponseInner validate(String resourceUri, String edgeDeviceName, ValidateRequest validateRequest); @@ -239,7 +239,7 @@ SyncPoller, ValidateResponseInner> beginValida * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an Accepted response with an Operation-Location header. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) ValidateResponseInner validate(String resourceUri, String edgeDeviceName, ValidateRequest validateRequest, diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/ExtensionsClient.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/ExtensionsClient.java index 9c174e73450b..9d1d44cff5bd 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/ExtensionsClient.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/ExtensionsClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.fluent; @@ -19,36 +19,6 @@ * An instance of this class provides access to all the operations defined in ExtensionsClient. */ public interface ExtensionsClient { - /** - * List all Extensions under ArcSetting resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterName The name of the cluster. - * @param arcSettingName The name of the proxy resource holding details of HCI ArcSetting information. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of Extensions in HCI cluster as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByArcSetting(String resourceGroupName, String clusterName, String arcSettingName); - - /** - * List all Extensions under ArcSetting resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterName The name of the cluster. - * @param arcSettingName The name of the proxy resource holding details of HCI ArcSetting information. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of Extensions in HCI cluster as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByArcSetting(String resourceGroupName, String clusterName, String arcSettingName, - Context context); - /** * Get particular Arc Extension of HCI Cluster. * @@ -284,6 +254,36 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String void delete(String resourceGroupName, String clusterName, String arcSettingName, String extensionName, Context context); + /** + * List all Extensions under ArcSetting resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param arcSettingName The name of the proxy resource holding details of HCI ArcSetting information. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of Extensions in HCI cluster as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByArcSetting(String resourceGroupName, String clusterName, String arcSettingName); + + /** + * List all Extensions under ArcSetting resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param arcSettingName The name of the proxy resource holding details of HCI ArcSetting information. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of Extensions in HCI cluster as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByArcSetting(String resourceGroupName, String clusterName, String arcSettingName, + Context context); + /** * Upgrade a particular Arc Extension of HCI Cluster. * diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/OffersClient.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/OffersClient.java index 9e145741b219..d30e3064584a 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/OffersClient.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/OffersClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.fluent; @@ -16,55 +16,59 @@ */ public interface OffersClient { /** - * List Offers available for a publisher within the HCI Cluster. + * Get Offer resource details within a publisher of HCI Cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param publisherName The name of the publisher available within HCI cluster. + * @param offerName The name of the offer available within HCI cluster. + * @param expand Specify $expand=content,contentVersion to populate additional fields related to the marketplace + * offer. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of Offer proxy resources for the HCI cluster as paginated response with {@link PagedIterable}. + * @return offer resource details within a publisher of HCI Cluster along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByPublisher(String resourceGroupName, String clusterName, String publisherName); + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse(String resourceGroupName, String clusterName, String publisherName, + String offerName, String expand, Context context); /** - * List Offers available for a publisher within the HCI Cluster. + * Get Offer resource details within a publisher of HCI Cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param publisherName The name of the publisher available within HCI cluster. - * @param expand Specify $expand=content,contentVersion to populate additional fields related to the marketplace - * offer. - * @param context The context to associate with this operation. + * @param offerName The name of the offer available within HCI cluster. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of Offer proxy resources for the HCI cluster as paginated response with {@link PagedIterable}. + * @return offer resource details within a publisher of HCI Cluster. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByPublisher(String resourceGroupName, String clusterName, String publisherName, - String expand, Context context); + @ServiceMethod(returns = ReturnType.SINGLE) + OfferInner get(String resourceGroupName, String clusterName, String publisherName, String offerName); /** - * List Offers available across publishers for the HCI Cluster. + * List Offers available for a publisher within the HCI Cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. + * @param publisherName The name of the publisher available within HCI cluster. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return list of Offer proxy resources for the HCI cluster as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByCluster(String resourceGroupName, String clusterName); + PagedIterable listByPublisher(String resourceGroupName, String clusterName, String publisherName); /** - * List Offers available across publishers for the HCI Cluster. + * List Offers available for a publisher within the HCI Cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. + * @param publisherName The name of the publisher available within HCI cluster. * @param expand Specify $expand=content,contentVersion to populate additional fields related to the marketplace * offer. * @param context The context to associate with this operation. @@ -74,40 +78,36 @@ PagedIterable listByPublisher(String resourceGroupName, String clust * @return list of Offer proxy resources for the HCI cluster as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByCluster(String resourceGroupName, String clusterName, String expand, - Context context); + PagedIterable listByPublisher(String resourceGroupName, String clusterName, String publisherName, + String expand, Context context); /** - * Get Offer resource details within a publisher of HCI Cluster. + * List Offers available across publishers for the HCI Cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. - * @param publisherName The name of the publisher available within HCI cluster. - * @param offerName The name of the offer available within HCI cluster. - * @param expand Specify $expand=content,contentVersion to populate additional fields related to the marketplace - * offer. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return offer resource details within a publisher of HCI Cluster along with {@link Response}. + * @return list of Offer proxy resources for the HCI cluster as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse(String resourceGroupName, String clusterName, String publisherName, - String offerName, String expand, Context context); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByCluster(String resourceGroupName, String clusterName); /** - * Get Offer resource details within a publisher of HCI Cluster. + * List Offers available across publishers for the HCI Cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. - * @param publisherName The name of the publisher available within HCI cluster. - * @param offerName The name of the offer available within HCI cluster. + * @param expand Specify $expand=content,contentVersion to populate additional fields related to the marketplace + * offer. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return offer resource details within a publisher of HCI Cluster. + * @return list of Offer proxy resources for the HCI cluster as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - OfferInner get(String resourceGroupName, String clusterName, String publisherName, String offerName); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByCluster(String resourceGroupName, String clusterName, String expand, + Context context); } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/OperationsClient.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/OperationsClient.java index 6feec3a3c889..099056a1ee5b 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/OperationsClient.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/OperationsClient.java @@ -1,38 +1,40 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.fluent; import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; -import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.PagedIterable; import com.azure.core.util.Context; -import com.azure.resourcemanager.azurestackhci.fluent.models.OperationListResultInner; +import com.azure.resourcemanager.azurestackhci.fluent.models.OperationInner; /** * An instance of this class provides access to all the operations defined in OperationsClient. */ public interface OperationsClient { /** - * List all available Microsoft.AzureStackHCI provider operations. + * List the operations for the provider. * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of REST API operations supported by an Azure Resource Provider along with {@link Response}. + * @return a list of REST API operations supported by an Azure Resource Provider as paginated response with + * {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response listWithResponse(Context context); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(); /** - * List all available Microsoft.AzureStackHCI provider operations. + * List the operations for the provider. * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of REST API operations supported by an Azure Resource Provider. + * @return a list of REST API operations supported by an Azure Resource Provider as paginated response with + * {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - OperationListResultInner list(); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(Context context); } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/SecuritySettingsClient.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/SecuritySettingsClient.java index 4892d4ba3fe3..fd02db00cbac 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/SecuritySettingsClient.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/SecuritySettingsClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.fluent; @@ -17,33 +17,6 @@ * An instance of this class provides access to all the operations defined in SecuritySettingsClient. */ public interface SecuritySettingsClient { - /** - * List SecuritySetting resources by Clusters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterName The name of the cluster. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a SecuritySetting list operation as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByClusters(String resourceGroupName, String clusterName); - - /** - * List SecuritySetting resources by Clusters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterName The name of the cluster. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a SecuritySetting list operation as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByClusters(String resourceGroupName, String clusterName, Context context); - /** * Get a SecuritySetting. * @@ -197,4 +170,31 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String */ @ServiceMethod(returns = ReturnType.SINGLE) void delete(String resourceGroupName, String clusterName, String securitySettingsName, Context context); + + /** + * List SecuritySetting resources by Clusters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a SecuritySetting list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByClusters(String resourceGroupName, String clusterName); + + /** + * List SecuritySetting resources by Clusters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a SecuritySetting list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByClusters(String resourceGroupName, String clusterName, Context context); } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/SkusClient.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/SkusClient.java index 7cf73f5cbfe9..9c3ddd2d5272 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/SkusClient.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/SkusClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.fluent; @@ -16,73 +16,73 @@ */ public interface SkusClient { /** - * List Skus available for a offer within the HCI Cluster. + * Get SKU resource details within a offer of HCI Cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param publisherName The name of the publisher available within HCI cluster. * @param offerName The name of the offer available within HCI cluster. + * @param skuName The name of the SKU available within HCI cluster. + * @param expand Specify $expand=content,contentVersion to populate additional fields related to the marketplace + * offer. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of SKU proxy resources for the HCI cluster as paginated response with {@link PagedIterable}. + * @return sKU resource details within a offer of HCI Cluster along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByOffer(String resourceGroupName, String clusterName, String publisherName, - String offerName); + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse(String resourceGroupName, String clusterName, String publisherName, + String offerName, String skuName, String expand, Context context); /** - * List Skus available for a offer within the HCI Cluster. + * Get SKU resource details within a offer of HCI Cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param publisherName The name of the publisher available within HCI cluster. * @param offerName The name of the offer available within HCI cluster. - * @param expand Specify $expand=content,contentVersion to populate additional fields related to the marketplace - * offer. - * @param context The context to associate with this operation. + * @param skuName The name of the SKU available within HCI cluster. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of SKU proxy resources for the HCI cluster as paginated response with {@link PagedIterable}. + * @return sKU resource details within a offer of HCI Cluster. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByOffer(String resourceGroupName, String clusterName, String publisherName, - String offerName, String expand, Context context); + @ServiceMethod(returns = ReturnType.SINGLE) + SkuInner get(String resourceGroupName, String clusterName, String publisherName, String offerName, String skuName); /** - * Get SKU resource details within a offer of HCI Cluster. + * List Skus available for a offer within the HCI Cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param publisherName The name of the publisher available within HCI cluster. * @param offerName The name of the offer available within HCI cluster. - * @param skuName The name of the SKU available within HCI cluster. - * @param expand Specify $expand=content,contentVersion to populate additional fields related to the marketplace - * offer. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return sKU resource details within a offer of HCI Cluster along with {@link Response}. + * @return list of SKU proxy resources for the HCI cluster as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse(String resourceGroupName, String clusterName, String publisherName, - String offerName, String skuName, String expand, Context context); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByOffer(String resourceGroupName, String clusterName, String publisherName, + String offerName); /** - * Get SKU resource details within a offer of HCI Cluster. + * List Skus available for a offer within the HCI Cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param publisherName The name of the publisher available within HCI cluster. * @param offerName The name of the offer available within HCI cluster. - * @param skuName The name of the SKU available within HCI cluster. + * @param expand Specify $expand=content,contentVersion to populate additional fields related to the marketplace + * offer. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return sKU resource details within a offer of HCI Cluster. + * @return list of SKU proxy resources for the HCI cluster as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - SkuInner get(String resourceGroupName, String clusterName, String publisherName, String offerName, String skuName); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByOffer(String resourceGroupName, String clusterName, String publisherName, + String offerName, String expand, Context context); } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/UpdateRunsClient.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/UpdateRunsClient.java index c5f5fb016c72..be0094245784 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/UpdateRunsClient.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/UpdateRunsClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.fluent; @@ -18,67 +18,71 @@ */ public interface UpdateRunsClient { /** - * List all Update runs for a specified update. + * Get the Update run for a specified update. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param updateName The name of the Update. + * @param updateRunName The name of the Update Run. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of Update runs as paginated response with {@link PagedIterable}. + * @return the Update run for a specified update along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String clusterName, String updateName); + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse(String resourceGroupName, String clusterName, String updateName, + String updateRunName, Context context); /** - * List all Update runs for a specified update. + * Get the Update run for a specified update. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param updateName The name of the Update. - * @param context The context to associate with this operation. + * @param updateRunName The name of the Update Run. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of Update runs as paginated response with {@link PagedIterable}. + * @return the Update run for a specified update. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String clusterName, String updateName, - Context context); + @ServiceMethod(returns = ReturnType.SINGLE) + UpdateRunInner get(String resourceGroupName, String clusterName, String updateName, String updateRunName); /** - * Delete specified Update Run. + * Put Update runs for a specified update. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param updateName The name of the Update. * @param updateRunName The name of the Update Run. + * @param updateRunsProperties Properties of the updateRuns object. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. + * @return details of an Update run along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete(String resourceGroupName, String clusterName, String updateName, - String updateRunName); + @ServiceMethod(returns = ReturnType.SINGLE) + Response putWithResponse(String resourceGroupName, String clusterName, String updateName, + String updateRunName, UpdateRunInner updateRunsProperties, Context context); /** - * Delete specified Update Run. + * Put Update runs for a specified update. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param updateName The name of the Update. * @param updateRunName The name of the Update Run. - * @param context The context to associate with this operation. + * @param updateRunsProperties Properties of the updateRuns object. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. + * @return details of an Update run. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete(String resourceGroupName, String clusterName, String updateName, - String updateRunName, Context context); + @ServiceMethod(returns = ReturnType.SINGLE) + UpdateRunInner put(String resourceGroupName, String clusterName, String updateName, String updateRunName, + UpdateRunInner updateRunsProperties); /** * Delete specified Update Run. @@ -90,9 +94,11 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String clusterName, String updateName, String updateRunName); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDelete(String resourceGroupName, String clusterName, String updateName, + String updateRunName); /** * Delete specified Update Run. @@ -105,74 +111,68 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String clusterName, String updateName, String updateRunName, Context context); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDelete(String resourceGroupName, String clusterName, String updateName, + String updateRunName, Context context); /** - * Put Update runs for a specified update. + * Delete specified Update Run. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param updateName The name of the Update. * @param updateRunName The name of the Update Run. - * @param updateRunsProperties Properties of the updateRuns object. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return details of an Update run along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response putWithResponse(String resourceGroupName, String clusterName, String updateName, - String updateRunName, UpdateRunInner updateRunsProperties, Context context); + void delete(String resourceGroupName, String clusterName, String updateName, String updateRunName); /** - * Put Update runs for a specified update. + * Delete specified Update Run. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param updateName The name of the Update. * @param updateRunName The name of the Update Run. - * @param updateRunsProperties Properties of the updateRuns object. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return details of an Update run. */ @ServiceMethod(returns = ReturnType.SINGLE) - UpdateRunInner put(String resourceGroupName, String clusterName, String updateName, String updateRunName, - UpdateRunInner updateRunsProperties); + void delete(String resourceGroupName, String clusterName, String updateName, String updateRunName, Context context); /** - * Get the Update run for a specified update. + * List all Update runs for a specified update. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param updateName The name of the Update. - * @param updateRunName The name of the Update Run. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Update run for a specified update along with {@link Response}. + * @return list of Update runs as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse(String resourceGroupName, String clusterName, String updateName, - String updateRunName, Context context); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, String clusterName, String updateName); /** - * Get the Update run for a specified update. + * List all Update runs for a specified update. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param updateName The name of the Update. - * @param updateRunName The name of the Update Run. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Update run for a specified update. + * @return list of Update runs as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - UpdateRunInner get(String resourceGroupName, String clusterName, String updateName, String updateRunName); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, String clusterName, String updateName, + Context context); } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/UpdateSummariesOperationsClient.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/UpdateSummariesOperationsClient.java index 665da1856102..c0704d357f89 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/UpdateSummariesOperationsClient.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/UpdateSummariesOperationsClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.fluent; @@ -18,58 +18,62 @@ */ public interface UpdateSummariesOperationsClient { /** - * List all Update summaries under the HCI cluster. + * Get all Update summaries under the HCI cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of Update Summaries as paginated response with {@link PagedIterable}. + * @return all Update summaries under the HCI cluster along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String clusterName); + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse(String resourceGroupName, String clusterName, Context context); /** - * List all Update summaries under the HCI cluster. + * Get all Update summaries under the HCI cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of Update Summaries as paginated response with {@link PagedIterable}. + * @return all Update summaries under the HCI cluster. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String clusterName, Context context); + @ServiceMethod(returns = ReturnType.SINGLE) + UpdateSummariesInner get(String resourceGroupName, String clusterName); /** - * Delete Update Summaries. + * Put Update summaries under the HCI cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. + * @param updateLocationProperties Properties of the UpdateSummaries resource. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. + * @return get the update summaries for the cluster along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete(String resourceGroupName, String clusterName); + @ServiceMethod(returns = ReturnType.SINGLE) + Response putWithResponse(String resourceGroupName, String clusterName, + UpdateSummariesInner updateLocationProperties, Context context); /** - * Delete Update Summaries. + * Put Update summaries under the HCI cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. - * @param context The context to associate with this operation. + * @param updateLocationProperties Properties of the UpdateSummaries resource. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. + * @return get the update summaries for the cluster. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete(String resourceGroupName, String clusterName, Context context); + @ServiceMethod(returns = ReturnType.SINGLE) + UpdateSummariesInner put(String resourceGroupName, String clusterName, + UpdateSummariesInner updateLocationProperties); /** * Delete Update Summaries. @@ -79,9 +83,10 @@ public interface UpdateSummariesOperationsClient { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String clusterName); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDelete(String resourceGroupName, String clusterName); /** * Delete Update Summaries. @@ -92,65 +97,60 @@ public interface UpdateSummariesOperationsClient { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String clusterName, Context context); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDelete(String resourceGroupName, String clusterName, Context context); /** - * Put Update summaries under the HCI cluster. + * Delete Update Summaries. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. - * @param updateLocationProperties Properties of the UpdateSummaries resource. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return get the update summaries for the cluster along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response putWithResponse(String resourceGroupName, String clusterName, - UpdateSummariesInner updateLocationProperties, Context context); + void delete(String resourceGroupName, String clusterName); /** - * Put Update summaries under the HCI cluster. + * Delete Update Summaries. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. - * @param updateLocationProperties Properties of the UpdateSummaries resource. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return get the update summaries for the cluster. */ @ServiceMethod(returns = ReturnType.SINGLE) - UpdateSummariesInner put(String resourceGroupName, String clusterName, - UpdateSummariesInner updateLocationProperties); + void delete(String resourceGroupName, String clusterName, Context context); /** - * Get all Update summaries under the HCI cluster. + * List all Update summaries under the HCI cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all Update summaries under the HCI cluster along with {@link Response}. + * @return list of Update Summaries as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse(String resourceGroupName, String clusterName, Context context); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, String clusterName); /** - * Get all Update summaries under the HCI cluster. + * List all Update summaries under the HCI cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all Update summaries under the HCI cluster. + * @return list of Update Summaries as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - UpdateSummariesInner get(String resourceGroupName, String clusterName); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, String clusterName, Context context); } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/UpdatesClient.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/UpdatesClient.java index abb24622a230..2459c3d5882d 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/UpdatesClient.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/UpdatesClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.fluent; @@ -18,88 +18,97 @@ */ public interface UpdatesClient { /** - * Apply Update. + * Get specified Update. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param updateName The name of the Update. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. + * @return specified Update along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginPost(String resourceGroupName, String clusterName, String updateName); + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse(String resourceGroupName, String clusterName, String updateName, + Context context); /** - * Apply Update. + * Get specified Update. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param updateName The name of the Update. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. + * @return specified Update. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginPost(String resourceGroupName, String clusterName, String updateName, - Context context); + @ServiceMethod(returns = ReturnType.SINGLE) + HciUpdateInner get(String resourceGroupName, String clusterName, String updateName); /** - * Apply Update. + * Put specified Update. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param updateName The name of the Update. + * @param updateProperties Properties of the Updates object. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return update details along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - void post(String resourceGroupName, String clusterName, String updateName); + Response putWithResponse(String resourceGroupName, String clusterName, String updateName, + HciUpdateInner updateProperties, Context context); /** - * Apply Update. + * Put specified Update. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param updateName The name of the Update. - * @param context The context to associate with this operation. + * @param updateProperties Properties of the Updates object. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return update details. */ @ServiceMethod(returns = ReturnType.SINGLE) - void post(String resourceGroupName, String clusterName, String updateName, Context context); + HciUpdateInner put(String resourceGroupName, String clusterName, String updateName, + HciUpdateInner updateProperties); /** - * List all Updates. + * Delete specified Update. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. + * @param updateName The name of the Update. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of Updates as paginated response with {@link PagedIterable}. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String clusterName); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDelete(String resourceGroupName, String clusterName, String updateName); /** - * List all Updates. + * Delete specified Update. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. + * @param updateName The name of the Update. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of Updates as paginated response with {@link PagedIterable}. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String clusterName, Context context); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDelete(String resourceGroupName, String clusterName, String updateName, + Context context); /** * Delete specified Update. @@ -110,10 +119,9 @@ SyncPoller, Void> beginPost(String resourceGroupName, String cl * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is 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 clusterName, String updateName); + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String clusterName, String updateName); /** * Delete specified Update. @@ -125,99 +133,91 @@ SyncPoller, Void> beginPost(String resourceGroupName, String cl * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is 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 clusterName, String updateName, - Context context); + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String clusterName, String updateName, Context context); /** - * Delete specified Update. + * List all Updates. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. - * @param updateName The name of the Update. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of Updates as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String clusterName, String updateName); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, String clusterName); /** - * Delete specified Update. + * List all Updates. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. - * @param updateName The name of the Update. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of Updates as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String clusterName, String updateName, Context context); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, String clusterName, Context context); /** - * Put specified Update. + * Apply Update. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param updateName The name of the Update. - * @param updateProperties Properties of the Updates object. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return update details along with {@link Response}. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response putWithResponse(String resourceGroupName, String clusterName, String updateName, - HciUpdateInner updateProperties, Context context); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginPost(String resourceGroupName, String clusterName, String updateName); /** - * Put specified Update. + * Apply Update. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param updateName The name of the Update. - * @param updateProperties Properties of the Updates object. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return update details. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) - HciUpdateInner put(String resourceGroupName, String clusterName, String updateName, - HciUpdateInner updateProperties); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginPost(String resourceGroupName, String clusterName, String updateName, + Context context); /** - * Get specified Update. + * Apply Update. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param updateName The name of the Update. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return specified Update along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse(String resourceGroupName, String clusterName, String updateName, - Context context); + void post(String resourceGroupName, String clusterName, String updateName); /** - * Get specified Update. + * Apply Update. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param updateName The name of the Update. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return specified Update. */ @ServiceMethod(returns = ReturnType.SINGLE) - HciUpdateInner get(String resourceGroupName, String clusterName, String updateName); + void post(String resourceGroupName, String clusterName, String updateName, Context context); } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/PublishersClient.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/ValidatedSolutionRecipesClient.java similarity index 51% rename from sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/PublishersClient.java rename to sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/ValidatedSolutionRecipesClient.java index fc00e8192d2e..30eadaa45a9a 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/PublishersClient.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/ValidatedSolutionRecipesClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.fluent; @@ -9,66 +9,64 @@ import com.azure.core.http.rest.PagedIterable; import com.azure.core.http.rest.Response; import com.azure.core.util.Context; -import com.azure.resourcemanager.azurestackhci.fluent.models.PublisherInner; +import com.azure.resourcemanager.azurestackhci.fluent.models.ValidatedSolutionRecipeInner; /** - * An instance of this class provides access to all the operations defined in PublishersClient. + * An instance of this class provides access to all the operations defined in ValidatedSolutionRecipesClient. */ -public interface PublishersClient { +public interface ValidatedSolutionRecipesClient { /** - * List Publishers available for the HCI Cluster. + * Get a validated solution recipe. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterName The name of the cluster. + * @param location The name of the Azure region. + * @param validatedSolutionRecipeName The name of the ValidatedSolutionRecipe. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of Publisher proxy resources for the HCI cluster as paginated response with {@link PagedIterable}. + * @return a validated solution recipe along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByCluster(String resourceGroupName, String clusterName); + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse(String location, String validatedSolutionRecipeName, + Context context); /** - * List Publishers available for the HCI Cluster. + * Get a validated solution recipe. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterName The name of the cluster. - * @param context The context to associate with this operation. + * @param location The name of the Azure region. + * @param validatedSolutionRecipeName The name of the ValidatedSolutionRecipe. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of Publisher proxy resources for the HCI cluster as paginated response with {@link PagedIterable}. + * @return a validated solution recipe. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByCluster(String resourceGroupName, String clusterName, Context context); + @ServiceMethod(returns = ReturnType.SINGLE) + ValidatedSolutionRecipeInner get(String location, String validatedSolutionRecipeName); /** - * Get Publisher resource details of HCI Cluster. + * List all validated solution recipes. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterName The name of the cluster. - * @param publisherName The name of the publisher available within HCI cluster. - * @param context The context to associate with this operation. + * @param location The name of the Azure region. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return publisher resource details of HCI Cluster along with {@link Response}. + * @return the response of a ValidatedSolutionRecipe list operation as paginated response with + * {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse(String resourceGroupName, String clusterName, String publisherName, - Context context); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listBySubscriptionLocationResource(String location); /** - * Get Publisher resource details of HCI Cluster. + * List all validated solution recipes. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterName The name of the cluster. - * @param publisherName The name of the publisher available within HCI cluster. + * @param location The name of the Azure region. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return publisher resource details of HCI Cluster. + * @return the response of a ValidatedSolutionRecipe list operation as paginated response with + * {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - PublisherInner get(String resourceGroupName, String clusterName, String publisherName); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listBySubscriptionLocationResource(String location, Context context); } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/ArcIdentityResponseInner.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/ArcIdentityResponseInner.java index 509d46b0756d..080815e37521 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/ArcIdentityResponseInner.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/ArcIdentityResponseInner.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.fluent.models; @@ -24,7 +24,7 @@ public final class ArcIdentityResponseInner implements JsonSerializable { /* * The arcApplicationClientId property. @@ -39,7 +39,7 @@ public final class ArcIdentityResponseProperties implements JsonSerializable perNodeDetails() { * * @return the connectivityProperties value. */ - public Object connectivityProperties() { + public ArcConnectivityProperties connectivityProperties() { return this.innerProperties() == null ? null : this.innerProperties().connectivityProperties(); } @@ -260,7 +261,7 @@ public Object connectivityProperties() { * @param connectivityProperties the connectivityProperties value to set. * @return the ArcSettingInner object itself. */ - public ArcSettingInner withConnectivityProperties(Object connectivityProperties) { + public ArcSettingInner withConnectivityProperties(ArcConnectivityProperties connectivityProperties) { if (this.innerProperties() == null) { this.innerProperties = new ArcSettingProperties(); } @@ -277,17 +278,6 @@ public List defaultExtensions() { return this.innerProperties() == null ? null : this.innerProperties().defaultExtensions(); } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (innerProperties() != null) { - innerProperties().validate(); - } - } - /** * {@inheritDoc} */ diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/ArcSettingProperties.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/ArcSettingProperties.java index 915d349b2fe6..4c159442a8f5 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/ArcSettingProperties.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/ArcSettingProperties.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.fluent.models; @@ -9,6 +9,7 @@ import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; +import com.azure.resourcemanager.azurestackhci.models.ArcConnectivityProperties; import com.azure.resourcemanager.azurestackhci.models.ArcSettingAggregateState; import com.azure.resourcemanager.azurestackhci.models.DefaultExtensionDetails; import com.azure.resourcemanager.azurestackhci.models.PerNodeState; @@ -64,7 +65,7 @@ public final class ArcSettingProperties implements JsonSerializable perNodeDetails() { * * @return the connectivityProperties value. */ - public Object connectivityProperties() { + public ArcConnectivityProperties connectivityProperties() { return this.connectivityProperties; } @@ -221,7 +222,7 @@ public Object connectivityProperties() { * @param connectivityProperties the connectivityProperties value to set. * @return the ArcSettingProperties object itself. */ - public ArcSettingProperties withConnectivityProperties(Object connectivityProperties) { + public ArcSettingProperties withConnectivityProperties(ArcConnectivityProperties connectivityProperties) { this.connectivityProperties = connectivityProperties; return this; } @@ -235,20 +236,6 @@ public List defaultExtensions() { return this.defaultExtensions; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (perNodeDetails() != null) { - perNodeDetails().forEach(e -> e.validate()); - } - if (defaultExtensions() != null) { - defaultExtensions().forEach(e -> e.validate()); - } - } - /** * {@inheritDoc} */ @@ -260,7 +247,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStringField("arcApplicationTenantId", this.arcApplicationTenantId); jsonWriter.writeStringField("arcServicePrincipalObjectId", this.arcServicePrincipalObjectId); jsonWriter.writeStringField("arcApplicationObjectId", this.arcApplicationObjectId); - jsonWriter.writeUntypedField("connectivityProperties", this.connectivityProperties); + jsonWriter.writeJsonField("connectivityProperties", this.connectivityProperties); return jsonWriter.writeEndObject(); } @@ -299,7 +286,8 @@ public static ArcSettingProperties fromJson(JsonReader jsonReader) throws IOExce List perNodeDetails = reader.readArray(reader1 -> PerNodeState.fromJson(reader1)); deserializedArcSettingProperties.perNodeDetails = perNodeDetails; } else if ("connectivityProperties".equals(fieldName)) { - deserializedArcSettingProperties.connectivityProperties = reader.readUntyped(); + deserializedArcSettingProperties.connectivityProperties + = ArcConnectivityProperties.fromJson(reader); } else if ("defaultExtensions".equals(fieldName)) { List defaultExtensions = reader.readArray(reader1 -> DefaultExtensionDetails.fromJson(reader1)); diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/ArcSettingsPatchProperties.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/ArcSettingsPatchProperties.java index 0e71e801fd3a..498e64fa770b 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/ArcSettingsPatchProperties.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/ArcSettingsPatchProperties.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.fluent.models; @@ -9,6 +9,7 @@ import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; +import com.azure.resourcemanager.azurestackhci.models.ArcConnectivityProperties; import java.io.IOException; /** @@ -19,7 +20,7 @@ public final class ArcSettingsPatchProperties implements JsonSerializable { /* * The aadClientId property. @@ -39,7 +39,7 @@ public final class ClusterIdentityResponseProperties implements JsonSerializable /** * Creates an instance of ClusterIdentityResponseProperties class. */ - public ClusterIdentityResponseProperties() { + private ClusterIdentityResponseProperties() { } /** @@ -51,17 +51,6 @@ public String aadClientId() { return this.aadClientId; } - /** - * Set the aadClientId property: The aadClientId property. - * - * @param aadClientId the aadClientId value to set. - * @return the ClusterIdentityResponseProperties object itself. - */ - public ClusterIdentityResponseProperties withAadClientId(String aadClientId) { - this.aadClientId = aadClientId; - return this; - } - /** * Get the aadTenantId property: The aadTenantId property. * @@ -71,17 +60,6 @@ public String aadTenantId() { return this.aadTenantId; } - /** - * Set the aadTenantId property: The aadTenantId property. - * - * @param aadTenantId the aadTenantId value to set. - * @return the ClusterIdentityResponseProperties object itself. - */ - public ClusterIdentityResponseProperties withAadTenantId(String aadTenantId) { - this.aadTenantId = aadTenantId; - return this; - } - /** * Get the aadServicePrincipalObjectId property: The aadServicePrincipalObjectId property. * @@ -91,17 +69,6 @@ public String aadServicePrincipalObjectId() { return this.aadServicePrincipalObjectId; } - /** - * Set the aadServicePrincipalObjectId property: The aadServicePrincipalObjectId property. - * - * @param aadServicePrincipalObjectId the aadServicePrincipalObjectId value to set. - * @return the ClusterIdentityResponseProperties object itself. - */ - public ClusterIdentityResponseProperties withAadServicePrincipalObjectId(String aadServicePrincipalObjectId) { - this.aadServicePrincipalObjectId = aadServicePrincipalObjectId; - return this; - } - /** * Get the aadApplicationObjectId property: The aadApplicationObjectId property. * @@ -111,25 +78,6 @@ public String aadApplicationObjectId() { return this.aadApplicationObjectId; } - /** - * Set the aadApplicationObjectId property: The aadApplicationObjectId property. - * - * @param aadApplicationObjectId the aadApplicationObjectId value to set. - * @return the ClusterIdentityResponseProperties object itself. - */ - public ClusterIdentityResponseProperties withAadApplicationObjectId(String aadApplicationObjectId) { - this.aadApplicationObjectId = aadApplicationObjectId; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/ClusterInner.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/ClusterInner.java index 1723360506c4..cf150590d67d 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/ClusterInner.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/ClusterInner.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.fluent.models; @@ -11,20 +11,24 @@ import com.azure.json.JsonToken; import com.azure.json.JsonWriter; import com.azure.resourcemanager.azurestackhci.models.ClusterDesiredProperties; +import com.azure.resourcemanager.azurestackhci.models.ClusterPattern; import com.azure.resourcemanager.azurestackhci.models.ClusterReportedProperties; import com.azure.resourcemanager.azurestackhci.models.ConnectivityStatus; +import com.azure.resourcemanager.azurestackhci.models.IdentityProvider; import com.azure.resourcemanager.azurestackhci.models.IsolatedVmAttestationConfiguration; +import com.azure.resourcemanager.azurestackhci.models.LocalAvailabilityZones; import com.azure.resourcemanager.azurestackhci.models.LogCollectionProperties; import com.azure.resourcemanager.azurestackhci.models.ManagedServiceIdentityType; import com.azure.resourcemanager.azurestackhci.models.ProvisioningState; import com.azure.resourcemanager.azurestackhci.models.RemoteSupportProperties; +import com.azure.resourcemanager.azurestackhci.models.SecretsLocationDetails; import com.azure.resourcemanager.azurestackhci.models.SoftwareAssuranceProperties; import com.azure.resourcemanager.azurestackhci.models.Status; import com.azure.resourcemanager.azurestackhci.models.UserAssignedIdentity; import java.io.IOException; import java.time.OffsetDateTime; +import java.util.List; import java.util.Map; -import java.util.UUID; /** * Cluster details. @@ -32,14 +36,14 @@ @Fluent public final class ClusterInner extends Resource { /* - * Identity of Cluster resource + * Cluster properties. */ - private ManagedServiceIdentity innerIdentity; + private ClusterProperties innerProperties; /* - * Cluster properties. + * The managed service identities assigned to this resource. */ - private ClusterProperties innerProperties; + private ManagedServiceIdentity innerIdentity; /* * Azure Resource Manager metadata containing createdBy and modifiedBy information. @@ -47,9 +51,9 @@ public final class ClusterInner extends Resource { private SystemData systemData; /* - * Fully qualified resource Id for the resource. + * The type of the resource. */ - private String id; + private String type; /* * The name of the resource. @@ -57,9 +61,9 @@ public final class ClusterInner extends Resource { private String name; /* - * The type of the resource. + * Fully qualified resource Id for the resource. */ - private String type; + private String id; /** * Creates an instance of ClusterInner class. @@ -68,21 +72,21 @@ public ClusterInner() { } /** - * Get the innerIdentity property: Identity of Cluster resource. + * Get the innerProperties property: Cluster properties. * - * @return the innerIdentity value. + * @return the innerProperties value. */ - private ManagedServiceIdentity innerIdentity() { - return this.innerIdentity; + private ClusterProperties innerProperties() { + return this.innerProperties; } /** - * Get the innerProperties property: Cluster properties. + * Get the innerIdentity property: The managed service identities assigned to this resource. * - * @return the innerProperties value. + * @return the innerIdentity value. */ - private ClusterProperties innerProperties() { - return this.innerProperties; + private ManagedServiceIdentity innerIdentity() { + return this.innerIdentity; } /** @@ -95,13 +99,13 @@ public SystemData systemData() { } /** - * Get the id property: Fully qualified resource Id for the resource. + * Get the type property: The type of the resource. * - * @return the id value. + * @return the type value. */ @Override - public String id() { - return this.id; + public String type() { + return this.type; } /** @@ -115,13 +119,13 @@ public String name() { } /** - * Get the type property: The type of the resource. + * Get the id property: Fully qualified resource Id for the resource. * - * @return the type value. + * @return the id value. */ @Override - public String type() { - return this.type; + public String id() { + return this.id; } /** @@ -143,81 +147,8 @@ public ClusterInner withTags(Map tags) { } /** - * Get the principalId property: The service principal ID of the system assigned identity. This property will only - * be provided for a system assigned identity. - * - * @return the principalId value. - */ - public UUID principalId() { - return this.innerIdentity() == null ? null : this.innerIdentity().principalId(); - } - - /** - * Get the tenantId property: The tenant ID of the system assigned identity. This property will only be provided for - * a system assigned identity. - * - * @return the tenantId value. - */ - public UUID tenantId() { - return this.innerIdentity() == null ? null : this.innerIdentity().tenantId(); - } - - /** - * Get the type property: Type of managed service identity (where both SystemAssigned and UserAssigned types are - * allowed). - * - * @return the type value. - */ - public ManagedServiceIdentityType typeIdentityType() { - return this.innerIdentity() == null ? null : this.innerIdentity().type(); - } - - /** - * Set the type property: Type of managed service identity (where both SystemAssigned and UserAssigned types are - * allowed). - * - * @param type the type value to set. - * @return the ClusterInner object itself. - */ - public ClusterInner withTypeIdentityType(ManagedServiceIdentityType type) { - if (this.innerIdentity() == null) { - this.innerIdentity = new ManagedServiceIdentity(); - } - this.innerIdentity().withType(type); - return this; - } - - /** - * Get the userAssignedIdentities property: The set of user assigned identities associated with the resource. The - * userAssignedIdentities dictionary keys will be ARM resource ids in the form: - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}. - * The dictionary values can be empty objects ({}) in requests. - * - * @return the userAssignedIdentities value. - */ - public Map userAssignedIdentities() { - return this.innerIdentity() == null ? null : this.innerIdentity().userAssignedIdentities(); - } - - /** - * Set the userAssignedIdentities property: The set of user assigned identities associated with the resource. The - * userAssignedIdentities dictionary keys will be ARM resource ids in the form: - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}. - * The dictionary values can be empty objects ({}) in requests. - * - * @param userAssignedIdentities the userAssignedIdentities value to set. - * @return the ClusterInner object itself. - */ - public ClusterInner withUserAssignedIdentities(Map userAssignedIdentities) { - if (this.innerIdentity() == null) { - this.innerIdentity = new ManagedServiceIdentity(); - } - this.innerIdentity().withUserAssignedIdentities(userAssignedIdentities); - return this; - } - - /** - * Get the provisioningState property: Provisioning state. + * Get the provisioningState property: Provisioning state. Indicates the current lifecycle status of the resource, + * including creation, update, deletion, connectivity, and error states. * * @return the provisioningState value. */ @@ -226,7 +157,8 @@ public ProvisioningState provisioningState() { } /** - * Get the status property: Status of the cluster agent. + * Get the status property: Status of the cluster agent. Indicates the current connectivity, validation, and + * deployment state of the agent within the cluster. * * @return the status value. */ @@ -235,7 +167,8 @@ public Status status() { } /** - * Get the connectivityStatus property: Overall connectivity status for the cluster resource. + * Get the connectivityStatus property: Overall connectivity status for the cluster resource. Indicates whether the + * cluster is connected to Azure, partially connected, or has not recently communicated. * * @return the connectivityStatus value. */ @@ -390,6 +323,16 @@ public ClusterInner withSoftwareAssuranceProperties(SoftwareAssuranceProperties return this; } + /** + * Get the isManagementCluster property: Is Management Cluster, when true indicates that the cluster is used for + * managing other clusters. + * + * @return the isManagementCluster value. + */ + public Boolean isManagementCluster() { + return this.innerProperties() == null ? null : this.innerProperties().isManagementCluster(); + } + /** * Get the logCollectionProperties property: Log Collection properties of the cluster. * @@ -483,7 +426,7 @@ public IsolatedVmAttestationConfiguration isolatedVmAttestationConfiguration() { * * @return the trialDaysRemaining value. */ - public Float trialDaysRemaining() { + public Double trialDaysRemaining() { return this.innerProperties() == null ? null : this.innerProperties().trialDaysRemaining(); } @@ -542,17 +485,133 @@ public String resourceProviderObjectId() { } /** - * Validates the instance. + * Get the secretsLocations property: List of secret locations. + * + * @return the secretsLocations value. + */ + public List secretsLocations() { + return this.innerProperties() == null ? null : this.innerProperties().secretsLocations(); + } + + /** + * Set the secretsLocations property: List of secret locations. + * + * @param secretsLocations the secretsLocations value to set. + * @return the ClusterInner object itself. + */ + public ClusterInner withSecretsLocations(List secretsLocations) { + if (this.innerProperties() == null) { + this.innerProperties = new ClusterProperties(); + } + this.innerProperties().withSecretsLocations(secretsLocations); + return this; + } + + /** + * Get the clusterPattern property: Supported Storage Type for HCI Cluster. + * + * @return the clusterPattern value. + */ + public ClusterPattern clusterPattern() { + return this.innerProperties() == null ? null : this.innerProperties().clusterPattern(); + } + + /** + * Get the localAvailabilityZones property: Local Availability Zone information for HCI cluster. + * + * @return the localAvailabilityZones value. + */ + public List localAvailabilityZones() { + return this.innerProperties() == null ? null : this.innerProperties().localAvailabilityZones(); + } + + /** + * Set the localAvailabilityZones property: Local Availability Zone information for HCI cluster. + * + * @param localAvailabilityZones the localAvailabilityZones value to set. + * @return the ClusterInner object itself. + */ + public ClusterInner withLocalAvailabilityZones(List localAvailabilityZones) { + if (this.innerProperties() == null) { + this.innerProperties = new ClusterProperties(); + } + this.innerProperties().withLocalAvailabilityZones(localAvailabilityZones); + return this; + } + + /** + * Get the identityProvider property: Identity Provider for the cluster. + * + * @return the identityProvider value. + */ + public IdentityProvider identityProvider() { + return this.innerProperties() == null ? null : this.innerProperties().identityProvider(); + } + + /** + * Get the principalId property: The service principal ID of the system assigned identity. This property will only + * be provided for a system assigned identity. + * + * @return the principalId value. + */ + public String principalId() { + return this.innerIdentity() == null ? null : this.innerIdentity().principalId(); + } + + /** + * Get the tenantId property: The tenant ID of the system assigned identity. This property will only be provided for + * a system assigned identity. + * + * @return the tenantId value. + */ + public String tenantId() { + return this.innerIdentity() == null ? null : this.innerIdentity().tenantId(); + } + + /** + * Get the type property: The type of managed identity assigned to this resource. + * + * @return the type value. + */ + public ManagedServiceIdentityType typeIdentityType() { + return this.innerIdentity() == null ? null : this.innerIdentity().type(); + } + + /** + * Set the type property: The type of managed identity assigned to this resource. * - * @throws IllegalArgumentException thrown if the instance is not valid. + * @param type the type value to set. + * @return the ClusterInner object itself. */ - public void validate() { - if (innerIdentity() != null) { - innerIdentity().validate(); + public ClusterInner withTypeIdentityType(ManagedServiceIdentityType type) { + if (this.innerIdentity() == null) { + this.innerIdentity = new ManagedServiceIdentity(); } - if (innerProperties() != null) { - innerProperties().validate(); + this.innerIdentity().withType(type); + return this; + } + + /** + * Get the userAssignedIdentities property: The identities assigned to this resource by the user. + * + * @return the userAssignedIdentities value. + */ + public Map userAssignedIdentities() { + return this.innerIdentity() == null ? null : this.innerIdentity().userAssignedIdentities(); + } + + /** + * Set the userAssignedIdentities property: The identities assigned to this resource by the user. + * + * @param userAssignedIdentities the userAssignedIdentities value to set. + * @return the ClusterInner object itself. + */ + public ClusterInner withUserAssignedIdentities(Map userAssignedIdentities) { + if (this.innerIdentity() == null) { + this.innerIdentity = new ManagedServiceIdentity(); } + this.innerIdentity().withUserAssignedIdentities(userAssignedIdentities); + return this; } /** @@ -563,8 +622,8 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); jsonWriter.writeStringField("location", location()); jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); - jsonWriter.writeJsonField("identity", this.innerIdentity); jsonWriter.writeJsonField("properties", this.innerProperties); + jsonWriter.writeJsonField("identity", this.innerIdentity); return jsonWriter.writeEndObject(); } @@ -595,10 +654,10 @@ public static ClusterInner fromJson(JsonReader jsonReader) throws IOException { } else if ("tags".equals(fieldName)) { Map tags = reader.readMap(reader1 -> reader1.getString()); deserializedClusterInner.withTags(tags); - } else if ("identity".equals(fieldName)) { - deserializedClusterInner.innerIdentity = ManagedServiceIdentity.fromJson(reader); } else if ("properties".equals(fieldName)) { deserializedClusterInner.innerProperties = ClusterProperties.fromJson(reader); + } else if ("identity".equals(fieldName)) { + deserializedClusterInner.innerIdentity = ManagedServiceIdentity.fromJson(reader); } else if ("systemData".equals(fieldName)) { deserializedClusterInner.systemData = SystemData.fromJson(reader); } else { diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/ClusterPatchProperties.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/ClusterPatchProperties.java index 649afd5a489b..5e0e9dc5e5f1 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/ClusterPatchProperties.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/ClusterPatchProperties.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.fluent.models; @@ -123,17 +123,6 @@ public ClusterPatchProperties withDesiredProperties(ClusterDesiredProperties des return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (desiredProperties() != null) { - desiredProperties().validate(); - } - } - /** * {@inheritDoc} */ diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/ClusterProperties.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/ClusterProperties.java index 07d16fd324e3..2bbd3e1006a6 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/ClusterProperties.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/ClusterProperties.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.fluent.models; @@ -11,16 +11,21 @@ import com.azure.json.JsonToken; import com.azure.json.JsonWriter; import com.azure.resourcemanager.azurestackhci.models.ClusterDesiredProperties; +import com.azure.resourcemanager.azurestackhci.models.ClusterPattern; import com.azure.resourcemanager.azurestackhci.models.ClusterReportedProperties; import com.azure.resourcemanager.azurestackhci.models.ConnectivityStatus; +import com.azure.resourcemanager.azurestackhci.models.IdentityProvider; import com.azure.resourcemanager.azurestackhci.models.IsolatedVmAttestationConfiguration; +import com.azure.resourcemanager.azurestackhci.models.LocalAvailabilityZones; import com.azure.resourcemanager.azurestackhci.models.LogCollectionProperties; import com.azure.resourcemanager.azurestackhci.models.ProvisioningState; import com.azure.resourcemanager.azurestackhci.models.RemoteSupportProperties; +import com.azure.resourcemanager.azurestackhci.models.SecretsLocationDetails; import com.azure.resourcemanager.azurestackhci.models.SoftwareAssuranceProperties; import com.azure.resourcemanager.azurestackhci.models.Status; import java.io.IOException; import java.time.OffsetDateTime; +import java.util.List; /** * Cluster properties. @@ -28,17 +33,20 @@ @Fluent public final class ClusterProperties implements JsonSerializable { /* - * Provisioning state. + * Provisioning state. Indicates the current lifecycle status of the resource, including creation, update, deletion, + * connectivity, and error states. */ private ProvisioningState provisioningState; /* - * Status of the cluster agent. + * Status of the cluster agent. Indicates the current connectivity, validation, and deployment state of the agent + * within the cluster. */ private Status status; /* - * Overall connectivity status for the cluster resource. + * Overall connectivity status for the cluster resource. Indicates whether the cluster is connected to Azure, + * partially connected, or has not recently communicated. */ private ConnectivityStatus connectivityStatus; @@ -77,6 +85,11 @@ public final class ClusterProperties implements JsonSerializable secretsLocations; + + /* + * Supported Storage Type for HCI Cluster + */ + private ClusterPattern clusterPattern; + + /* + * Local Availability Zone information for HCI cluster + */ + private List localAvailabilityZones; + + /* + * Identity Provider for the cluster + */ + private IdentityProvider identityProvider; + /** * Creates an instance of ClusterProperties class. */ @@ -144,7 +177,8 @@ public ClusterProperties() { } /** - * Get the provisioningState property: Provisioning state. + * Get the provisioningState property: Provisioning state. Indicates the current lifecycle status of the resource, + * including creation, update, deletion, connectivity, and error states. * * @return the provisioningState value. */ @@ -153,7 +187,8 @@ public ProvisioningState provisioningState() { } /** - * Get the status property: Status of the cluster agent. + * Get the status property: Status of the cluster agent. Indicates the current connectivity, validation, and + * deployment state of the agent within the cluster. * * @return the status value. */ @@ -162,7 +197,8 @@ public Status status() { } /** - * Get the connectivityStatus property: Overall connectivity status for the cluster resource. + * Get the connectivityStatus property: Overall connectivity status for the cluster resource. Indicates whether the + * cluster is connected to Azure, partially connected, or has not recently communicated. * * @return the connectivityStatus value. */ @@ -299,6 +335,16 @@ public ClusterProperties withSoftwareAssuranceProperties(SoftwareAssuranceProper return this; } + /** + * Get the isManagementCluster property: Is Management Cluster, when true indicates that the cluster is used for + * managing other clusters. + * + * @return the isManagementCluster value. + */ + public Boolean isManagementCluster() { + return this.isManagementCluster; + } + /** * Get the logCollectionProperties property: Log Collection properties of the cluster. * @@ -383,7 +429,7 @@ public IsolatedVmAttestationConfiguration isolatedVmAttestationConfiguration() { * * @return the trialDaysRemaining value. */ - public Float trialDaysRemaining() { + public Double trialDaysRemaining() { return this.trialDaysRemaining; } @@ -442,29 +488,61 @@ public String resourceProviderObjectId() { } /** - * Validates the instance. + * Get the secretsLocations property: List of secret locations. + * + * @return the secretsLocations value. + */ + public List secretsLocations() { + return this.secretsLocations; + } + + /** + * Set the secretsLocations property: List of secret locations. + * + * @param secretsLocations the secretsLocations value to set. + * @return the ClusterProperties object itself. + */ + public ClusterProperties withSecretsLocations(List secretsLocations) { + this.secretsLocations = secretsLocations; + return this; + } + + /** + * Get the clusterPattern property: Supported Storage Type for HCI Cluster. + * + * @return the clusterPattern value. + */ + public ClusterPattern clusterPattern() { + return this.clusterPattern; + } + + /** + * Get the localAvailabilityZones property: Local Availability Zone information for HCI cluster. + * + * @return the localAvailabilityZones value. + */ + public List localAvailabilityZones() { + return this.localAvailabilityZones; + } + + /** + * Set the localAvailabilityZones property: Local Availability Zone information for HCI cluster. + * + * @param localAvailabilityZones the localAvailabilityZones value to set. + * @return the ClusterProperties object itself. + */ + public ClusterProperties withLocalAvailabilityZones(List localAvailabilityZones) { + this.localAvailabilityZones = localAvailabilityZones; + return this; + } + + /** + * Get the identityProvider property: Identity Provider for the cluster. * - * @throws IllegalArgumentException thrown if the instance is not valid. + * @return the identityProvider value. */ - public void validate() { - if (softwareAssuranceProperties() != null) { - softwareAssuranceProperties().validate(); - } - if (logCollectionProperties() != null) { - logCollectionProperties().validate(); - } - if (remoteSupportProperties() != null) { - remoteSupportProperties().validate(); - } - if (desiredProperties() != null) { - desiredProperties().validate(); - } - if (reportedProperties() != null) { - reportedProperties().validate(); - } - if (isolatedVmAttestationConfiguration() != null) { - isolatedVmAttestationConfiguration().validate(); - } + public IdentityProvider identityProvider() { + return this.identityProvider; } /** @@ -482,6 +560,10 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeJsonField("logCollectionProperties", this.logCollectionProperties); jsonWriter.writeJsonField("remoteSupportProperties", this.remoteSupportProperties); jsonWriter.writeJsonField("desiredProperties", this.desiredProperties); + jsonWriter.writeArrayField("secretsLocations", this.secretsLocations, + (writer, element) -> writer.writeJson(element)); + jsonWriter.writeArrayField("localAvailabilityZones", this.localAvailabilityZones, + (writer, element) -> writer.writeJson(element)); return jsonWriter.writeEndObject(); } @@ -522,6 +604,8 @@ public static ClusterProperties fromJson(JsonReader jsonReader) throws IOExcepti } else if ("softwareAssuranceProperties".equals(fieldName)) { deserializedClusterProperties.softwareAssuranceProperties = SoftwareAssuranceProperties.fromJson(reader); + } else if ("isManagementCluster".equals(fieldName)) { + deserializedClusterProperties.isManagementCluster = reader.getNullable(JsonReader::getBoolean); } else if ("logCollectionProperties".equals(fieldName)) { deserializedClusterProperties.logCollectionProperties = LogCollectionProperties.fromJson(reader); } else if ("remoteSupportProperties".equals(fieldName)) { @@ -534,7 +618,7 @@ public static ClusterProperties fromJson(JsonReader jsonReader) throws IOExcepti deserializedClusterProperties.isolatedVmAttestationConfiguration = IsolatedVmAttestationConfiguration.fromJson(reader); } else if ("trialDaysRemaining".equals(fieldName)) { - deserializedClusterProperties.trialDaysRemaining = reader.getNullable(JsonReader::getFloat); + deserializedClusterProperties.trialDaysRemaining = reader.getNullable(JsonReader::getDouble); } else if ("billingModel".equals(fieldName)) { deserializedClusterProperties.billingModel = reader.getString(); } else if ("registrationTimestamp".equals(fieldName)) { @@ -550,6 +634,18 @@ public static ClusterProperties fromJson(JsonReader jsonReader) throws IOExcepti deserializedClusterProperties.serviceEndpoint = reader.getString(); } else if ("resourceProviderObjectId".equals(fieldName)) { deserializedClusterProperties.resourceProviderObjectId = reader.getString(); + } else if ("secretsLocations".equals(fieldName)) { + List secretsLocations + = reader.readArray(reader1 -> SecretsLocationDetails.fromJson(reader1)); + deserializedClusterProperties.secretsLocations = secretsLocations; + } else if ("clusterPattern".equals(fieldName)) { + deserializedClusterProperties.clusterPattern = ClusterPattern.fromString(reader.getString()); + } else if ("localAvailabilityZones".equals(fieldName)) { + List localAvailabilityZones + = reader.readArray(reader1 -> LocalAvailabilityZones.fromJson(reader1)); + deserializedClusterProperties.localAvailabilityZones = localAvailabilityZones; + } else if ("identityProvider".equals(fieldName)) { + deserializedClusterProperties.identityProvider = IdentityProvider.fromString(reader.getString()); } else { reader.skipChildren(); } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/DeploymentSettingInner.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/DeploymentSettingInner.java index 8af39058fe81..e36717abeddb 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/DeploymentSettingInner.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/DeploymentSettingInner.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.fluent.models; @@ -34,9 +34,9 @@ public final class DeploymentSettingInner extends ProxyResource { private SystemData systemData; /* - * Fully qualified resource Id for the resource. + * The type of the resource. */ - private String id; + private String type; /* * The name of the resource. @@ -44,9 +44,9 @@ public final class DeploymentSettingInner extends ProxyResource { private String name; /* - * The type of the resource. + * Fully qualified resource Id for the resource. */ - private String type; + private String id; /** * Creates an instance of DeploymentSettingInner class. @@ -73,13 +73,13 @@ public SystemData systemData() { } /** - * Get the id property: Fully qualified resource Id for the resource. + * Get the type property: The type of the resource. * - * @return the id value. + * @return the type value. */ @Override - public String id() { - return this.id; + public String type() { + return this.type; } /** @@ -93,13 +93,13 @@ public String name() { } /** - * Get the type property: The type of the resource. + * Get the id property: Fully qualified resource Id for the resource. * - * @return the type value. + * @return the id value. */ @Override - public String type() { - return this.type; + public String id() { + return this.id; } /** @@ -212,17 +212,6 @@ public EceReportedProperties reportedProperties() { return this.innerProperties() == null ? null : this.innerProperties().reportedProperties(); } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (innerProperties() != null) { - innerProperties().validate(); - } - } - /** * {@inheritDoc} */ diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/DeploymentSettingsProperties.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/DeploymentSettingsProperties.java index d5a01157bf95..30e561cbc17e 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/DeploymentSettingsProperties.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/DeploymentSettingsProperties.java @@ -1,11 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.fluent.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -157,36 +156,6 @@ public EceReportedProperties reportedProperties() { return this.reportedProperties; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (arcNodeResourceIds() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property arcNodeResourceIds in model DeploymentSettingsProperties")); - } - if (deploymentMode() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property deploymentMode in model DeploymentSettingsProperties")); - } - if (deploymentConfiguration() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property deploymentConfiguration in model DeploymentSettingsProperties")); - } else { - deploymentConfiguration().validate(); - } - if (reportedProperties() != null) { - reportedProperties().validate(); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(DeploymentSettingsProperties.class); - /** * {@inheritDoc} */ diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/EdgeDeviceInner.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/EdgeDeviceInner.java index 2b718468d4a2..a9fb6354136f 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/EdgeDeviceInner.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/EdgeDeviceInner.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.fluent.models; @@ -20,7 +20,9 @@ @Immutable public class EdgeDeviceInner extends ProxyResource { /* - * Device kind to support polymorphic resource. + * Metadata used by portal/tooling/etc to render different UX experiences for resources of the same type; e.g. + * ApiApps are a kind of Microsoft.Web/sites type. If supported, the resource provider must validate and persist + * this value. */ private DeviceKind kind = DeviceKind.fromString("EdgeDevice"); @@ -30,9 +32,9 @@ public class EdgeDeviceInner extends ProxyResource { private SystemData systemData; /* - * Fully qualified resource Id for the resource. + * The type of the resource. */ - private String id; + private String type; /* * The name of the resource. @@ -40,9 +42,9 @@ public class EdgeDeviceInner extends ProxyResource { private String name; /* - * The type of the resource. + * Fully qualified resource Id for the resource. */ - private String type; + private String id; /** * Creates an instance of EdgeDeviceInner class. @@ -51,7 +53,9 @@ public EdgeDeviceInner() { } /** - * Get the kind property: Device kind to support polymorphic resource. + * Get the kind property: Metadata used by portal/tooling/etc to render different UX experiences for resources of + * the same type; e.g. ApiApps are a kind of Microsoft.Web/sites type. If supported, the resource provider must + * validate and persist this value. * * @return the kind value. */ @@ -80,13 +84,13 @@ EdgeDeviceInner withSystemData(SystemData systemData) { } /** - * Get the id property: Fully qualified resource Id for the resource. + * Get the type property: The type of the resource. * - * @return the id value. + * @return the type value. */ @Override - public String id() { - return this.id; + public String type() { + return this.type; } /** @@ -100,21 +104,13 @@ public String name() { } /** - * Get the type property: The type of the resource. + * Get the id property: Fully qualified resource Id for the resource. * - * @return the type value. + * @return the id value. */ @Override - public String type() { - return this.type; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { + public String id() { + return this.id; } /** diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/EdgeDeviceJobInner.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/EdgeDeviceJobInner.java new file mode 100644 index 000000000000..aa6a22ee047e --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/EdgeDeviceJobInner.java @@ -0,0 +1,185 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.azurestackhci.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.azurestackhci.models.EdgeDeviceKind; +import com.azure.resourcemanager.azurestackhci.models.HciEdgeDeviceJob; +import java.io.IOException; + +/** + * EdgeDevice Jobs resource. + */ +@Immutable +public class EdgeDeviceJobInner extends ProxyResource { + /* + * Metadata used by portal/tooling/etc to render different UX experiences for resources of the same type; e.g. + * ApiApps are a kind of Microsoft.Web/sites type. If supported, the resource provider must validate and persist + * this value. + */ + private EdgeDeviceKind kind = EdgeDeviceKind.fromString("EdgeDeviceJob"); + + /* + * 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 EdgeDeviceJobInner class. + */ + public EdgeDeviceJobInner() { + } + + /** + * Get the kind property: Metadata used by portal/tooling/etc to render different UX experiences for resources of + * the same type; e.g. ApiApps are a kind of Microsoft.Web/sites type. If supported, the resource provider must + * validate and persist this value. + * + * @return the kind value. + */ + public EdgeDeviceKind kind() { + return this.kind; + } + + /** + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + + /** + * Set the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @param systemData the systemData value to set. + * @return the EdgeDeviceJobInner object itself. + */ + EdgeDeviceJobInner withSystemData(SystemData systemData) { + this.systemData = systemData; + return this; + } + + /** + * 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.writeStringField("kind", this.kind == null ? null : this.kind.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of EdgeDeviceJobInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of EdgeDeviceJobInner 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 EdgeDeviceJobInner. + */ + public static EdgeDeviceJobInner 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 ("HCI".equals(discriminatorValue)) { + return HciEdgeDeviceJob.fromJson(readerToUse.reset()); + } else { + return fromJsonKnownDiscriminator(readerToUse.reset()); + } + } + }); + } + + static EdgeDeviceJobInner fromJsonKnownDiscriminator(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + EdgeDeviceJobInner deserializedEdgeDeviceJobInner = new EdgeDeviceJobInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedEdgeDeviceJobInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedEdgeDeviceJobInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedEdgeDeviceJobInner.type = reader.getString(); + } else if ("kind".equals(fieldName)) { + deserializedEdgeDeviceJobInner.kind = EdgeDeviceKind.fromString(reader.getString()); + } else if ("systemData".equals(fieldName)) { + deserializedEdgeDeviceJobInner.systemData = SystemData.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedEdgeDeviceJobInner; + }); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/ExtensionInner.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/ExtensionInner.java index e942d3a82fe7..9d4c8f48962c 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/ExtensionInner.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/ExtensionInner.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.fluent.models; @@ -33,9 +33,9 @@ public final class ExtensionInner extends ProxyResource { private SystemData systemData; /* - * Fully qualified resource Id for the resource. + * The type of the resource. */ - private String id; + private String type; /* * The name of the resource. @@ -43,9 +43,9 @@ public final class ExtensionInner extends ProxyResource { private String name; /* - * The type of the resource. + * Fully qualified resource Id for the resource. */ - private String type; + private String id; /** * Creates an instance of ExtensionInner class. @@ -72,13 +72,13 @@ public SystemData systemData() { } /** - * Get the id property: Fully qualified resource Id for the resource. + * Get the type property: The type of the resource. * - * @return the id value. + * @return the type value. */ @Override - public String id() { - return this.id; + public String type() { + return this.type; } /** @@ -92,17 +92,19 @@ public String name() { } /** - * Get the type property: The type of the resource. + * Get the id property: Fully qualified resource Id for the resource. * - * @return the type value. + * @return the id value. */ @Override - public String type() { - return this.type; + public String id() { + return this.id; } /** - * Get the provisioningState property: Provisioning state of the Extension proxy resource. + * Get the provisioningState property: Provisioning state of the Extension proxy resource. Indicates the current + * lifecycle status of the resource, such as whether it's being created, updated, deleted, or has encountered an + * error. * * @return the provisioningState value. */ @@ -111,7 +113,8 @@ public ProvisioningState provisioningState() { } /** - * Get the aggregateState property: Aggregate state of Arc Extensions across the nodes in this HCI cluster. + * Get the aggregateState property: Aggregate state of Arc Extensions across the nodes in this HCI cluster. This + * reflects the overall status of the extension deployment and operation across all nodes. * * @return the aggregateState value. */ @@ -129,7 +132,8 @@ public List perNodeExtensionDetails() { } /** - * Get the managedBy property: Indicates if the extension is managed by azure or the user. + * Get the managedBy property: Indicates if the extension is managed by Azure or the user. This determines who + * controls the deployment and lifecycle of the extension. * * @return the managedBy value. */ @@ -331,17 +335,6 @@ public ExtensionInner withEnableAutomaticUpgrade(Boolean enableAutomaticUpgrade) return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (innerProperties() != null) { - innerProperties().validate(); - } - } - /** * {@inheritDoc} */ diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/ExtensionParameters.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/ExtensionParameters.java index fa183cc024b4..1c67bfe2d1f3 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/ExtensionParameters.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/ExtensionParameters.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.fluent.models; @@ -235,14 +235,6 @@ public ExtensionParameters withEnableAutomaticUpgrade(Boolean enableAutomaticUpg return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ @@ -254,8 +246,12 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStringField("type", this.type); jsonWriter.writeStringField("typeHandlerVersion", this.typeHandlerVersion); jsonWriter.writeBooleanField("autoUpgradeMinorVersion", this.autoUpgradeMinorVersion); - jsonWriter.writeUntypedField("settings", this.settings); - jsonWriter.writeUntypedField("protectedSettings", this.protectedSettings); + if (this.settings != null) { + jsonWriter.writeUntypedField("settings", this.settings); + } + if (this.protectedSettings != null) { + jsonWriter.writeUntypedField("protectedSettings", this.protectedSettings); + } jsonWriter.writeBooleanField("enableAutomaticUpgrade", this.enableAutomaticUpgrade); return jsonWriter.writeEndObject(); } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/ExtensionPatchProperties.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/ExtensionPatchProperties.java index 354a2e911c09..a33f25b51725 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/ExtensionPatchProperties.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/ExtensionPatchProperties.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.fluent.models; @@ -48,17 +48,6 @@ public ExtensionPatchProperties withExtensionParameters(ExtensionPatchParameters return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (extensionParameters() != null) { - extensionParameters().validate(); - } - } - /** * {@inheritDoc} */ diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/ExtensionProperties.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/ExtensionProperties.java index 29ecd1704ff5..e19ed7715245 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/ExtensionProperties.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/ExtensionProperties.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.fluent.models; @@ -22,7 +22,8 @@ @Fluent public final class ExtensionProperties implements JsonSerializable { /* - * Provisioning state of the Extension proxy resource. + * Provisioning state of the Extension proxy resource. Indicates the current lifecycle status of the resource, such + * as whether it's being created, updated, deleted, or has encountered an error. */ private ProvisioningState provisioningState; @@ -32,7 +33,8 @@ public final class ExtensionProperties implements JsonSerializable perNodeExtensionDetails; /* - * Indicates if the extension is managed by azure or the user. + * Indicates if the extension is managed by Azure or the user. This determines who controls the deployment and + * lifecycle of the extension. */ private ExtensionManagedBy managedBy; @@ -53,7 +56,9 @@ public ExtensionProperties() { } /** - * Get the provisioningState property: Provisioning state of the Extension proxy resource. + * Get the provisioningState property: Provisioning state of the Extension proxy resource. Indicates the current + * lifecycle status of the resource, such as whether it's being created, updated, deleted, or has encountered an + * error. * * @return the provisioningState value. */ @@ -71,7 +76,8 @@ private ExtensionParameters innerExtensionParameters() { } /** - * Get the aggregateState property: Aggregate state of Arc Extensions across the nodes in this HCI cluster. + * Get the aggregateState property: Aggregate state of Arc Extensions across the nodes in this HCI cluster. This + * reflects the overall status of the extension deployment and operation across all nodes. * * @return the aggregateState value. */ @@ -89,7 +95,8 @@ public List perNodeExtensionDetails() { } /** - * Get the managedBy property: Indicates if the extension is managed by azure or the user. + * Get the managedBy property: Indicates if the extension is managed by Azure or the user. This determines who + * controls the deployment and lifecycle of the extension. * * @return the managedBy value. */ @@ -295,20 +302,6 @@ public ExtensionProperties withEnableAutomaticUpgrade(Boolean enableAutomaticUpg return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (innerExtensionParameters() != null) { - innerExtensionParameters().validate(); - } - if (perNodeExtensionDetails() != null) { - perNodeExtensionDetails().forEach(e -> e.validate()); - } - } - /** * {@inheritDoc} */ diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/HciUpdateInner.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/HciUpdateInner.java index c666b15899a7..8dceffb51351 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/HciUpdateInner.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/HciUpdateInner.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.fluent.models; @@ -28,14 +28,14 @@ @Fluent public final class HciUpdateInner extends ProxyResource { /* - * The geo-location where the resource lives + * Update properties */ - private String location; + private UpdateProperties innerProperties; /* - * Update properties + * The geo-location where the resource lives */ - private UpdateProperties innerProperties; + private String location; /* * Azure Resource Manager metadata containing createdBy and modifiedBy information. @@ -43,9 +43,9 @@ public final class HciUpdateInner extends ProxyResource { private SystemData systemData; /* - * Fully qualified resource Id for the resource. + * The type of the resource. */ - private String id; + private String type; /* * The name of the resource. @@ -53,9 +53,9 @@ public final class HciUpdateInner extends ProxyResource { private String name; /* - * The type of the resource. + * Fully qualified resource Id for the resource. */ - private String type; + private String id; /** * Creates an instance of HciUpdateInner class. @@ -63,6 +63,15 @@ public final class HciUpdateInner extends ProxyResource { public HciUpdateInner() { } + /** + * Get the innerProperties property: Update properties. + * + * @return the innerProperties value. + */ + private UpdateProperties innerProperties() { + return this.innerProperties; + } + /** * Get the location property: The geo-location where the resource lives. * @@ -83,15 +92,6 @@ public HciUpdateInner withLocation(String location) { return this; } - /** - * Get the innerProperties property: Update properties. - * - * @return the innerProperties value. - */ - private UpdateProperties innerProperties() { - return this.innerProperties; - } - /** * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. * @@ -102,13 +102,13 @@ public SystemData systemData() { } /** - * Get the id property: Fully qualified resource Id for the resource. + * Get the type property: The type of the resource. * - * @return the id value. + * @return the type value. */ @Override - public String id() { - return this.id; + public String type() { + return this.type; } /** @@ -122,17 +122,18 @@ public String name() { } /** - * Get the type property: The type of the resource. + * Get the id property: Fully qualified resource Id for the resource. * - * @return the type value. + * @return the id value. */ @Override - public String type() { - return this.type; + public String id() { + return this.id; } /** - * Get the provisioningState property: Provisioning state of the Updates proxy resource. + * Get the provisioningState property: Provisioning state of the Updates proxy resource. Indicates the current + * lifecycle status of the update operation, such as whether it has been accepted, is in progress, or has completed. * * @return the provisioningState value. */ @@ -210,7 +211,9 @@ public HciUpdateInner withMinSbeVersionRequired(String minSbeVersionRequired) { } /** - * Get the state property: State of the update as it relates to this stamp. + * Get the state property: Represents the current state of the update as it relates to this stamp. This includes + * phases such as preparation, installation, scanning, and error handling, providing insight into the update's + * progress and any issues encountered. * * @return the state value. */ @@ -219,7 +222,9 @@ public State state() { } /** - * Set the state property: State of the update as it relates to this stamp. + * Set the state property: Represents the current state of the update as it relates to this stamp. This includes + * phases such as preparation, installation, scanning, and error handling, providing insight into the update's + * progress and any issues encountered. * * @param state the state value to set. * @return the HciUpdateInner object itself. @@ -283,7 +288,8 @@ public HciUpdateInner withComponentVersions(List componentVe } /** - * Get the rebootRequired property: The rebootRequired property. + * Get the rebootRequired property: Indicates whether a reboot is required after the update or operation. Helps + * determine if a system restart is necessary to complete the process. * * @return the rebootRequired value. */ @@ -292,7 +298,8 @@ public RebootRequirement rebootRequired() { } /** - * Set the rebootRequired property: The rebootRequired property. + * Set the rebootRequired property: Indicates whether a reboot is required after the update or operation. Helps + * determine if a system restart is necessary to complete the process. * * @param rebootRequired the rebootRequired value to set. * @return the HciUpdateInner object itself. @@ -403,7 +410,7 @@ public HciUpdateInner withPackagePath(String packagePath) { * * @return the packageSizeInMb value. */ - public Float packageSizeInMb() { + public Double packageSizeInMb() { return this.innerProperties() == null ? null : this.innerProperties().packageSizeInMb(); } @@ -414,7 +421,7 @@ public Float packageSizeInMb() { * @param packageSizeInMb the packageSizeInMb value to set. * @return the HciUpdateInner object itself. */ - public HciUpdateInner withPackageSizeInMb(Float packageSizeInMb) { + public HciUpdateInner withPackageSizeInMb(Double packageSizeInMb) { if (this.innerProperties() == null) { this.innerProperties = new UpdateProperties(); } @@ -515,7 +522,8 @@ public HciUpdateInner withReleaseLink(String releaseLink) { } /** - * Get the availabilityType property: Indicates the way the update content can be downloaded. + * Get the availabilityType property: Indicates how the update content is made available for download. This + * determines whether the update is sourced locally, from an online repository, or requires user notification. * * @return the availabilityType value. */ @@ -524,7 +532,8 @@ public AvailabilityType availabilityType() { } /** - * Set the availabilityType property: Indicates the way the update content can be downloaded. + * Set the availabilityType property: Indicates how the update content is made available for download. This + * determines whether the update is sourced locally, from an online repository, or requires user notification. * * @param availabilityType the availabilityType value to set. * @return the HciUpdateInner object itself. @@ -594,7 +603,7 @@ public HciUpdateInner withAdditionalProperties(String additionalProperties) { * * @return the progressPercentage value. */ - public Float progressPercentage() { + public Double progressPercentage() { return this.innerProperties() == null ? null : this.innerProperties().progressPercentage(); } @@ -606,7 +615,7 @@ public Float progressPercentage() { * @param progressPercentage the progressPercentage value to set. * @return the HciUpdateInner object itself. */ - public HciUpdateInner withProgressPercentage(Float progressPercentage) { + public HciUpdateInner withProgressPercentage(Double progressPercentage) { if (this.innerProperties() == null) { this.innerProperties = new UpdateProperties(); } @@ -637,25 +646,14 @@ public HciUpdateInner withNotifyMessage(String notifyMessage) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (innerProperties() != null) { - innerProperties().validate(); - } - } - /** * {@inheritDoc} */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); - jsonWriter.writeStringField("location", this.location); jsonWriter.writeJsonField("properties", this.innerProperties); + jsonWriter.writeStringField("location", this.location); return jsonWriter.writeEndObject(); } @@ -681,10 +679,10 @@ public static HciUpdateInner fromJson(JsonReader jsonReader) throws IOException deserializedHciUpdateInner.name = reader.getString(); } else if ("type".equals(fieldName)) { deserializedHciUpdateInner.type = reader.getString(); - } else if ("location".equals(fieldName)) { - deserializedHciUpdateInner.location = reader.getString(); } else if ("properties".equals(fieldName)) { deserializedHciUpdateInner.innerProperties = UpdateProperties.fromJson(reader); + } else if ("location".equals(fieldName)) { + deserializedHciUpdateInner.location = reader.getString(); } else if ("systemData".equals(fieldName)) { deserializedHciUpdateInner.systemData = SystemData.fromJson(reader); } else { diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/ManagedServiceIdentity.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/ManagedServiceIdentity.java index c659c603f23b..943fe7db17b1 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/ManagedServiceIdentity.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/ManagedServiceIdentity.java @@ -1,11 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.fluent.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -14,7 +13,6 @@ import com.azure.resourcemanager.azurestackhci.models.UserAssignedIdentity; import java.io.IOException; import java.util.Map; -import java.util.UUID; /** * Managed service identity (system assigned and/or user assigned identities). @@ -25,24 +23,21 @@ public final class ManagedServiceIdentity implements JsonSerializable userAssignedIdentities; @@ -58,7 +53,7 @@ public ManagedServiceIdentity() { * * @return the principalId value. */ - public UUID principalId() { + public String principalId() { return this.principalId; } @@ -68,13 +63,12 @@ public UUID principalId() { * * @return the tenantId value. */ - public UUID tenantId() { + public String tenantId() { return this.tenantId; } /** - * Get the type property: Type of managed service identity (where both SystemAssigned and UserAssigned types are - * allowed). + * Get the type property: The type of managed identity assigned to this resource. * * @return the type value. */ @@ -83,8 +77,7 @@ public ManagedServiceIdentityType type() { } /** - * Set the type property: Type of managed service identity (where both SystemAssigned and UserAssigned types are - * allowed). + * Set the type property: The type of managed identity assigned to this resource. * * @param type the type value to set. * @return the ManagedServiceIdentity object itself. @@ -95,10 +88,7 @@ public ManagedServiceIdentity withType(ManagedServiceIdentityType type) { } /** - * Get the userAssignedIdentities property: The set of user assigned identities associated with the resource. The - * userAssignedIdentities dictionary keys will be ARM resource ids in the form: - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}. - * The dictionary values can be empty objects ({}) in requests. + * Get the userAssignedIdentities property: The identities assigned to this resource by the user. * * @return the userAssignedIdentities value. */ @@ -107,10 +97,7 @@ public Map userAssignedIdentities() { } /** - * Set the userAssignedIdentities property: The set of user assigned identities associated with the resource. The - * userAssignedIdentities dictionary keys will be ARM resource ids in the form: - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}. - * The dictionary values can be empty objects ({}) in requests. + * Set the userAssignedIdentities property: The identities assigned to this resource by the user. * * @param userAssignedIdentities the userAssignedIdentities value to set. * @return the ManagedServiceIdentity object itself. @@ -120,27 +107,6 @@ public ManagedServiceIdentity withUserAssignedIdentities(Map { - if (e != null) { - e.validate(); - } - }); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(ManagedServiceIdentity.class); - /** * {@inheritDoc} */ @@ -172,11 +138,9 @@ public static ManagedServiceIdentity fromJson(JsonReader jsonReader) throws IOEx if ("type".equals(fieldName)) { deserializedManagedServiceIdentity.type = ManagedServiceIdentityType.fromString(reader.getString()); } else if ("principalId".equals(fieldName)) { - deserializedManagedServiceIdentity.principalId - = reader.getNullable(nonNullReader -> UUID.fromString(nonNullReader.getString())); + deserializedManagedServiceIdentity.principalId = reader.getString(); } else if ("tenantId".equals(fieldName)) { - deserializedManagedServiceIdentity.tenantId - = reader.getNullable(nonNullReader -> UUID.fromString(nonNullReader.getString())); + deserializedManagedServiceIdentity.tenantId = reader.getString(); } else if ("userAssignedIdentities".equals(fieldName)) { Map userAssignedIdentities = reader.readMap(reader1 -> UserAssignedIdentity.fromJson(reader1)); diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/OfferInner.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/OfferInner.java index 08f059d0778d..8ee49a406c60 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/OfferInner.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/OfferInner.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.fluent.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.core.management.ProxyResource; import com.azure.core.management.SystemData; import com.azure.json.JsonReader; @@ -17,7 +17,7 @@ /** * Offer details. */ -@Fluent +@Immutable public final class OfferInner extends ProxyResource { /* * Offer properties. @@ -30,9 +30,9 @@ public final class OfferInner extends ProxyResource { private SystemData systemData; /* - * Fully qualified resource Id for the resource. + * The type of the resource. */ - private String id; + private String type; /* * The name of the resource. @@ -40,14 +40,14 @@ public final class OfferInner extends ProxyResource { private String name; /* - * The type of the resource. + * Fully qualified resource Id for the resource. */ - private String type; + private String id; /** * Creates an instance of OfferInner class. */ - public OfferInner() { + private OfferInner() { } /** @@ -69,13 +69,13 @@ public SystemData systemData() { } /** - * Get the id property: Fully qualified resource Id for the resource. + * Get the type property: The type of the resource. * - * @return the id value. + * @return the type value. */ @Override - public String id() { - return this.id; + public String type() { + return this.type; } /** @@ -89,13 +89,13 @@ public String name() { } /** - * Get the type property: The type of the resource. + * Get the id property: Fully qualified resource Id for the resource. * - * @return the type value. + * @return the id value. */ @Override - public String type() { - return this.type; + public String id() { + return this.id; } /** @@ -116,20 +116,6 @@ public String publisherId() { return this.innerProperties() == null ? null : this.innerProperties().publisherId(); } - /** - * Set the publisherId property: Identifier of the Publisher for the offer. - * - * @param publisherId the publisherId value to set. - * @return the OfferInner object itself. - */ - public OfferInner withPublisherId(String publisherId) { - if (this.innerProperties() == null) { - this.innerProperties = new OfferProperties(); - } - this.innerProperties().withPublisherId(publisherId); - return this; - } - /** * Get the content property: JSON serialized catalog content of the offer. * @@ -139,20 +125,6 @@ public String content() { return this.innerProperties() == null ? null : this.innerProperties().content(); } - /** - * Set the content property: JSON serialized catalog content of the offer. - * - * @param content the content value to set. - * @return the OfferInner object itself. - */ - public OfferInner withContent(String content) { - if (this.innerProperties() == null) { - this.innerProperties = new OfferProperties(); - } - this.innerProperties().withContent(content); - return this; - } - /** * Get the contentVersion property: The API version of the catalog service used to serve the catalog content. * @@ -162,20 +134,6 @@ public String contentVersion() { return this.innerProperties() == null ? null : this.innerProperties().contentVersion(); } - /** - * Set the contentVersion property: The API version of the catalog service used to serve the catalog content. - * - * @param contentVersion the contentVersion value to set. - * @return the OfferInner object itself. - */ - public OfferInner withContentVersion(String contentVersion) { - if (this.innerProperties() == null) { - this.innerProperties = new OfferProperties(); - } - this.innerProperties().withContentVersion(contentVersion); - return this; - } - /** * Get the skuMappings property: Array of SKU mappings. * @@ -185,31 +143,6 @@ public List skuMappings() { return this.innerProperties() == null ? null : this.innerProperties().skuMappings(); } - /** - * Set the skuMappings property: Array of SKU mappings. - * - * @param skuMappings the skuMappings value to set. - * @return the OfferInner object itself. - */ - public OfferInner withSkuMappings(List skuMappings) { - if (this.innerProperties() == null) { - this.innerProperties = new OfferProperties(); - } - this.innerProperties().withSkuMappings(skuMappings); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (innerProperties() != null) { - innerProperties().validate(); - } - } - /** * {@inheritDoc} */ diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/OfferProperties.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/OfferProperties.java index 470593b2b7df..a0980f12f7bf 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/OfferProperties.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/OfferProperties.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.fluent.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -16,7 +16,7 @@ /** * Publisher properties. */ -@Fluent +@Immutable public final class OfferProperties implements JsonSerializable { /* * Provisioning State @@ -46,7 +46,7 @@ public final class OfferProperties implements JsonSerializable /** * Creates an instance of OfferProperties class. */ - public OfferProperties() { + private OfferProperties() { } /** @@ -67,17 +67,6 @@ public String publisherId() { return this.publisherId; } - /** - * Set the publisherId property: Identifier of the Publisher for the offer. - * - * @param publisherId the publisherId value to set. - * @return the OfferProperties object itself. - */ - public OfferProperties withPublisherId(String publisherId) { - this.publisherId = publisherId; - return this; - } - /** * Get the content property: JSON serialized catalog content of the offer. * @@ -87,17 +76,6 @@ public String content() { return this.content; } - /** - * Set the content property: JSON serialized catalog content of the offer. - * - * @param content the content value to set. - * @return the OfferProperties object itself. - */ - public OfferProperties withContent(String content) { - this.content = content; - return this; - } - /** * Get the contentVersion property: The API version of the catalog service used to serve the catalog content. * @@ -107,17 +85,6 @@ public String contentVersion() { return this.contentVersion; } - /** - * Set the contentVersion property: The API version of the catalog service used to serve the catalog content. - * - * @param contentVersion the contentVersion value to set. - * @return the OfferProperties object itself. - */ - public OfferProperties withContentVersion(String contentVersion) { - this.contentVersion = contentVersion; - return this; - } - /** * Get the skuMappings property: Array of SKU mappings. * @@ -127,28 +94,6 @@ public List skuMappings() { return this.skuMappings; } - /** - * Set the skuMappings property: Array of SKU mappings. - * - * @param skuMappings the skuMappings value to set. - * @return the OfferProperties object itself. - */ - public OfferProperties withSkuMappings(List skuMappings) { - this.skuMappings = skuMappings; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (skuMappings() != null) { - skuMappings().forEach(e -> e.validate()); - } - } - /** * {@inheritDoc} */ diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/OperationInner.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/OperationInner.java new file mode 100644 index 000000000000..f0c6878f31d8 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/OperationInner.java @@ -0,0 +1,150 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.azurestackhci.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.azurestackhci.models.ActionType; +import com.azure.resourcemanager.azurestackhci.models.OperationDisplay; +import com.azure.resourcemanager.azurestackhci.models.Origin; +import java.io.IOException; + +/** + * REST API Operation + * + * Details of a REST API operation, returned from the Resource Provider Operations API. + */ +@Immutable +public final class OperationInner implements JsonSerializable { + /* + * The name of the operation, as per Resource-Based Access Control (RBAC). Examples: + * "Microsoft.Compute/virtualMachines/write", "Microsoft.Compute/virtualMachines/capture/action" + */ + private String name; + + /* + * Whether the operation applies to data-plane. This is "true" for data-plane operations and "false" for Azure + * Resource Manager/control-plane operations. + */ + private Boolean isDataAction; + + /* + * Localized display information for this particular operation. + */ + private OperationDisplay display; + + /* + * The intended executor of the operation; as in Resource Based Access Control (RBAC) and audit logs UX. Default + * value is "user,system" + */ + private Origin origin; + + /* + * Extensible enum. Indicates the action type. "Internal" refers to actions that are for internal only APIs. + */ + private ActionType actionType; + + /** + * Creates an instance of OperationInner class. + */ + private OperationInner() { + } + + /** + * Get the name property: The name of the operation, as per Resource-Based Access Control (RBAC). Examples: + * "Microsoft.Compute/virtualMachines/write", "Microsoft.Compute/virtualMachines/capture/action". + * + * @return the name value. + */ + public String name() { + return this.name; + } + + /** + * Get the isDataAction property: Whether the operation applies to data-plane. This is "true" for data-plane + * operations and "false" for Azure Resource Manager/control-plane operations. + * + * @return the isDataAction value. + */ + public Boolean isDataAction() { + return this.isDataAction; + } + + /** + * Get the display property: Localized display information for this particular operation. + * + * @return the display value. + */ + public OperationDisplay display() { + return this.display; + } + + /** + * Get the origin property: The intended executor of the operation; as in Resource Based Access Control (RBAC) and + * audit logs UX. Default value is "user,system". + * + * @return the origin value. + */ + public Origin origin() { + return this.origin; + } + + /** + * Get the actionType property: Extensible enum. Indicates the action type. "Internal" refers to actions that are + * for internal only APIs. + * + * @return the actionType value. + */ + public ActionType actionType() { + return this.actionType; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("display", this.display); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of OperationInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of OperationInner if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IOException If an error occurs while reading the OperationInner. + */ + public static OperationInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + OperationInner deserializedOperationInner = new OperationInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("name".equals(fieldName)) { + deserializedOperationInner.name = reader.getString(); + } else if ("isDataAction".equals(fieldName)) { + deserializedOperationInner.isDataAction = reader.getNullable(JsonReader::getBoolean); + } else if ("display".equals(fieldName)) { + deserializedOperationInner.display = OperationDisplay.fromJson(reader); + } else if ("origin".equals(fieldName)) { + deserializedOperationInner.origin = Origin.fromString(reader.getString()); + } else if ("actionType".equals(fieldName)) { + deserializedOperationInner.actionType = ActionType.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedOperationInner; + }); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/OperationListResultInner.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/OperationListResultInner.java deleted file mode 100644 index 65eede5f63b2..000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/OperationListResultInner.java +++ /dev/null @@ -1,104 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.azurestackhci.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.azurestackhci.models.Operation; -import java.io.IOException; -import java.util.List; - -/** - * A list of REST API operations supported by an Azure Resource Provider. It contains an URL link to get the next set of - * results. - */ -@Immutable -public final class OperationListResultInner implements JsonSerializable { - /* - * List of operations supported by the resource provider - */ - private List value; - - /* - * URL to get the next set of operation list results (if there are any). - */ - private String nextLink; - - /** - * Creates an instance of OperationListResultInner class. - */ - public OperationListResultInner() { - } - - /** - * Get the value property: List of operations supported by the resource provider. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Get the nextLink property: URL to get the next set of operation list results (if there are any). - * - * @return the nextLink value. - */ - public String nextLink() { - return this.nextLink; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (value() != null) { - value().forEach(e -> e.validate()); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of OperationListResultInner from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of OperationListResultInner 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 OperationListResultInner. - */ - public static OperationListResultInner fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - OperationListResultInner deserializedOperationListResultInner = new OperationListResultInner(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("value".equals(fieldName)) { - List value = reader.readArray(reader1 -> Operation.fromJson(reader1)); - deserializedOperationListResultInner.value = value; - } else if ("nextLink".equals(fieldName)) { - deserializedOperationListResultInner.nextLink = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedOperationListResultInner; - }); - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/PasswordCredentialInner.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/PasswordCredentialInner.java index 56d65c3fd923..4583da7da0cf 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/PasswordCredentialInner.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/PasswordCredentialInner.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.fluent.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.core.util.CoreUtils; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; @@ -17,7 +17,7 @@ /** * The PasswordCredential model. */ -@Fluent +@Immutable public final class PasswordCredentialInner implements JsonSerializable { /* * The secretText property. @@ -42,7 +42,7 @@ public final class PasswordCredentialInner implements JsonSerializable { - /* - * Provisioning State - */ - private String provisioningState; - - /** - * Creates an instance of PublisherProperties class. - */ - public PublisherProperties() { - } - - /** - * Get the provisioningState property: Provisioning State. - * - * @return the provisioningState value. - */ - public String provisioningState() { - return this.provisioningState; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of PublisherProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of PublisherProperties 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 PublisherProperties. - */ - public static PublisherProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - PublisherProperties deserializedPublisherProperties = new PublisherProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("provisioningState".equals(fieldName)) { - deserializedPublisherProperties.provisioningState = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedPublisherProperties; - }); - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/SecurityProperties.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/SecurityProperties.java index 61e0ee98a238..a9999281c386 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/SecurityProperties.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/SecurityProperties.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.fluent.models; @@ -134,28 +134,6 @@ public ProvisioningState provisioningState() { return this.provisioningState; } - /** - * Set the provisioningState property: The status of the last operation. - * - * @param provisioningState the provisioningState value to set. - * @return the SecurityProperties object itself. - */ - public SecurityProperties withProvisioningState(ProvisioningState provisioningState) { - this.provisioningState = provisioningState; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (securityComplianceStatus() != null) { - securityComplianceStatus().validate(); - } - } - /** * {@inheritDoc} */ @@ -170,8 +148,6 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { this.smbEncryptionForIntraClusterTrafficComplianceAssignment == null ? null : this.smbEncryptionForIntraClusterTrafficComplianceAssignment.toString()); - jsonWriter.writeStringField("provisioningState", - this.provisioningState == null ? null : this.provisioningState.toString()); return jsonWriter.writeEndObject(); } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/SecuritySettingInner.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/SecuritySettingInner.java index 015ce7f54dae..a6636f5895f9 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/SecuritySettingInner.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/SecuritySettingInner.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.fluent.models; @@ -31,9 +31,9 @@ public final class SecuritySettingInner extends ProxyResource { private SystemData systemData; /* - * Fully qualified resource Id for the resource. + * The type of the resource. */ - private String id; + private String type; /* * The name of the resource. @@ -41,9 +41,9 @@ public final class SecuritySettingInner extends ProxyResource { private String name; /* - * The type of the resource. + * Fully qualified resource Id for the resource. */ - private String type; + private String id; /** * Creates an instance of SecuritySettingInner class. @@ -70,13 +70,13 @@ public SystemData systemData() { } /** - * Get the id property: Fully qualified resource Id for the resource. + * Get the type property: The type of the resource. * - * @return the id value. + * @return the type value. */ @Override - public String id() { - return this.id; + public String type() { + return this.type; } /** @@ -90,13 +90,13 @@ public String name() { } /** - * Get the type property: The type of the resource. + * Get the id property: Fully qualified resource Id for the resource. * - * @return the type value. + * @return the id value. */ @Override - public String type() { - return this.type; + public String id() { + return this.id; } /** @@ -195,31 +195,6 @@ public ProvisioningState provisioningState() { return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); } - /** - * Set the provisioningState property: The status of the last operation. - * - * @param provisioningState the provisioningState value to set. - * @return the SecuritySettingInner object itself. - */ - public SecuritySettingInner withProvisioningState(ProvisioningState provisioningState) { - if (this.innerProperties() == null) { - this.innerProperties = new SecurityProperties(); - } - this.innerProperties().withProvisioningState(provisioningState); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (innerProperties() != null) { - innerProperties().validate(); - } - } - /** * {@inheritDoc} */ diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/SkuInner.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/SkuInner.java index 77c643002986..79aa55aaf06f 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/SkuInner.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/SkuInner.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.fluent.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.core.management.ProxyResource; import com.azure.core.management.SystemData; import com.azure.json.JsonReader; @@ -17,7 +17,7 @@ /** * Sku details. */ -@Fluent +@Immutable public final class SkuInner extends ProxyResource { /* * SKU properties. @@ -30,9 +30,9 @@ public final class SkuInner extends ProxyResource { private SystemData systemData; /* - * Fully qualified resource Id for the resource. + * The type of the resource. */ - private String id; + private String type; /* * The name of the resource. @@ -40,14 +40,14 @@ public final class SkuInner extends ProxyResource { private String name; /* - * The type of the resource. + * Fully qualified resource Id for the resource. */ - private String type; + private String id; /** * Creates an instance of SkuInner class. */ - public SkuInner() { + private SkuInner() { } /** @@ -69,13 +69,13 @@ public SystemData systemData() { } /** - * Get the id property: Fully qualified resource Id for the resource. + * Get the type property: The type of the resource. * - * @return the id value. + * @return the type value. */ @Override - public String id() { - return this.id; + public String type() { + return this.type; } /** @@ -89,13 +89,13 @@ public String name() { } /** - * Get the type property: The type of the resource. + * Get the id property: Fully qualified resource Id for the resource. * - * @return the type value. + * @return the id value. */ @Override - public String type() { - return this.type; + public String id() { + return this.id; } /** @@ -116,20 +116,6 @@ public String publisherId() { return this.innerProperties() == null ? null : this.innerProperties().publisherId(); } - /** - * Set the publisherId property: Identifier of the Publisher for the offer. - * - * @param publisherId the publisherId value to set. - * @return the SkuInner object itself. - */ - public SkuInner withPublisherId(String publisherId) { - if (this.innerProperties() == null) { - this.innerProperties = new SkuProperties(); - } - this.innerProperties().withPublisherId(publisherId); - return this; - } - /** * Get the offerId property: Identifier of the Offer for the sku. * @@ -139,20 +125,6 @@ public String offerId() { return this.innerProperties() == null ? null : this.innerProperties().offerId(); } - /** - * Set the offerId property: Identifier of the Offer for the sku. - * - * @param offerId the offerId value to set. - * @return the SkuInner object itself. - */ - public SkuInner withOfferId(String offerId) { - if (this.innerProperties() == null) { - this.innerProperties = new SkuProperties(); - } - this.innerProperties().withOfferId(offerId); - return this; - } - /** * Get the content property: JSON serialized catalog content of the sku offer. * @@ -162,20 +134,6 @@ public String content() { return this.innerProperties() == null ? null : this.innerProperties().content(); } - /** - * Set the content property: JSON serialized catalog content of the sku offer. - * - * @param content the content value to set. - * @return the SkuInner object itself. - */ - public SkuInner withContent(String content) { - if (this.innerProperties() == null) { - this.innerProperties = new SkuProperties(); - } - this.innerProperties().withContent(content); - return this; - } - /** * Get the contentVersion property: The API version of the catalog service used to serve the catalog content. * @@ -185,20 +143,6 @@ public String contentVersion() { return this.innerProperties() == null ? null : this.innerProperties().contentVersion(); } - /** - * Set the contentVersion property: The API version of the catalog service used to serve the catalog content. - * - * @param contentVersion the contentVersion value to set. - * @return the SkuInner object itself. - */ - public SkuInner withContentVersion(String contentVersion) { - if (this.innerProperties() == null) { - this.innerProperties = new SkuProperties(); - } - this.innerProperties().withContentVersion(contentVersion); - return this; - } - /** * Get the skuMappings property: Array of SKU mappings. * @@ -208,31 +152,6 @@ public List skuMappings() { return this.innerProperties() == null ? null : this.innerProperties().skuMappings(); } - /** - * Set the skuMappings property: Array of SKU mappings. - * - * @param skuMappings the skuMappings value to set. - * @return the SkuInner object itself. - */ - public SkuInner withSkuMappings(List skuMappings) { - if (this.innerProperties() == null) { - this.innerProperties = new SkuProperties(); - } - this.innerProperties().withSkuMappings(skuMappings); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (innerProperties() != null) { - innerProperties().validate(); - } - } - /** * {@inheritDoc} */ diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/SkuProperties.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/SkuProperties.java index b78c7cabda1c..fdd5a5c72a53 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/SkuProperties.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/SkuProperties.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.fluent.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -16,7 +16,7 @@ /** * SKU properties. */ -@Fluent +@Immutable public final class SkuProperties implements JsonSerializable { /* * Provisioning State @@ -51,7 +51,7 @@ public final class SkuProperties implements JsonSerializable { /** * Creates an instance of SkuProperties class. */ - public SkuProperties() { + private SkuProperties() { } /** @@ -72,17 +72,6 @@ public String publisherId() { return this.publisherId; } - /** - * Set the publisherId property: Identifier of the Publisher for the offer. - * - * @param publisherId the publisherId value to set. - * @return the SkuProperties object itself. - */ - public SkuProperties withPublisherId(String publisherId) { - this.publisherId = publisherId; - return this; - } - /** * Get the offerId property: Identifier of the Offer for the sku. * @@ -92,17 +81,6 @@ public String offerId() { return this.offerId; } - /** - * Set the offerId property: Identifier of the Offer for the sku. - * - * @param offerId the offerId value to set. - * @return the SkuProperties object itself. - */ - public SkuProperties withOfferId(String offerId) { - this.offerId = offerId; - return this; - } - /** * Get the content property: JSON serialized catalog content of the sku offer. * @@ -112,17 +90,6 @@ public String content() { return this.content; } - /** - * Set the content property: JSON serialized catalog content of the sku offer. - * - * @param content the content value to set. - * @return the SkuProperties object itself. - */ - public SkuProperties withContent(String content) { - this.content = content; - return this; - } - /** * Get the contentVersion property: The API version of the catalog service used to serve the catalog content. * @@ -132,17 +99,6 @@ public String contentVersion() { return this.contentVersion; } - /** - * Set the contentVersion property: The API version of the catalog service used to serve the catalog content. - * - * @param contentVersion the contentVersion value to set. - * @return the SkuProperties object itself. - */ - public SkuProperties withContentVersion(String contentVersion) { - this.contentVersion = contentVersion; - return this; - } - /** * Get the skuMappings property: Array of SKU mappings. * @@ -152,28 +108,6 @@ public List skuMappings() { return this.skuMappings; } - /** - * Set the skuMappings property: Array of SKU mappings. - * - * @param skuMappings the skuMappings value to set. - * @return the SkuProperties object itself. - */ - public SkuProperties withSkuMappings(List skuMappings) { - this.skuMappings = skuMappings; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (skuMappings() != null) { - skuMappings().forEach(e -> e.validate()); - } - } - /** * {@inheritDoc} */ diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/Step.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/Step.java index 82e367fcde8b..3fb9224797e9 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/Step.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/Step.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.fluent.models; @@ -256,17 +256,6 @@ public Step withSteps(List steps) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (steps() != null) { - steps().forEach(e -> e.validate()); - } - } - /** * {@inheritDoc} */ diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/UpdateProperties.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/UpdateProperties.java index eb137ccec19a..39f4ffe8a76b 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/UpdateProperties.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/UpdateProperties.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.fluent.models; @@ -29,7 +29,8 @@ @Fluent public final class UpdateProperties implements JsonSerializable { /* - * Provisioning state of the Updates proxy resource. + * Provisioning state of the Updates proxy resource. Indicates the current lifecycle status of the update operation, + * such as whether it has been accepted, is in progress, or has completed. */ private ProvisioningState provisioningState; @@ -49,7 +50,9 @@ public final class UpdateProperties implements JsonSerializable componentVersions; /* - * The rebootRequired property. + * Indicates whether a reboot is required after the update or operation. Helps determine if a system restart is + * necessary to complete the process. */ private RebootRequirement rebootRequired; @@ -93,7 +97,7 @@ public final class UpdateProperties implements JsonSerializable component } /** - * Get the rebootRequired property: The rebootRequired property. + * Get the rebootRequired property: Indicates whether a reboot is required after the update or operation. Helps + * determine if a system restart is necessary to complete the process. * * @return the rebootRequired value. */ @@ -286,7 +297,8 @@ public RebootRequirement rebootRequired() { } /** - * Set the rebootRequired property: The rebootRequired property. + * Set the rebootRequired property: Indicates whether a reboot is required after the update or operation. Helps + * determine if a system restart is necessary to complete the process. * * @param rebootRequired the rebootRequired value to set. * @return the UpdateProperties object itself. @@ -382,7 +394,7 @@ public UpdateProperties withPackagePath(String packagePath) { * * @return the packageSizeInMb value. */ - public Float packageSizeInMb() { + public Double packageSizeInMb() { return this.packageSizeInMb; } @@ -393,7 +405,7 @@ public Float packageSizeInMb() { * @param packageSizeInMb the packageSizeInMb value to set. * @return the UpdateProperties object itself. */ - public UpdateProperties withPackageSizeInMb(Float packageSizeInMb) { + public UpdateProperties withPackageSizeInMb(Double packageSizeInMb) { this.packageSizeInMb = packageSizeInMb; return this; } @@ -479,7 +491,8 @@ public UpdateProperties withReleaseLink(String releaseLink) { } /** - * Get the availabilityType property: Indicates the way the update content can be downloaded. + * Get the availabilityType property: Indicates how the update content is made available for download. This + * determines whether the update is sourced locally, from an online repository, or requires user notification. * * @return the availabilityType value. */ @@ -488,7 +501,8 @@ public AvailabilityType availabilityType() { } /** - * Set the availabilityType property: Indicates the way the update content can be downloaded. + * Set the availabilityType property: Indicates how the update content is made available for download. This + * determines whether the update is sourced locally, from an online repository, or requires user notification. * * @param availabilityType the availabilityType value to set. * @return the UpdateProperties object itself. @@ -559,7 +573,7 @@ private UpdateStateProperties innerUpdateStateProperties() { * * @return the progressPercentage value. */ - public Float progressPercentage() { + public Double progressPercentage() { return this.innerUpdateStateProperties() == null ? null : this.innerUpdateStateProperties().progressPercentage(); @@ -573,7 +587,7 @@ public Float progressPercentage() { * @param progressPercentage the progressPercentage value to set. * @return the UpdateProperties object itself. */ - public UpdateProperties withProgressPercentage(Float progressPercentage) { + public UpdateProperties withProgressPercentage(Double progressPercentage) { if (this.innerUpdateStateProperties() == null) { this.innerUpdateStateProperties = new UpdateStateProperties(); } @@ -604,26 +618,6 @@ public UpdateProperties withNotifyMessage(String notifyMessage) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (prerequisites() != null) { - prerequisites().forEach(e -> e.validate()); - } - if (componentVersions() != null) { - componentVersions().forEach(e -> e.validate()); - } - if (healthCheckResult() != null) { - healthCheckResult().forEach(e -> e.validate()); - } - if (innerUpdateStateProperties() != null) { - innerUpdateStateProperties().validate(); - } - } - /** * {@inheritDoc} */ @@ -707,7 +701,7 @@ public static UpdateProperties fromJson(JsonReader jsonReader) throws IOExceptio } else if ("packagePath".equals(fieldName)) { deserializedUpdateProperties.packagePath = reader.getString(); } else if ("packageSizeInMb".equals(fieldName)) { - deserializedUpdateProperties.packageSizeInMb = reader.getNullable(JsonReader::getFloat); + deserializedUpdateProperties.packageSizeInMb = reader.getNullable(JsonReader::getDouble); } else if ("displayName".equals(fieldName)) { deserializedUpdateProperties.displayName = reader.getString(); } else if ("version".equals(fieldName)) { diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/UpdateRunInner.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/UpdateRunInner.java index f20578cd3d95..b2ac133a146a 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/UpdateRunInner.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/UpdateRunInner.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.fluent.models; @@ -22,14 +22,14 @@ @Fluent public final class UpdateRunInner extends ProxyResource { /* - * The geo-location where the resource lives + * Describes Update Run Properties. */ - private String location; + private UpdateRunProperties innerProperties; /* - * Describes Update Run Properties. + * The geo-location where the resource lives */ - private UpdateRunProperties innerProperties; + private String location; /* * Azure Resource Manager metadata containing createdBy and modifiedBy information. @@ -37,9 +37,9 @@ public final class UpdateRunInner extends ProxyResource { private SystemData systemData; /* - * Fully qualified resource Id for the resource. + * The type of the resource. */ - private String id; + private String type; /* * The name of the resource. @@ -47,9 +47,9 @@ public final class UpdateRunInner extends ProxyResource { private String name; /* - * The type of the resource. + * Fully qualified resource Id for the resource. */ - private String type; + private String id; /** * Creates an instance of UpdateRunInner class. @@ -57,6 +57,15 @@ public final class UpdateRunInner extends ProxyResource { public UpdateRunInner() { } + /** + * Get the innerProperties property: Describes Update Run Properties. + * + * @return the innerProperties value. + */ + private UpdateRunProperties innerProperties() { + return this.innerProperties; + } + /** * Get the location property: The geo-location where the resource lives. * @@ -77,15 +86,6 @@ public UpdateRunInner withLocation(String location) { return this; } - /** - * Get the innerProperties property: Describes Update Run Properties. - * - * @return the innerProperties value. - */ - private UpdateRunProperties innerProperties() { - return this.innerProperties; - } - /** * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. * @@ -96,13 +96,13 @@ public SystemData systemData() { } /** - * Get the id property: Fully qualified resource Id for the resource. + * Get the type property: The type of the resource. * - * @return the id value. + * @return the type value. */ @Override - public String id() { - return this.id; + public String type() { + return this.type; } /** @@ -116,17 +116,18 @@ public String name() { } /** - * Get the type property: The type of the resource. + * Get the id property: Fully qualified resource Id for the resource. * - * @return the type value. + * @return the id value. */ @Override - public String type() { - return this.type; + public String id() { + return this.id; } /** - * Get the provisioningState property: Provisioning state of the UpdateRuns proxy resource. + * Get the provisioningState property: Provisioning state of the UpdateRuns proxy resource. Indicates the current + * lifecycle status of the update operation, such as whether it has been accepted, is in progress, or has completed. * * @return the provisioningState value. */ @@ -204,7 +205,8 @@ public UpdateRunInner withDuration(String duration) { } /** - * Get the state property: State of the update run. + * Get the state property: Represents the current state of the update run. Indicates whether the update is in + * progress, has completed successfully, failed, or is in an unknown state. * * @return the state value. */ @@ -213,7 +215,8 @@ public UpdateRunPropertiesState state() { } /** - * Set the state property: State of the update run. + * Set the state property: Represents the current state of the update run. Indicates whether the update is in + * progress, has completed successfully, failed, or is in an unknown state. * * @param state the state value to set. * @return the UpdateRunInner object itself. @@ -437,25 +440,14 @@ public UpdateRunInner withSteps(List steps) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (innerProperties() != null) { - innerProperties().validate(); - } - } - /** * {@inheritDoc} */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); - jsonWriter.writeStringField("location", this.location); jsonWriter.writeJsonField("properties", this.innerProperties); + jsonWriter.writeStringField("location", this.location); return jsonWriter.writeEndObject(); } @@ -481,10 +473,10 @@ public static UpdateRunInner fromJson(JsonReader jsonReader) throws IOException deserializedUpdateRunInner.name = reader.getString(); } else if ("type".equals(fieldName)) { deserializedUpdateRunInner.type = reader.getString(); - } else if ("location".equals(fieldName)) { - deserializedUpdateRunInner.location = reader.getString(); } else if ("properties".equals(fieldName)) { deserializedUpdateRunInner.innerProperties = UpdateRunProperties.fromJson(reader); + } else if ("location".equals(fieldName)) { + deserializedUpdateRunInner.location = reader.getString(); } else if ("systemData".equals(fieldName)) { deserializedUpdateRunInner.systemData = SystemData.fromJson(reader); } else { diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/UpdateRunProperties.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/UpdateRunProperties.java index d594f9b7c4cb..c8760917e5a9 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/UpdateRunProperties.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/UpdateRunProperties.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.fluent.models; @@ -23,7 +23,8 @@ @Fluent public final class UpdateRunProperties implements JsonSerializable { /* - * Provisioning state of the UpdateRuns proxy resource. + * Provisioning state of the UpdateRuns proxy resource. Indicates the current lifecycle status of the update + * operation, such as whether it has been accepted, is in progress, or has completed. */ private ProvisioningState provisioningState; @@ -43,7 +44,8 @@ public final class UpdateRunProperties implements JsonSerializable steps) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (innerProgress() != null) { - innerProgress().validate(); - } - } - /** * {@inheritDoc} */ diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/UpdateStateProperties.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/UpdateStateProperties.java index 17f7f7fe9a7a..4d58b9ada0b3 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/UpdateStateProperties.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/UpdateStateProperties.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.fluent.models; @@ -21,7 +21,7 @@ public final class UpdateStateProperties implements JsonSerializable { /* - * Provisioning state of the UpdateSummaries proxy resource. + * Provisioning state of the UpdateSummaries proxy resource. Indicates the current lifecycle status of the update + * summary operation, such as whether it has been accepted, is in progress, or has completed. */ private ProvisioningState provisioningState; @@ -86,7 +87,8 @@ public final class UpdateSummariesProperties implements JsonSerializable e.validate()); - } - if (healthCheckResult() != null) { - healthCheckResult().forEach(e -> e.validate()); - } - } - /** * {@inheritDoc} */ diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/ValidateResponseInner.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/ValidateResponseInner.java index 14b31c03c549..661a029011c4 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/ValidateResponseInner.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/ValidateResponseInner.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.fluent.models; @@ -24,7 +24,7 @@ public final class ValidateResponseInner implements JsonSerializable { - PublisherInner deserializedPublisherInner = new PublisherInner(); + ValidatedSolutionRecipeInner deserializedValidatedSolutionRecipeInner = new ValidatedSolutionRecipeInner(); while (reader.nextToken() != JsonToken.END_OBJECT) { String fieldName = reader.getFieldName(); reader.nextToken(); if ("id".equals(fieldName)) { - deserializedPublisherInner.id = reader.getString(); + deserializedValidatedSolutionRecipeInner.id = reader.getString(); } else if ("name".equals(fieldName)) { - deserializedPublisherInner.name = reader.getString(); + deserializedValidatedSolutionRecipeInner.name = reader.getString(); } else if ("type".equals(fieldName)) { - deserializedPublisherInner.type = reader.getString(); + deserializedValidatedSolutionRecipeInner.type = reader.getString(); } else if ("properties".equals(fieldName)) { - deserializedPublisherInner.innerProperties = PublisherProperties.fromJson(reader); + deserializedValidatedSolutionRecipeInner.properties + = ValidatedSolutionRecipeProperties.fromJson(reader); } else if ("systemData".equals(fieldName)) { - deserializedPublisherInner.systemData = SystemData.fromJson(reader); + deserializedValidatedSolutionRecipeInner.systemData = SystemData.fromJson(reader); } else { reader.skipChildren(); } } - return deserializedPublisherInner; + return deserializedValidatedSolutionRecipeInner; }); } } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/package-info.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/package-info.java index 611f7358c042..45bdd7fe0a07 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/package-info.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/package-info.java @@ -1,9 +1,9 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. /** - * Package containing the inner data models for AzureStackHciClient. - * Azure Stack HCI management service. + * Package containing the inner data models for AzureStackHci. + * Azure Stack HCI service. */ package com.azure.resourcemanager.azurestackhci.fluent.models; diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/package-info.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/package-info.java index d0573888c104..8e41b1eda8bc 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/package-info.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/package-info.java @@ -1,9 +1,9 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. /** - * Package containing the service clients for AzureStackHciClient. - * Azure Stack HCI management service. + * Package containing the service clients for AzureStackHci. + * Azure Stack HCI service. */ package com.azure.resourcemanager.azurestackhci.fluent; diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/ArcIdentityResponseImpl.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/ArcIdentityResponseImpl.java index 54ac1517757b..1ccf2b2cfa32 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/ArcIdentityResponseImpl.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/ArcIdentityResponseImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.implementation; diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/ArcSettingImpl.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/ArcSettingImpl.java index 36a7f582212d..bd4044e53962 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/ArcSettingImpl.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/ArcSettingImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.implementation; @@ -8,6 +8,7 @@ import com.azure.core.management.SystemData; import com.azure.core.util.Context; import com.azure.resourcemanager.azurestackhci.fluent.models.ArcSettingInner; +import com.azure.resourcemanager.azurestackhci.models.ArcConnectivityProperties; import com.azure.resourcemanager.azurestackhci.models.ArcIdentityResponse; import com.azure.resourcemanager.azurestackhci.models.ArcSetting; import com.azure.resourcemanager.azurestackhci.models.ArcSettingAggregateState; @@ -16,6 +17,7 @@ import com.azure.resourcemanager.azurestackhci.models.PasswordCredential; import com.azure.resourcemanager.azurestackhci.models.PerNodeState; import com.azure.resourcemanager.azurestackhci.models.ProvisioningState; +import com.azure.resourcemanager.azurestackhci.models.ReconcileArcSettingsRequest; import java.util.Collections; import java.util.List; import java.util.Map; @@ -78,7 +80,7 @@ public List perNodeDetails() { } } - public Object connectivityProperties() { + public ArcConnectivityProperties connectivityProperties() { return this.innerModel().connectivityProperties(); } @@ -202,6 +204,16 @@ public ArcIdentityResponse createIdentity(Context context) { return serviceManager.arcSettings().createIdentity(resourceGroupName, clusterName, arcSettingName, context); } + public ArcSetting reconcile(ReconcileArcSettingsRequest reconcileArcSettingsRequest) { + return serviceManager.arcSettings() + .reconcile(resourceGroupName, clusterName, arcSettingName, reconcileArcSettingsRequest); + } + + public ArcSetting reconcile(ReconcileArcSettingsRequest reconcileArcSettingsRequest, Context context) { + return serviceManager.arcSettings() + .reconcile(resourceGroupName, clusterName, arcSettingName, reconcileArcSettingsRequest, context); + } + public Response consentAndInstallDefaultExtensionsWithResponse(Context context) { return serviceManager.arcSettings() .consentAndInstallDefaultExtensionsWithResponse(resourceGroupName, clusterName, arcSettingName, context); @@ -245,7 +257,7 @@ public ArcSettingImpl withArcApplicationObjectId(String arcApplicationObjectId) return this; } - public ArcSettingImpl withConnectivityProperties(Object connectivityProperties) { + public ArcSettingImpl withConnectivityProperties(ArcConnectivityProperties connectivityProperties) { if (isInCreateMode()) { this.innerModel().withConnectivityProperties(connectivityProperties); return this; @@ -261,6 +273,6 @@ public ArcSettingImpl withTags(Map tags) { } private boolean isInCreateMode() { - return this.innerModel().id() == null; + return this.innerModel() == null || this.innerModel().id() == null; } } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/ArcSettingsClientImpl.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/ArcSettingsClientImpl.java index aec4711584ef..926f535902e2 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/ArcSettingsClientImpl.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/ArcSettingsClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.implementation; @@ -29,6 +29,7 @@ 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; @@ -37,8 +38,9 @@ import com.azure.resourcemanager.azurestackhci.fluent.models.ArcIdentityResponseInner; import com.azure.resourcemanager.azurestackhci.fluent.models.ArcSettingInner; import com.azure.resourcemanager.azurestackhci.fluent.models.PasswordCredentialInner; -import com.azure.resourcemanager.azurestackhci.models.ArcSettingList; +import com.azure.resourcemanager.azurestackhci.implementation.models.ArcSettingList; import com.azure.resourcemanager.azurestackhci.models.ArcSettingsPatch; +import com.azure.resourcemanager.azurestackhci.models.ReconcileArcSettingsRequest; import java.nio.ByteBuffer; import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; @@ -55,265 +57,225 @@ public final class ArcSettingsClientImpl implements ArcSettingsClient { /** * The service client containing this operation class. */ - private final AzureStackHciClientImpl client; + private final AzureStackHciManagementClientImpl client; /** * Initializes an instance of ArcSettingsClientImpl. * * @param client the instance of the service client containing this operation class. */ - ArcSettingsClientImpl(AzureStackHciClientImpl client) { + ArcSettingsClientImpl(AzureStackHciManagementClientImpl client) { this.service = RestProxy.create(ArcSettingsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for AzureStackHciClientArcSettings to be used by the proxy service to - * perform REST calls. + * The interface defining all the services for AzureStackHciManagementClientArcSettings to be used by the proxy + * service to perform REST calls. */ - @Host("{$host}") - @ServiceInterface(name = "AzureStackHciClientA") + @Host("{endpoint}") + @ServiceInterface(name = "AzureStackHciManagementClientArcSettings") public interface ArcSettingsService { @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/clusters/{clusterName}/arcSettings") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/clusters/{clusterName}/arcSettings/{arcSettingName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByCluster(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono> get(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("clusterName") String clusterName, - @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + @PathParam("arcSettingName") String arcSettingName, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/clusters/{clusterName}/arcSettings/{arcSettingName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Response getSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("clusterName") String clusterName, - @PathParam("arcSettingName") String arcSettingName, @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, Context context); + @PathParam("arcSettingName") String arcSettingName, @HeaderParam("Accept") String accept, Context context); - @Headers({ "Content-Type: application/json" }) @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/clusters/{clusterName}/arcSettings/{arcSettingName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> create(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono> create(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("clusterName") String clusterName, - @PathParam("arcSettingName") String arcSettingName, @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") ArcSettingInner arcSetting, @HeaderParam("Accept") String accept, + @PathParam("arcSettingName") String arcSettingName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") ArcSettingInner arcSetting, + Context context); + + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/clusters/{clusterName}/arcSettings/{arcSettingName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response createSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("clusterName") String clusterName, + @PathParam("arcSettingName") String arcSettingName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") ArcSettingInner arcSetting, Context context); - @Headers({ "Content-Type: application/json" }) @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/clusters/{clusterName}/arcSettings/{arcSettingName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> update(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono> update(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("clusterName") String clusterName, - @PathParam("arcSettingName") String arcSettingName, @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") ArcSettingsPatch arcSetting, @HeaderParam("Accept") String accept, + @PathParam("arcSettingName") String arcSettingName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") ArcSettingsPatch arcSetting, Context context); - @Headers({ "Content-Type: application/json" }) + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/clusters/{clusterName}/arcSettings/{arcSettingName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response updateSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("clusterName") String clusterName, + @PathParam("arcSettingName") String arcSettingName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") ArcSettingsPatch arcSetting, + Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/clusters/{clusterName}/arcSettings/{arcSettingName}") @ExpectedResponses({ 200, 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono>> delete(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("clusterName") String clusterName, + @PathParam("arcSettingName") String arcSettingName, Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/clusters/{clusterName}/arcSettings/{arcSettingName}") + @ExpectedResponses({ 200, 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("clusterName") String clusterName, + @PathParam("arcSettingName") String arcSettingName, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/clusters/{clusterName}/arcSettings") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByCluster(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("clusterName") String clusterName, - @PathParam("arcSettingName") String arcSettingName, @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) - @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/clusters/{clusterName}/arcSettings/{arcSettingName}/generatePassword") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/clusters/{clusterName}/arcSettings") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> generatePassword(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Response listByClusterSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("clusterName") String clusterName, - @PathParam("arcSettingName") String arcSettingName, @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/clusters/{clusterName}/arcSettings/{arcSettingName}/generatePassword") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> generatePassword(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("clusterName") String clusterName, + @PathParam("arcSettingName") String arcSettingName, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/clusters/{clusterName}/arcSettings/{arcSettingName}/generatePassword") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response generatePasswordSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("clusterName") String clusterName, + @PathParam("arcSettingName") String arcSettingName, @HeaderParam("Accept") String accept, Context context); + @Headers({ "Content-Type: application/json" }) @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/clusters/{clusterName}/arcSettings/{arcSettingName}/createArcIdentity") @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> createIdentity(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono>> createIdentity(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("clusterName") String clusterName, - @PathParam("arcSettingName") String arcSettingName, @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, Context context); + @PathParam("arcSettingName") String arcSettingName, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/clusters/{clusterName}/arcSettings/{arcSettingName}/createArcIdentity") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response createIdentitySync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("clusterName") String clusterName, + @PathParam("arcSettingName") String arcSettingName, @HeaderParam("Accept") String accept, Context context); + + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/clusters/{clusterName}/arcSettings/{arcSettingName}/reconcile") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> reconcile(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("clusterName") String clusterName, + @PathParam("arcSettingName") String arcSettingName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, + @BodyParam("application/json") ReconcileArcSettingsRequest reconcileArcSettingsRequest, Context context); + + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/clusters/{clusterName}/arcSettings/{arcSettingName}/reconcile") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response reconcileSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("clusterName") String clusterName, + @PathParam("arcSettingName") String arcSettingName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, + @BodyParam("application/json") ReconcileArcSettingsRequest reconcileArcSettingsRequest, Context context); @Headers({ "Content-Type: application/json" }) @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/clusters/{clusterName}/arcSettings/{arcSettingName}/consentAndInstallDefaultExtensions") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> consentAndInstallDefaultExtensions(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono> consentAndInstallDefaultExtensions(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("clusterName") String clusterName, - @PathParam("arcSettingName") String arcSettingName, @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, Context context); + @PathParam("arcSettingName") String arcSettingName, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/clusters/{clusterName}/arcSettings/{arcSettingName}/consentAndInstallDefaultExtensions") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response consentAndInstallDefaultExtensionsSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("clusterName") String clusterName, + @PathParam("arcSettingName") String arcSettingName, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/clusters/{clusterName}/arcSettings/{arcSettingName}/initializeDisableProcess") @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> initializeDisableProcess(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono>> initializeDisableProcess(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("clusterName") String clusterName, - @PathParam("arcSettingName") String arcSettingName, @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, Context context); + @PathParam("arcSettingName") String arcSettingName, Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/clusters/{clusterName}/arcSettings/{arcSettingName}/initializeDisableProcess") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response initializeDisableProcessSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("clusterName") String clusterName, + @PathParam("arcSettingName") String arcSettingName, Context context); @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByClusterNext(@PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); - } + @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); - /** - * Get ArcSetting resources of HCI Cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterName The name of the cluster. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return arcSetting resources of HCI Cluster along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByClusterSinglePageAsync(String resourceGroupName, - String clusterName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (clusterName == null) { - return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listByCluster(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, clusterName, this.client.getApiVersion(), 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 ArcSetting resources of HCI Cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterName The name of the cluster. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return arcSetting resources of HCI Cluster along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByClusterSinglePageAsync(String resourceGroupName, - String clusterName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (clusterName == null) { - return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .listByCluster(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, clusterName, - this.client.getApiVersion(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * Get ArcSetting resources of HCI Cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterName The name of the cluster. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return arcSetting resources of HCI Cluster as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByClusterAsync(String resourceGroupName, String clusterName) { - return new PagedFlux<>(() -> listByClusterSinglePageAsync(resourceGroupName, clusterName), - nextLink -> listByClusterNextSinglePageAsync(nextLink)); - } - - /** - * Get ArcSetting resources of HCI Cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterName The name of the cluster. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return arcSetting resources of HCI Cluster as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByClusterAsync(String resourceGroupName, String clusterName, - Context context) { - return new PagedFlux<>(() -> listByClusterSinglePageAsync(resourceGroupName, clusterName, context), - nextLink -> listByClusterNextSinglePageAsync(nextLink, context)); - } - - /** - * Get ArcSetting resources of HCI Cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterName The name of the cluster. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return arcSetting resources of HCI Cluster as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByCluster(String resourceGroupName, String clusterName) { - return new PagedIterable<>(listByClusterAsync(resourceGroupName, clusterName)); - } - - /** - * Get ArcSetting resources of HCI Cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterName The name of the cluster. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return arcSetting resources of HCI Cluster as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByCluster(String resourceGroupName, String clusterName, Context context) { - return new PagedIterable<>(listByClusterAsync(resourceGroupName, clusterName, context)); + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listByClusterNextSync(@PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); } /** @@ -331,71 +293,13 @@ public PagedIterable listByCluster(String resourceGroupName, St @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync(String resourceGroupName, String clusterName, String arcSettingName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (clusterName == null) { - return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); - } - if (arcSettingName == null) { - return Mono.error(new IllegalArgumentException("Parameter arcSettingName is required and cannot be null.")); - } final String accept = "application/json"; return FluxUtil - .withContext(context -> service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, clusterName, arcSettingName, this.client.getApiVersion(), accept, context)) + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, clusterName, arcSettingName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } - /** - * Get ArcSetting resource details of HCI Cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterName The name of the cluster. - * @param arcSettingName The name of the proxy resource holding details of HCI ArcSetting information. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return arcSetting resource details of HCI Cluster along with {@link Response} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, String clusterName, - String arcSettingName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (clusterName == null) { - return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); - } - if (arcSettingName == null) { - return Mono.error(new IllegalArgumentException("Parameter arcSettingName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, clusterName, - arcSettingName, this.client.getApiVersion(), accept, context); - } - /** * Get ArcSetting resource details of HCI Cluster. * @@ -428,7 +332,9 @@ private Mono getAsync(String resourceGroupName, String clusterN @ServiceMethod(returns = ReturnType.SINGLE) public Response getWithResponse(String resourceGroupName, String clusterName, String arcSettingName, Context context) { - return getWithResponseAsync(resourceGroupName, clusterName, arcSettingName, context).block(); + final String accept = "application/json"; + return service.getSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, clusterName, arcSettingName, accept, context); } /** @@ -462,82 +368,15 @@ public ArcSettingInner get(String resourceGroupName, String clusterName, String @ServiceMethod(returns = ReturnType.SINGLE) private Mono> createWithResponseAsync(String resourceGroupName, String clusterName, String arcSettingName, ArcSettingInner arcSetting) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (clusterName == null) { - return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); - } - if (arcSettingName == null) { - return Mono.error(new IllegalArgumentException("Parameter arcSettingName is required and cannot be null.")); - } - if (arcSetting == null) { - return Mono.error(new IllegalArgumentException("Parameter arcSetting is required and cannot be null.")); - } else { - arcSetting.validate(); - } + final String contentType = "application/json"; final String accept = "application/json"; return FluxUtil - .withContext( - context -> service.create(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - clusterName, arcSettingName, this.client.getApiVersion(), arcSetting, accept, context)) + .withContext(context -> service.create(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, clusterName, arcSettingName, contentType, accept, + arcSetting, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } - /** - * Create ArcSetting for HCI cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterName The name of the cluster. - * @param arcSettingName The name of the proxy resource holding details of HCI ArcSetting information. - * @param arcSetting Parameters supplied to the Create ArcSetting resource for this HCI cluster. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return arcSetting details along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createWithResponseAsync(String resourceGroupName, String clusterName, - String arcSettingName, ArcSettingInner arcSetting, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (clusterName == null) { - return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); - } - if (arcSettingName == null) { - return Mono.error(new IllegalArgumentException("Parameter arcSettingName is required and cannot be null.")); - } - if (arcSetting == null) { - return Mono.error(new IllegalArgumentException("Parameter arcSetting is required and cannot be null.")); - } else { - arcSetting.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.create(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - clusterName, arcSettingName, this.client.getApiVersion(), arcSetting, accept, context); - } - /** * Create ArcSetting for HCI cluster. * @@ -573,7 +412,11 @@ private Mono createAsync(String resourceGroupName, String clust @ServiceMethod(returns = ReturnType.SINGLE) public Response createWithResponse(String resourceGroupName, String clusterName, String arcSettingName, ArcSettingInner arcSetting, Context context) { - return createWithResponseAsync(resourceGroupName, clusterName, arcSettingName, arcSetting, context).block(); + final String contentType = "application/json"; + final String accept = "application/json"; + return service.createSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, clusterName, arcSettingName, contentType, accept, + arcSetting, context); } /** @@ -609,82 +452,15 @@ public ArcSettingInner create(String resourceGroupName, String clusterName, Stri @ServiceMethod(returns = ReturnType.SINGLE) private Mono> updateWithResponseAsync(String resourceGroupName, String clusterName, String arcSettingName, ArcSettingsPatch arcSetting) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (clusterName == null) { - return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); - } - if (arcSettingName == null) { - return Mono.error(new IllegalArgumentException("Parameter arcSettingName is required and cannot be null.")); - } - if (arcSetting == null) { - return Mono.error(new IllegalArgumentException("Parameter arcSetting is required and cannot be null.")); - } else { - arcSetting.validate(); - } + final String contentType = "application/json"; final String accept = "application/json"; return FluxUtil - .withContext( - context -> service.update(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - clusterName, arcSettingName, this.client.getApiVersion(), arcSetting, accept, context)) + .withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, clusterName, arcSettingName, contentType, accept, + arcSetting, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } - /** - * Update ArcSettings for HCI cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterName The name of the cluster. - * @param arcSettingName The name of the proxy resource holding details of HCI ArcSetting information. - * @param arcSetting ArcSettings parameters that needs to be updated. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return arcSetting details along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> updateWithResponseAsync(String resourceGroupName, String clusterName, - String arcSettingName, ArcSettingsPatch arcSetting, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (clusterName == null) { - return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); - } - if (arcSettingName == null) { - return Mono.error(new IllegalArgumentException("Parameter arcSettingName is required and cannot be null.")); - } - if (arcSetting == null) { - return Mono.error(new IllegalArgumentException("Parameter arcSetting is required and cannot be null.")); - } else { - arcSetting.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.update(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - clusterName, arcSettingName, this.client.getApiVersion(), arcSetting, accept, context); - } - /** * Update ArcSettings for HCI cluster. * @@ -720,7 +496,11 @@ private Mono updateAsync(String resourceGroupName, String clust @ServiceMethod(returns = ReturnType.SINGLE) public Response updateWithResponse(String resourceGroupName, String clusterName, String arcSettingName, ArcSettingsPatch arcSetting, Context context) { - return updateWithResponseAsync(resourceGroupName, clusterName, arcSettingName, arcSetting, context).block(); + final String contentType = "application/json"; + final String accept = "application/json"; + return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, clusterName, arcSettingName, contentType, accept, + arcSetting, context); } /** @@ -755,28 +535,9 @@ public ArcSettingInner update(String resourceGroupName, String clusterName, Stri @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> deleteWithResponseAsync(String resourceGroupName, String clusterName, String arcSettingName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (clusterName == null) { - return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); - } - if (arcSettingName == null) { - return Mono.error(new IllegalArgumentException("Parameter arcSettingName is required and cannot be null.")); - } - final String accept = "application/json"; return FluxUtil - .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, clusterName, arcSettingName, this.client.getApiVersion(), accept, context)) + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, clusterName, arcSettingName, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -786,37 +547,16 @@ private Mono>> deleteWithResponseAsync(String resource * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param arcSettingName The name of the proxy resource holding details of HCI ArcSetting information. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync(String resourceGroupName, String clusterName, - String arcSettingName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (clusterName == null) { - return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); - } - if (arcSettingName == null) { - return Mono.error(new IllegalArgumentException("Parameter arcSettingName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - clusterName, arcSettingName, this.client.getApiVersion(), accept, context); + private Response deleteWithResponse(String resourceGroupName, String clusterName, + String arcSettingName) { + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, clusterName, arcSettingName, Context.NONE); } /** @@ -825,17 +565,17 @@ private Mono>> deleteWithResponseAsync(String resource * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param arcSettingName The name of the proxy resource holding details of HCI ArcSetting information. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. + * @return the response body along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String clusterName, - String arcSettingName) { - Mono>> mono = deleteWithResponseAsync(resourceGroupName, clusterName, arcSettingName); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - this.client.getContext()); + @ServiceMethod(returns = ReturnType.SINGLE) + private Response deleteWithResponse(String resourceGroupName, String clusterName, String arcSettingName, + Context context) { + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, clusterName, arcSettingName, context); } /** @@ -844,7 +584,6 @@ private PollerFlux, Void> beginDeleteAsync(String resourceGroup * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param arcSettingName The name of the proxy resource holding details of HCI ArcSetting information. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -852,12 +591,10 @@ private PollerFlux, Void> beginDeleteAsync(String resourceGroup */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String clusterName, - String arcSettingName, Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = deleteWithResponseAsync(resourceGroupName, clusterName, arcSettingName, context); + String arcSettingName) { + Mono>> mono = deleteWithResponseAsync(resourceGroupName, clusterName, arcSettingName); return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - context); + this.client.getContext()); } /** @@ -874,7 +611,8 @@ private PollerFlux, Void> beginDeleteAsync(String resourceGroup @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete(String resourceGroupName, String clusterName, String arcSettingName) { - return this.beginDeleteAsync(resourceGroupName, clusterName, arcSettingName).getSyncPoller(); + Response response = deleteWithResponse(resourceGroupName, clusterName, arcSettingName); + return this.client.getLroResult(response, Void.class, Void.class, Context.NONE); } /** @@ -892,7 +630,8 @@ public SyncPoller, Void> beginDelete(String resourceGroupName, @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete(String resourceGroupName, String clusterName, String arcSettingName, Context context) { - return this.beginDeleteAsync(resourceGroupName, clusterName, arcSettingName, context).getSyncPoller(); + Response response = deleteWithResponse(resourceGroupName, clusterName, arcSettingName, context); + return this.client.getLroResult(response, Void.class, Void.class, context); } /** @@ -912,6 +651,21 @@ private Mono deleteAsync(String resourceGroupName, String clusterName, Str .flatMap(this.client::getLroFinalResultOrError); } + /** + * Delete ArcSetting resource details of HCI Cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param arcSettingName The name of the proxy resource holding details of HCI ArcSetting information. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @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 clusterName, String arcSettingName) { + beginDelete(resourceGroupName, clusterName, arcSettingName).getFinalResult(); + } + /** * Delete ArcSetting resource details of HCI Cluster. * @@ -922,83 +676,122 @@ private Mono deleteAsync(String resourceGroupName, String clusterName, Str * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String clusterName, String arcSettingName, - Context context) { - return beginDeleteAsync(resourceGroupName, clusterName, arcSettingName, context).last() - .flatMap(this.client::getLroFinalResultOrError); + public void delete(String resourceGroupName, String clusterName, String arcSettingName, Context context) { + beginDelete(resourceGroupName, clusterName, arcSettingName, context).getFinalResult(); + } + + /** + * Get ArcSetting resources of HCI Cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return arcSetting resources of HCI Cluster along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByClusterSinglePageAsync(String resourceGroupName, + String clusterName) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listByCluster(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, clusterName, accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get ArcSetting resources of HCI Cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return arcSetting resources of HCI Cluster as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByClusterAsync(String resourceGroupName, String clusterName) { + return new PagedFlux<>(() -> listByClusterSinglePageAsync(resourceGroupName, clusterName), + nextLink -> listByClusterNextSinglePageAsync(nextLink)); + } + + /** + * Get ArcSetting resources of HCI Cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return arcSetting resources of HCI Cluster along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByClusterSinglePage(String resourceGroupName, String clusterName) { + final String accept = "application/json"; + Response res = service.listByClusterSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, clusterName, accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * Delete ArcSetting resource details of HCI Cluster. + * Get ArcSetting resources of HCI Cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. - * @param arcSettingName The name of the proxy resource holding details of HCI ArcSetting information. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return arcSetting resources of HCI Cluster along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String clusterName, String arcSettingName) { - deleteAsync(resourceGroupName, clusterName, arcSettingName).block(); + private PagedResponse listByClusterSinglePage(String resourceGroupName, String clusterName, + Context context) { + final String accept = "application/json"; + Response res = service.listByClusterSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, clusterName, accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * Delete ArcSetting resource details of HCI Cluster. + * Get ArcSetting resources of HCI Cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. - * @param arcSettingName The name of the proxy resource holding details of HCI ArcSetting information. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return arcSetting resources of HCI Cluster as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String clusterName, String arcSettingName, Context context) { - deleteAsync(resourceGroupName, clusterName, arcSettingName, context).block(); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByCluster(String resourceGroupName, String clusterName) { + return new PagedIterable<>(() -> listByClusterSinglePage(resourceGroupName, clusterName), + nextLink -> listByClusterNextSinglePage(nextLink)); } /** - * Generate password for arc settings. + * Get ArcSetting resources of HCI Cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. - * @param arcSettingName The name of the proxy resource holding details of HCI ArcSetting information. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown 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} on successful completion of {@link Mono}. + * @return arcSetting resources of HCI Cluster as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> generatePasswordWithResponseAsync(String resourceGroupName, - String clusterName, String arcSettingName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (clusterName == null) { - return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); - } - if (arcSettingName == null) { - return Mono.error(new IllegalArgumentException("Parameter arcSettingName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.generatePassword(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, clusterName, arcSettingName, this.client.getApiVersion(), accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByCluster(String resourceGroupName, String clusterName, Context context) { + return new PagedIterable<>(() -> listByClusterSinglePage(resourceGroupName, clusterName, context), + nextLink -> listByClusterNextSinglePage(nextLink, context)); } /** @@ -1007,7 +800,6 @@ private Mono> generatePasswordWithResponseAsyn * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param arcSettingName The name of the proxy resource holding details of HCI ArcSetting information. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -1015,29 +807,12 @@ private Mono> generatePasswordWithResponseAsyn */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> generatePasswordWithResponseAsync(String resourceGroupName, - String clusterName, String arcSettingName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (clusterName == null) { - return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); - } - if (arcSettingName == null) { - return Mono.error(new IllegalArgumentException("Parameter arcSettingName is required and cannot be null.")); - } + String clusterName, String arcSettingName) { final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.generatePassword(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - clusterName, arcSettingName, this.client.getApiVersion(), accept, context); + return FluxUtil + .withContext(context -> service.generatePassword(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, clusterName, arcSettingName, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** @@ -1073,7 +848,9 @@ private Mono generatePasswordAsync(String resourceGroup @ServiceMethod(returns = ReturnType.SINGLE) public Response generatePasswordWithResponse(String resourceGroupName, String clusterName, String arcSettingName, Context context) { - return generatePasswordWithResponseAsync(resourceGroupName, clusterName, arcSettingName, context).block(); + final String accept = "application/json"; + return service.generatePasswordSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, clusterName, arcSettingName, accept, context); } /** @@ -1102,33 +879,15 @@ public PasswordCredentialInner generatePassword(String resourceGroupName, String * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return arcIdentity details along with {@link Response} on successful completion of {@link Mono}. + * @return the response body along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> createIdentityWithResponseAsync(String resourceGroupName, String clusterName, String arcSettingName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (clusterName == null) { - return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); - } - if (arcSettingName == null) { - return Mono.error(new IllegalArgumentException("Parameter arcSettingName is required and cannot be null.")); - } final String accept = "application/json"; return FluxUtil - .withContext(context -> service.createIdentity(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, clusterName, arcSettingName, this.client.getApiVersion(), accept, context)) + .withContext(context -> service.createIdentity(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, clusterName, arcSettingName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -1138,37 +897,17 @@ private Mono>> createIdentityWithResponseAsync(String * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param arcSettingName The name of the proxy resource holding details of HCI ArcSetting information. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return arcIdentity details along with {@link Response} on successful completion of {@link Mono}. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createIdentityWithResponseAsync(String resourceGroupName, - String clusterName, String arcSettingName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (clusterName == null) { - return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); - } - if (arcSettingName == null) { - return Mono.error(new IllegalArgumentException("Parameter arcSettingName is required and cannot be null.")); - } + private Response createIdentityWithResponse(String resourceGroupName, String clusterName, + String arcSettingName) { final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.createIdentity(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - clusterName, arcSettingName, this.client.getApiVersion(), accept, context); + return service.createIdentitySync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, clusterName, arcSettingName, accept, Context.NONE); } /** @@ -1177,19 +916,18 @@ private Mono>> createIdentityWithResponseAsync(String * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param arcSettingName The name of the proxy resource holding details of HCI ArcSetting information. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of arcIdentity details. + * @return the response body along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, ArcIdentityResponseInner> - beginCreateIdentityAsync(String resourceGroupName, String clusterName, String arcSettingName) { - Mono>> mono - = createIdentityWithResponseAsync(resourceGroupName, clusterName, arcSettingName); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), ArcIdentityResponseInner.class, ArcIdentityResponseInner.class, - this.client.getContext()); + @ServiceMethod(returns = ReturnType.SINGLE) + private Response createIdentityWithResponse(String resourceGroupName, String clusterName, + String arcSettingName, Context context) { + final String accept = "application/json"; + return service.createIdentitySync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, clusterName, arcSettingName, accept, context); } /** @@ -1198,20 +936,19 @@ private Mono>> createIdentityWithResponseAsync(String * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param arcSettingName The name of the proxy resource holding details of HCI ArcSetting information. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of arcIdentity details. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, ArcIdentityResponseInner> - beginCreateIdentityAsync(String resourceGroupName, String clusterName, String arcSettingName, Context context) { - context = this.client.mergeContext(context); + beginCreateIdentityAsync(String resourceGroupName, String clusterName, String arcSettingName) { Mono>> mono - = createIdentityWithResponseAsync(resourceGroupName, clusterName, arcSettingName, context); + = createIdentityWithResponseAsync(resourceGroupName, clusterName, arcSettingName); return this.client.getLroResult(mono, - this.client.getHttpPipeline(), ArcIdentityResponseInner.class, ArcIdentityResponseInner.class, context); + this.client.getHttpPipeline(), ArcIdentityResponseInner.class, ArcIdentityResponseInner.class, + this.client.getContext()); } /** @@ -1223,12 +960,14 @@ private Mono>> createIdentityWithResponseAsync(String * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of arcIdentity details. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, ArcIdentityResponseInner> beginCreateIdentity(String resourceGroupName, String clusterName, String arcSettingName) { - return this.beginCreateIdentityAsync(resourceGroupName, clusterName, arcSettingName).getSyncPoller(); + Response response = createIdentityWithResponse(resourceGroupName, clusterName, arcSettingName); + return this.client.getLroResult(response, + ArcIdentityResponseInner.class, ArcIdentityResponseInner.class, Context.NONE); } /** @@ -1241,12 +980,15 @@ private Mono>> createIdentityWithResponseAsync(String * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of arcIdentity details. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, ArcIdentityResponseInner> beginCreateIdentity(String resourceGroupName, String clusterName, String arcSettingName, Context context) { - return this.beginCreateIdentityAsync(resourceGroupName, clusterName, arcSettingName, context).getSyncPoller(); + Response response + = createIdentityWithResponse(resourceGroupName, clusterName, arcSettingName, context); + return this.client.getLroResult(response, + ArcIdentityResponseInner.class, ArcIdentityResponseInner.class, context); } /** @@ -1258,7 +1000,7 @@ private Mono>> createIdentityWithResponseAsync(String * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return arcIdentity details on successful completion of {@link Mono}. + * @return the response body on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono createIdentityAsync(String resourceGroupName, String clusterName, @@ -1273,17 +1015,15 @@ private Mono createIdentityAsync(String resourceGroupN * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param arcSettingName The name of the proxy resource holding details of HCI ArcSetting information. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return arcIdentity details on successful completion of {@link Mono}. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createIdentityAsync(String resourceGroupName, String clusterName, - String arcSettingName, Context context) { - return beginCreateIdentityAsync(resourceGroupName, clusterName, arcSettingName, context).last() - .flatMap(this.client::getLroFinalResultOrError); + public ArcIdentityResponseInner createIdentity(String resourceGroupName, String clusterName, + String arcSettingName) { + return beginCreateIdentity(resourceGroupName, clusterName, arcSettingName).getFinalResult(); } /** @@ -1292,112 +1032,230 @@ private Mono createIdentityAsync(String resourceGroupN * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param arcSettingName The name of the proxy resource holding details of HCI ArcSetting information. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return arcIdentity details. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ArcIdentityResponseInner createIdentity(String resourceGroupName, String clusterName, - String arcSettingName) { - return createIdentityAsync(resourceGroupName, clusterName, arcSettingName).block(); + public ArcIdentityResponseInner createIdentity(String resourceGroupName, String clusterName, String arcSettingName, + Context context) { + return beginCreateIdentity(resourceGroupName, clusterName, arcSettingName, context).getFinalResult(); } /** - * Create Aad identity for arc settings. + * Reconcile Arc Settings with information related to all nodes. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param arcSettingName The name of the proxy resource holding details of HCI ArcSetting information. + * @param reconcileArcSettingsRequest Request for reconciling Arc Settings. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> reconcileWithResponseAsync(String resourceGroupName, String clusterName, + String arcSettingName, ReconcileArcSettingsRequest reconcileArcSettingsRequest) { + final String contentType = "application/json"; + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.reconcile(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, clusterName, arcSettingName, contentType, accept, + reconcileArcSettingsRequest, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Reconcile Arc Settings with information related to all nodes. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param arcSettingName The name of the proxy resource holding details of HCI ArcSetting information. + * @param reconcileArcSettingsRequest Request for reconciling Arc Settings. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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 reconcileWithResponse(String resourceGroupName, String clusterName, + String arcSettingName, ReconcileArcSettingsRequest reconcileArcSettingsRequest) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.reconcileSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, clusterName, arcSettingName, contentType, accept, + reconcileArcSettingsRequest, Context.NONE); + } + + /** + * Reconcile Arc Settings with information related to all nodes. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param arcSettingName The name of the proxy resource holding details of HCI ArcSetting information. + * @param reconcileArcSettingsRequest Request for reconciling Arc Settings. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return arcIdentity details. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ArcIdentityResponseInner createIdentity(String resourceGroupName, String clusterName, String arcSettingName, + private Response reconcileWithResponse(String resourceGroupName, String clusterName, + String arcSettingName, ReconcileArcSettingsRequest reconcileArcSettingsRequest, Context context) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.reconcileSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, clusterName, arcSettingName, contentType, accept, + reconcileArcSettingsRequest, context); + } + + /** + * Reconcile Arc Settings with information related to all nodes. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param arcSettingName The name of the proxy resource holding details of HCI ArcSetting information. + * @param reconcileArcSettingsRequest Request for reconciling Arc Settings. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is 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, ArcSettingInner> beginReconcileAsync(String resourceGroupName, + String clusterName, String arcSettingName, ReconcileArcSettingsRequest reconcileArcSettingsRequest) { + Mono>> mono + = reconcileWithResponseAsync(resourceGroupName, clusterName, arcSettingName, reconcileArcSettingsRequest); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + ArcSettingInner.class, ArcSettingInner.class, this.client.getContext()); + } + + /** + * Reconcile Arc Settings with information related to all nodes. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param arcSettingName The name of the proxy resource holding details of HCI ArcSetting information. + * @param reconcileArcSettingsRequest Request for reconciling Arc Settings. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is 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, ArcSettingInner> beginReconcile(String resourceGroupName, + String clusterName, String arcSettingName, ReconcileArcSettingsRequest reconcileArcSettingsRequest) { + Response response + = reconcileWithResponse(resourceGroupName, clusterName, arcSettingName, reconcileArcSettingsRequest); + return this.client.getLroResult(response, ArcSettingInner.class, + ArcSettingInner.class, Context.NONE); + } + + /** + * Reconcile Arc Settings with information related to all nodes. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param arcSettingName The name of the proxy resource holding details of HCI ArcSetting information. + * @param reconcileArcSettingsRequest Request for reconciling Arc Settings. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is 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, ArcSettingInner> beginReconcile(String resourceGroupName, + String clusterName, String arcSettingName, ReconcileArcSettingsRequest reconcileArcSettingsRequest, Context context) { - return createIdentityAsync(resourceGroupName, clusterName, arcSettingName, context).block(); + Response response = reconcileWithResponse(resourceGroupName, clusterName, arcSettingName, + reconcileArcSettingsRequest, context); + return this.client.getLroResult(response, ArcSettingInner.class, + ArcSettingInner.class, context); } /** - * Add consent time for default extensions and initiate extensions installation. + * Reconcile Arc Settings with information related to all nodes. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param arcSettingName The name of the proxy resource holding details of HCI ArcSetting information. + * @param reconcileArcSettingsRequest Request for reconciling Arc Settings. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return arcSetting details along with {@link Response} on successful completion of {@link Mono}. + * @return the response body on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> consentAndInstallDefaultExtensionsWithResponseAsync( - String resourceGroupName, String clusterName, String arcSettingName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (clusterName == null) { - return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); - } - if (arcSettingName == null) { - return Mono.error(new IllegalArgumentException("Parameter arcSettingName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.consentAndInstallDefaultExtensions(this.client.getEndpoint(), - this.client.getSubscriptionId(), resourceGroupName, clusterName, arcSettingName, - this.client.getApiVersion(), accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + private Mono reconcileAsync(String resourceGroupName, String clusterName, String arcSettingName, + ReconcileArcSettingsRequest reconcileArcSettingsRequest) { + return beginReconcileAsync(resourceGroupName, clusterName, arcSettingName, reconcileArcSettingsRequest).last() + .flatMap(this.client::getLroFinalResultOrError); } /** - * Add consent time for default extensions and initiate extensions installation. + * Reconcile Arc Settings with information related to all nodes. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param arcSettingName The name of the proxy resource holding details of HCI ArcSetting information. + * @param reconcileArcSettingsRequest Request for reconciling Arc Settings. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ArcSettingInner reconcile(String resourceGroupName, String clusterName, String arcSettingName, + ReconcileArcSettingsRequest reconcileArcSettingsRequest) { + return beginReconcile(resourceGroupName, clusterName, arcSettingName, reconcileArcSettingsRequest) + .getFinalResult(); + } + + /** + * Reconcile Arc Settings with information related to all nodes. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param arcSettingName The name of the proxy resource holding details of HCI ArcSetting information. + * @param reconcileArcSettingsRequest Request for reconciling Arc Settings. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ArcSettingInner reconcile(String resourceGroupName, String clusterName, String arcSettingName, + ReconcileArcSettingsRequest reconcileArcSettingsRequest, Context context) { + return beginReconcile(resourceGroupName, clusterName, arcSettingName, reconcileArcSettingsRequest, context) + .getFinalResult(); + } + + /** + * Add consent time for default extensions and initiate extensions installation. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param arcSettingName The name of the proxy resource holding details of HCI ArcSetting information. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return arcSetting details along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> consentAndInstallDefaultExtensionsWithResponseAsync( - String resourceGroupName, String clusterName, String arcSettingName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (clusterName == null) { - return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); - } - if (arcSettingName == null) { - return Mono.error(new IllegalArgumentException("Parameter arcSettingName is required and cannot be null.")); - } + String resourceGroupName, String clusterName, String arcSettingName) { final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.consentAndInstallDefaultExtensions(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, clusterName, arcSettingName, this.client.getApiVersion(), accept, context); + return FluxUtil + .withContext(context -> service.consentAndInstallDefaultExtensions(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, clusterName, + arcSettingName, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** @@ -1433,8 +1291,9 @@ private Mono consentAndInstallDefaultExtensionsAsync(String res @ServiceMethod(returns = ReturnType.SINGLE) public Response consentAndInstallDefaultExtensionsWithResponse(String resourceGroupName, String clusterName, String arcSettingName, Context context) { - return consentAndInstallDefaultExtensionsWithResponseAsync(resourceGroupName, clusterName, arcSettingName, - context).block(); + final String accept = "application/json"; + return service.consentAndInstallDefaultExtensionsSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, clusterName, arcSettingName, accept, context); } /** @@ -1469,29 +1328,10 @@ public ArcSettingInner consentAndInstallDefaultExtensions(String resourceGroupNa @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> initializeDisableProcessWithResponseAsync(String resourceGroupName, String clusterName, String arcSettingName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (clusterName == null) { - return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); - } - if (arcSettingName == null) { - return Mono.error(new IllegalArgumentException("Parameter arcSettingName is required and cannot be null.")); - } - final String accept = "application/json"; return FluxUtil .withContext( - context -> service.initializeDisableProcess(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, clusterName, arcSettingName, this.client.getApiVersion(), accept, context)) + context -> service.initializeDisableProcess(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, clusterName, arcSettingName, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -1501,37 +1341,16 @@ private Mono>> initializeDisableProcessWithResponseAsy * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param arcSettingName The name of the proxy resource holding details of HCI ArcSetting information. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> initializeDisableProcessWithResponseAsync(String resourceGroupName, - String clusterName, String arcSettingName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (clusterName == null) { - return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); - } - if (arcSettingName == null) { - return Mono.error(new IllegalArgumentException("Parameter arcSettingName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.initializeDisableProcess(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, clusterName, arcSettingName, this.client.getApiVersion(), accept, context); + private Response initializeDisableProcessWithResponse(String resourceGroupName, String clusterName, + String arcSettingName) { + return service.initializeDisableProcessSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, clusterName, arcSettingName, Context.NONE); } /** @@ -1540,18 +1359,17 @@ private Mono>> initializeDisableProcessWithResponseAsy * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param arcSettingName The name of the proxy resource holding details of HCI ArcSetting information. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. + * @return the response body along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginInitializeDisableProcessAsync(String resourceGroupName, - String clusterName, String arcSettingName) { - Mono>> mono - = initializeDisableProcessWithResponseAsync(resourceGroupName, clusterName, arcSettingName); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - this.client.getContext()); + @ServiceMethod(returns = ReturnType.SINGLE) + private Response initializeDisableProcessWithResponse(String resourceGroupName, String clusterName, + String arcSettingName, Context context) { + return service.initializeDisableProcessSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, clusterName, arcSettingName, context); } /** @@ -1560,7 +1378,6 @@ private PollerFlux, Void> beginInitializeDisableProcessAsync(St * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param arcSettingName The name of the proxy resource holding details of HCI ArcSetting information. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -1568,12 +1385,11 @@ private PollerFlux, Void> beginInitializeDisableProcessAsync(St */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginInitializeDisableProcessAsync(String resourceGroupName, - String clusterName, String arcSettingName, Context context) { - context = this.client.mergeContext(context); + String clusterName, String arcSettingName) { Mono>> mono - = initializeDisableProcessWithResponseAsync(resourceGroupName, clusterName, arcSettingName, context); + = initializeDisableProcessWithResponseAsync(resourceGroupName, clusterName, arcSettingName); return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - context); + this.client.getContext()); } /** @@ -1590,7 +1406,9 @@ private PollerFlux, Void> beginInitializeDisableProcessAsync(St @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginInitializeDisableProcess(String resourceGroupName, String clusterName, String arcSettingName) { - return this.beginInitializeDisableProcessAsync(resourceGroupName, clusterName, arcSettingName).getSyncPoller(); + Response response + = initializeDisableProcessWithResponse(resourceGroupName, clusterName, arcSettingName); + return this.client.getLroResult(response, Void.class, Void.class, Context.NONE); } /** @@ -1608,8 +1426,9 @@ public SyncPoller, Void> beginInitializeDisableProcess(String r @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginInitializeDisableProcess(String resourceGroupName, String clusterName, String arcSettingName, Context context) { - return this.beginInitializeDisableProcessAsync(resourceGroupName, clusterName, arcSettingName, context) - .getSyncPoller(); + Response response + = initializeDisableProcessWithResponse(resourceGroupName, clusterName, arcSettingName, context); + return this.client.getLroResult(response, Void.class, Void.class, context); } /** @@ -1630,25 +1449,6 @@ private Mono initializeDisableProcessAsync(String resourceGroupName, Strin .flatMap(this.client::getLroFinalResultOrError); } - /** - * Initializes ARC Disable process on the cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterName The name of the cluster. - * @param arcSettingName The name of the proxy resource holding details of HCI ArcSetting information. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 initializeDisableProcessAsync(String resourceGroupName, String clusterName, - String arcSettingName, Context context) { - return beginInitializeDisableProcessAsync(resourceGroupName, clusterName, arcSettingName, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - /** * Initializes ARC Disable process on the cluster. * @@ -1661,7 +1461,7 @@ private Mono initializeDisableProcessAsync(String resourceGroupName, Strin */ @ServiceMethod(returns = ReturnType.SINGLE) public void initializeDisableProcess(String resourceGroupName, String clusterName, String arcSettingName) { - initializeDisableProcessAsync(resourceGroupName, clusterName, arcSettingName).block(); + beginInitializeDisableProcess(resourceGroupName, clusterName, arcSettingName).getFinalResult(); } /** @@ -1678,7 +1478,7 @@ public void initializeDisableProcess(String resourceGroupName, String clusterNam @ServiceMethod(returns = ReturnType.SINGLE) public void initializeDisableProcess(String resourceGroupName, String clusterName, String arcSettingName, Context context) { - initializeDisableProcessAsync(resourceGroupName, clusterName, arcSettingName, context).block(); + beginInitializeDisableProcess(resourceGroupName, clusterName, arcSettingName, context).getFinalResult(); } /** @@ -1688,18 +1488,11 @@ public void initializeDisableProcess(String resourceGroupName, String clusterNam * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of ArcSetting proxy resources for the HCI cluster along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * @return arcSetting resources of HCI Cluster along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByClusterNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } final String accept = "application/json"; return FluxUtil .withContext(context -> service.listByClusterNext(nextLink, this.client.getEndpoint(), accept, context)) @@ -1708,6 +1501,24 @@ private Mono> listByClusterNextSinglePageAsync(St .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 arcSetting resources of HCI Cluster along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByClusterNextSinglePage(String nextLink) { + final String accept = "application/json"; + Response res + = service.listByClusterNextSync(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. * @@ -1716,22 +1527,14 @@ private Mono> listByClusterNextSinglePageAsync(St * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of ArcSetting proxy resources for the HCI cluster along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * @return arcSetting resources of HCI Cluster along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByClusterNextSinglePageAsync(String nextLink, Context context) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } + private PagedResponse listByClusterNextSinglePage(String nextLink, Context context) { final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.listByClusterNext(nextLink, this.client.getEndpoint(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); + Response res + = service.listByClusterNextSync(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/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/ArcSettingsImpl.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/ArcSettingsImpl.java index 6763384442bd..26779e682e5e 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/ArcSettingsImpl.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/ArcSettingsImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.implementation; @@ -17,6 +17,7 @@ import com.azure.resourcemanager.azurestackhci.models.ArcSetting; import com.azure.resourcemanager.azurestackhci.models.ArcSettings; import com.azure.resourcemanager.azurestackhci.models.PasswordCredential; +import com.azure.resourcemanager.azurestackhci.models.ReconcileArcSettingsRequest; public final class ArcSettingsImpl implements ArcSettings { private static final ClientLogger LOGGER = new ClientLogger(ArcSettingsImpl.class); @@ -31,17 +32,6 @@ public ArcSettingsImpl(ArcSettingsClient innerClient, this.serviceManager = serviceManager; } - public PagedIterable listByCluster(String resourceGroupName, String clusterName) { - PagedIterable inner = this.serviceClient().listByCluster(resourceGroupName, clusterName); - return ResourceManagerUtils.mapPage(inner, inner1 -> new ArcSettingImpl(inner1, this.manager())); - } - - public PagedIterable listByCluster(String resourceGroupName, String clusterName, Context context) { - PagedIterable inner - = this.serviceClient().listByCluster(resourceGroupName, clusterName, context); - return ResourceManagerUtils.mapPage(inner, inner1 -> new ArcSettingImpl(inner1, this.manager())); - } - public Response getWithResponse(String resourceGroupName, String clusterName, String arcSettingName, Context context) { Response inner @@ -71,6 +61,17 @@ public void delete(String resourceGroupName, String clusterName, String arcSetti this.serviceClient().delete(resourceGroupName, clusterName, arcSettingName, context); } + public PagedIterable listByCluster(String resourceGroupName, String clusterName) { + PagedIterable inner = this.serviceClient().listByCluster(resourceGroupName, clusterName); + return ResourceManagerUtils.mapPage(inner, inner1 -> new ArcSettingImpl(inner1, this.manager())); + } + + public PagedIterable listByCluster(String resourceGroupName, String clusterName, Context context) { + PagedIterable inner + = this.serviceClient().listByCluster(resourceGroupName, clusterName, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new ArcSettingImpl(inner1, this.manager())); + } + public Response generatePasswordWithResponse(String resourceGroupName, String clusterName, String arcSettingName, Context context) { Response inner = this.serviceClient() @@ -114,6 +115,28 @@ public ArcIdentityResponse createIdentity(String resourceGroupName, String clust } } + public ArcSetting reconcile(String resourceGroupName, String clusterName, String arcSettingName, + ReconcileArcSettingsRequest reconcileArcSettingsRequest) { + ArcSettingInner inner = this.serviceClient() + .reconcile(resourceGroupName, clusterName, arcSettingName, reconcileArcSettingsRequest); + if (inner != null) { + return new ArcSettingImpl(inner, this.manager()); + } else { + return null; + } + } + + public ArcSetting reconcile(String resourceGroupName, String clusterName, String arcSettingName, + ReconcileArcSettingsRequest reconcileArcSettingsRequest, Context context) { + ArcSettingInner inner = this.serviceClient() + .reconcile(resourceGroupName, clusterName, arcSettingName, reconcileArcSettingsRequest, context); + if (inner != null) { + return new ArcSettingImpl(inner, this.manager()); + } else { + return null; + } + } + public Response consentAndInstallDefaultExtensionsWithResponse(String resourceGroupName, String clusterName, String arcSettingName, Context context) { Response inner = this.serviceClient() diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/AzureStackHciClientBuilder.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/AzureStackHciManagementClientBuilder.java similarity index 65% rename from sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/AzureStackHciClientBuilder.java rename to sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/AzureStackHciManagementClientBuilder.java index 8a91bf54edb8..5919a37ada80 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/AzureStackHciClientBuilder.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/AzureStackHciManagementClientBuilder.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.implementation; @@ -15,39 +15,39 @@ import java.time.Duration; /** - * A builder for creating a new instance of the AzureStackHciClientImpl type. + * A builder for creating a new instance of the AzureStackHciManagementClientImpl type. */ -@ServiceClientBuilder(serviceClients = { AzureStackHciClientImpl.class }) -public final class AzureStackHciClientBuilder { +@ServiceClientBuilder(serviceClients = { AzureStackHciManagementClientImpl.class }) +public final class AzureStackHciManagementClientBuilder { /* - * The ID of the target subscription. The value must be an UUID. + * Service host */ - private String subscriptionId; + private String endpoint; /** - * Sets The ID of the target subscription. The value must be an UUID. + * Sets Service host. * - * @param subscriptionId the subscriptionId value. - * @return the AzureStackHciClientBuilder. + * @param endpoint the endpoint value. + * @return the AzureStackHciManagementClientBuilder. */ - public AzureStackHciClientBuilder subscriptionId(String subscriptionId) { - this.subscriptionId = subscriptionId; + public AzureStackHciManagementClientBuilder endpoint(String endpoint) { + this.endpoint = endpoint; return this; } /* - * server parameter + * The ID of the target subscription. The value must be an UUID. */ - private String endpoint; + private String subscriptionId; /** - * Sets server parameter. + * Sets The ID of the target subscription. The value must be an UUID. * - * @param endpoint the endpoint value. - * @return the AzureStackHciClientBuilder. + * @param subscriptionId the subscriptionId value. + * @return the AzureStackHciManagementClientBuilder. */ - public AzureStackHciClientBuilder endpoint(String endpoint) { - this.endpoint = endpoint; + public AzureStackHciManagementClientBuilder subscriptionId(String subscriptionId) { + this.subscriptionId = subscriptionId; return this; } @@ -60,9 +60,9 @@ public AzureStackHciClientBuilder endpoint(String endpoint) { * Sets The environment to connect to. * * @param environment the environment value. - * @return the AzureStackHciClientBuilder. + * @return the AzureStackHciManagementClientBuilder. */ - public AzureStackHciClientBuilder environment(AzureEnvironment environment) { + public AzureStackHciManagementClientBuilder environment(AzureEnvironment environment) { this.environment = environment; return this; } @@ -76,9 +76,9 @@ public AzureStackHciClientBuilder environment(AzureEnvironment environment) { * Sets The HTTP pipeline to send requests through. * * @param pipeline the pipeline value. - * @return the AzureStackHciClientBuilder. + * @return the AzureStackHciManagementClientBuilder. */ - public AzureStackHciClientBuilder pipeline(HttpPipeline pipeline) { + public AzureStackHciManagementClientBuilder pipeline(HttpPipeline pipeline) { this.pipeline = pipeline; return this; } @@ -92,9 +92,9 @@ public AzureStackHciClientBuilder pipeline(HttpPipeline pipeline) { * Sets The default poll interval for long-running operation. * * @param defaultPollInterval the defaultPollInterval value. - * @return the AzureStackHciClientBuilder. + * @return the AzureStackHciManagementClientBuilder. */ - public AzureStackHciClientBuilder defaultPollInterval(Duration defaultPollInterval) { + public AzureStackHciManagementClientBuilder defaultPollInterval(Duration defaultPollInterval) { this.defaultPollInterval = defaultPollInterval; return this; } @@ -108,19 +108,19 @@ public AzureStackHciClientBuilder defaultPollInterval(Duration defaultPollInterv * Sets The serializer to serialize an object into a string. * * @param serializerAdapter the serializerAdapter value. - * @return the AzureStackHciClientBuilder. + * @return the AzureStackHciManagementClientBuilder. */ - public AzureStackHciClientBuilder serializerAdapter(SerializerAdapter serializerAdapter) { + public AzureStackHciManagementClientBuilder serializerAdapter(SerializerAdapter serializerAdapter) { this.serializerAdapter = serializerAdapter; return this; } /** - * Builds an instance of AzureStackHciClientImpl with the provided parameters. + * Builds an instance of AzureStackHciManagementClientImpl with the provided parameters. * - * @return an instance of AzureStackHciClientImpl. + * @return an instance of AzureStackHciManagementClientImpl. */ - public AzureStackHciClientImpl buildClient() { + public AzureStackHciManagementClientImpl buildClient() { String localEndpoint = (endpoint != null) ? endpoint : "https://management.azure.com"; AzureEnvironment localEnvironment = (environment != null) ? environment : AzureEnvironment.AZURE; HttpPipeline localPipeline = (pipeline != null) @@ -131,8 +131,8 @@ public AzureStackHciClientImpl buildClient() { SerializerAdapter localSerializerAdapter = (serializerAdapter != null) ? serializerAdapter : SerializerFactory.createDefaultManagementSerializerAdapter(); - AzureStackHciClientImpl client = new AzureStackHciClientImpl(localPipeline, localSerializerAdapter, - localDefaultPollInterval, localEnvironment, this.subscriptionId, localEndpoint); + AzureStackHciManagementClientImpl client = new AzureStackHciManagementClientImpl(localPipeline, + localSerializerAdapter, localDefaultPollInterval, localEnvironment, localEndpoint, this.subscriptionId); return client; } } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/AzureStackHciClientImpl.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/AzureStackHciManagementClientImpl.java similarity index 84% rename from sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/AzureStackHciClientImpl.java rename to sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/AzureStackHciManagementClientImpl.java index 1a75e162c02e..1a60c8d9e127 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/AzureStackHciClientImpl.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/AzureStackHciManagementClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.implementation; @@ -13,30 +13,34 @@ import com.azure.core.management.AzureEnvironment; import com.azure.core.management.exception.ManagementError; import com.azure.core.management.exception.ManagementException; -import com.azure.core.management.polling.PollerFactory; import com.azure.core.management.polling.PollResult; +import com.azure.core.management.polling.PollerFactory; +import com.azure.core.management.polling.SyncPollerFactory; +import com.azure.core.util.BinaryData; import com.azure.core.util.Context; import com.azure.core.util.CoreUtils; import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.polling.AsyncPollResponse; import com.azure.core.util.polling.LongRunningOperationStatus; import com.azure.core.util.polling.PollerFlux; +import com.azure.core.util.polling.SyncPoller; import com.azure.core.util.serializer.SerializerAdapter; import com.azure.core.util.serializer.SerializerEncoding; import com.azure.resourcemanager.azurestackhci.fluent.ArcSettingsClient; -import com.azure.resourcemanager.azurestackhci.fluent.AzureStackHciClient; +import com.azure.resourcemanager.azurestackhci.fluent.AzureStackHciManagementClient; import com.azure.resourcemanager.azurestackhci.fluent.ClustersClient; import com.azure.resourcemanager.azurestackhci.fluent.DeploymentSettingsClient; +import com.azure.resourcemanager.azurestackhci.fluent.EdgeDeviceJobsClient; import com.azure.resourcemanager.azurestackhci.fluent.EdgeDevicesClient; import com.azure.resourcemanager.azurestackhci.fluent.ExtensionsClient; import com.azure.resourcemanager.azurestackhci.fluent.OffersClient; import com.azure.resourcemanager.azurestackhci.fluent.OperationsClient; -import com.azure.resourcemanager.azurestackhci.fluent.PublishersClient; import com.azure.resourcemanager.azurestackhci.fluent.SecuritySettingsClient; import com.azure.resourcemanager.azurestackhci.fluent.SkusClient; import com.azure.resourcemanager.azurestackhci.fluent.UpdateRunsClient; -import com.azure.resourcemanager.azurestackhci.fluent.UpdatesClient; import com.azure.resourcemanager.azurestackhci.fluent.UpdateSummariesOperationsClient; +import com.azure.resourcemanager.azurestackhci.fluent.UpdatesClient; +import com.azure.resourcemanager.azurestackhci.fluent.ValidatedSolutionRecipesClient; import java.io.IOException; import java.lang.reflect.Type; import java.nio.ByteBuffer; @@ -47,31 +51,17 @@ import reactor.core.publisher.Mono; /** - * Initializes a new instance of the AzureStackHciClientImpl type. + * Initializes a new instance of the AzureStackHciManagementClientImpl type. */ -@ServiceClient(builder = AzureStackHciClientBuilder.class) -public final class AzureStackHciClientImpl implements AzureStackHciClient { - /** - * The ID of the target subscription. The value must be an UUID. - */ - private final String subscriptionId; - - /** - * Gets The ID of the target subscription. The value must be an UUID. - * - * @return the subscriptionId value. - */ - public String getSubscriptionId() { - return this.subscriptionId; - } - +@ServiceClient(builder = AzureStackHciManagementClientBuilder.class) +public final class AzureStackHciManagementClientImpl implements AzureStackHciManagementClient { /** - * server parameter. + * Service host. */ private final String endpoint; /** - * Gets server parameter. + * Gets Service host. * * @return the endpoint value. */ @@ -80,12 +70,12 @@ public String getEndpoint() { } /** - * Api Version. + * Version parameter. */ private final String apiVersion; /** - * Gets Api Version. + * Gets Version parameter. * * @return the apiVersion value. */ @@ -93,6 +83,20 @@ public String getApiVersion() { return this.apiVersion; } + /** + * The ID of the target subscription. The value must be an UUID. + */ + private final String subscriptionId; + + /** + * Gets The ID of the target subscription. The value must be an UUID. + * + * @return the subscriptionId value. + */ + public String getSubscriptionId() { + return this.subscriptionId; + } + /** * The HTTP pipeline to send requests through. */ @@ -135,6 +139,20 @@ public Duration getDefaultPollInterval() { return this.defaultPollInterval; } + /** + * The OperationsClient object to access its operations. + */ + private final OperationsClient operations; + + /** + * Gets the OperationsClient object to access its operations. + * + * @return the OperationsClient object. + */ + public OperationsClient getOperations() { + return this.operations; + } + /** * The ArcSettingsClient object to access its operations. */ @@ -149,6 +167,20 @@ public ArcSettingsClient getArcSettings() { return this.arcSettings; } + /** + * The OffersClient object to access its operations. + */ + private final OffersClient offers; + + /** + * Gets the OffersClient object to access its operations. + * + * @return the OffersClient object. + */ + public OffersClient getOffers() { + return this.offers; + } + /** * The ClustersClient object to access its operations. */ @@ -177,6 +209,20 @@ public DeploymentSettingsClient getDeploymentSettings() { return this.deploymentSettings; } + /** + * The EdgeDeviceJobsClient object to access its operations. + */ + private final EdgeDeviceJobsClient edgeDeviceJobs; + + /** + * Gets the EdgeDeviceJobsClient object to access its operations. + * + * @return the EdgeDeviceJobsClient object. + */ + public EdgeDeviceJobsClient getEdgeDeviceJobs() { + return this.edgeDeviceJobs; + } + /** * The EdgeDevicesClient object to access its operations. */ @@ -205,48 +251,6 @@ public ExtensionsClient getExtensions() { return this.extensions; } - /** - * The OffersClient object to access its operations. - */ - private final OffersClient offers; - - /** - * Gets the OffersClient object to access its operations. - * - * @return the OffersClient object. - */ - public OffersClient getOffers() { - return this.offers; - } - - /** - * The OperationsClient object to access its operations. - */ - private final OperationsClient operations; - - /** - * Gets the OperationsClient object to access its operations. - * - * @return the OperationsClient object. - */ - public OperationsClient getOperations() { - return this.operations; - } - - /** - * The PublishersClient object to access its operations. - */ - private final PublishersClient publishers; - - /** - * Gets the PublishersClient object to access its operations. - * - * @return the PublishersClient object. - */ - public PublishersClient getPublishers() { - return this.publishers; - } - /** * The SecuritySettingsClient object to access its operations. */ @@ -290,64 +294,79 @@ public UpdateRunsClient getUpdateRuns() { } /** - * The UpdateSummariesOperationsClient object to access its operations. + * The UpdatesClient object to access its operations. */ - private final UpdateSummariesOperationsClient updateSummariesOperations; + private final UpdatesClient updates; /** - * Gets the UpdateSummariesOperationsClient object to access its operations. + * Gets the UpdatesClient object to access its operations. * - * @return the UpdateSummariesOperationsClient object. + * @return the UpdatesClient object. */ - public UpdateSummariesOperationsClient getUpdateSummariesOperations() { - return this.updateSummariesOperations; + public UpdatesClient getUpdates() { + return this.updates; } /** - * The UpdatesClient object to access its operations. + * The ValidatedSolutionRecipesClient object to access its operations. */ - private final UpdatesClient updates; + private final ValidatedSolutionRecipesClient validatedSolutionRecipes; /** - * Gets the UpdatesClient object to access its operations. + * Gets the ValidatedSolutionRecipesClient object to access its operations. * - * @return the UpdatesClient object. + * @return the ValidatedSolutionRecipesClient object. */ - public UpdatesClient getUpdates() { - return this.updates; + public ValidatedSolutionRecipesClient getValidatedSolutionRecipes() { + return this.validatedSolutionRecipes; + } + + /** + * The UpdateSummariesOperationsClient object to access its operations. + */ + private final UpdateSummariesOperationsClient updateSummariesOperations; + + /** + * Gets the UpdateSummariesOperationsClient object to access its operations. + * + * @return the UpdateSummariesOperationsClient object. + */ + public UpdateSummariesOperationsClient getUpdateSummariesOperations() { + return this.updateSummariesOperations; } /** - * Initializes an instance of AzureStackHciClient client. + * Initializes an instance of AzureStackHciManagementClient client. * * @param httpPipeline The HTTP pipeline to send requests through. * @param serializerAdapter The serializer to serialize an object into a string. * @param defaultPollInterval The default poll interval for long-running operation. * @param environment The Azure environment. + * @param endpoint Service host. * @param subscriptionId The ID of the target subscription. The value must be an UUID. - * @param endpoint server parameter. */ - AzureStackHciClientImpl(HttpPipeline httpPipeline, SerializerAdapter serializerAdapter, - Duration defaultPollInterval, AzureEnvironment environment, String subscriptionId, String endpoint) { + AzureStackHciManagementClientImpl(HttpPipeline httpPipeline, SerializerAdapter serializerAdapter, + Duration defaultPollInterval, AzureEnvironment environment, String endpoint, String subscriptionId) { this.httpPipeline = httpPipeline; this.serializerAdapter = serializerAdapter; this.defaultPollInterval = defaultPollInterval; - this.subscriptionId = subscriptionId; this.endpoint = endpoint; - this.apiVersion = "2024-04-01"; + this.subscriptionId = subscriptionId; + this.apiVersion = "2026-02-01"; + this.operations = new OperationsClientImpl(this); this.arcSettings = new ArcSettingsClientImpl(this); + this.offers = new OffersClientImpl(this); this.clusters = new ClustersClientImpl(this); this.deploymentSettings = new DeploymentSettingsClientImpl(this); + this.edgeDeviceJobs = new EdgeDeviceJobsClientImpl(this); this.edgeDevices = new EdgeDevicesClientImpl(this); this.extensions = new ExtensionsClientImpl(this); - this.offers = new OffersClientImpl(this); - this.operations = new OperationsClientImpl(this); - this.publishers = new PublishersClientImpl(this); this.securitySettings = new SecuritySettingsClientImpl(this); this.skus = new SkusClientImpl(this); this.updateRuns = new UpdateRunsClientImpl(this); - this.updateSummariesOperations = new UpdateSummariesOperationsClientImpl(this); this.updates = new UpdatesClientImpl(this); + this.validatedSolutionRecipes = new ValidatedSolutionRecipesClientImpl(this); + this.updateSummariesOperations = new UpdateSummariesOperationsClientImpl(this); } /** @@ -387,6 +406,23 @@ public PollerFlux, U> getLroResult(Mono type of poll result. + * @param type of final result. + * @return SyncPoller for poll result and final result. + */ + public SyncPoller, U> getLroResult(Response activationResponse, + Type pollResultType, Type finalResultType, Context context) { + return SyncPollerFactory.create(serializerAdapter, httpPipeline, pollResultType, finalResultType, + defaultPollInterval, () -> activationResponse, context); + } + /** * Gets the final result, or an error, based on last async poll response. * @@ -476,5 +512,5 @@ public Mono getBodyAsString(Charset charset) { } } - private static final ClientLogger LOGGER = new ClientLogger(AzureStackHciClientImpl.class); + private static final ClientLogger LOGGER = new ClientLogger(AzureStackHciManagementClientImpl.class); } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/ClusterIdentityResponseImpl.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/ClusterIdentityResponseImpl.java index 54b4e3a155b0..f2658c1c9aa1 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/ClusterIdentityResponseImpl.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/ClusterIdentityResponseImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.implementation; diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/ClusterImpl.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/ClusterImpl.java index 93a05b49edbe..1d55a9209ff7 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/ClusterImpl.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/ClusterImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.implementation; @@ -12,15 +12,20 @@ import com.azure.resourcemanager.azurestackhci.models.ClusterDesiredProperties; import com.azure.resourcemanager.azurestackhci.models.ClusterIdentityResponse; import com.azure.resourcemanager.azurestackhci.models.ClusterPatch; +import com.azure.resourcemanager.azurestackhci.models.ClusterPattern; import com.azure.resourcemanager.azurestackhci.models.ClusterReportedProperties; import com.azure.resourcemanager.azurestackhci.models.ConnectivityStatus; +import com.azure.resourcemanager.azurestackhci.models.IdentityProvider; import com.azure.resourcemanager.azurestackhci.models.IsolatedVmAttestationConfiguration; +import com.azure.resourcemanager.azurestackhci.models.LocalAvailabilityZones; import com.azure.resourcemanager.azurestackhci.models.LogCollectionProperties; import com.azure.resourcemanager.azurestackhci.models.LogCollectionRequest; import com.azure.resourcemanager.azurestackhci.models.ManagedServiceIdentityType; import com.azure.resourcemanager.azurestackhci.models.ProvisioningState; import com.azure.resourcemanager.azurestackhci.models.RemoteSupportProperties; import com.azure.resourcemanager.azurestackhci.models.RemoteSupportRequest; +import com.azure.resourcemanager.azurestackhci.models.SecretsLocationDetails; +import com.azure.resourcemanager.azurestackhci.models.SecretsLocationsChangeRequest; import com.azure.resourcemanager.azurestackhci.models.SoftwareAssuranceChangeRequest; import com.azure.resourcemanager.azurestackhci.models.SoftwareAssuranceProperties; import com.azure.resourcemanager.azurestackhci.models.Status; @@ -28,8 +33,8 @@ import com.azure.resourcemanager.azurestackhci.models.UserAssignedIdentity; import java.time.OffsetDateTime; import java.util.Collections; +import java.util.List; import java.util.Map; -import java.util.UUID; public final class ClusterImpl implements Cluster, Cluster.Definition, Cluster.Update { private ClusterInner innerObject; @@ -65,27 +70,6 @@ public SystemData systemData() { return this.innerModel().systemData(); } - public UUID principalId() { - return this.innerModel().principalId(); - } - - public UUID tenantId() { - return this.innerModel().tenantId(); - } - - public ManagedServiceIdentityType typeIdentityType() { - return this.innerModel().typeIdentityType(); - } - - public Map userAssignedIdentities() { - Map inner = this.innerModel().userAssignedIdentities(); - if (inner != null) { - return Collections.unmodifiableMap(inner); - } else { - return Collections.emptyMap(); - } - } - public ProvisioningState provisioningState() { return this.innerModel().provisioningState(); } @@ -126,6 +110,10 @@ public SoftwareAssuranceProperties softwareAssuranceProperties() { return this.innerModel().softwareAssuranceProperties(); } + public Boolean isManagementCluster() { + return this.innerModel().isManagementCluster(); + } + public LogCollectionProperties logCollectionProperties() { return this.innerModel().logCollectionProperties(); } @@ -146,7 +134,7 @@ public IsolatedVmAttestationConfiguration isolatedVmAttestationConfiguration() { return this.innerModel().isolatedVmAttestationConfiguration(); } - public Float trialDaysRemaining() { + public Double trialDaysRemaining() { return this.innerModel().trialDaysRemaining(); } @@ -174,6 +162,53 @@ public String resourceProviderObjectId() { return this.innerModel().resourceProviderObjectId(); } + public List secretsLocations() { + List inner = this.innerModel().secretsLocations(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + + public ClusterPattern clusterPattern() { + return this.innerModel().clusterPattern(); + } + + public List localAvailabilityZones() { + List inner = this.innerModel().localAvailabilityZones(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + + public IdentityProvider identityProvider() { + return this.innerModel().identityProvider(); + } + + public String principalId() { + return this.innerModel().principalId(); + } + + public String tenantId() { + return this.innerModel().tenantId(); + } + + public ManagedServiceIdentityType typeIdentityType() { + return this.innerModel().typeIdentityType(); + } + + public Map userAssignedIdentities() { + Map inner = this.innerModel().userAssignedIdentities(); + if (inner != null) { + return Collections.unmodifiableMap(inner); + } else { + return Collections.emptyMap(); + } + } + public Region region() { return Region.fromName(this.regionName()); } @@ -271,6 +306,14 @@ public Cluster refresh(Context context) { return this; } + public Cluster updateSecretsLocations(SecretsLocationsChangeRequest body) { + return serviceManager.clusters().updateSecretsLocations(resourceGroupName, clusterName, body); + } + + public Cluster updateSecretsLocations(SecretsLocationsChangeRequest body, Context context) { + return serviceManager.clusters().updateSecretsLocations(resourceGroupName, clusterName, body, context); + } + public void uploadCertificate(UploadCertificateRequest uploadCertificateRequest) { serviceManager.clusters().uploadCertificate(resourceGroupName, clusterName, uploadCertificateRequest); } @@ -336,21 +379,6 @@ public ClusterImpl withTags(Map tags) { } } - public ClusterImpl withTypeIdentityType(ManagedServiceIdentityType typeIdentityType) { - this.innerModel().withTypeIdentityType(typeIdentityType); - return this; - } - - public ClusterImpl withUserAssignedIdentities(Map userAssignedIdentities) { - if (isInCreateMode()) { - this.innerModel().withUserAssignedIdentities(userAssignedIdentities); - return this; - } else { - this.updateCluster.withUserAssignedIdentities(userAssignedIdentities); - return this; - } - } - public ClusterImpl withCloudManagementEndpoint(String cloudManagementEndpoint) { if (isInCreateMode()) { this.innerModel().withCloudManagementEndpoint(cloudManagementEndpoint); @@ -416,12 +444,37 @@ public ClusterImpl withDesiredProperties(ClusterDesiredProperties desiredPropert } } + public ClusterImpl withSecretsLocations(List secretsLocations) { + this.innerModel().withSecretsLocations(secretsLocations); + return this; + } + + public ClusterImpl withLocalAvailabilityZones(List localAvailabilityZones) { + this.innerModel().withLocalAvailabilityZones(localAvailabilityZones); + return this; + } + + public ClusterImpl withTypeIdentityType(ManagedServiceIdentityType typeIdentityType) { + this.innerModel().withTypeIdentityType(typeIdentityType); + return this; + } + + public ClusterImpl withUserAssignedIdentities(Map userAssignedIdentities) { + if (isInCreateMode()) { + this.innerModel().withUserAssignedIdentities(userAssignedIdentities); + return this; + } else { + this.updateCluster.withUserAssignedIdentities(userAssignedIdentities); + return this; + } + } + public ClusterImpl withType(ManagedServiceIdentityType type) { this.updateCluster.withType(type); return this; } private boolean isInCreateMode() { - return this.innerModel().id() == null; + return this.innerModel() == null || this.innerModel().id() == null; } } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/ClustersClientImpl.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/ClustersClientImpl.java index 811b6d9c6118..905b9969edf6 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/ClustersClientImpl.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/ClustersClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.implementation; @@ -29,6 +29,7 @@ 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; @@ -36,10 +37,11 @@ import com.azure.resourcemanager.azurestackhci.fluent.ClustersClient; import com.azure.resourcemanager.azurestackhci.fluent.models.ClusterIdentityResponseInner; import com.azure.resourcemanager.azurestackhci.fluent.models.ClusterInner; -import com.azure.resourcemanager.azurestackhci.models.ClusterList; +import com.azure.resourcemanager.azurestackhci.implementation.models.ClusterList; import com.azure.resourcemanager.azurestackhci.models.ClusterPatch; import com.azure.resourcemanager.azurestackhci.models.LogCollectionRequest; import com.azure.resourcemanager.azurestackhci.models.RemoteSupportRequest; +import com.azure.resourcemanager.azurestackhci.models.SecretsLocationsChangeRequest; import com.azure.resourcemanager.azurestackhci.models.SoftwareAssuranceChangeRequest; import com.azure.resourcemanager.azurestackhci.models.UploadCertificateRequest; import java.nio.ByteBuffer; @@ -58,422 +60,583 @@ public final class ClustersClientImpl implements ClustersClient { /** * The service client containing this operation class. */ - private final AzureStackHciClientImpl client; + private final AzureStackHciManagementClientImpl client; /** * Initializes an instance of ClustersClientImpl. * * @param client the instance of the service client containing this operation class. */ - ClustersClientImpl(AzureStackHciClientImpl client) { + ClustersClientImpl(AzureStackHciManagementClientImpl client) { this.service = RestProxy.create(ClustersService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for AzureStackHciClientClusters to be used by the proxy service to - * perform REST calls. + * The interface defining all the services for AzureStackHciManagementClientClusters to be used by the proxy service + * to perform REST calls. */ - @Host("{$host}") - @ServiceInterface(name = "AzureStackHciClientC") + @Host("{endpoint}") + @ServiceInterface(name = "AzureStackHciManagementClientClusters") public interface ClustersService { @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/providers/Microsoft.AzureStackHCI/clusters") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/clusters/{clusterName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + Mono> getByResourceGroup(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("clusterName") String clusterName, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/clusters") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/clusters/{clusterName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByResourceGroup(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, + Response getByResourceGroupSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("clusterName") String clusterName, @HeaderParam("Accept") String accept, Context context); - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/clusters/{clusterName}") + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/clusters/{clusterName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> getByResourceGroup(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono> create(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("clusterName") String clusterName, - @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") ClusterInner cluster, Context context); - @Headers({ "Content-Type: application/json" }) @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/clusters/{clusterName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> create(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Response createSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("clusterName") String clusterName, - @QueryParam("api-version") String apiVersion, @BodyParam("application/json") ClusterInner cluster, - @HeaderParam("Accept") String accept, Context context); + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") ClusterInner cluster, Context context); - @Headers({ "Content-Type: application/json" }) @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/clusters/{clusterName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> update(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono> update(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("clusterName") String clusterName, - @QueryParam("api-version") String apiVersion, @BodyParam("application/json") ClusterPatch cluster, - @HeaderParam("Accept") String accept, Context context); + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") ClusterPatch cluster, Context context); - @Headers({ "Content-Type: application/json" }) + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/clusters/{clusterName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response updateSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("clusterName") String clusterName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") ClusterPatch cluster, Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/clusters/{clusterName}") @ExpectedResponses({ 200, 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono>> delete(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("clusterName") String clusterName, - @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/clusters/{clusterName}") + @ExpectedResponses({ 200, 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("clusterName") String clusterName, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/clusters") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByResourceGroup(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @HeaderParam("Accept") String accept, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/clusters") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listByResourceGroupSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @HeaderParam("Accept") String accept, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/providers/Microsoft.AzureStackHCI/clusters") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> list(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/providers/Microsoft.AzureStackHCI/clusters") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @HeaderParam("Accept") String accept, Context context); + + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/clusters/{clusterName}/updateSecretsLocations") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> updateSecretsLocations(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("clusterName") String clusterName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") SecretsLocationsChangeRequest body, Context context); + + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/clusters/{clusterName}/updateSecretsLocations") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response updateSecretsLocationsSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("clusterName") String clusterName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") SecretsLocationsChangeRequest body, Context context); + + @Headers({ "Accept: application/json;q=0.9" }) @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/clusters/{clusterName}/uploadCertificate") @ExpectedResponses({ 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> uploadCertificate(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono>> uploadCertificate(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("clusterName") String clusterName, - @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") UploadCertificateRequest uploadCertificateRequest, - @HeaderParam("Accept") String accept, Context context); + @HeaderParam("Content-Type") String contentType, + @BodyParam("application/json") UploadCertificateRequest uploadCertificateRequest, Context context); + + @Headers({ "Accept: application/json;q=0.9" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/clusters/{clusterName}/uploadCertificate") + @ExpectedResponses({ 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response uploadCertificateSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("clusterName") String clusterName, + @HeaderParam("Content-Type") String contentType, + @BodyParam("application/json") UploadCertificateRequest uploadCertificateRequest, Context context); @Headers({ "Content-Type: application/json" }) @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/clusters/{clusterName}/createClusterIdentity") @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> createIdentity(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono>> createIdentity(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("clusterName") String clusterName, - @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/clusters/{clusterName}/createClusterIdentity") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response createIdentitySync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("clusterName") String clusterName, + @HeaderParam("Accept") String accept, Context context); + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/clusters/{clusterName}/extendSoftwareAssuranceBenefit") @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> extendSoftwareAssuranceBenefit(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono>> extendSoftwareAssuranceBenefit(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("clusterName") String clusterName, - @QueryParam("api-version") String apiVersion, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, @BodyParam("application/json") SoftwareAssuranceChangeRequest softwareAssuranceChangeRequest, - @HeaderParam("Accept") String accept, Context context); + Context context); + + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/clusters/{clusterName}/extendSoftwareAssuranceBenefit") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response extendSoftwareAssuranceBenefitSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("clusterName") String clusterName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") SoftwareAssuranceChangeRequest softwareAssuranceChangeRequest, + Context context); - @Headers({ "Content-Type: application/json" }) @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/clusters/{clusterName}/triggerLogCollection") @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> triggerLogCollection(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono>> triggerLogCollection(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("clusterName") String clusterName, - @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") LogCollectionRequest logCollectionRequest, - @HeaderParam("Accept") String accept, Context context); + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") LogCollectionRequest logCollectionRequest, Context context); + + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/clusters/{clusterName}/triggerLogCollection") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response triggerLogCollectionSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("clusterName") String clusterName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") LogCollectionRequest logCollectionRequest, Context context); - @Headers({ "Content-Type: application/json" }) @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/clusters/{clusterName}/configureRemoteSupport") @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> configureRemoteSupport(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono>> configureRemoteSupport(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("clusterName") String clusterName, - @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") RemoteSupportRequest remoteSupportRequest, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") RemoteSupportRequest remoteSupportRequest, Context context); + + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/clusters/{clusterName}/configureRemoteSupport") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response configureRemoteSupportSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("clusterName") String clusterName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") RemoteSupportRequest remoteSupportRequest, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByResourceGroupNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listBySubscriptionNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + Response listByResourceGroupNextSync( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByResourceGroupNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + Mono> listBySubscriptionNext( + @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 listBySubscriptionNextSync(@PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); } /** - * List all HCI clusters in a subscription. + * Get HCI cluster. * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of clusters along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return hCI cluster along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync() { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } + private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, + String clusterName) { final String accept = "application/json"; return FluxUtil - .withContext(context -> service.list(this.client.getEndpoint(), this.client.getSubscriptionId(), - this.client.getApiVersion(), accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), - res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .withContext(context -> service.getByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, clusterName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * List all HCI clusters in a subscription. + * Get HCI cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return hCI cluster on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getByResourceGroupAsync(String resourceGroupName, String clusterName) { + return getByResourceGroupWithResponseAsync(resourceGroupName, clusterName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Get HCI cluster. * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of clusters along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return hCI cluster along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } + public Response getByResourceGroupWithResponse(String resourceGroupName, String clusterName, + Context context) { final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .list(this.client.getEndpoint(), this.client.getSubscriptionId(), this.client.getApiVersion(), accept, - context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); + return service.getByResourceGroupSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, clusterName, accept, context); } /** - * List all HCI clusters in a subscription. + * Get HCI cluster. * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of clusters as paginated response with {@link PagedFlux}. + * @return hCI cluster. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync() { - return new PagedFlux<>(() -> listSinglePageAsync(), - nextLink -> listBySubscriptionNextSinglePageAsync(nextLink)); + @ServiceMethod(returns = ReturnType.SINGLE) + public ClusterInner getByResourceGroup(String resourceGroupName, String clusterName) { + return getByResourceGroupWithResponse(resourceGroupName, clusterName, Context.NONE).getValue(); } /** - * List all HCI clusters in a subscription. + * Create an HCI cluster. * - * @param context The context to associate with this operation. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param cluster Details of the HCI cluster. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of clusters as paginated response with {@link PagedFlux}. + * @return cluster details along with {@link Response} on successful completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(Context context) { - return new PagedFlux<>(() -> listSinglePageAsync(context), - nextLink -> listBySubscriptionNextSinglePageAsync(nextLink, context)); + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> createWithResponseAsync(String resourceGroupName, String clusterName, + ClusterInner cluster) { + final String contentType = "application/json"; + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.create(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, clusterName, contentType, accept, cluster, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * List all HCI clusters in a subscription. + * Create an HCI cluster. * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param cluster Details of the HCI cluster. + * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of clusters as paginated response with {@link PagedIterable}. + * @return cluster details on successful completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list() { - return new PagedIterable<>(listAsync()); + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createAsync(String resourceGroupName, String clusterName, ClusterInner cluster) { + return createWithResponseAsync(resourceGroupName, clusterName, cluster) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** - * List all HCI clusters in a subscription. + * Create an HCI cluster. * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param cluster Details of the HCI cluster. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of clusters as paginated response with {@link PagedIterable}. + * @return cluster details along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(Context context) { - return new PagedIterable<>(listAsync(context)); + @ServiceMethod(returns = ReturnType.SINGLE) + public Response createWithResponse(String resourceGroupName, String clusterName, ClusterInner cluster, + Context context) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.createSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, clusterName, contentType, accept, cluster, context); } /** - * List all HCI clusters in a resource group. + * Create an HCI cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param cluster Details of the HCI cluster. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of clusters along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return cluster details. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } + public ClusterInner create(String resourceGroupName, String clusterName, ClusterInner cluster) { + return createWithResponse(resourceGroupName, clusterName, cluster, Context.NONE).getValue(); + } + + /** + * Update an HCI cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param cluster Details of the HCI cluster. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return cluster details along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> updateWithResponseAsync(String resourceGroupName, String clusterName, + ClusterPatch cluster) { + final String contentType = "application/json"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.listByResourceGroup(this.client.getEndpoint(), - this.client.getSubscriptionId(), resourceGroupName, this.client.getApiVersion(), accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), - res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, clusterName, contentType, accept, cluster, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * List all HCI clusters in a resource group. + * Update an HCI cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param cluster Details of the HCI cluster. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return cluster details on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono updateAsync(String resourceGroupName, String clusterName, ClusterPatch cluster) { + return updateWithResponseAsync(resourceGroupName, clusterName, cluster) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Update an HCI cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param cluster Details of the HCI cluster. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of clusters along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return cluster details along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName, + public Response updateWithResponse(String resourceGroupName, String clusterName, ClusterPatch cluster, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } + final String contentType = "application/json"; final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .listByResourceGroup(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - this.client.getApiVersion(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); + return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, clusterName, contentType, accept, cluster, context); } /** - * List all HCI clusters in a resource group. + * Update an HCI cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param cluster Details of the HCI cluster. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of clusters as paginated response with {@link PagedFlux}. + * @return cluster details. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByResourceGroupAsync(String resourceGroupName) { - return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName), - nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); + @ServiceMethod(returns = ReturnType.SINGLE) + public ClusterInner update(String resourceGroupName, String clusterName, ClusterPatch cluster) { + return updateWithResponse(resourceGroupName, clusterName, cluster, Context.NONE).getValue(); } /** - * List all HCI clusters in a resource group. + * Delete an HCI cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param context The context to associate with this operation. + * @param clusterName The name of the cluster. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of clusters as paginated response with {@link PagedFlux}. + * @return the {@link Response} on successful completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByResourceGroupAsync(String resourceGroupName, Context context) { - return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName, context), - nextLink -> listByResourceGroupNextSinglePageAsync(nextLink, context)); + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> deleteWithResponseAsync(String resourceGroupName, String clusterName) { + return FluxUtil + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, clusterName, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * List all HCI clusters in a resource group. + * Delete an HCI cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of clusters as paginated response with {@link PagedIterable}. + * @return the response body along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByResourceGroup(String resourceGroupName) { - return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName)); + @ServiceMethod(returns = ReturnType.SINGLE) + private Response deleteWithResponse(String resourceGroupName, String clusterName) { + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, clusterName, Context.NONE); } /** - * List all HCI clusters in a resource group. + * Delete an HCI cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of clusters as paginated response with {@link PagedIterable}. + * @return the response body along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByResourceGroup(String resourceGroupName, Context context) { - return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName, context)); + @ServiceMethod(returns = ReturnType.SINGLE) + private Response deleteWithResponse(String resourceGroupName, String clusterName, Context context) { + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, clusterName, context); + } + + /** + * Delete an HCI cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String clusterName) { + Mono>> mono = deleteWithResponseAsync(resourceGroupName, clusterName); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); } /** - * Get HCI cluster. + * Delete an HCI cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return hCI cluster along with {@link Response} on successful completion of {@link Mono}. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, - String clusterName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (clusterName == null) { - return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> service.getByResourceGroup(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, clusterName, this.client.getApiVersion(), accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDelete(String resourceGroupName, String clusterName) { + Response response = deleteWithResponse(resourceGroupName, clusterName); + return this.client.getLroResult(response, Void.class, Void.class, Context.NONE); } /** - * Get HCI cluster. + * Delete an HCI cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. @@ -481,543 +644,429 @@ private Mono> getByResourceGroupWithResponseAsync(String * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return hCI cluster along with {@link Response} on successful completion of {@link Mono}. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, - String clusterName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (clusterName == null) { - return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.getByResourceGroup(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - clusterName, this.client.getApiVersion(), accept, context); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDelete(String resourceGroupName, String clusterName, + Context context) { + Response response = deleteWithResponse(resourceGroupName, clusterName, context); + return this.client.getLroResult(response, Void.class, Void.class, context); } /** - * Get HCI cluster. + * Delete an HCI cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return hCI cluster on successful completion of {@link Mono}. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getByResourceGroupAsync(String resourceGroupName, String clusterName) { - return getByResourceGroupWithResponseAsync(resourceGroupName, clusterName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); + private Mono deleteAsync(String resourceGroupName, String clusterName) { + return beginDeleteAsync(resourceGroupName, clusterName).last().flatMap(this.client::getLroFinalResultOrError); } /** - * Get HCI cluster. + * Delete an HCI cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return hCI cluster along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getByResourceGroupWithResponse(String resourceGroupName, String clusterName, - Context context) { - return getByResourceGroupWithResponseAsync(resourceGroupName, clusterName, context).block(); + public void delete(String resourceGroupName, String clusterName) { + beginDelete(resourceGroupName, clusterName).getFinalResult(); } /** - * Get HCI cluster. + * Delete an HCI cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return hCI cluster. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ClusterInner getByResourceGroup(String resourceGroupName, String clusterName) { - return getByResourceGroupWithResponse(resourceGroupName, clusterName, Context.NONE).getValue(); + public void delete(String resourceGroupName, String clusterName, Context context) { + beginDelete(resourceGroupName, clusterName, context).getFinalResult(); } /** - * Create an HCI cluster. + * List all HCI clusters in a resource group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterName The name of the cluster. - * @param cluster Details of the HCI cluster. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return cluster details along with {@link Response} on successful completion of {@link Mono}. + * @return list of clusters along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createWithResponseAsync(String resourceGroupName, String clusterName, - ClusterInner cluster) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (clusterName == null) { - return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); - } - if (cluster == null) { - return Mono.error(new IllegalArgumentException("Parameter cluster is required and cannot be null.")); - } else { - cluster.validate(); - } + private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName) { final String accept = "application/json"; return FluxUtil - .withContext(context -> service.create(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, clusterName, this.client.getApiVersion(), cluster, accept, context)) + .withContext(context -> service.listByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Create an HCI cluster. + * List all HCI clusters in a resource group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterName The name of the cluster. - * @param cluster Details of the HCI cluster. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return cluster details along with {@link Response} on successful completion of {@link Mono}. + * @return list of clusters as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createWithResponseAsync(String resourceGroupName, String clusterName, - ClusterInner cluster, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (clusterName == null) { - return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); - } - if (cluster == null) { - return Mono.error(new IllegalArgumentException("Parameter cluster is required and cannot be null.")); - } else { - cluster.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.create(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - clusterName, this.client.getApiVersion(), cluster, accept, context); + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByResourceGroupAsync(String resourceGroupName) { + return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName), + nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); } /** - * Create an HCI cluster. + * List all HCI clusters in a resource group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterName The name of the cluster. - * @param cluster Details of the HCI cluster. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return cluster details on successful completion of {@link Mono}. + * @return list of clusters along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createAsync(String resourceGroupName, String clusterName, ClusterInner cluster) { - return createWithResponseAsync(resourceGroupName, clusterName, cluster) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); + private PagedResponse listByResourceGroupSinglePage(String resourceGroupName) { + final String accept = "application/json"; + Response res = service.listByResourceGroupSync(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * Create an HCI cluster. + * List all HCI clusters in a resource group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterName The name of the cluster. - * @param cluster Details of the HCI cluster. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return cluster details along with {@link Response}. + * @return list of clusters along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response createWithResponse(String resourceGroupName, String clusterName, ClusterInner cluster, - Context context) { - return createWithResponseAsync(resourceGroupName, clusterName, cluster, context).block(); + private PagedResponse listByResourceGroupSinglePage(String resourceGroupName, Context context) { + final String accept = "application/json"; + Response res = service.listByResourceGroupSync(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * Create an HCI cluster. + * List all HCI clusters in a resource group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterName The name of the cluster. - * @param cluster Details of the HCI cluster. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return cluster details. + * @return list of clusters as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ClusterInner create(String resourceGroupName, String clusterName, ClusterInner cluster) { - return createWithResponse(resourceGroupName, clusterName, cluster, Context.NONE).getValue(); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByResourceGroup(String resourceGroupName) { + return new PagedIterable<>(() -> listByResourceGroupSinglePage(resourceGroupName), + nextLink -> listByResourceGroupNextSinglePage(nextLink)); } /** - * Update an HCI cluster. + * List all HCI clusters in a resource group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterName The name of the cluster. - * @param cluster Details of the HCI cluster. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return cluster details along with {@link Response} on successful completion of {@link Mono}. + * @return list of clusters as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByResourceGroup(String resourceGroupName, Context context) { + return new PagedIterable<>(() -> listByResourceGroupSinglePage(resourceGroupName, context), + nextLink -> listByResourceGroupNextSinglePage(nextLink, context)); + } + + /** + * List all HCI clusters in a subscription. + * + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of clusters along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> updateWithResponseAsync(String resourceGroupName, String clusterName, - ClusterPatch cluster) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (clusterName == null) { - return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); - } - if (cluster == null) { - return Mono.error(new IllegalArgumentException("Parameter cluster is required and cannot be null.")); - } else { - cluster.validate(); - } + private Mono> listSinglePageAsync() { final String accept = "application/json"; return FluxUtil - .withContext(context -> service.update(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, clusterName, this.client.getApiVersion(), cluster, accept, context)) + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Update an HCI cluster. + * List all HCI clusters in a subscription. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterName The name of the cluster. - * @param cluster Details of the HCI cluster. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return cluster details along with {@link Response} on successful completion of {@link Mono}. + * @return list of clusters as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> updateWithResponseAsync(String resourceGroupName, String clusterName, - ClusterPatch cluster, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (clusterName == null) { - return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); - } - if (cluster == null) { - return Mono.error(new IllegalArgumentException("Parameter cluster is required and cannot be null.")); - } else { - cluster.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.update(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - clusterName, this.client.getApiVersion(), cluster, accept, context); + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync() { + return new PagedFlux<>(() -> listSinglePageAsync(), + nextLink -> listBySubscriptionNextSinglePageAsync(nextLink)); } /** - * Update an HCI cluster. + * List all HCI clusters in a subscription. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterName The name of the cluster. - * @param cluster Details of the HCI cluster. - * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return cluster details on successful completion of {@link Mono}. + * @return list of clusters along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync(String resourceGroupName, String clusterName, ClusterPatch cluster) { - return updateWithResponseAsync(resourceGroupName, clusterName, cluster) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); + private PagedResponse listSinglePage() { + final String accept = "application/json"; + Response res = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * Update an HCI cluster. + * List all HCI clusters in a subscription. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterName The name of the cluster. - * @param cluster Details of the HCI cluster. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return cluster details along with {@link Response}. + * @return list of clusters along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response updateWithResponse(String resourceGroupName, String clusterName, ClusterPatch cluster, - Context context) { - return updateWithResponseAsync(resourceGroupName, clusterName, cluster, context).block(); + private PagedResponse listSinglePage(Context context) { + final String accept = "application/json"; + Response res = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * Update an HCI cluster. + * List all HCI clusters in a subscription. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterName The name of the cluster. - * @param cluster Details of the HCI cluster. - * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return cluster details. + * @return list of clusters as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ClusterInner update(String resourceGroupName, String clusterName, ClusterPatch cluster) { - return updateWithResponse(resourceGroupName, clusterName, cluster, Context.NONE).getValue(); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list() { + return new PagedIterable<>(() -> listSinglePage(), nextLink -> listBySubscriptionNextSinglePage(nextLink)); } /** - * Delete an HCI cluster. + * List all HCI clusters in a subscription. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterName The name of the cluster. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. + * @return list of clusters as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync(String resourceGroupName, String clusterName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (clusterName == null) { - return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, clusterName, this.client.getApiVersion(), accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(Context context) { + return new PagedIterable<>(() -> listSinglePage(context), + nextLink -> listBySubscriptionNextSinglePage(nextLink, context)); } /** - * Delete an HCI cluster. + * Update cluster secrets locations. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. - * @param context The context to associate with this operation. + * @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 the {@link Response} on successful completion of {@link Mono}. + * @return the response body along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync(String resourceGroupName, String clusterName, - Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (clusterName == null) { - return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); - } + private Mono>> updateSecretsLocationsWithResponseAsync(String resourceGroupName, + String clusterName, SecretsLocationsChangeRequest body) { + final String contentType = "application/json"; final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - clusterName, this.client.getApiVersion(), accept, context); + return FluxUtil + .withContext(context -> service.updateSecretsLocations(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, clusterName, + contentType, accept, body, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Delete an HCI cluster. + * Update cluster secrets locations. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. + * @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 the {@link PollerFlux} for polling of long-running operation. + * @return the response body along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String clusterName) { - Mono>> mono = deleteWithResponseAsync(resourceGroupName, clusterName); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - this.client.getContext()); + @ServiceMethod(returns = ReturnType.SINGLE) + private Response updateSecretsLocationsWithResponse(String resourceGroupName, String clusterName, + SecretsLocationsChangeRequest body) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.updateSecretsLocationsSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, clusterName, contentType, accept, body, Context.NONE); } /** - * Delete an HCI cluster. + * Update cluster secrets locations. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. + * @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 the {@link PollerFlux} for polling of long-running operation. + * @return the response body along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String clusterName, - Context context) { - context = this.client.mergeContext(context); - Mono>> mono = deleteWithResponseAsync(resourceGroupName, clusterName, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - context); + @ServiceMethod(returns = ReturnType.SINGLE) + private Response updateSecretsLocationsWithResponse(String resourceGroupName, String clusterName, + SecretsLocationsChangeRequest body, Context context) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.updateSecretsLocationsSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, clusterName, contentType, accept, body, context); } /** - * Delete an HCI cluster. + * Update cluster secrets locations. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. + * @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 the {@link SyncPoller} for polling of long-running operation. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete(String resourceGroupName, String clusterName) { - return this.beginDeleteAsync(resourceGroupName, clusterName).getSyncPoller(); + private PollerFlux, ClusterInner> beginUpdateSecretsLocationsAsync( + String resourceGroupName, String clusterName, SecretsLocationsChangeRequest body) { + Mono>> mono + = updateSecretsLocationsWithResponseAsync(resourceGroupName, clusterName, body); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + ClusterInner.class, ClusterInner.class, this.client.getContext()); } /** - * Delete an HCI cluster. + * Update cluster secrets locations. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. - * @param context The context to associate with this operation. + * @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 the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete(String resourceGroupName, String clusterName, - Context context) { - return this.beginDeleteAsync(resourceGroupName, clusterName, context).getSyncPoller(); + public SyncPoller, ClusterInner> beginUpdateSecretsLocations(String resourceGroupName, + String clusterName, SecretsLocationsChangeRequest body) { + Response response = updateSecretsLocationsWithResponse(resourceGroupName, clusterName, body); + return this.client.getLroResult(response, ClusterInner.class, ClusterInner.class, + Context.NONE); } /** - * Delete an HCI cluster. + * Update cluster secrets locations. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. + * @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 {@link Mono} that completes when a successful response is received. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String clusterName) { - return beginDeleteAsync(resourceGroupName, clusterName).last().flatMap(this.client::getLroFinalResultOrError); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, ClusterInner> beginUpdateSecretsLocations(String resourceGroupName, + String clusterName, SecretsLocationsChangeRequest body, Context context) { + Response response + = updateSecretsLocationsWithResponse(resourceGroupName, clusterName, body, context); + return this.client.getLroResult(response, ClusterInner.class, ClusterInner.class, + context); } /** - * Delete an HCI cluster. + * Update cluster secrets locations. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. - * @param context The context to associate with this operation. + * @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 {@link Mono} that completes when a successful response is received. + * @return the response body on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String clusterName, Context context) { - return beginDeleteAsync(resourceGroupName, clusterName, context).last() + private Mono updateSecretsLocationsAsync(String resourceGroupName, String clusterName, + SecretsLocationsChangeRequest body) { + return beginUpdateSecretsLocationsAsync(resourceGroupName, clusterName, body).last() .flatMap(this.client::getLroFinalResultOrError); } /** - * Delete an HCI cluster. + * Update cluster secrets locations. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. + * @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 the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String clusterName) { - deleteAsync(resourceGroupName, clusterName).block(); + public ClusterInner updateSecretsLocations(String resourceGroupName, String clusterName, + SecretsLocationsChangeRequest body) { + return beginUpdateSecretsLocations(resourceGroupName, clusterName, body).getFinalResult(); } /** - * Delete an HCI cluster. + * Update cluster secrets locations. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. + * @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 the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String clusterName, Context context) { - deleteAsync(resourceGroupName, clusterName, context).block(); + public ClusterInner updateSecretsLocations(String resourceGroupName, String clusterName, + SecretsLocationsChangeRequest body, Context context) { + return beginUpdateSecretsLocations(resourceGroupName, clusterName, body, context).getFinalResult(); } /** @@ -1034,77 +1083,14 @@ public void delete(String resourceGroupName, String clusterName, Context context @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> uploadCertificateWithResponseAsync(String resourceGroupName, String clusterName, UploadCertificateRequest uploadCertificateRequest) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (clusterName == null) { - return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); - } - if (uploadCertificateRequest == null) { - return Mono.error( - new IllegalArgumentException("Parameter uploadCertificateRequest is required and cannot be null.")); - } else { - uploadCertificateRequest.validate(); - } - final String accept = "application/json"; + final String contentType = "application/json"; return FluxUtil - .withContext(context -> service.uploadCertificate(this.client.getEndpoint(), - this.client.getSubscriptionId(), resourceGroupName, clusterName, this.client.getApiVersion(), - uploadCertificateRequest, accept, context)) + .withContext(context -> service.uploadCertificate(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, clusterName, contentType, uploadCertificateRequest, + context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } - /** - * Upload certificate. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterName The name of the cluster. - * @param uploadCertificateRequest Upload certificate 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 the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> uploadCertificateWithResponseAsync(String resourceGroupName, - String clusterName, UploadCertificateRequest uploadCertificateRequest, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (clusterName == null) { - return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); - } - if (uploadCertificateRequest == null) { - return Mono.error( - new IllegalArgumentException("Parameter uploadCertificateRequest is required and cannot be null.")); - } else { - uploadCertificateRequest.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.uploadCertificate(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - clusterName, this.client.getApiVersion(), uploadCertificateRequest, accept, context); - } - /** * Upload certificate. * @@ -1114,15 +1100,15 @@ private Mono>> uploadCertificateWithResponseAsync(Stri * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. + * @return the response body along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginUploadCertificateAsync(String resourceGroupName, String clusterName, + @ServiceMethod(returns = ReturnType.SINGLE) + private Response uploadCertificateWithResponse(String resourceGroupName, String clusterName, UploadCertificateRequest uploadCertificateRequest) { - Mono>> mono - = uploadCertificateWithResponseAsync(resourceGroupName, clusterName, uploadCertificateRequest); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - this.client.getContext()); + final String contentType = "application/json"; + return service.uploadCertificateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, clusterName, contentType, uploadCertificateRequest, + Context.NONE); } /** @@ -1135,15 +1121,14 @@ private PollerFlux, Void> beginUploadCertificateAsync(String re * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. + * @return the response body along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginUploadCertificateAsync(String resourceGroupName, String clusterName, + @ServiceMethod(returns = ReturnType.SINGLE) + private Response uploadCertificateWithResponse(String resourceGroupName, String clusterName, UploadCertificateRequest uploadCertificateRequest, Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = uploadCertificateWithResponseAsync(resourceGroupName, clusterName, uploadCertificateRequest, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + final String contentType = "application/json"; + return service.uploadCertificateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, clusterName, contentType, uploadCertificateRequest, context); } @@ -1156,13 +1141,15 @@ private PollerFlux, Void> beginUploadCertificateAsync(String re * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginUploadCertificate(String resourceGroupName, String clusterName, + private PollerFlux, Void> beginUploadCertificateAsync(String resourceGroupName, String clusterName, UploadCertificateRequest uploadCertificateRequest) { - return this.beginUploadCertificateAsync(resourceGroupName, clusterName, uploadCertificateRequest) - .getSyncPoller(); + Mono>> mono + = uploadCertificateWithResponseAsync(resourceGroupName, clusterName, uploadCertificateRequest); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); } /** @@ -1171,7 +1158,6 @@ public SyncPoller, Void> beginUploadCertificate(String resource * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param uploadCertificateRequest Upload certificate 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. @@ -1179,9 +1165,10 @@ public SyncPoller, Void> beginUploadCertificate(String resource */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginUploadCertificate(String resourceGroupName, String clusterName, - UploadCertificateRequest uploadCertificateRequest, Context context) { - return this.beginUploadCertificateAsync(resourceGroupName, clusterName, uploadCertificateRequest, context) - .getSyncPoller(); + UploadCertificateRequest uploadCertificateRequest) { + Response response + = uploadCertificateWithResponse(resourceGroupName, clusterName, uploadCertificateRequest); + return this.client.getLroResult(response, Void.class, Void.class, Context.NONE); } /** @@ -1190,16 +1177,18 @@ public SyncPoller, Void> beginUploadCertificate(String resource * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param uploadCertificateRequest Upload certificate 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 {@link Mono} that completes when a successful response is received. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono uploadCertificateAsync(String resourceGroupName, String clusterName, - UploadCertificateRequest uploadCertificateRequest) { - return beginUploadCertificateAsync(resourceGroupName, clusterName, uploadCertificateRequest).last() - .flatMap(this.client::getLroFinalResultOrError); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginUploadCertificate(String resourceGroupName, String clusterName, + UploadCertificateRequest uploadCertificateRequest, Context context) { + Response response + = uploadCertificateWithResponse(resourceGroupName, clusterName, uploadCertificateRequest, context); + return this.client.getLroResult(response, Void.class, Void.class, context); } /** @@ -1208,7 +1197,6 @@ private Mono uploadCertificateAsync(String resourceGroupName, String clust * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param uploadCertificateRequest Upload certificate 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. @@ -1216,8 +1204,8 @@ private Mono uploadCertificateAsync(String resourceGroupName, String clust */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono uploadCertificateAsync(String resourceGroupName, String clusterName, - UploadCertificateRequest uploadCertificateRequest, Context context) { - return beginUploadCertificateAsync(resourceGroupName, clusterName, uploadCertificateRequest, context).last() + UploadCertificateRequest uploadCertificateRequest) { + return beginUploadCertificateAsync(resourceGroupName, clusterName, uploadCertificateRequest).last() .flatMap(this.client::getLroFinalResultOrError); } @@ -1234,7 +1222,7 @@ private Mono uploadCertificateAsync(String resourceGroupName, String clust @ServiceMethod(returns = ReturnType.SINGLE) public void uploadCertificate(String resourceGroupName, String clusterName, UploadCertificateRequest uploadCertificateRequest) { - uploadCertificateAsync(resourceGroupName, clusterName, uploadCertificateRequest).block(); + beginUploadCertificate(resourceGroupName, clusterName, uploadCertificateRequest).getFinalResult(); } /** @@ -1251,7 +1239,7 @@ public void uploadCertificate(String resourceGroupName, String clusterName, @ServiceMethod(returns = ReturnType.SINGLE) public void uploadCertificate(String resourceGroupName, String clusterName, UploadCertificateRequest uploadCertificateRequest, Context context) { - uploadCertificateAsync(resourceGroupName, clusterName, uploadCertificateRequest, context).block(); + beginUploadCertificate(resourceGroupName, clusterName, uploadCertificateRequest, context).getFinalResult(); } /** @@ -1262,30 +1250,15 @@ public void uploadCertificate(String resourceGroupName, String clusterName, * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return cluster Identity details along with {@link Response} on successful completion of {@link Mono}. + * @return the response body along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> createIdentityWithResponseAsync(String resourceGroupName, String clusterName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (clusterName == null) { - return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); - } final String accept = "application/json"; return FluxUtil - .withContext(context -> service.createIdentity(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, clusterName, this.client.getApiVersion(), accept, context)) + .withContext(context -> service.createIdentity(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, clusterName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -1294,34 +1267,16 @@ private Mono>> createIdentityWithResponseAsync(String * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return cluster Identity details along with {@link Response} on successful completion of {@link Mono}. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createIdentityWithResponseAsync(String resourceGroupName, - String clusterName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (clusterName == null) { - return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); - } + private Response createIdentityWithResponse(String resourceGroupName, String clusterName) { final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.createIdentity(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - clusterName, this.client.getApiVersion(), accept, context); + return service.createIdentitySync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, clusterName, accept, Context.NONE); } /** @@ -1329,18 +1284,18 @@ private Mono>> createIdentityWithResponseAsync(String * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of cluster Identity details. + * @return the response body along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, ClusterIdentityResponseInner> - beginCreateIdentityAsync(String resourceGroupName, String clusterName) { - Mono>> mono = createIdentityWithResponseAsync(resourceGroupName, clusterName); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), ClusterIdentityResponseInner.class, ClusterIdentityResponseInner.class, - this.client.getContext()); + @ServiceMethod(returns = ReturnType.SINGLE) + private Response createIdentityWithResponse(String resourceGroupName, String clusterName, + Context context) { + final String accept = "application/json"; + return service.createIdentitySync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, clusterName, accept, context); } /** @@ -1348,21 +1303,18 @@ private Mono>> createIdentityWithResponseAsync(String * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of cluster Identity details. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, ClusterIdentityResponseInner> - beginCreateIdentityAsync(String resourceGroupName, String clusterName, Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = createIdentityWithResponseAsync(resourceGroupName, clusterName, context); + beginCreateIdentityAsync(String resourceGroupName, String clusterName) { + Mono>> mono = createIdentityWithResponseAsync(resourceGroupName, clusterName); return this.client.getLroResult(mono, this.client.getHttpPipeline(), ClusterIdentityResponseInner.class, ClusterIdentityResponseInner.class, - context); + this.client.getContext()); } /** @@ -1373,12 +1325,14 @@ private Mono>> createIdentityWithResponseAsync(String * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of cluster Identity details. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, ClusterIdentityResponseInner> beginCreateIdentity(String resourceGroupName, String clusterName) { - return this.beginCreateIdentityAsync(resourceGroupName, clusterName).getSyncPoller(); + Response response = createIdentityWithResponse(resourceGroupName, clusterName); + return this.client.getLroResult(response, + ClusterIdentityResponseInner.class, ClusterIdentityResponseInner.class, Context.NONE); } /** @@ -1390,12 +1344,14 @@ private Mono>> createIdentityWithResponseAsync(String * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of cluster Identity details. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, ClusterIdentityResponseInner> beginCreateIdentity(String resourceGroupName, String clusterName, Context context) { - return this.beginCreateIdentityAsync(resourceGroupName, clusterName, context).getSyncPoller(); + Response response = createIdentityWithResponse(resourceGroupName, clusterName, context); + return this.client.getLroResult(response, + ClusterIdentityResponseInner.class, ClusterIdentityResponseInner.class, context); } /** @@ -1406,7 +1362,7 @@ private Mono>> createIdentityWithResponseAsync(String * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return cluster Identity details on successful completion of {@link Mono}. + * @return the response body on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono createIdentityAsync(String resourceGroupName, String clusterName) { @@ -1414,24 +1370,6 @@ private Mono createIdentityAsync(String resourceGr .flatMap(this.client::getLroFinalResultOrError); } - /** - * Create cluster identity. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterName The name of the cluster. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return cluster Identity details on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createIdentityAsync(String resourceGroupName, String clusterName, - Context context) { - return beginCreateIdentityAsync(resourceGroupName, clusterName, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - /** * Create cluster identity. * @@ -1440,11 +1378,11 @@ private Mono createIdentityAsync(String resourceGr * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return cluster Identity details. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) public ClusterIdentityResponseInner createIdentity(String resourceGroupName, String clusterName) { - return createIdentityAsync(resourceGroupName, clusterName).block(); + return beginCreateIdentity(resourceGroupName, clusterName).getFinalResult(); } /** @@ -1456,11 +1394,11 @@ public ClusterIdentityResponseInner createIdentity(String resourceGroupName, Str * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return cluster Identity details. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) public ClusterIdentityResponseInner createIdentity(String resourceGroupName, String clusterName, Context context) { - return createIdentityAsync(resourceGroupName, clusterName, context).block(); + return beginCreateIdentity(resourceGroupName, clusterName, context).getFinalResult(); } /** @@ -1472,37 +1410,17 @@ public ClusterIdentityResponseInner createIdentity(String resourceGroupName, Str * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return cluster details along with {@link Response} on successful completion of {@link Mono}. + * @return the response body along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> extendSoftwareAssuranceBenefitWithResponseAsync(String resourceGroupName, String clusterName, SoftwareAssuranceChangeRequest softwareAssuranceChangeRequest) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (clusterName == null) { - return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); - } - if (softwareAssuranceChangeRequest == null) { - return Mono.error(new IllegalArgumentException( - "Parameter softwareAssuranceChangeRequest is required and cannot be null.")); - } else { - softwareAssuranceChangeRequest.validate(); - } + final String contentType = "application/json"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.extendSoftwareAssuranceBenefit(this.client.getEndpoint(), - this.client.getSubscriptionId(), resourceGroupName, clusterName, this.client.getApiVersion(), - softwareAssuranceChangeRequest, accept, context)) + this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, clusterName, + contentType, accept, softwareAssuranceChangeRequest, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -1512,41 +1430,19 @@ private Mono>> extendSoftwareAssuranceBenefitWithRespo * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param softwareAssuranceChangeRequest Software Assurance Change Request Payload. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return cluster details along with {@link Response} on successful completion of {@link Mono}. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> extendSoftwareAssuranceBenefitWithResponseAsync(String resourceGroupName, - String clusterName, SoftwareAssuranceChangeRequest softwareAssuranceChangeRequest, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (clusterName == null) { - return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); - } - if (softwareAssuranceChangeRequest == null) { - return Mono.error(new IllegalArgumentException( - "Parameter softwareAssuranceChangeRequest is required and cannot be null.")); - } else { - softwareAssuranceChangeRequest.validate(); - } + private Response extendSoftwareAssuranceBenefitWithResponse(String resourceGroupName, + String clusterName, SoftwareAssuranceChangeRequest softwareAssuranceChangeRequest) { + final String contentType = "application/json"; final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.extendSoftwareAssuranceBenefit(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, clusterName, this.client.getApiVersion(), softwareAssuranceChangeRequest, accept, - context); + return service.extendSoftwareAssuranceBenefitSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, clusterName, contentType, accept, + softwareAssuranceChangeRequest, Context.NONE); } /** @@ -1555,18 +1451,20 @@ private Mono>> extendSoftwareAssuranceBenefitWithRespo * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param softwareAssuranceChangeRequest Software Assurance Change Request Payload. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of cluster details. + * @return the response body along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, ClusterInner> beginExtendSoftwareAssuranceBenefitAsync( - String resourceGroupName, String clusterName, SoftwareAssuranceChangeRequest softwareAssuranceChangeRequest) { - Mono>> mono = extendSoftwareAssuranceBenefitWithResponseAsync(resourceGroupName, - clusterName, softwareAssuranceChangeRequest); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - ClusterInner.class, ClusterInner.class, this.client.getContext()); + @ServiceMethod(returns = ReturnType.SINGLE) + private Response extendSoftwareAssuranceBenefitWithResponse(String resourceGroupName, + String clusterName, SoftwareAssuranceChangeRequest softwareAssuranceChangeRequest, Context context) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.extendSoftwareAssuranceBenefitSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, clusterName, contentType, accept, + softwareAssuranceChangeRequest, context); } /** @@ -1575,21 +1473,18 @@ private PollerFlux, ClusterInner> beginExtendSoftwareAs * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param softwareAssuranceChangeRequest Software Assurance Change Request Payload. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of cluster details. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, ClusterInner> beginExtendSoftwareAssuranceBenefitAsync( - String resourceGroupName, String clusterName, SoftwareAssuranceChangeRequest softwareAssuranceChangeRequest, - Context context) { - context = this.client.mergeContext(context); + String resourceGroupName, String clusterName, SoftwareAssuranceChangeRequest softwareAssuranceChangeRequest) { Mono>> mono = extendSoftwareAssuranceBenefitWithResponseAsync(resourceGroupName, - clusterName, softwareAssuranceChangeRequest, context); + clusterName, softwareAssuranceChangeRequest); return this.client.getLroResult(mono, this.client.getHttpPipeline(), - ClusterInner.class, ClusterInner.class, context); + ClusterInner.class, ClusterInner.class, this.client.getContext()); } /** @@ -1601,14 +1496,15 @@ private PollerFlux, ClusterInner> beginExtendSoftwareAs * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of cluster details. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, ClusterInner> beginExtendSoftwareAssuranceBenefit( String resourceGroupName, String clusterName, SoftwareAssuranceChangeRequest softwareAssuranceChangeRequest) { - return this - .beginExtendSoftwareAssuranceBenefitAsync(resourceGroupName, clusterName, softwareAssuranceChangeRequest) - .getSyncPoller(); + Response response = extendSoftwareAssuranceBenefitWithResponse(resourceGroupName, clusterName, + softwareAssuranceChangeRequest); + return this.client.getLroResult(response, ClusterInner.class, ClusterInner.class, + Context.NONE); } /** @@ -1621,16 +1517,16 @@ public SyncPoller, ClusterInner> beginExtendSoftwareAss * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of cluster details. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, ClusterInner> beginExtendSoftwareAssuranceBenefit( String resourceGroupName, String clusterName, SoftwareAssuranceChangeRequest softwareAssuranceChangeRequest, Context context) { - return this - .beginExtendSoftwareAssuranceBenefitAsync(resourceGroupName, clusterName, softwareAssuranceChangeRequest, - context) - .getSyncPoller(); + Response response = extendSoftwareAssuranceBenefitWithResponse(resourceGroupName, clusterName, + softwareAssuranceChangeRequest, context); + return this.client.getLroResult(response, ClusterInner.class, ClusterInner.class, + context); } /** @@ -1642,7 +1538,7 @@ public SyncPoller, ClusterInner> beginExtendSoftwareAss * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return cluster details on successful completion of {@link Mono}. + * @return the response body on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono extendSoftwareAssuranceBenefitAsync(String resourceGroupName, String clusterName, @@ -1652,25 +1548,6 @@ private Mono extendSoftwareAssuranceBenefitAsync(String resourceGr .flatMap(this.client::getLroFinalResultOrError); } - /** - * Extends Software Assurance Benefit to a cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterName The name of the cluster. - * @param softwareAssuranceChangeRequest Software Assurance Change Request Payload. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return cluster details on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono extendSoftwareAssuranceBenefitAsync(String resourceGroupName, String clusterName, - SoftwareAssuranceChangeRequest softwareAssuranceChangeRequest, Context context) { - return beginExtendSoftwareAssuranceBenefitAsync(resourceGroupName, clusterName, softwareAssuranceChangeRequest, - context).last().flatMap(this.client::getLroFinalResultOrError); - } - /** * Extends Software Assurance Benefit to a cluster. * @@ -1680,13 +1557,13 @@ private Mono extendSoftwareAssuranceBenefitAsync(String resourceGr * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return cluster details. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) public ClusterInner extendSoftwareAssuranceBenefit(String resourceGroupName, String clusterName, SoftwareAssuranceChangeRequest softwareAssuranceChangeRequest) { - return extendSoftwareAssuranceBenefitAsync(resourceGroupName, clusterName, softwareAssuranceChangeRequest) - .block(); + return beginExtendSoftwareAssuranceBenefit(resourceGroupName, clusterName, softwareAssuranceChangeRequest) + .getFinalResult(); } /** @@ -1699,13 +1576,13 @@ public ClusterInner extendSoftwareAssuranceBenefit(String resourceGroupName, Str * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return cluster details. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) public ClusterInner extendSoftwareAssuranceBenefit(String resourceGroupName, String clusterName, SoftwareAssuranceChangeRequest softwareAssuranceChangeRequest, Context context) { - return extendSoftwareAssuranceBenefitAsync(resourceGroupName, clusterName, softwareAssuranceChangeRequest, - context).block(); + return beginExtendSoftwareAssuranceBenefit(resourceGroupName, clusterName, softwareAssuranceChangeRequest, + context).getFinalResult(); } /** @@ -1717,37 +1594,17 @@ public ClusterInner extendSoftwareAssuranceBenefit(String resourceGroupName, Str * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return cluster details along with {@link Response} on successful completion of {@link Mono}. + * @return the response body along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> triggerLogCollectionWithResponseAsync(String resourceGroupName, String clusterName, LogCollectionRequest logCollectionRequest) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (clusterName == null) { - return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); - } - if (logCollectionRequest == null) { - return Mono - .error(new IllegalArgumentException("Parameter logCollectionRequest is required and cannot be null.")); - } else { - logCollectionRequest.validate(); - } + final String contentType = "application/json"; final String accept = "application/json"; return FluxUtil - .withContext( - context -> service.triggerLogCollection(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, clusterName, this.client.getApiVersion(), logCollectionRequest, accept, context)) + .withContext(context -> service.triggerLogCollection(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, clusterName, contentType, accept, + logCollectionRequest, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -1757,40 +1614,19 @@ private Mono>> triggerLogCollectionWithResponseAsync(S * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param logCollectionRequest Trigger Log Collection Request Payload. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return cluster details along with {@link Response} on successful completion of {@link Mono}. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> triggerLogCollectionWithResponseAsync(String resourceGroupName, - String clusterName, LogCollectionRequest logCollectionRequest, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (clusterName == null) { - return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); - } - if (logCollectionRequest == null) { - return Mono - .error(new IllegalArgumentException("Parameter logCollectionRequest is required and cannot be null.")); - } else { - logCollectionRequest.validate(); - } + private Response triggerLogCollectionWithResponse(String resourceGroupName, String clusterName, + LogCollectionRequest logCollectionRequest) { + final String contentType = "application/json"; final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.triggerLogCollection(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, clusterName, this.client.getApiVersion(), logCollectionRequest, accept, context); + return service.triggerLogCollectionSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, clusterName, contentType, accept, logCollectionRequest, + Context.NONE); } /** @@ -1799,18 +1635,20 @@ private Mono>> triggerLogCollectionWithResponseAsync(S * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param logCollectionRequest Trigger Log Collection Request Payload. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of cluster details. + * @return the response body along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, ClusterInner> beginTriggerLogCollectionAsync(String resourceGroupName, - String clusterName, LogCollectionRequest logCollectionRequest) { - Mono>> mono - = triggerLogCollectionWithResponseAsync(resourceGroupName, clusterName, logCollectionRequest); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - ClusterInner.class, ClusterInner.class, this.client.getContext()); + @ServiceMethod(returns = ReturnType.SINGLE) + private Response triggerLogCollectionWithResponse(String resourceGroupName, String clusterName, + LogCollectionRequest logCollectionRequest, Context context) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.triggerLogCollectionSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, clusterName, contentType, accept, logCollectionRequest, + context); } /** @@ -1819,20 +1657,18 @@ private PollerFlux, ClusterInner> beginTriggerLogCollec * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param logCollectionRequest Trigger Log Collection Request Payload. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of cluster details. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, ClusterInner> beginTriggerLogCollectionAsync(String resourceGroupName, - String clusterName, LogCollectionRequest logCollectionRequest, Context context) { - context = this.client.mergeContext(context); + String clusterName, LogCollectionRequest logCollectionRequest) { Mono>> mono - = triggerLogCollectionWithResponseAsync(resourceGroupName, clusterName, logCollectionRequest, context); + = triggerLogCollectionWithResponseAsync(resourceGroupName, clusterName, logCollectionRequest); return this.client.getLroResult(mono, this.client.getHttpPipeline(), - ClusterInner.class, ClusterInner.class, context); + ClusterInner.class, ClusterInner.class, this.client.getContext()); } /** @@ -1844,13 +1680,15 @@ private PollerFlux, ClusterInner> beginTriggerLogCollec * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of cluster details. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, ClusterInner> beginTriggerLogCollection(String resourceGroupName, String clusterName, LogCollectionRequest logCollectionRequest) { - return this.beginTriggerLogCollectionAsync(resourceGroupName, clusterName, logCollectionRequest) - .getSyncPoller(); + Response response + = triggerLogCollectionWithResponse(resourceGroupName, clusterName, logCollectionRequest); + return this.client.getLroResult(response, ClusterInner.class, ClusterInner.class, + Context.NONE); } /** @@ -1863,13 +1701,15 @@ public SyncPoller, ClusterInner> beginTriggerLogCollect * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of cluster details. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, ClusterInner> beginTriggerLogCollection(String resourceGroupName, String clusterName, LogCollectionRequest logCollectionRequest, Context context) { - return this.beginTriggerLogCollectionAsync(resourceGroupName, clusterName, logCollectionRequest, context) - .getSyncPoller(); + Response response + = triggerLogCollectionWithResponse(resourceGroupName, clusterName, logCollectionRequest, context); + return this.client.getLroResult(response, ClusterInner.class, ClusterInner.class, + context); } /** @@ -1881,7 +1721,7 @@ public SyncPoller, ClusterInner> beginTriggerLogCollect * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return cluster details on successful completion of {@link Mono}. + * @return the response body on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono triggerLogCollectionAsync(String resourceGroupName, String clusterName, @@ -1890,25 +1730,6 @@ private Mono triggerLogCollectionAsync(String resourceGroupName, S .flatMap(this.client::getLroFinalResultOrError); } - /** - * Trigger Log Collection on a cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterName The name of the cluster. - * @param logCollectionRequest Trigger Log Collection Request Payload. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return cluster details on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono triggerLogCollectionAsync(String resourceGroupName, String clusterName, - LogCollectionRequest logCollectionRequest, Context context) { - return beginTriggerLogCollectionAsync(resourceGroupName, clusterName, logCollectionRequest, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - /** * Trigger Log Collection on a cluster. * @@ -1918,12 +1739,12 @@ private Mono triggerLogCollectionAsync(String resourceGroupName, S * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return cluster details. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) public ClusterInner triggerLogCollection(String resourceGroupName, String clusterName, LogCollectionRequest logCollectionRequest) { - return triggerLogCollectionAsync(resourceGroupName, clusterName, logCollectionRequest).block(); + return beginTriggerLogCollection(resourceGroupName, clusterName, logCollectionRequest).getFinalResult(); } /** @@ -1936,12 +1757,13 @@ public ClusterInner triggerLogCollection(String resourceGroupName, String cluste * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return cluster details. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) public ClusterInner triggerLogCollection(String resourceGroupName, String clusterName, LogCollectionRequest logCollectionRequest, Context context) { - return triggerLogCollectionAsync(resourceGroupName, clusterName, logCollectionRequest, context).block(); + return beginTriggerLogCollection(resourceGroupName, clusterName, logCollectionRequest, context) + .getFinalResult(); } /** @@ -1953,37 +1775,17 @@ public ClusterInner triggerLogCollection(String resourceGroupName, String cluste * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return cluster details along with {@link Response} on successful completion of {@link Mono}. + * @return the response body along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> configureRemoteSupportWithResponseAsync(String resourceGroupName, String clusterName, RemoteSupportRequest remoteSupportRequest) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (clusterName == null) { - return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); - } - if (remoteSupportRequest == null) { - return Mono - .error(new IllegalArgumentException("Parameter remoteSupportRequest is required and cannot be null.")); - } else { - remoteSupportRequest.validate(); - } + final String contentType = "application/json"; final String accept = "application/json"; return FluxUtil - .withContext( - context -> service.configureRemoteSupport(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, clusterName, this.client.getApiVersion(), remoteSupportRequest, accept, context)) + .withContext(context -> service.configureRemoteSupport(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, clusterName, + contentType, accept, remoteSupportRequest, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -1993,40 +1795,19 @@ private Mono>> configureRemoteSupportWithResponseAsync * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param remoteSupportRequest Configure Remote Support Request Payload. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return cluster details along with {@link Response} on successful completion of {@link Mono}. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> configureRemoteSupportWithResponseAsync(String resourceGroupName, - String clusterName, RemoteSupportRequest remoteSupportRequest, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (clusterName == null) { - return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); - } - if (remoteSupportRequest == null) { - return Mono - .error(new IllegalArgumentException("Parameter remoteSupportRequest is required and cannot be null.")); - } else { - remoteSupportRequest.validate(); - } + private Response configureRemoteSupportWithResponse(String resourceGroupName, String clusterName, + RemoteSupportRequest remoteSupportRequest) { + final String contentType = "application/json"; final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.configureRemoteSupport(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, clusterName, this.client.getApiVersion(), remoteSupportRequest, accept, context); + return service.configureRemoteSupportSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, clusterName, contentType, accept, remoteSupportRequest, + Context.NONE); } /** @@ -2035,18 +1816,20 @@ private Mono>> configureRemoteSupportWithResponseAsync * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param remoteSupportRequest Configure Remote Support Request Payload. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of cluster details. + * @return the response body along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, ClusterInner> beginConfigureRemoteSupportAsync( - String resourceGroupName, String clusterName, RemoteSupportRequest remoteSupportRequest) { - Mono>> mono - = configureRemoteSupportWithResponseAsync(resourceGroupName, clusterName, remoteSupportRequest); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - ClusterInner.class, ClusterInner.class, this.client.getContext()); + @ServiceMethod(returns = ReturnType.SINGLE) + private Response configureRemoteSupportWithResponse(String resourceGroupName, String clusterName, + RemoteSupportRequest remoteSupportRequest, Context context) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.configureRemoteSupportSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, clusterName, contentType, accept, remoteSupportRequest, + context); } /** @@ -2055,20 +1838,18 @@ private PollerFlux, ClusterInner> beginConfigureRemoteS * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param remoteSupportRequest Configure Remote Support Request Payload. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of cluster details. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, ClusterInner> beginConfigureRemoteSupportAsync( - String resourceGroupName, String clusterName, RemoteSupportRequest remoteSupportRequest, Context context) { - context = this.client.mergeContext(context); + String resourceGroupName, String clusterName, RemoteSupportRequest remoteSupportRequest) { Mono>> mono - = configureRemoteSupportWithResponseAsync(resourceGroupName, clusterName, remoteSupportRequest, context); + = configureRemoteSupportWithResponseAsync(resourceGroupName, clusterName, remoteSupportRequest); return this.client.getLroResult(mono, this.client.getHttpPipeline(), - ClusterInner.class, ClusterInner.class, context); + ClusterInner.class, ClusterInner.class, this.client.getContext()); } /** @@ -2080,13 +1861,15 @@ private PollerFlux, ClusterInner> beginConfigureRemoteS * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of cluster details. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, ClusterInner> beginConfigureRemoteSupport(String resourceGroupName, String clusterName, RemoteSupportRequest remoteSupportRequest) { - return this.beginConfigureRemoteSupportAsync(resourceGroupName, clusterName, remoteSupportRequest) - .getSyncPoller(); + Response response + = configureRemoteSupportWithResponse(resourceGroupName, clusterName, remoteSupportRequest); + return this.client.getLroResult(response, ClusterInner.class, ClusterInner.class, + Context.NONE); } /** @@ -2099,13 +1882,15 @@ public SyncPoller, ClusterInner> beginConfigureRemoteSu * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of cluster details. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, ClusterInner> beginConfigureRemoteSupport(String resourceGroupName, String clusterName, RemoteSupportRequest remoteSupportRequest, Context context) { - return this.beginConfigureRemoteSupportAsync(resourceGroupName, clusterName, remoteSupportRequest, context) - .getSyncPoller(); + Response response + = configureRemoteSupportWithResponse(resourceGroupName, clusterName, remoteSupportRequest, context); + return this.client.getLroResult(response, ClusterInner.class, ClusterInner.class, + context); } /** @@ -2117,7 +1902,7 @@ public SyncPoller, ClusterInner> beginConfigureRemoteSu * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return cluster details on successful completion of {@link Mono}. + * @return the response body on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono configureRemoteSupportAsync(String resourceGroupName, String clusterName, @@ -2126,25 +1911,6 @@ private Mono configureRemoteSupportAsync(String resourceGroupName, .flatMap(this.client::getLroFinalResultOrError); } - /** - * Configure RemoteSupport on a cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterName The name of the cluster. - * @param remoteSupportRequest Configure Remote Support Request Payload. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return cluster details on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono configureRemoteSupportAsync(String resourceGroupName, String clusterName, - RemoteSupportRequest remoteSupportRequest, Context context) { - return beginConfigureRemoteSupportAsync(resourceGroupName, clusterName, remoteSupportRequest, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - /** * Configure RemoteSupport on a cluster. * @@ -2154,12 +1920,12 @@ private Mono configureRemoteSupportAsync(String resourceGroupName, * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return cluster details. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) public ClusterInner configureRemoteSupport(String resourceGroupName, String clusterName, RemoteSupportRequest remoteSupportRequest) { - return configureRemoteSupportAsync(resourceGroupName, clusterName, remoteSupportRequest).block(); + return beginConfigureRemoteSupport(resourceGroupName, clusterName, remoteSupportRequest).getFinalResult(); } /** @@ -2172,12 +1938,13 @@ public ClusterInner configureRemoteSupport(String resourceGroupName, String clus * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return cluster details. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) public ClusterInner configureRemoteSupport(String resourceGroupName, String clusterName, RemoteSupportRequest remoteSupportRequest, Context context) { - return configureRemoteSupportAsync(resourceGroupName, clusterName, remoteSupportRequest, context).block(); + return beginConfigureRemoteSupport(resourceGroupName, clusterName, remoteSupportRequest, context) + .getFinalResult(); } /** @@ -2190,23 +1957,34 @@ public ClusterInner configureRemoteSupport(String resourceGroupName, String clus * @return list of clusters along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listBySubscriptionNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } + private Mono> listByResourceGroupNextSinglePageAsync(String nextLink) { final String accept = "application/json"; return FluxUtil .withContext( - context -> service.listBySubscriptionNext(nextLink, this.client.getEndpoint(), accept, context)) + context -> service.listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context)) .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of clusters along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByResourceGroupNextSinglePage(String nextLink) { + final String accept = "application/json"; + Response res + = service.listByResourceGroupNextSync(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. * @@ -2215,22 +1993,15 @@ private Mono> listBySubscriptionNextSinglePageAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of clusters along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return list of clusters along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listBySubscriptionNextSinglePageAsync(String nextLink, Context context) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } + private PagedResponse listByResourceGroupNextSinglePage(String nextLink, Context context) { final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.listBySubscriptionNext(nextLink, this.client.getEndpoint(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); + Response res + = service.listByResourceGroupNextSync(nextLink, this.client.getEndpoint(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** @@ -2243,23 +2014,34 @@ private Mono> listBySubscriptionNextSinglePageAsync( * @return list of clusters along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } + private Mono> listBySubscriptionNextSinglePageAsync(String nextLink) { final String accept = "application/json"; return FluxUtil .withContext( - context -> service.listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context)) + context -> service.listBySubscriptionNext(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 list of clusters along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listBySubscriptionNextSinglePage(String nextLink) { + final String accept = "application/json"; + Response res + = service.listBySubscriptionNextSync(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. * @@ -2268,21 +2050,14 @@ private Mono> listByResourceGroupNextSinglePageAsync * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of clusters along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return list of clusters along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupNextSinglePageAsync(String nextLink, Context context) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } + private PagedResponse listBySubscriptionNextSinglePage(String nextLink, Context context) { final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); + Response res + = service.listBySubscriptionNextSync(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/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/ClustersImpl.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/ClustersImpl.java index a807837fa7a3..7f243351b2b7 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/ClustersImpl.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/ClustersImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.implementation; @@ -17,6 +17,7 @@ import com.azure.resourcemanager.azurestackhci.models.Clusters; import com.azure.resourcemanager.azurestackhci.models.LogCollectionRequest; import com.azure.resourcemanager.azurestackhci.models.RemoteSupportRequest; +import com.azure.resourcemanager.azurestackhci.models.SecretsLocationsChangeRequest; import com.azure.resourcemanager.azurestackhci.models.SoftwareAssuranceChangeRequest; import com.azure.resourcemanager.azurestackhci.models.UploadCertificateRequest; @@ -33,26 +34,6 @@ public ClustersImpl(ClustersClient innerClient, this.serviceManager = serviceManager; } - public PagedIterable list() { - PagedIterable inner = this.serviceClient().list(); - return ResourceManagerUtils.mapPage(inner, inner1 -> new ClusterImpl(inner1, this.manager())); - } - - public PagedIterable list(Context context) { - PagedIterable inner = this.serviceClient().list(context); - return ResourceManagerUtils.mapPage(inner, inner1 -> new ClusterImpl(inner1, this.manager())); - } - - public PagedIterable listByResourceGroup(String resourceGroupName) { - PagedIterable inner = this.serviceClient().listByResourceGroup(resourceGroupName); - return ResourceManagerUtils.mapPage(inner, inner1 -> new ClusterImpl(inner1, this.manager())); - } - - public PagedIterable listByResourceGroup(String resourceGroupName, Context context) { - PagedIterable inner = this.serviceClient().listByResourceGroup(resourceGroupName, context); - return ResourceManagerUtils.mapPage(inner, inner1 -> new ClusterImpl(inner1, this.manager())); - } - public Response getByResourceGroupWithResponse(String resourceGroupName, String clusterName, Context context) { Response inner @@ -82,6 +63,46 @@ public void delete(String resourceGroupName, String clusterName, Context context this.serviceClient().delete(resourceGroupName, clusterName, context); } + public PagedIterable listByResourceGroup(String resourceGroupName) { + PagedIterable inner = this.serviceClient().listByResourceGroup(resourceGroupName); + return ResourceManagerUtils.mapPage(inner, inner1 -> new ClusterImpl(inner1, this.manager())); + } + + public PagedIterable listByResourceGroup(String resourceGroupName, Context context) { + PagedIterable inner = this.serviceClient().listByResourceGroup(resourceGroupName, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new ClusterImpl(inner1, this.manager())); + } + + public PagedIterable list() { + PagedIterable inner = this.serviceClient().list(); + return ResourceManagerUtils.mapPage(inner, inner1 -> new ClusterImpl(inner1, this.manager())); + } + + public PagedIterable list(Context context) { + PagedIterable inner = this.serviceClient().list(context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new ClusterImpl(inner1, this.manager())); + } + + public Cluster updateSecretsLocations(String resourceGroupName, String clusterName, + SecretsLocationsChangeRequest body) { + ClusterInner inner = this.serviceClient().updateSecretsLocations(resourceGroupName, clusterName, body); + if (inner != null) { + return new ClusterImpl(inner, this.manager()); + } else { + return null; + } + } + + public Cluster updateSecretsLocations(String resourceGroupName, String clusterName, + SecretsLocationsChangeRequest body, Context context) { + ClusterInner inner = this.serviceClient().updateSecretsLocations(resourceGroupName, clusterName, body, context); + if (inner != null) { + return new ClusterImpl(inner, this.manager()); + } else { + return null; + } + } + public void uploadCertificate(String resourceGroupName, String clusterName, UploadCertificateRequest uploadCertificateRequest) { this.serviceClient().uploadCertificate(resourceGroupName, clusterName, uploadCertificateRequest); diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/DeploymentSettingImpl.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/DeploymentSettingImpl.java index c541771b75ad..f14e0e573026 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/DeploymentSettingImpl.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/DeploymentSettingImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.implementation; diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/DeploymentSettingsClientImpl.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/DeploymentSettingsClientImpl.java index 2b69d37bb381..1320e17a8d30 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/DeploymentSettingsClientImpl.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/DeploymentSettingsClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.implementation; @@ -27,13 +27,14 @@ 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.azurestackhci.fluent.DeploymentSettingsClient; import com.azure.resourcemanager.azurestackhci.fluent.models.DeploymentSettingInner; -import com.azure.resourcemanager.azurestackhci.models.DeploymentSettingListResult; +import com.azure.resourcemanager.azurestackhci.implementation.models.DeploymentSettingListResult; import java.nio.ByteBuffer; import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; @@ -50,216 +51,117 @@ public final class DeploymentSettingsClientImpl implements DeploymentSettingsCli /** * The service client containing this operation class. */ - private final AzureStackHciClientImpl client; + private final AzureStackHciManagementClientImpl client; /** * Initializes an instance of DeploymentSettingsClientImpl. * * @param client the instance of the service client containing this operation class. */ - DeploymentSettingsClientImpl(AzureStackHciClientImpl client) { + DeploymentSettingsClientImpl(AzureStackHciManagementClientImpl client) { this.service = RestProxy.create(DeploymentSettingsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for AzureStackHciClientDeploymentSettings to be used by the proxy service - * to perform REST calls. + * The interface defining all the services for AzureStackHciManagementClientDeploymentSettings to be used by the + * proxy service to perform REST calls. */ - @Host("{$host}") - @ServiceInterface(name = "AzureStackHciClientD") + @Host("{endpoint}") + @ServiceInterface(name = "AzureStackHciManagementClientDeploymentSettings") public interface DeploymentSettingsService { @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/clusters/{clusterName}/deploymentSettings") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/clusters/{clusterName}/deploymentSettings/{deploymentSettingsName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByClusters(@HostParam("$host") String endpoint, + Mono> get(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("clusterName") String clusterName, - @HeaderParam("Accept") String accept, Context context); + @PathParam("deploymentSettingsName") String deploymentSettingsName, @HeaderParam("Accept") String accept, + Context context); @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/clusters/{clusterName}/deploymentSettings/{deploymentSettingsName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("$host") String endpoint, + Response getSync(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("clusterName") String clusterName, @PathParam("deploymentSettingsName") String deploymentSettingsName, @HeaderParam("Accept") String accept, Context context); - @Headers({ "Content-Type: application/json" }) @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/clusters/{clusterName}/deploymentSettings/{deploymentSettingsName}") @ExpectedResponses({ 200, 201 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> createOrUpdate(@HostParam("$host") String endpoint, + Mono>> createOrUpdate(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("clusterName") String clusterName, @PathParam("deploymentSettingsName") String deploymentSettingsName, - @BodyParam("application/json") DeploymentSettingInner resource, @HeaderParam("Accept") String accept, - Context context); + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") DeploymentSettingInner resource, Context context); - @Headers({ "Content-Type: application/json" }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/clusters/{clusterName}/deploymentSettings/{deploymentSettingsName}") + @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("clusterName") String clusterName, + @PathParam("deploymentSettingsName") String deploymentSettingsName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") DeploymentSettingInner resource, Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/clusters/{clusterName}/deploymentSettings/{deploymentSettingsName}") @ExpectedResponses({ 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete(@HostParam("$host") String endpoint, + Mono>> delete(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("clusterName") String clusterName, - @PathParam("deploymentSettingsName") String deploymentSettingsName, @HeaderParam("Accept") String accept, - Context context); + @PathParam("deploymentSettingsName") String deploymentSettingsName, Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/clusters/{clusterName}/deploymentSettings/{deploymentSettingsName}") + @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("clusterName") String clusterName, + @PathParam("deploymentSettingsName") String deploymentSettingsName, Context context); @Headers({ "Content-Type: application/json" }) - @Get("{nextLink}") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/clusters/{clusterName}/deploymentSettings") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByClustersNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + Mono> listByClusters(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("clusterName") String clusterName, @HeaderParam("Accept") String accept, Context context); - } - /** - * List DeploymentSetting resources by Clusters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterName The name of the cluster. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a DeploymentSetting list operation along with {@link PagedResponse} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByClustersSinglePageAsync(String resourceGroupName, - String clusterName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (clusterName == null) { - return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listByClusters(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, clusterName, accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * List DeploymentSetting resources by Clusters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterName The name of the cluster. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a DeploymentSetting list operation along with {@link PagedResponse} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByClustersSinglePageAsync(String resourceGroupName, - String clusterName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (clusterName == null) { - return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .listByClusters(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, clusterName, accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * List DeploymentSetting resources by Clusters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterName The name of the cluster. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a DeploymentSetting list operation as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByClustersAsync(String resourceGroupName, String clusterName) { - return new PagedFlux<>(() -> listByClustersSinglePageAsync(resourceGroupName, clusterName), - nextLink -> listByClustersNextSinglePageAsync(nextLink)); - } - - /** - * List DeploymentSetting resources by Clusters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterName The name of the cluster. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a DeploymentSetting list operation as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByClustersAsync(String resourceGroupName, String clusterName, - Context context) { - return new PagedFlux<>(() -> listByClustersSinglePageAsync(resourceGroupName, clusterName, context), - nextLink -> listByClustersNextSinglePageAsync(nextLink, context)); - } + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/clusters/{clusterName}/deploymentSettings") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listByClustersSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("clusterName") String clusterName, + @HeaderParam("Accept") String accept, Context context); - /** - * List DeploymentSetting resources by Clusters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterName The name of the cluster. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a DeploymentSetting list operation as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByClusters(String resourceGroupName, String clusterName) { - return new PagedIterable<>(listByClustersAsync(resourceGroupName, clusterName)); - } + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByClustersNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, Context context); - /** - * List DeploymentSetting resources by Clusters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterName The name of the cluster. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a DeploymentSetting list operation as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByClusters(String resourceGroupName, String clusterName, - Context context) { - return new PagedIterable<>(listByClustersAsync(resourceGroupName, clusterName, context)); + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listByClustersNextSync( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, Context context); } /** @@ -276,71 +178,12 @@ public PagedIterable listByClusters(String resourceGroup @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync(String resourceGroupName, String clusterName, String deploymentSettingsName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (clusterName == null) { - return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); - } - if (deploymentSettingsName == null) { - return Mono.error( - new IllegalArgumentException("Parameter deploymentSettingsName is required and cannot be null.")); - } final String accept = "application/json"; return FluxUtil.withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, clusterName, deploymentSettingsName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } - /** - * Get a DeploymentSetting. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterName The name of the cluster. - * @param deploymentSettingsName Name of Deployment Setting. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a DeploymentSetting along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, String clusterName, - String deploymentSettingsName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (clusterName == null) { - return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); - } - if (deploymentSettingsName == null) { - return Mono.error( - new IllegalArgumentException("Parameter deploymentSettingsName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.get(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, clusterName, deploymentSettingsName, accept, context); - } - /** * Get a DeploymentSetting. * @@ -374,7 +217,9 @@ private Mono getAsync(String resourceGroupName, String c @ServiceMethod(returns = ReturnType.SINGLE) public Response getWithResponse(String resourceGroupName, String clusterName, String deploymentSettingsName, Context context) { - return getWithResponseAsync(resourceGroupName, clusterName, deploymentSettingsName, context).block(); + final String accept = "application/json"; + return service.getSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, clusterName, deploymentSettingsName, accept, context); } /** @@ -408,35 +253,12 @@ public DeploymentSettingInner get(String resourceGroupName, String clusterName, @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, String clusterName, String deploymentSettingsName, DeploymentSettingInner resource) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (clusterName == null) { - return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); - } - if (deploymentSettingsName == null) { - return Mono.error( - new IllegalArgumentException("Parameter deploymentSettingsName is required and cannot be null.")); - } - if (resource == null) { - return Mono.error(new IllegalArgumentException("Parameter resource is required and cannot be null.")); - } else { - resource.validate(); - } + final String contentType = "application/json"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, clusterName, deploymentSettingsName, resource, - accept, context)) + this.client.getSubscriptionId(), resourceGroupName, clusterName, deploymentSettingsName, contentType, + accept, resource, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -447,44 +269,19 @@ private Mono>> createOrUpdateWithResponseAsync(String * @param clusterName The name of the cluster. * @param deploymentSettingsName Name of Deployment Setting. * @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 edge device resource along with {@link Response} on successful completion of {@link Mono}. + * @return edge device resource along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, - String clusterName, String deploymentSettingsName, DeploymentSettingInner resource, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (clusterName == null) { - return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); - } - if (deploymentSettingsName == null) { - return Mono.error( - new IllegalArgumentException("Parameter deploymentSettingsName is required and cannot be null.")); - } - if (resource == null) { - return Mono.error(new IllegalArgumentException("Parameter resource is required and cannot be null.")); - } else { - resource.validate(); - } + private Response createOrUpdateWithResponse(String resourceGroupName, String clusterName, + String deploymentSettingsName, DeploymentSettingInner resource) { + final String contentType = "application/json"; final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, clusterName, deploymentSettingsName, resource, accept, - context); + return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, clusterName, deploymentSettingsName, contentType, + accept, resource, Context.NONE); } /** @@ -494,19 +291,20 @@ private Mono>> createOrUpdateWithResponseAsync(String * @param clusterName The name of the cluster. * @param deploymentSettingsName Name of Deployment Setting. * @param resource Resource create parameters. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of edge device resource. + * @return edge device resource along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, DeploymentSettingInner> beginCreateOrUpdateAsync( - String resourceGroupName, String clusterName, String deploymentSettingsName, DeploymentSettingInner resource) { - Mono>> mono - = createOrUpdateWithResponseAsync(resourceGroupName, clusterName, deploymentSettingsName, resource); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), DeploymentSettingInner.class, DeploymentSettingInner.class, - this.client.getContext()); + @ServiceMethod(returns = ReturnType.SINGLE) + private Response createOrUpdateWithResponse(String resourceGroupName, String clusterName, + String deploymentSettingsName, DeploymentSettingInner 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, clusterName, deploymentSettingsName, contentType, + accept, resource, context); } /** @@ -516,7 +314,6 @@ private PollerFlux, DeploymentSettingInner> b * @param clusterName The name of the cluster. * @param deploymentSettingsName Name of Deployment Setting. * @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. @@ -524,13 +321,12 @@ private PollerFlux, DeploymentSettingInner> b */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, DeploymentSettingInner> beginCreateOrUpdateAsync( - String resourceGroupName, String clusterName, String deploymentSettingsName, DeploymentSettingInner resource, - Context context) { - context = this.client.mergeContext(context); - Mono>> mono = createOrUpdateWithResponseAsync(resourceGroupName, clusterName, - deploymentSettingsName, resource, context); + String resourceGroupName, String clusterName, String deploymentSettingsName, DeploymentSettingInner resource) { + Mono>> mono + = createOrUpdateWithResponseAsync(resourceGroupName, clusterName, deploymentSettingsName, resource); return this.client.getLroResult(mono, - this.client.getHttpPipeline(), DeploymentSettingInner.class, DeploymentSettingInner.class, context); + this.client.getHttpPipeline(), DeploymentSettingInner.class, DeploymentSettingInner.class, + this.client.getContext()); } /** @@ -548,8 +344,10 @@ private PollerFlux, DeploymentSettingInner> b @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, DeploymentSettingInner> beginCreateOrUpdate( String resourceGroupName, String clusterName, String deploymentSettingsName, DeploymentSettingInner resource) { - return this.beginCreateOrUpdateAsync(resourceGroupName, clusterName, deploymentSettingsName, resource) - .getSyncPoller(); + Response response + = createOrUpdateWithResponse(resourceGroupName, clusterName, deploymentSettingsName, resource); + return this.client.getLroResult(response, + DeploymentSettingInner.class, DeploymentSettingInner.class, Context.NONE); } /** @@ -569,8 +367,10 @@ public SyncPoller, DeploymentSettingInner> be public SyncPoller, DeploymentSettingInner> beginCreateOrUpdate( String resourceGroupName, String clusterName, String deploymentSettingsName, DeploymentSettingInner resource, Context context) { - return this.beginCreateOrUpdateAsync(resourceGroupName, clusterName, deploymentSettingsName, resource, context) - .getSyncPoller(); + Response response + = createOrUpdateWithResponse(resourceGroupName, clusterName, deploymentSettingsName, resource, context); + return this.client.getLroResult(response, + DeploymentSettingInner.class, DeploymentSettingInner.class, context); } /** @@ -592,27 +392,6 @@ private Mono createOrUpdateAsync(String resourceGroupNam .flatMap(this.client::getLroFinalResultOrError); } - /** - * Create a DeploymentSetting. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterName The name of the cluster. - * @param deploymentSettingsName Name of Deployment Setting. - * @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 edge device resource on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync(String resourceGroupName, String clusterName, - String deploymentSettingsName, DeploymentSettingInner resource, Context context) { - return beginCreateOrUpdateAsync(resourceGroupName, clusterName, deploymentSettingsName, resource, context) - .last() - .flatMap(this.client::getLroFinalResultOrError); - } - /** * Create a DeploymentSetting. * @@ -628,7 +407,7 @@ private Mono createOrUpdateAsync(String resourceGroupNam @ServiceMethod(returns = ReturnType.SINGLE) public DeploymentSettingInner createOrUpdate(String resourceGroupName, String clusterName, String deploymentSettingsName, DeploymentSettingInner resource) { - return createOrUpdateAsync(resourceGroupName, clusterName, deploymentSettingsName, resource).block(); + return beginCreateOrUpdate(resourceGroupName, clusterName, deploymentSettingsName, resource).getFinalResult(); } /** @@ -647,7 +426,8 @@ public DeploymentSettingInner createOrUpdate(String resourceGroupName, String cl @ServiceMethod(returns = ReturnType.SINGLE) public DeploymentSettingInner createOrUpdate(String resourceGroupName, String clusterName, String deploymentSettingsName, DeploymentSettingInner resource, Context context) { - return createOrUpdateAsync(resourceGroupName, clusterName, deploymentSettingsName, resource, context).block(); + return beginCreateOrUpdate(resourceGroupName, clusterName, deploymentSettingsName, resource, context) + .getFinalResult(); } /** @@ -664,28 +444,9 @@ public DeploymentSettingInner createOrUpdate(String resourceGroupName, String cl @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> deleteWithResponseAsync(String resourceGroupName, String clusterName, String deploymentSettingsName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (clusterName == null) { - return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); - } - if (deploymentSettingsName == null) { - return Mono.error( - new IllegalArgumentException("Parameter deploymentSettingsName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil.withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, clusterName, deploymentSettingsName, accept, context)) + return FluxUtil + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, clusterName, deploymentSettingsName, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -695,38 +456,16 @@ private Mono>> deleteWithResponseAsync(String resource * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param deploymentSettingsName Name of Deployment Setting. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync(String resourceGroupName, String clusterName, - String deploymentSettingsName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (clusterName == null) { - return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); - } - if (deploymentSettingsName == null) { - return Mono.error( - new IllegalArgumentException("Parameter deploymentSettingsName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.delete(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, clusterName, deploymentSettingsName, accept, context); + private Response deleteWithResponse(String resourceGroupName, String clusterName, + String deploymentSettingsName) { + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, clusterName, deploymentSettingsName, Context.NONE); } /** @@ -735,18 +474,17 @@ private Mono>> deleteWithResponseAsync(String resource * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param deploymentSettingsName Name of Deployment Setting. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. + * @return the response body along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String clusterName, - String deploymentSettingsName) { - Mono>> mono - = deleteWithResponseAsync(resourceGroupName, clusterName, deploymentSettingsName); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - this.client.getContext()); + @ServiceMethod(returns = ReturnType.SINGLE) + private Response deleteWithResponse(String resourceGroupName, String clusterName, + String deploymentSettingsName, Context context) { + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, clusterName, deploymentSettingsName, context); } /** @@ -755,7 +493,6 @@ private PollerFlux, Void> beginDeleteAsync(String resourceGroup * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param deploymentSettingsName Name of Deployment Setting. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -763,12 +500,11 @@ private PollerFlux, Void> beginDeleteAsync(String resourceGroup */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String clusterName, - String deploymentSettingsName, Context context) { - context = this.client.mergeContext(context); + String deploymentSettingsName) { Mono>> mono - = deleteWithResponseAsync(resourceGroupName, clusterName, deploymentSettingsName, context); + = deleteWithResponseAsync(resourceGroupName, clusterName, deploymentSettingsName); return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - context); + this.client.getContext()); } /** @@ -785,7 +521,8 @@ private PollerFlux, Void> beginDeleteAsync(String resourceGroup @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete(String resourceGroupName, String clusterName, String deploymentSettingsName) { - return this.beginDeleteAsync(resourceGroupName, clusterName, deploymentSettingsName).getSyncPoller(); + Response response = deleteWithResponse(resourceGroupName, clusterName, deploymentSettingsName); + return this.client.getLroResult(response, Void.class, Void.class, Context.NONE); } /** @@ -803,7 +540,9 @@ public SyncPoller, Void> beginDelete(String resourceGroupName, @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete(String resourceGroupName, String clusterName, String deploymentSettingsName, Context context) { - return this.beginDeleteAsync(resourceGroupName, clusterName, deploymentSettingsName, context).getSyncPoller(); + Response response + = deleteWithResponse(resourceGroupName, clusterName, deploymentSettingsName, context); + return this.client.getLroResult(response, Void.class, Void.class, context); } /** @@ -829,17 +568,13 @@ private Mono deleteAsync(String resourceGroupName, String clusterName, Str * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param deploymentSettingsName Name of Deployment Setting. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 clusterName, String deploymentSettingsName, - Context context) { - return beginDeleteAsync(resourceGroupName, clusterName, deploymentSettingsName, context).last() - .flatMap(this.client::getLroFinalResultOrError); + public void delete(String resourceGroupName, String clusterName, String deploymentSettingsName) { + beginDelete(resourceGroupName, clusterName, deploymentSettingsName).getFinalResult(); } /** @@ -848,29 +583,130 @@ private Mono deleteAsync(String resourceGroupName, String clusterName, Str * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param deploymentSettingsName Name of Deployment Setting. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @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 clusterName, String deploymentSettingsName) { - deleteAsync(resourceGroupName, clusterName, deploymentSettingsName).block(); + public void delete(String resourceGroupName, String clusterName, String deploymentSettingsName, Context context) { + beginDelete(resourceGroupName, clusterName, deploymentSettingsName, context).getFinalResult(); } /** - * Delete a DeploymentSetting. + * List DeploymentSetting resources by Clusters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a DeploymentSetting list operation along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByClustersSinglePageAsync(String resourceGroupName, + String clusterName) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listByClusters(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, clusterName, accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * List DeploymentSetting resources by Clusters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a DeploymentSetting list operation as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByClustersAsync(String resourceGroupName, String clusterName) { + return new PagedFlux<>(() -> listByClustersSinglePageAsync(resourceGroupName, clusterName), + nextLink -> listByClustersNextSinglePageAsync(nextLink)); + } + + /** + * List DeploymentSetting resources by Clusters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a DeploymentSetting list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByClustersSinglePage(String resourceGroupName, + String clusterName) { + final String accept = "application/json"; + Response res + = service.listByClustersSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, clusterName, accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * List DeploymentSetting resources by Clusters. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. - * @param deploymentSettingsName Name of Deployment Setting. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a DeploymentSetting list operation along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String clusterName, String deploymentSettingsName, Context context) { - deleteAsync(resourceGroupName, clusterName, deploymentSettingsName, context).block(); + private PagedResponse listByClustersSinglePage(String resourceGroupName, String clusterName, + Context context) { + final String accept = "application/json"; + Response res + = service.listByClustersSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, clusterName, accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * List DeploymentSetting resources by Clusters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a DeploymentSetting list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByClusters(String resourceGroupName, String clusterName) { + return new PagedIterable<>(() -> listByClustersSinglePage(resourceGroupName, clusterName), + nextLink -> listByClustersNextSinglePage(nextLink)); + } + + /** + * List DeploymentSetting resources by Clusters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a DeploymentSetting list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByClusters(String resourceGroupName, String clusterName, + Context context) { + return new PagedIterable<>(() -> listByClustersSinglePage(resourceGroupName, clusterName, context), + nextLink -> listByClustersNextSinglePage(nextLink, context)); } /** @@ -885,13 +721,6 @@ public void delete(String resourceGroupName, String clusterName, String deployme */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByClustersNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } final String accept = "application/json"; return FluxUtil .withContext(context -> service.listByClustersNext(nextLink, this.client.getEndpoint(), accept, context)) @@ -900,6 +729,24 @@ private Mono> listByClustersNextSinglePage .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 DeploymentSetting list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByClustersNextSinglePage(String nextLink) { + final String accept = "application/json"; + Response res + = service.listByClustersNextSync(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. * @@ -908,23 +755,14 @@ private Mono> listByClustersNextSinglePage * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a DeploymentSetting list operation along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * @return the response of a DeploymentSetting list operation along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByClustersNextSinglePageAsync(String nextLink, - Context context) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } + private PagedResponse listByClustersNextSinglePage(String nextLink, Context context) { final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.listByClustersNext(nextLink, this.client.getEndpoint(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); + Response res + = service.listByClustersNextSync(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/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/DeploymentSettingsImpl.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/DeploymentSettingsImpl.java index 67cf3f75119c..ecac917a9117 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/DeploymentSettingsImpl.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/DeploymentSettingsImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.implementation; @@ -27,19 +27,6 @@ public DeploymentSettingsImpl(DeploymentSettingsClient innerClient, this.serviceManager = serviceManager; } - public PagedIterable listByClusters(String resourceGroupName, String clusterName) { - PagedIterable inner - = this.serviceClient().listByClusters(resourceGroupName, clusterName); - return ResourceManagerUtils.mapPage(inner, inner1 -> new DeploymentSettingImpl(inner1, this.manager())); - } - - public PagedIterable listByClusters(String resourceGroupName, String clusterName, - Context context) { - PagedIterable inner - = this.serviceClient().listByClusters(resourceGroupName, clusterName, context); - return ResourceManagerUtils.mapPage(inner, inner1 -> new DeploymentSettingImpl(inner1, this.manager())); - } - public Response getWithResponse(String resourceGroupName, String clusterName, String deploymentSettingsName, Context context) { Response inner @@ -69,6 +56,19 @@ public void delete(String resourceGroupName, String clusterName, String deployme this.serviceClient().delete(resourceGroupName, clusterName, deploymentSettingsName, context); } + public PagedIterable listByClusters(String resourceGroupName, String clusterName) { + PagedIterable inner + = this.serviceClient().listByClusters(resourceGroupName, clusterName); + return ResourceManagerUtils.mapPage(inner, inner1 -> new DeploymentSettingImpl(inner1, this.manager())); + } + + public PagedIterable listByClusters(String resourceGroupName, String clusterName, + Context context) { + PagedIterable inner + = this.serviceClient().listByClusters(resourceGroupName, clusterName, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new DeploymentSettingImpl(inner1, this.manager())); + } + public DeploymentSetting getById(String id) { String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/EdgeDeviceImpl.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/EdgeDeviceImpl.java index 1e29703bba70..8d8512667635 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/EdgeDeviceImpl.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/EdgeDeviceImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.implementation; diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/PublisherImpl.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/EdgeDeviceJobImpl.java similarity index 63% rename from sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/PublisherImpl.java rename to sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/EdgeDeviceJobImpl.java index 412046443c03..2fde0a295340 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/PublisherImpl.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/EdgeDeviceJobImpl.java @@ -1,19 +1,20 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.implementation; import com.azure.core.management.SystemData; -import com.azure.resourcemanager.azurestackhci.fluent.models.PublisherInner; -import com.azure.resourcemanager.azurestackhci.models.Publisher; +import com.azure.resourcemanager.azurestackhci.fluent.models.EdgeDeviceJobInner; +import com.azure.resourcemanager.azurestackhci.models.EdgeDeviceJob; +import com.azure.resourcemanager.azurestackhci.models.EdgeDeviceKind; -public final class PublisherImpl implements Publisher { - private PublisherInner innerObject; +public final class EdgeDeviceJobImpl implements EdgeDeviceJob { + private EdgeDeviceJobInner innerObject; private final com.azure.resourcemanager.azurestackhci.AzureStackHciManager serviceManager; - PublisherImpl(PublisherInner innerObject, + EdgeDeviceJobImpl(EdgeDeviceJobInner innerObject, com.azure.resourcemanager.azurestackhci.AzureStackHciManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; @@ -31,15 +32,15 @@ public String type() { return this.innerModel().type(); } - public SystemData systemData() { - return this.innerModel().systemData(); + public EdgeDeviceKind kind() { + return this.innerModel().kind(); } - public String provisioningState() { - return this.innerModel().provisioningState(); + public SystemData systemData() { + return this.innerModel().systemData(); } - public PublisherInner innerModel() { + public EdgeDeviceJobInner innerModel() { return this.innerObject; } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/EdgeDeviceJobsClientImpl.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/EdgeDeviceJobsClientImpl.java new file mode 100644 index 000000000000..aa158d16f979 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/EdgeDeviceJobsClientImpl.java @@ -0,0 +1,756 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.azurestackhci.implementation; + +import com.azure.core.annotation.BodyParam; +import com.azure.core.annotation.Delete; +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.Get; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Headers; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.Put; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.PagedResponse; +import com.azure.core.http.rest.PagedResponseBase; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.management.exception.ManagementException; +import com.azure.core.management.polling.PollResult; +import com.azure.core.util.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.azurestackhci.fluent.EdgeDeviceJobsClient; +import com.azure.resourcemanager.azurestackhci.fluent.models.EdgeDeviceJobInner; +import com.azure.resourcemanager.azurestackhci.implementation.models.EdgeDeviceJobListResult; +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 EdgeDeviceJobsClient. + */ +public final class EdgeDeviceJobsClientImpl implements EdgeDeviceJobsClient { + /** + * The proxy service used to perform REST calls. + */ + private final EdgeDeviceJobsService service; + + /** + * The service client containing this operation class. + */ + private final AzureStackHciManagementClientImpl client; + + /** + * Initializes an instance of EdgeDeviceJobsClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + EdgeDeviceJobsClientImpl(AzureStackHciManagementClientImpl client) { + this.service + = RestProxy.create(EdgeDeviceJobsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for AzureStackHciManagementClientEdgeDeviceJobs to be used by the proxy + * service to perform REST calls. + */ + @Host("{endpoint}") + @ServiceInterface(name = "AzureStackHciManagementClientEdgeDeviceJobs") + public interface EdgeDeviceJobsService { + @Headers({ "Content-Type: application/json" }) + @Get("/{resourceUri}/providers/Microsoft.AzureStackHCI/edgeDevices/{edgeDeviceName}/jobs/{jobsName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> get(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, + @PathParam(value = "resourceUri", encoded = true) String resourceUri, + @PathParam("edgeDeviceName") String edgeDeviceName, @PathParam("jobsName") String jobsName, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/{resourceUri}/providers/Microsoft.AzureStackHCI/edgeDevices/{edgeDeviceName}/jobs/{jobsName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response getSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, + @PathParam(value = "resourceUri", encoded = true) String resourceUri, + @PathParam("edgeDeviceName") String edgeDeviceName, @PathParam("jobsName") String jobsName, + @HeaderParam("Accept") String accept, Context context); + + @Put("/{resourceUri}/providers/Microsoft.AzureStackHCI/edgeDevices/{edgeDeviceName}/jobs/{jobsName}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> createOrUpdate(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, + @PathParam(value = "resourceUri", encoded = true) String resourceUri, + @PathParam("edgeDeviceName") String edgeDeviceName, @PathParam("jobsName") String jobsName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") EdgeDeviceJobInner resource, Context context); + + @Put("/{resourceUri}/providers/Microsoft.AzureStackHCI/edgeDevices/{edgeDeviceName}/jobs/{jobsName}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response createOrUpdateSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, + @PathParam(value = "resourceUri", encoded = true) String resourceUri, + @PathParam("edgeDeviceName") String edgeDeviceName, @PathParam("jobsName") String jobsName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") EdgeDeviceJobInner resource, Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/{resourceUri}/providers/Microsoft.AzureStackHCI/edgeDevices/{edgeDeviceName}/jobs/{jobsName}") + @ExpectedResponses({ 202, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> delete(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, + @PathParam(value = "resourceUri", encoded = true) String resourceUri, + @PathParam("edgeDeviceName") String edgeDeviceName, @PathParam("jobsName") String jobsName, + Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/{resourceUri}/providers/Microsoft.AzureStackHCI/edgeDevices/{edgeDeviceName}/jobs/{jobsName}") + @ExpectedResponses({ 202, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response deleteSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, + @PathParam(value = "resourceUri", encoded = true) String resourceUri, + @PathParam("edgeDeviceName") String edgeDeviceName, @PathParam("jobsName") String jobsName, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/{resourceUri}/providers/Microsoft.AzureStackHCI/edgeDevices/{edgeDeviceName}/jobs") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByEdgeDevice(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, + @PathParam(value = "resourceUri", encoded = true) String resourceUri, + @PathParam("edgeDeviceName") String edgeDeviceName, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/{resourceUri}/providers/Microsoft.AzureStackHCI/edgeDevices/{edgeDeviceName}/jobs") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listByEdgeDeviceSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, + @PathParam(value = "resourceUri", encoded = true) String resourceUri, + @PathParam("edgeDeviceName") String edgeDeviceName, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByEdgeDeviceNext( + @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 listByEdgeDeviceNextSync( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, Context context); + } + + /** + * Get a EdgeDeviceJob. + * + * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. + * @param edgeDeviceName Name of Device. + * @param jobsName Name of EdgeDevice Job. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a EdgeDeviceJob along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync(String resourceUri, String edgeDeviceName, + String jobsName) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), resourceUri, + edgeDeviceName, jobsName, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get a EdgeDeviceJob. + * + * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. + * @param edgeDeviceName Name of Device. + * @param jobsName Name of EdgeDevice Job. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a EdgeDeviceJob on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getAsync(String resourceUri, String edgeDeviceName, String jobsName) { + return getWithResponseAsync(resourceUri, edgeDeviceName, jobsName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Get a EdgeDeviceJob. + * + * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. + * @param edgeDeviceName Name of Device. + * @param jobsName Name of EdgeDevice Job. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a EdgeDeviceJob along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse(String resourceUri, String edgeDeviceName, String jobsName, + Context context) { + final String accept = "application/json"; + return service.getSync(this.client.getEndpoint(), this.client.getApiVersion(), resourceUri, edgeDeviceName, + jobsName, accept, context); + } + + /** + * Get a EdgeDeviceJob. + * + * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. + * @param edgeDeviceName Name of Device. + * @param jobsName Name of EdgeDevice Job. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a EdgeDeviceJob. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public EdgeDeviceJobInner get(String resourceUri, String edgeDeviceName, String jobsName) { + return getWithResponse(resourceUri, edgeDeviceName, jobsName, Context.NONE).getValue(); + } + + /** + * Create a EdgeDeviceJob. + * + * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. + * @param edgeDeviceName Name of Device. + * @param jobsName Name of EdgeDevice Job. + * @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 edgeDevice Jobs resource along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createOrUpdateWithResponseAsync(String resourceUri, String edgeDeviceName, + String jobsName, EdgeDeviceJobInner resource) { + final String contentType = "application/json"; + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), + resourceUri, edgeDeviceName, jobsName, contentType, accept, resource, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Create a EdgeDeviceJob. + * + * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. + * @param edgeDeviceName Name of Device. + * @param jobsName Name of EdgeDevice Job. + * @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 edgeDevice Jobs resource along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response createOrUpdateWithResponse(String resourceUri, String edgeDeviceName, String jobsName, + EdgeDeviceJobInner resource) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), resourceUri, + edgeDeviceName, jobsName, contentType, accept, resource, Context.NONE); + } + + /** + * Create a EdgeDeviceJob. + * + * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. + * @param edgeDeviceName Name of Device. + * @param jobsName Name of EdgeDevice Job. + * @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 edgeDevice Jobs resource along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response createOrUpdateWithResponse(String resourceUri, String edgeDeviceName, String jobsName, + EdgeDeviceJobInner resource, Context context) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), resourceUri, + edgeDeviceName, jobsName, contentType, accept, resource, context); + } + + /** + * Create a EdgeDeviceJob. + * + * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. + * @param edgeDeviceName Name of Device. + * @param jobsName Name of EdgeDevice Job. + * @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 edgeDevice Jobs resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, EdgeDeviceJobInner> beginCreateOrUpdateAsync(String resourceUri, + String edgeDeviceName, String jobsName, EdgeDeviceJobInner resource) { + Mono>> mono + = createOrUpdateWithResponseAsync(resourceUri, edgeDeviceName, jobsName, resource); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + EdgeDeviceJobInner.class, EdgeDeviceJobInner.class, this.client.getContext()); + } + + /** + * Create a EdgeDeviceJob. + * + * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. + * @param edgeDeviceName Name of Device. + * @param jobsName Name of EdgeDevice Job. + * @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 edgeDevice Jobs resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, EdgeDeviceJobInner> beginCreateOrUpdate(String resourceUri, + String edgeDeviceName, String jobsName, EdgeDeviceJobInner resource) { + Response response = createOrUpdateWithResponse(resourceUri, edgeDeviceName, jobsName, resource); + return this.client.getLroResult(response, EdgeDeviceJobInner.class, + EdgeDeviceJobInner.class, Context.NONE); + } + + /** + * Create a EdgeDeviceJob. + * + * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. + * @param edgeDeviceName Name of Device. + * @param jobsName Name of EdgeDevice Job. + * @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 edgeDevice Jobs resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, EdgeDeviceJobInner> beginCreateOrUpdate(String resourceUri, + String edgeDeviceName, String jobsName, EdgeDeviceJobInner resource, Context context) { + Response response + = createOrUpdateWithResponse(resourceUri, edgeDeviceName, jobsName, resource, context); + return this.client.getLroResult(response, EdgeDeviceJobInner.class, + EdgeDeviceJobInner.class, context); + } + + /** + * Create a EdgeDeviceJob. + * + * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. + * @param edgeDeviceName Name of Device. + * @param jobsName Name of EdgeDevice Job. + * @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 edgeDevice Jobs resource on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateAsync(String resourceUri, String edgeDeviceName, String jobsName, + EdgeDeviceJobInner resource) { + return beginCreateOrUpdateAsync(resourceUri, edgeDeviceName, jobsName, resource).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Create a EdgeDeviceJob. + * + * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. + * @param edgeDeviceName Name of Device. + * @param jobsName Name of EdgeDevice Job. + * @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 edgeDevice Jobs resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public EdgeDeviceJobInner createOrUpdate(String resourceUri, String edgeDeviceName, String jobsName, + EdgeDeviceJobInner resource) { + return beginCreateOrUpdate(resourceUri, edgeDeviceName, jobsName, resource).getFinalResult(); + } + + /** + * Create a EdgeDeviceJob. + * + * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. + * @param edgeDeviceName Name of Device. + * @param jobsName Name of EdgeDevice Job. + * @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 edgeDevice Jobs resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public EdgeDeviceJobInner createOrUpdate(String resourceUri, String edgeDeviceName, String jobsName, + EdgeDeviceJobInner resource, Context context) { + return beginCreateOrUpdate(resourceUri, edgeDeviceName, jobsName, resource, context).getFinalResult(); + } + + /** + * Delete a EdgeDeviceJob. + * + * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. + * @param edgeDeviceName Name of Device. + * @param jobsName Name of EdgeDevice Job. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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 resourceUri, String edgeDeviceName, + String jobsName) { + return FluxUtil + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), resourceUri, + edgeDeviceName, jobsName, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Delete a EdgeDeviceJob. + * + * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. + * @param edgeDeviceName Name of Device. + * @param jobsName Name of EdgeDevice Job. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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 resourceUri, String edgeDeviceName, String jobsName) { + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), resourceUri, edgeDeviceName, + jobsName, Context.NONE); + } + + /** + * Delete a EdgeDeviceJob. + * + * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. + * @param edgeDeviceName Name of Device. + * @param jobsName Name of EdgeDevice Job. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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 resourceUri, String edgeDeviceName, String jobsName, + Context context) { + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), resourceUri, edgeDeviceName, + jobsName, context); + } + + /** + * Delete a EdgeDeviceJob. + * + * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. + * @param edgeDeviceName Name of Device. + * @param jobsName Name of EdgeDevice Job. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is 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 resourceUri, String edgeDeviceName, + String jobsName) { + Mono>> mono = deleteWithResponseAsync(resourceUri, edgeDeviceName, jobsName); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); + } + + /** + * Delete a EdgeDeviceJob. + * + * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. + * @param edgeDeviceName Name of Device. + * @param jobsName Name of EdgeDevice Job. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is 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 resourceUri, String edgeDeviceName, String jobsName) { + Response response = deleteWithResponse(resourceUri, edgeDeviceName, jobsName); + return this.client.getLroResult(response, Void.class, Void.class, Context.NONE); + } + + /** + * Delete a EdgeDeviceJob. + * + * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. + * @param edgeDeviceName Name of Device. + * @param jobsName Name of EdgeDevice Job. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is 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 resourceUri, String edgeDeviceName, String jobsName, + Context context) { + Response response = deleteWithResponse(resourceUri, edgeDeviceName, jobsName, context); + return this.client.getLroResult(response, Void.class, Void.class, context); + } + + /** + * Delete a EdgeDeviceJob. + * + * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. + * @param edgeDeviceName Name of Device. + * @param jobsName Name of EdgeDevice Job. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 resourceUri, String edgeDeviceName, String jobsName) { + return beginDeleteAsync(resourceUri, edgeDeviceName, jobsName).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Delete a EdgeDeviceJob. + * + * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. + * @param edgeDeviceName Name of Device. + * @param jobsName Name of EdgeDevice Job. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @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 resourceUri, String edgeDeviceName, String jobsName) { + beginDelete(resourceUri, edgeDeviceName, jobsName).getFinalResult(); + } + + /** + * Delete a EdgeDeviceJob. + * + * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. + * @param edgeDeviceName Name of Device. + * @param jobsName Name of EdgeDevice Job. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @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 resourceUri, String edgeDeviceName, String jobsName, Context context) { + beginDelete(resourceUri, edgeDeviceName, jobsName, context).getFinalResult(); + } + + /** + * List EdgeDeviceJob resources by EdgeDevice. + * + * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. + * @param edgeDeviceName Name of Device. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a EdgeDeviceJob list operation along with {@link PagedResponse} on successful completion + * of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByEdgeDeviceSinglePageAsync(String resourceUri, + String edgeDeviceName) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listByEdgeDevice(this.client.getEndpoint(), this.client.getApiVersion(), + resourceUri, edgeDeviceName, 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 EdgeDeviceJob resources by EdgeDevice. + * + * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. + * @param edgeDeviceName Name of Device. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a EdgeDeviceJob list operation as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByEdgeDeviceAsync(String resourceUri, String edgeDeviceName) { + return new PagedFlux<>(() -> listByEdgeDeviceSinglePageAsync(resourceUri, edgeDeviceName), + nextLink -> listByEdgeDeviceNextSinglePageAsync(nextLink)); + } + + /** + * List EdgeDeviceJob resources by EdgeDevice. + * + * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. + * @param edgeDeviceName Name of Device. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a EdgeDeviceJob list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByEdgeDeviceSinglePage(String resourceUri, String edgeDeviceName) { + final String accept = "application/json"; + Response res = service.listByEdgeDeviceSync(this.client.getEndpoint(), + this.client.getApiVersion(), resourceUri, edgeDeviceName, accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * List EdgeDeviceJob resources by EdgeDevice. + * + * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. + * @param edgeDeviceName Name of Device. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a EdgeDeviceJob list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByEdgeDeviceSinglePage(String resourceUri, String edgeDeviceName, + Context context) { + final String accept = "application/json"; + Response res = service.listByEdgeDeviceSync(this.client.getEndpoint(), + this.client.getApiVersion(), resourceUri, edgeDeviceName, accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * List EdgeDeviceJob resources by EdgeDevice. + * + * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. + * @param edgeDeviceName Name of Device. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a EdgeDeviceJob list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByEdgeDevice(String resourceUri, String edgeDeviceName) { + return new PagedIterable<>(() -> listByEdgeDeviceSinglePage(resourceUri, edgeDeviceName), + nextLink -> listByEdgeDeviceNextSinglePage(nextLink)); + } + + /** + * List EdgeDeviceJob resources by EdgeDevice. + * + * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. + * @param edgeDeviceName Name of Device. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a EdgeDeviceJob list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByEdgeDevice(String resourceUri, String edgeDeviceName, + Context context) { + return new PagedIterable<>(() -> listByEdgeDeviceSinglePage(resourceUri, edgeDeviceName, context), + nextLink -> listByEdgeDeviceNextSinglePage(nextLink, context)); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a EdgeDeviceJob list operation along with {@link PagedResponse} on successful completion + * of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByEdgeDeviceNextSinglePageAsync(String nextLink) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listByEdgeDeviceNext(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 EdgeDeviceJob list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByEdgeDeviceNextSinglePage(String nextLink) { + final String accept = "application/json"; + Response res + = service.listByEdgeDeviceNextSync(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 EdgeDeviceJob list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByEdgeDeviceNextSinglePage(String nextLink, Context context) { + final String accept = "application/json"; + Response res + = service.listByEdgeDeviceNextSync(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/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/EdgeDeviceJobsImpl.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/EdgeDeviceJobsImpl.java new file mode 100644 index 000000000000..c5a3cfafb901 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/EdgeDeviceJobsImpl.java @@ -0,0 +1,98 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.azurestackhci.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.azurestackhci.fluent.EdgeDeviceJobsClient; +import com.azure.resourcemanager.azurestackhci.fluent.models.EdgeDeviceJobInner; +import com.azure.resourcemanager.azurestackhci.models.EdgeDeviceJob; +import com.azure.resourcemanager.azurestackhci.models.EdgeDeviceJobs; + +public final class EdgeDeviceJobsImpl implements EdgeDeviceJobs { + private static final ClientLogger LOGGER = new ClientLogger(EdgeDeviceJobsImpl.class); + + private final EdgeDeviceJobsClient innerClient; + + private final com.azure.resourcemanager.azurestackhci.AzureStackHciManager serviceManager; + + public EdgeDeviceJobsImpl(EdgeDeviceJobsClient innerClient, + com.azure.resourcemanager.azurestackhci.AzureStackHciManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public Response getWithResponse(String resourceUri, String edgeDeviceName, String jobsName, + Context context) { + Response inner + = this.serviceClient().getWithResponse(resourceUri, edgeDeviceName, jobsName, context); + if (inner != null) { + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new EdgeDeviceJobImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public EdgeDeviceJob get(String resourceUri, String edgeDeviceName, String jobsName) { + EdgeDeviceJobInner inner = this.serviceClient().get(resourceUri, edgeDeviceName, jobsName); + if (inner != null) { + return new EdgeDeviceJobImpl(inner, this.manager()); + } else { + return null; + } + } + + public EdgeDeviceJob createOrUpdate(String resourceUri, String edgeDeviceName, String jobsName, + EdgeDeviceJobInner resource) { + EdgeDeviceJobInner inner = this.serviceClient().createOrUpdate(resourceUri, edgeDeviceName, jobsName, resource); + if (inner != null) { + return new EdgeDeviceJobImpl(inner, this.manager()); + } else { + return null; + } + } + + public EdgeDeviceJob createOrUpdate(String resourceUri, String edgeDeviceName, String jobsName, + EdgeDeviceJobInner resource, Context context) { + EdgeDeviceJobInner inner + = this.serviceClient().createOrUpdate(resourceUri, edgeDeviceName, jobsName, resource, context); + if (inner != null) { + return new EdgeDeviceJobImpl(inner, this.manager()); + } else { + return null; + } + } + + public void delete(String resourceUri, String edgeDeviceName, String jobsName) { + this.serviceClient().delete(resourceUri, edgeDeviceName, jobsName); + } + + public void delete(String resourceUri, String edgeDeviceName, String jobsName, Context context) { + this.serviceClient().delete(resourceUri, edgeDeviceName, jobsName, context); + } + + public PagedIterable listByEdgeDevice(String resourceUri, String edgeDeviceName) { + PagedIterable inner = this.serviceClient().listByEdgeDevice(resourceUri, edgeDeviceName); + return ResourceManagerUtils.mapPage(inner, inner1 -> new EdgeDeviceJobImpl(inner1, this.manager())); + } + + public PagedIterable listByEdgeDevice(String resourceUri, String edgeDeviceName, Context context) { + PagedIterable inner + = this.serviceClient().listByEdgeDevice(resourceUri, edgeDeviceName, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new EdgeDeviceJobImpl(inner1, this.manager())); + } + + private EdgeDeviceJobsClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/EdgeDevicesClientImpl.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/EdgeDevicesClientImpl.java index b3dfafbabc60..b6ac778a8a23 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/EdgeDevicesClientImpl.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/EdgeDevicesClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.implementation; @@ -28,6 +28,7 @@ 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; @@ -35,7 +36,7 @@ import com.azure.resourcemanager.azurestackhci.fluent.EdgeDevicesClient; import com.azure.resourcemanager.azurestackhci.fluent.models.EdgeDeviceInner; import com.azure.resourcemanager.azurestackhci.fluent.models.ValidateResponseInner; -import com.azure.resourcemanager.azurestackhci.models.EdgeDeviceListResult; +import com.azure.resourcemanager.azurestackhci.implementation.models.EdgeDeviceListResult; import com.azure.resourcemanager.azurestackhci.models.ValidateRequest; import java.nio.ByteBuffer; import reactor.core.publisher.Flux; @@ -53,72 +54,118 @@ public final class EdgeDevicesClientImpl implements EdgeDevicesClient { /** * The service client containing this operation class. */ - private final AzureStackHciClientImpl client; + private final AzureStackHciManagementClientImpl client; /** * Initializes an instance of EdgeDevicesClientImpl. * * @param client the instance of the service client containing this operation class. */ - EdgeDevicesClientImpl(AzureStackHciClientImpl client) { + EdgeDevicesClientImpl(AzureStackHciManagementClientImpl client) { this.service = RestProxy.create(EdgeDevicesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for AzureStackHciClientEdgeDevices to be used by the proxy service to - * perform REST calls. + * The interface defining all the services for AzureStackHciManagementClientEdgeDevices to be used by the proxy + * service to perform REST calls. */ - @Host("{$host}") - @ServiceInterface(name = "AzureStackHciClientE") + @Host("{endpoint}") + @ServiceInterface(name = "AzureStackHciManagementClientEdgeDevices") public interface EdgeDevicesService { @Headers({ "Content-Type: application/json" }) - @Get("/{resourceUri}/providers/Microsoft.AzureStackHCI/edgeDevices") + @Get("/{resourceUri}/providers/Microsoft.AzureStackHCI/edgeDevices/{edgeDeviceName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("$host") String endpoint, + Mono> get(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, - @PathParam(value = "resourceUri", encoded = true) String resourceUri, @HeaderParam("Accept") String accept, - Context context); + @PathParam(value = "resourceUri", encoded = true) String resourceUri, + @PathParam("edgeDeviceName") String edgeDeviceName, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Get("/{resourceUri}/providers/Microsoft.AzureStackHCI/edgeDevices/{edgeDeviceName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("$host") String endpoint, + Response getSync(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam(value = "resourceUri", encoded = true) String resourceUri, @PathParam("edgeDeviceName") String edgeDeviceName, @HeaderParam("Accept") String accept, Context context); - @Headers({ "Content-Type: application/json" }) @Put("/{resourceUri}/providers/Microsoft.AzureStackHCI/edgeDevices/{edgeDeviceName}") @ExpectedResponses({ 200, 201 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> createOrUpdate(@HostParam("$host") String endpoint, + Mono>> createOrUpdate(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam(value = "resourceUri", encoded = true) String resourceUri, - @PathParam("edgeDeviceName") String edgeDeviceName, @BodyParam("application/json") EdgeDeviceInner resource, - @HeaderParam("Accept") String accept, Context context); + @PathParam("edgeDeviceName") String edgeDeviceName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") EdgeDeviceInner resource, + Context context); - @Headers({ "Content-Type: application/json" }) + @Put("/{resourceUri}/providers/Microsoft.AzureStackHCI/edgeDevices/{edgeDeviceName}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response createOrUpdateSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, + @PathParam(value = "resourceUri", encoded = true) String resourceUri, + @PathParam("edgeDeviceName") String edgeDeviceName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") EdgeDeviceInner resource, + Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) @Delete("/{resourceUri}/providers/Microsoft.AzureStackHCI/edgeDevices/{edgeDeviceName}") @ExpectedResponses({ 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete(@HostParam("$host") String endpoint, + Mono>> delete(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam(value = "resourceUri", encoded = true) String resourceUri, - @PathParam("edgeDeviceName") String edgeDeviceName, @HeaderParam("Accept") String accept, Context context); + @PathParam("edgeDeviceName") String edgeDeviceName, Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/{resourceUri}/providers/Microsoft.AzureStackHCI/edgeDevices/{edgeDeviceName}") + @ExpectedResponses({ 202, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response deleteSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, + @PathParam(value = "resourceUri", encoded = true) String resourceUri, + @PathParam("edgeDeviceName") String edgeDeviceName, Context context); @Headers({ "Content-Type: application/json" }) + @Get("/{resourceUri}/providers/Microsoft.AzureStackHCI/edgeDevices") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> list(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, + @PathParam(value = "resourceUri", encoded = true) String resourceUri, @HeaderParam("Accept") String accept, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/{resourceUri}/providers/Microsoft.AzureStackHCI/edgeDevices") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, + @PathParam(value = "resourceUri", encoded = true) String resourceUri, @HeaderParam("Accept") String accept, + Context context); + + @Post("/{resourceUri}/providers/Microsoft.AzureStackHCI/edgeDevices/{edgeDeviceName}/validate") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> validate(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, + @PathParam(value = "resourceUri", encoded = true) String resourceUri, + @PathParam("edgeDeviceName") String edgeDeviceName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") ValidateRequest validateRequest, + Context context); + @Post("/{resourceUri}/providers/Microsoft.AzureStackHCI/edgeDevices/{edgeDeviceName}/validate") @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> validate(@HostParam("$host") String endpoint, + Response validateSync(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam(value = "resourceUri", encoded = true) String resourceUri, - @PathParam("edgeDeviceName") String edgeDeviceName, - @BodyParam("application/json") ValidateRequest validateRequest, @HeaderParam("Accept") String accept, + @PathParam("edgeDeviceName") String edgeDeviceName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") ValidateRequest validateRequest, Context context); @Headers({ "Content-Type: application/json" }) @@ -126,121 +173,14 @@ Mono>> validate(@HostParam("$host") String endpoint, @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listNext(@PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); - } - - /** - * List EdgeDevice resources by parent. - * - * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a EdgeDevice list operation along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String resourceUri) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceUri == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceUri is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), resourceUri, - 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 EdgeDevice resources by parent. - * - * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a EdgeDevice list operation along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String resourceUri, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceUri == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceUri is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.list(this.client.getEndpoint(), this.client.getApiVersion(), resourceUri, accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * List EdgeDevice resources by parent. - * - * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a EdgeDevice list operation as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceUri) { - return new PagedFlux<>(() -> listSinglePageAsync(resourceUri), nextLink -> listNextSinglePageAsync(nextLink)); - } + @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); - /** - * List EdgeDevice resources by parent. - * - * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a EdgeDevice list operation as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceUri, Context context) { - return new PagedFlux<>(() -> listSinglePageAsync(resourceUri, context), - nextLink -> listNextSinglePageAsync(nextLink, context)); - } - - /** - * List EdgeDevice resources by parent. - * - * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a EdgeDevice list operation as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceUri) { - return new PagedIterable<>(listAsync(resourceUri)); - } - - /** - * List EdgeDevice resources by parent. - * - * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a EdgeDevice list operation as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceUri, Context context) { - return new PagedIterable<>(listAsync(resourceUri, 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); } /** @@ -255,16 +195,6 @@ public PagedIterable list(String resourceUri, Context context) */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync(String resourceUri, String edgeDeviceName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceUri == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceUri is required and cannot be null.")); - } - if (edgeDeviceName == null) { - return Mono.error(new IllegalArgumentException("Parameter edgeDeviceName is required and cannot be null.")); - } final String accept = "application/json"; return FluxUtil .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), resourceUri, @@ -272,36 +202,6 @@ private Mono> getWithResponseAsync(String resourceUri, .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } - /** - * Get a EdgeDevice. - * - * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. - * @param edgeDeviceName Name of Device. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a EdgeDevice along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceUri, String edgeDeviceName, - Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceUri == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceUri is required and cannot be null.")); - } - if (edgeDeviceName == null) { - return Mono.error(new IllegalArgumentException("Parameter edgeDeviceName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.get(this.client.getEndpoint(), this.client.getApiVersion(), resourceUri, edgeDeviceName, accept, - context); - } - /** * Get a EdgeDevice. * @@ -330,7 +230,9 @@ private Mono getAsync(String resourceUri, String edgeDeviceName */ @ServiceMethod(returns = ReturnType.SINGLE) public Response getWithResponse(String resourceUri, String edgeDeviceName, Context context) { - return getWithResponseAsync(resourceUri, edgeDeviceName, context).block(); + final String accept = "application/json"; + return service.getSync(this.client.getEndpoint(), this.client.getApiVersion(), resourceUri, edgeDeviceName, + accept, context); } /** @@ -362,25 +264,11 @@ public EdgeDeviceInner get(String resourceUri, String edgeDeviceName) { @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> createOrUpdateWithResponseAsync(String resourceUri, String edgeDeviceName, EdgeDeviceInner resource) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceUri == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceUri is required and cannot be null.")); - } - if (edgeDeviceName == null) { - return Mono.error(new IllegalArgumentException("Parameter edgeDeviceName is required and cannot be null.")); - } - if (resource == null) { - return Mono.error(new IllegalArgumentException("Parameter resource is required and cannot be null.")); - } else { - resource.validate(); - } + final String contentType = "application/json"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), - resourceUri, edgeDeviceName, resource, accept, context)) + resourceUri, edgeDeviceName, contentType, accept, resource, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -390,34 +278,18 @@ private Mono>> createOrUpdateWithResponseAsync(String * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. * @param edgeDeviceName Name of Device. * @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 edge device resource along with {@link Response} on successful completion of {@link Mono}. + * @return edge device resource along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync(String resourceUri, String edgeDeviceName, - EdgeDeviceInner resource, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceUri == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceUri is required and cannot be null.")); - } - if (edgeDeviceName == null) { - return Mono.error(new IllegalArgumentException("Parameter edgeDeviceName is required and cannot be null.")); - } - if (resource == null) { - return Mono.error(new IllegalArgumentException("Parameter resource is required and cannot be null.")); - } else { - resource.validate(); - } + private Response createOrUpdateWithResponse(String resourceUri, String edgeDeviceName, + EdgeDeviceInner resource) { + final String contentType = "application/json"; final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), resourceUri, - edgeDeviceName, resource, accept, context); + return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), resourceUri, + edgeDeviceName, contentType, accept, resource, Context.NONE); } /** @@ -426,17 +298,19 @@ private Mono>> createOrUpdateWithResponseAsync(String * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. * @param edgeDeviceName Name of Device. * @param resource Resource create parameters. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of edge device resource. + * @return edge device resource along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, EdgeDeviceInner> beginCreateOrUpdateAsync(String resourceUri, - String edgeDeviceName, EdgeDeviceInner resource) { - Mono>> mono = createOrUpdateWithResponseAsync(resourceUri, edgeDeviceName, resource); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - EdgeDeviceInner.class, EdgeDeviceInner.class, this.client.getContext()); + @ServiceMethod(returns = ReturnType.SINGLE) + private Response createOrUpdateWithResponse(String resourceUri, String edgeDeviceName, + EdgeDeviceInner resource, Context context) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), resourceUri, + edgeDeviceName, contentType, accept, resource, context); } /** @@ -445,7 +319,6 @@ private PollerFlux, EdgeDeviceInner> beginCreateOrUp * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. * @param edgeDeviceName Name of Device. * @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. @@ -453,12 +326,10 @@ private PollerFlux, EdgeDeviceInner> beginCreateOrUp */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, EdgeDeviceInner> beginCreateOrUpdateAsync(String resourceUri, - String edgeDeviceName, EdgeDeviceInner resource, Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = createOrUpdateWithResponseAsync(resourceUri, edgeDeviceName, resource, context); + String edgeDeviceName, EdgeDeviceInner resource) { + Mono>> mono = createOrUpdateWithResponseAsync(resourceUri, edgeDeviceName, resource); return this.client.getLroResult(mono, this.client.getHttpPipeline(), - EdgeDeviceInner.class, EdgeDeviceInner.class, context); + EdgeDeviceInner.class, EdgeDeviceInner.class, this.client.getContext()); } /** @@ -475,7 +346,9 @@ private PollerFlux, EdgeDeviceInner> beginCreateOrUp @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, EdgeDeviceInner> beginCreateOrUpdate(String resourceUri, String edgeDeviceName, EdgeDeviceInner resource) { - return this.beginCreateOrUpdateAsync(resourceUri, edgeDeviceName, resource).getSyncPoller(); + Response response = createOrUpdateWithResponse(resourceUri, edgeDeviceName, resource); + return this.client.getLroResult(response, EdgeDeviceInner.class, + EdgeDeviceInner.class, Context.NONE); } /** @@ -493,7 +366,9 @@ public SyncPoller, EdgeDeviceInner> beginCreateOrUpd @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, EdgeDeviceInner> beginCreateOrUpdate(String resourceUri, String edgeDeviceName, EdgeDeviceInner resource, Context context) { - return this.beginCreateOrUpdateAsync(resourceUri, edgeDeviceName, resource, context).getSyncPoller(); + Response response = createOrUpdateWithResponse(resourceUri, edgeDeviceName, resource, context); + return this.client.getLroResult(response, EdgeDeviceInner.class, + EdgeDeviceInner.class, context); } /** @@ -514,25 +389,6 @@ private Mono createOrUpdateAsync(String resourceUri, String edg .flatMap(this.client::getLroFinalResultOrError); } - /** - * Create a EdgeDevice. - * - * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. - * @param edgeDeviceName Name of Device. - * @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 edge device resource on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync(String resourceUri, String edgeDeviceName, - EdgeDeviceInner resource, Context context) { - return beginCreateOrUpdateAsync(resourceUri, edgeDeviceName, resource, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - /** * Create a EdgeDevice. * @@ -546,7 +402,7 @@ private Mono createOrUpdateAsync(String resourceUri, String edg */ @ServiceMethod(returns = ReturnType.SINGLE) public EdgeDeviceInner createOrUpdate(String resourceUri, String edgeDeviceName, EdgeDeviceInner resource) { - return createOrUpdateAsync(resourceUri, edgeDeviceName, resource).block(); + return beginCreateOrUpdate(resourceUri, edgeDeviceName, resource).getFinalResult(); } /** @@ -564,7 +420,7 @@ public EdgeDeviceInner createOrUpdate(String resourceUri, String edgeDeviceName, @ServiceMethod(returns = ReturnType.SINGLE) public EdgeDeviceInner createOrUpdate(String resourceUri, String edgeDeviceName, EdgeDeviceInner resource, Context context) { - return createOrUpdateAsync(resourceUri, edgeDeviceName, resource, context).block(); + return beginCreateOrUpdate(resourceUri, edgeDeviceName, resource, context).getFinalResult(); } /** @@ -579,20 +435,9 @@ public EdgeDeviceInner createOrUpdate(String resourceUri, String edgeDeviceName, */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> deleteWithResponseAsync(String resourceUri, String edgeDeviceName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceUri == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceUri is required and cannot be null.")); - } - if (edgeDeviceName == null) { - return Mono.error(new IllegalArgumentException("Parameter edgeDeviceName is required and cannot be null.")); - } - final String accept = "application/json"; return FluxUtil .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), resourceUri, - edgeDeviceName, accept, context)) + edgeDeviceName, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -601,29 +446,15 @@ private Mono>> deleteWithResponseAsync(String resource * * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. * @param edgeDeviceName Name of Device. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync(String resourceUri, String edgeDeviceName, - Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceUri == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceUri is required and cannot be null.")); - } - if (edgeDeviceName == null) { - return Mono.error(new IllegalArgumentException("Parameter edgeDeviceName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.delete(this.client.getEndpoint(), this.client.getApiVersion(), resourceUri, edgeDeviceName, - accept, context); + private Response deleteWithResponse(String resourceUri, String edgeDeviceName) { + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), resourceUri, edgeDeviceName, + Context.NONE); } /** @@ -631,16 +462,16 @@ private Mono>> deleteWithResponseAsync(String resource * * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. * @param edgeDeviceName Name of Device. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. + * @return the response body along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync(String resourceUri, String edgeDeviceName) { - Mono>> mono = deleteWithResponseAsync(resourceUri, edgeDeviceName); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - this.client.getContext()); + @ServiceMethod(returns = ReturnType.SINGLE) + private Response deleteWithResponse(String resourceUri, String edgeDeviceName, Context context) { + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), resourceUri, edgeDeviceName, + context); } /** @@ -648,19 +479,16 @@ private PollerFlux, Void> beginDeleteAsync(String resourceUri, * * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. * @param edgeDeviceName Name of Device. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is 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 resourceUri, String edgeDeviceName, - Context context) { - context = this.client.mergeContext(context); - Mono>> mono = deleteWithResponseAsync(resourceUri, edgeDeviceName, context); + private PollerFlux, Void> beginDeleteAsync(String resourceUri, String edgeDeviceName) { + Mono>> mono = deleteWithResponseAsync(resourceUri, edgeDeviceName); return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - context); + this.client.getContext()); } /** @@ -675,7 +503,8 @@ private PollerFlux, Void> beginDeleteAsync(String resourceUri, */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete(String resourceUri, String edgeDeviceName) { - return this.beginDeleteAsync(resourceUri, edgeDeviceName).getSyncPoller(); + Response response = deleteWithResponse(resourceUri, edgeDeviceName); + return this.client.getLroResult(response, Void.class, Void.class, Context.NONE); } /** @@ -691,7 +520,8 @@ public SyncPoller, Void> beginDelete(String resourceUri, String */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete(String resourceUri, String edgeDeviceName, Context context) { - return this.beginDeleteAsync(resourceUri, edgeDeviceName, context).getSyncPoller(); + Response response = deleteWithResponse(resourceUri, edgeDeviceName, context); + return this.client.getLroResult(response, Void.class, Void.class, context); } /** @@ -714,16 +544,13 @@ private Mono deleteAsync(String resourceUri, String edgeDeviceName) { * * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. * @param edgeDeviceName Name of Device. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 resourceUri, String edgeDeviceName, Context context) { - return beginDeleteAsync(resourceUri, edgeDeviceName, context).last() - .flatMap(this.client::getLroFinalResultOrError); + public void delete(String resourceUri, String edgeDeviceName) { + beginDelete(resourceUri, edgeDeviceName).getFinalResult(); } /** @@ -731,28 +558,116 @@ private Mono deleteAsync(String resourceUri, String edgeDeviceName, Contex * * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. * @param edgeDeviceName Name of Device. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @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 resourceUri, String edgeDeviceName) { - deleteAsync(resourceUri, edgeDeviceName).block(); + public void delete(String resourceUri, String edgeDeviceName, Context context) { + beginDelete(resourceUri, edgeDeviceName, context).getFinalResult(); } /** - * Delete a EdgeDevice. + * List EdgeDevice resources by parent. + * + * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a EdgeDevice list operation along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync(String resourceUri) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), resourceUri, + 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 EdgeDevice resources by parent. + * + * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a EdgeDevice list operation as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String resourceUri) { + return new PagedFlux<>(() -> listSinglePageAsync(resourceUri), nextLink -> listNextSinglePageAsync(nextLink)); + } + + /** + * List EdgeDevice resources by parent. + * + * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a EdgeDevice list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listSinglePage(String resourceUri) { + final String accept = "application/json"; + Response res = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), + resourceUri, accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * List EdgeDevice resources by parent. * * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. - * @param edgeDeviceName Name of Device. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a EdgeDevice list operation along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceUri, String edgeDeviceName, Context context) { - deleteAsync(resourceUri, edgeDeviceName, context).block(); + private PagedResponse listSinglePage(String resourceUri, Context context) { + final String accept = "application/json"; + Response res + = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), resourceUri, accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * List EdgeDevice resources by parent. + * + * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a EdgeDevice list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String resourceUri) { + return new PagedIterable<>(() -> listSinglePage(resourceUri), nextLink -> listNextSinglePage(nextLink)); + } + + /** + * List EdgeDevice resources by parent. + * + * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a EdgeDevice list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String resourceUri, Context context) { + return new PagedIterable<>(() -> listSinglePage(resourceUri, context), + nextLink -> listNextSinglePage(nextLink, context)); } /** @@ -764,32 +679,16 @@ public void delete(String resourceUri, String edgeDeviceName, Context context) { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an Accepted response with an Operation-Location header along with {@link Response} on successful - * completion of {@link Mono}. + * @return the response body along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> validateWithResponseAsync(String resourceUri, String edgeDeviceName, ValidateRequest validateRequest) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceUri == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceUri is required and cannot be null.")); - } - if (edgeDeviceName == null) { - return Mono.error(new IllegalArgumentException("Parameter edgeDeviceName is required and cannot be null.")); - } - if (validateRequest == null) { - return Mono - .error(new IllegalArgumentException("Parameter validateRequest is required and cannot be null.")); - } else { - validateRequest.validate(); - } + final String contentType = "application/json"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.validate(this.client.getEndpoint(), this.client.getApiVersion(), - resourceUri, edgeDeviceName, validateRequest, accept, context)) + resourceUri, edgeDeviceName, contentType, accept, validateRequest, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -799,36 +698,18 @@ private Mono>> validateWithResponseAsync(String resour * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. * @param edgeDeviceName Name of Device. * @param validateRequest 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 an Accepted response with an Operation-Location header along with {@link Response} on successful - * completion of {@link Mono}. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> validateWithResponseAsync(String resourceUri, String edgeDeviceName, - ValidateRequest validateRequest, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceUri == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceUri is required and cannot be null.")); - } - if (edgeDeviceName == null) { - return Mono.error(new IllegalArgumentException("Parameter edgeDeviceName is required and cannot be null.")); - } - if (validateRequest == null) { - return Mono - .error(new IllegalArgumentException("Parameter validateRequest is required and cannot be null.")); - } else { - validateRequest.validate(); - } + private Response validateWithResponse(String resourceUri, String edgeDeviceName, + ValidateRequest validateRequest) { + final String contentType = "application/json"; final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.validate(this.client.getEndpoint(), this.client.getApiVersion(), resourceUri, edgeDeviceName, - validateRequest, accept, context); + return service.validateSync(this.client.getEndpoint(), this.client.getApiVersion(), resourceUri, edgeDeviceName, + contentType, accept, validateRequest, Context.NONE); } /** @@ -837,18 +718,19 @@ private Mono>> validateWithResponseAsync(String resour * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. * @param edgeDeviceName Name of Device. * @param validateRequest 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 the {@link PollerFlux} for polling of an Accepted response with an Operation-Location header. + * @return the response body along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, ValidateResponseInner> beginValidateAsync(String resourceUri, - String edgeDeviceName, ValidateRequest validateRequest) { - Mono>> mono = validateWithResponseAsync(resourceUri, edgeDeviceName, validateRequest); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), ValidateResponseInner.class, ValidateResponseInner.class, - this.client.getContext()); + @ServiceMethod(returns = ReturnType.SINGLE) + private Response validateWithResponse(String resourceUri, String edgeDeviceName, + ValidateRequest validateRequest, Context context) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.validateSync(this.client.getEndpoint(), this.client.getApiVersion(), resourceUri, edgeDeviceName, + contentType, accept, validateRequest, context); } /** @@ -857,20 +739,18 @@ private PollerFlux, ValidateResponseInner> beg * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. * @param edgeDeviceName Name of Device. * @param validateRequest 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 the {@link PollerFlux} for polling of an Accepted response with an Operation-Location header. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, ValidateResponseInner> beginValidateAsync(String resourceUri, - String edgeDeviceName, ValidateRequest validateRequest, Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = validateWithResponseAsync(resourceUri, edgeDeviceName, validateRequest, context); + String edgeDeviceName, ValidateRequest validateRequest) { + Mono>> mono = validateWithResponseAsync(resourceUri, edgeDeviceName, validateRequest); return this.client.getLroResult(mono, - this.client.getHttpPipeline(), ValidateResponseInner.class, ValidateResponseInner.class, context); + this.client.getHttpPipeline(), ValidateResponseInner.class, ValidateResponseInner.class, + this.client.getContext()); } /** @@ -882,12 +762,14 @@ private PollerFlux, ValidateResponseInner> beg * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of an Accepted response with an Operation-Location header. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, ValidateResponseInner> beginValidate(String resourceUri, String edgeDeviceName, ValidateRequest validateRequest) { - return this.beginValidateAsync(resourceUri, edgeDeviceName, validateRequest).getSyncPoller(); + Response response = validateWithResponse(resourceUri, edgeDeviceName, validateRequest); + return this.client.getLroResult(response, + ValidateResponseInner.class, ValidateResponseInner.class, Context.NONE); } /** @@ -900,12 +782,14 @@ public SyncPoller, ValidateResponseInner> begi * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of an Accepted response with an Operation-Location header. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, ValidateResponseInner> beginValidate(String resourceUri, String edgeDeviceName, ValidateRequest validateRequest, Context context) { - return this.beginValidateAsync(resourceUri, edgeDeviceName, validateRequest, context).getSyncPoller(); + Response response = validateWithResponse(resourceUri, edgeDeviceName, validateRequest, context); + return this.client.getLroResult(response, + ValidateResponseInner.class, ValidateResponseInner.class, context); } /** @@ -917,7 +801,7 @@ public SyncPoller, ValidateResponseInner> begi * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an Accepted response with an Operation-Location header on successful completion of {@link Mono}. + * @return the response body on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono validateAsync(String resourceUri, String edgeDeviceName, @@ -926,25 +810,6 @@ private Mono validateAsync(String resourceUri, String edg .flatMap(this.client::getLroFinalResultOrError); } - /** - * A long-running resource action. - * - * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. - * @param edgeDeviceName Name of Device. - * @param validateRequest 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 an Accepted response with an Operation-Location header on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono validateAsync(String resourceUri, String edgeDeviceName, - ValidateRequest validateRequest, Context context) { - return beginValidateAsync(resourceUri, edgeDeviceName, validateRequest, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - /** * A long-running resource action. * @@ -954,11 +819,11 @@ private Mono validateAsync(String resourceUri, String edg * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an Accepted response with an Operation-Location header. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) public ValidateResponseInner validate(String resourceUri, String edgeDeviceName, ValidateRequest validateRequest) { - return validateAsync(resourceUri, edgeDeviceName, validateRequest).block(); + return beginValidate(resourceUri, edgeDeviceName, validateRequest).getFinalResult(); } /** @@ -971,12 +836,12 @@ public ValidateResponseInner validate(String resourceUri, String edgeDeviceName, * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an Accepted response with an Operation-Location header. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) public ValidateResponseInner validate(String resourceUri, String edgeDeviceName, ValidateRequest validateRequest, Context context) { - return validateAsync(resourceUri, edgeDeviceName, validateRequest, context).block(); + return beginValidate(resourceUri, edgeDeviceName, validateRequest, context).getFinalResult(); } /** @@ -991,13 +856,6 @@ public ValidateResponseInner validate(String resourceUri, String edgeDeviceName, */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } final String accept = "application/json"; return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), @@ -1005,6 +863,24 @@ private Mono> listNextSinglePageAsync(String next .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 EdgeDevice 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. * @@ -1013,22 +889,13 @@ private Mono> listNextSinglePageAsync(String next * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a EdgeDevice list operation along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * @return the response of a EdgeDevice list operation along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink, Context context) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } + private PagedResponse listNextSinglePage(String nextLink, Context context) { final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.listNext(nextLink, this.client.getEndpoint(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); + 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/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/EdgeDevicesImpl.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/EdgeDevicesImpl.java index 34a960cb551b..70dccef29f64 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/EdgeDevicesImpl.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/EdgeDevicesImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.implementation; @@ -30,16 +30,6 @@ public EdgeDevicesImpl(EdgeDevicesClient innerClient, this.serviceManager = serviceManager; } - public PagedIterable list(String resourceUri) { - PagedIterable inner = this.serviceClient().list(resourceUri); - return ResourceManagerUtils.mapPage(inner, inner1 -> new EdgeDeviceImpl(inner1, this.manager())); - } - - public PagedIterable list(String resourceUri, Context context) { - PagedIterable inner = this.serviceClient().list(resourceUri, context); - return ResourceManagerUtils.mapPage(inner, inner1 -> new EdgeDeviceImpl(inner1, this.manager())); - } - public Response getWithResponse(String resourceUri, String edgeDeviceName, Context context) { Response inner = this.serviceClient().getWithResponse(resourceUri, edgeDeviceName, context); if (inner != null) { @@ -86,6 +76,16 @@ public void delete(String resourceUri, String edgeDeviceName, Context context) { this.serviceClient().delete(resourceUri, edgeDeviceName, context); } + public PagedIterable list(String resourceUri) { + PagedIterable inner = this.serviceClient().list(resourceUri); + return ResourceManagerUtils.mapPage(inner, inner1 -> new EdgeDeviceImpl(inner1, this.manager())); + } + + public PagedIterable list(String resourceUri, Context context) { + PagedIterable inner = this.serviceClient().list(resourceUri, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new EdgeDeviceImpl(inner1, this.manager())); + } + public ValidateResponse validate(String resourceUri, String edgeDeviceName, ValidateRequest validateRequest) { ValidateResponseInner inner = this.serviceClient().validate(resourceUri, edgeDeviceName, validateRequest); if (inner != null) { diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/ExtensionImpl.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/ExtensionImpl.java index 4e2708793046..9722121cf1b3 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/ExtensionImpl.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/ExtensionImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.implementation; diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/ExtensionsClientImpl.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/ExtensionsClientImpl.java index 77c4b8f7dec1..276d00201e78 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/ExtensionsClientImpl.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/ExtensionsClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.implementation; @@ -29,13 +29,14 @@ 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.azurestackhci.fluent.ExtensionsClient; import com.azure.resourcemanager.azurestackhci.fluent.models.ExtensionInner; -import com.azure.resourcemanager.azurestackhci.models.ExtensionList; +import com.azure.resourcemanager.azurestackhci.implementation.models.ExtensionList; import com.azure.resourcemanager.azurestackhci.models.ExtensionPatch; import com.azure.resourcemanager.azurestackhci.models.ExtensionUpgradeParameters; import java.nio.ByteBuffer; @@ -54,255 +55,160 @@ public final class ExtensionsClientImpl implements ExtensionsClient { /** * The service client containing this operation class. */ - private final AzureStackHciClientImpl client; + private final AzureStackHciManagementClientImpl client; /** * Initializes an instance of ExtensionsClientImpl. * * @param client the instance of the service client containing this operation class. */ - ExtensionsClientImpl(AzureStackHciClientImpl client) { + ExtensionsClientImpl(AzureStackHciManagementClientImpl client) { this.service = RestProxy.create(ExtensionsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for AzureStackHciClientExtensions to be used by the proxy service to - * perform REST calls. + * The interface defining all the services for AzureStackHciManagementClientExtensions to be used by the proxy + * service to perform REST calls. */ - @Host("{$host}") - @ServiceInterface(name = "AzureStackHciClientE") + @Host("{endpoint}") + @ServiceInterface(name = "AzureStackHciManagementClientExtensions") public interface ExtensionsService { @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/clusters/{clusterName}/arcSettings/{arcSettingName}/extensions") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/clusters/{clusterName}/arcSettings/{arcSettingName}/extensions/{extensionName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByArcSetting(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono> get(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("clusterName") String clusterName, - @PathParam("arcSettingName") String arcSettingName, @QueryParam("api-version") String apiVersion, + @PathParam("arcSettingName") String arcSettingName, @PathParam("extensionName") String extensionName, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/clusters/{clusterName}/arcSettings/{arcSettingName}/extensions/{extensionName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Response getSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("clusterName") String clusterName, @PathParam("arcSettingName") String arcSettingName, @PathParam("extensionName") String extensionName, - @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + @HeaderParam("Accept") String accept, Context context); - @Headers({ "Content-Type: application/json" }) @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/clusters/{clusterName}/arcSettings/{arcSettingName}/extensions/{extensionName}") @ExpectedResponses({ 200, 201 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> create(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono>> create(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("clusterName") String clusterName, @PathParam("arcSettingName") String arcSettingName, @PathParam("extensionName") String extensionName, - @QueryParam("api-version") String apiVersion, @BodyParam("application/json") ExtensionInner extension, - @HeaderParam("Accept") String accept, Context context); + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") ExtensionInner extension, Context context); + + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/clusters/{clusterName}/arcSettings/{arcSettingName}/extensions/{extensionName}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response createSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("clusterName") String clusterName, + @PathParam("arcSettingName") String arcSettingName, @PathParam("extensionName") String extensionName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") ExtensionInner extension, Context context); - @Headers({ "Content-Type: application/json" }) @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/clusters/{clusterName}/arcSettings/{arcSettingName}/extensions/{extensionName}") @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> update(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono>> update(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("clusterName") String clusterName, @PathParam("arcSettingName") String arcSettingName, @PathParam("extensionName") String extensionName, - @QueryParam("api-version") String apiVersion, @BodyParam("application/json") ExtensionPatch extension, - @HeaderParam("Accept") String accept, Context context); + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") ExtensionPatch extension, Context context); - @Headers({ "Content-Type: application/json" }) + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/clusters/{clusterName}/arcSettings/{arcSettingName}/extensions/{extensionName}") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response updateSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("clusterName") String clusterName, + @PathParam("arcSettingName") String arcSettingName, @PathParam("extensionName") String extensionName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") ExtensionPatch extension, Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/clusters/{clusterName}/arcSettings/{arcSettingName}/extensions/{extensionName}") + @ExpectedResponses({ 200, 202, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> delete(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("clusterName") String clusterName, + @PathParam("arcSettingName") String arcSettingName, @PathParam("extensionName") String extensionName, + Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/clusters/{clusterName}/arcSettings/{arcSettingName}/extensions/{extensionName}") @ExpectedResponses({ 200, 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Response deleteSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("clusterName") String clusterName, @PathParam("arcSettingName") String arcSettingName, @PathParam("extensionName") String extensionName, - @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + Context context); @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/clusters/{clusterName}/arcSettings/{arcSettingName}/extensions") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByArcSetting(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("clusterName") String clusterName, + @PathParam("arcSettingName") String arcSettingName, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/clusters/{clusterName}/arcSettings/{arcSettingName}/extensions") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listByArcSettingSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("clusterName") String clusterName, + @PathParam("arcSettingName") String arcSettingName, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Accept: application/json;q=0.9" }) @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/clusters/{clusterName}/arcSettings/{arcSettingName}/extensions/{extensionName}/upgrade") @ExpectedResponses({ 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> upgrade(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono>> upgrade(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("clusterName") String clusterName, @PathParam("arcSettingName") String arcSettingName, @PathParam("extensionName") String extensionName, - @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") ExtensionUpgradeParameters extensionUpgradeParameters, - @HeaderParam("Accept") String accept, Context context); + @HeaderParam("Content-Type") String contentType, + @BodyParam("application/json") ExtensionUpgradeParameters extensionUpgradeParameters, Context context); + + @Headers({ "Accept: application/json;q=0.9" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/clusters/{clusterName}/arcSettings/{arcSettingName}/extensions/{extensionName}/upgrade") + @ExpectedResponses({ 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response upgradeSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("clusterName") String clusterName, + @PathParam("arcSettingName") String arcSettingName, @PathParam("extensionName") String extensionName, + @HeaderParam("Content-Type") String contentType, + @BodyParam("application/json") ExtensionUpgradeParameters extensionUpgradeParameters, Context context); @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByArcSettingNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); - } - - /** - * List all Extensions under ArcSetting resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterName The name of the cluster. - * @param arcSettingName The name of the proxy resource holding details of HCI ArcSetting information. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of Extensions in HCI cluster along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByArcSettingSinglePageAsync(String resourceGroupName, - String clusterName, String arcSettingName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (clusterName == null) { - return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); - } - if (arcSettingName == null) { - return Mono.error(new IllegalArgumentException("Parameter arcSettingName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listByArcSetting(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, clusterName, arcSettingName, this.client.getApiVersion(), 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 all Extensions under ArcSetting resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterName The name of the cluster. - * @param arcSettingName The name of the proxy resource holding details of HCI ArcSetting information. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of Extensions in HCI cluster along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByArcSettingSinglePageAsync(String resourceGroupName, - String clusterName, String arcSettingName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (clusterName == null) { - return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); - } - if (arcSettingName == null) { - return Mono.error(new IllegalArgumentException("Parameter arcSettingName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .listByArcSetting(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - clusterName, arcSettingName, this.client.getApiVersion(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - /** - * List all Extensions under ArcSetting resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterName The name of the cluster. - * @param arcSettingName The name of the proxy resource holding details of HCI ArcSetting information. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of Extensions in HCI cluster as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByArcSettingAsync(String resourceGroupName, String clusterName, - String arcSettingName) { - return new PagedFlux<>(() -> listByArcSettingSinglePageAsync(resourceGroupName, clusterName, arcSettingName), - nextLink -> listByArcSettingNextSinglePageAsync(nextLink)); - } - - /** - * List all Extensions under ArcSetting resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterName The name of the cluster. - * @param arcSettingName The name of the proxy resource holding details of HCI ArcSetting information. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of Extensions in HCI cluster as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByArcSettingAsync(String resourceGroupName, String clusterName, - String arcSettingName, Context context) { - return new PagedFlux<>( - () -> listByArcSettingSinglePageAsync(resourceGroupName, clusterName, arcSettingName, context), - nextLink -> listByArcSettingNextSinglePageAsync(nextLink, context)); - } - - /** - * List all Extensions under ArcSetting resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterName The name of the cluster. - * @param arcSettingName The name of the proxy resource holding details of HCI ArcSetting information. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of Extensions in HCI cluster as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByArcSetting(String resourceGroupName, String clusterName, - String arcSettingName) { - return new PagedIterable<>(listByArcSettingAsync(resourceGroupName, clusterName, arcSettingName)); - } - - /** - * List all Extensions under ArcSetting resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterName The name of the cluster. - * @param arcSettingName The name of the proxy resource holding details of HCI ArcSetting information. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of Extensions in HCI cluster as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByArcSetting(String resourceGroupName, String clusterName, - String arcSettingName, Context context) { - return new PagedIterable<>(listByArcSettingAsync(resourceGroupName, clusterName, arcSettingName, context)); + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listByArcSettingNextSync(@PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); } /** @@ -321,79 +227,14 @@ public PagedIterable listByArcSetting(String resourceGroupName, @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync(String resourceGroupName, String clusterName, String arcSettingName, String extensionName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (clusterName == null) { - return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); - } - if (arcSettingName == null) { - return Mono.error(new IllegalArgumentException("Parameter arcSettingName is required and cannot be null.")); - } - if (extensionName == null) { - return Mono.error(new IllegalArgumentException("Parameter extensionName is required and cannot be null.")); - } final String accept = "application/json"; return FluxUtil - .withContext( - context -> service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - clusterName, arcSettingName, extensionName, this.client.getApiVersion(), accept, context)) + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, clusterName, arcSettingName, extensionName, accept, + context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } - /** - * Get particular Arc Extension of HCI Cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterName The name of the cluster. - * @param arcSettingName The name of the proxy resource holding details of HCI ArcSetting information. - * @param extensionName The name of the machine extension. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return particular Arc Extension of HCI Cluster along with {@link Response} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, String clusterName, - String arcSettingName, String extensionName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (clusterName == null) { - return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); - } - if (arcSettingName == null) { - return Mono.error(new IllegalArgumentException("Parameter arcSettingName is required and cannot be null.")); - } - if (extensionName == null) { - return Mono.error(new IllegalArgumentException("Parameter extensionName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, clusterName, - arcSettingName, extensionName, this.client.getApiVersion(), accept, context); - } - /** * Get particular Arc Extension of HCI Cluster. * @@ -429,7 +270,9 @@ private Mono getAsync(String resourceGroupName, String clusterNa @ServiceMethod(returns = ReturnType.SINGLE) public Response getWithResponse(String resourceGroupName, String clusterName, String arcSettingName, String extensionName, Context context) { - return getWithResponseAsync(resourceGroupName, clusterName, arcSettingName, extensionName, context).block(); + final String accept = "application/json"; + return service.getSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, clusterName, arcSettingName, extensionName, accept, context); } /** @@ -467,37 +310,12 @@ public ExtensionInner get(String resourceGroupName, String clusterName, String a @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> createWithResponseAsync(String resourceGroupName, String clusterName, String arcSettingName, String extensionName, ExtensionInner extension) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (clusterName == null) { - return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); - } - if (arcSettingName == null) { - return Mono.error(new IllegalArgumentException("Parameter arcSettingName is required and cannot be null.")); - } - if (extensionName == null) { - return Mono.error(new IllegalArgumentException("Parameter extensionName is required and cannot be null.")); - } - if (extension == null) { - return Mono.error(new IllegalArgumentException("Parameter extension is required and cannot be null.")); - } else { - extension.validate(); - } + final String contentType = "application/json"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.create(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, clusterName, arcSettingName, extensionName, this.client.getApiVersion(), extension, - accept, context)) + .withContext(context -> service.create(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, clusterName, arcSettingName, extensionName, + contentType, accept, extension, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -509,46 +327,19 @@ private Mono>> createWithResponseAsync(String resource * @param arcSettingName The name of the proxy resource holding details of HCI ArcSetting information. * @param extensionName The name of the machine extension. * @param extension Details of the Machine Extension to be created. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return details of a particular extension in HCI Cluster along with {@link Response} on successful completion of - * {@link Mono}. + * @return details of a particular extension in HCI Cluster along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createWithResponseAsync(String resourceGroupName, String clusterName, - String arcSettingName, String extensionName, ExtensionInner extension, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (clusterName == null) { - return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); - } - if (arcSettingName == null) { - return Mono.error(new IllegalArgumentException("Parameter arcSettingName is required and cannot be null.")); - } - if (extensionName == null) { - return Mono.error(new IllegalArgumentException("Parameter extensionName is required and cannot be null.")); - } - if (extension == null) { - return Mono.error(new IllegalArgumentException("Parameter extension is required and cannot be null.")); - } else { - extension.validate(); - } + private Response createWithResponse(String resourceGroupName, String clusterName, String arcSettingName, + String extensionName, ExtensionInner extension) { + final String contentType = "application/json"; final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.create(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - clusterName, arcSettingName, extensionName, this.client.getApiVersion(), extension, accept, context); + return service.createSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, clusterName, arcSettingName, extensionName, contentType, + accept, extension, Context.NONE); } /** @@ -559,18 +350,20 @@ private Mono>> createWithResponseAsync(String resource * @param arcSettingName The name of the proxy resource holding details of HCI ArcSetting information. * @param extensionName The name of the machine extension. * @param extension Details of the Machine Extension to be created. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of details of a particular extension in HCI Cluster. + * @return details of a particular extension in HCI Cluster along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, ExtensionInner> beginCreateAsync(String resourceGroupName, - String clusterName, String arcSettingName, String extensionName, ExtensionInner extension) { - Mono>> mono - = createWithResponseAsync(resourceGroupName, clusterName, arcSettingName, extensionName, extension); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - ExtensionInner.class, ExtensionInner.class, this.client.getContext()); + @ServiceMethod(returns = ReturnType.SINGLE) + private Response createWithResponse(String resourceGroupName, String clusterName, String arcSettingName, + String extensionName, ExtensionInner extension, Context context) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.createSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, clusterName, arcSettingName, extensionName, contentType, + accept, extension, context); } /** @@ -581,7 +374,6 @@ private PollerFlux, ExtensionInner> beginCreateAsync( * @param arcSettingName The name of the proxy resource holding details of HCI ArcSetting information. * @param extensionName The name of the machine extension. * @param extension Details of the Machine Extension to be created. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -589,12 +381,11 @@ private PollerFlux, ExtensionInner> beginCreateAsync( */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, ExtensionInner> beginCreateAsync(String resourceGroupName, - String clusterName, String arcSettingName, String extensionName, ExtensionInner extension, Context context) { - context = this.client.mergeContext(context); - Mono>> mono = createWithResponseAsync(resourceGroupName, clusterName, arcSettingName, - extensionName, extension, context); + String clusterName, String arcSettingName, String extensionName, ExtensionInner extension) { + Mono>> mono + = createWithResponseAsync(resourceGroupName, clusterName, arcSettingName, extensionName, extension); return this.client.getLroResult(mono, this.client.getHttpPipeline(), - ExtensionInner.class, ExtensionInner.class, context); + ExtensionInner.class, ExtensionInner.class, this.client.getContext()); } /** @@ -613,8 +404,10 @@ private PollerFlux, ExtensionInner> beginCreateAsync( @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, ExtensionInner> beginCreate(String resourceGroupName, String clusterName, String arcSettingName, String extensionName, ExtensionInner extension) { - return this.beginCreateAsync(resourceGroupName, clusterName, arcSettingName, extensionName, extension) - .getSyncPoller(); + Response response + = createWithResponse(resourceGroupName, clusterName, arcSettingName, extensionName, extension); + return this.client.getLroResult(response, ExtensionInner.class, + ExtensionInner.class, Context.NONE); } /** @@ -634,8 +427,10 @@ public SyncPoller, ExtensionInner> beginCreate(String @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, ExtensionInner> beginCreate(String resourceGroupName, String clusterName, String arcSettingName, String extensionName, ExtensionInner extension, Context context) { - return this.beginCreateAsync(resourceGroupName, clusterName, arcSettingName, extensionName, extension, context) - .getSyncPoller(); + Response response + = createWithResponse(resourceGroupName, clusterName, arcSettingName, extensionName, extension, context); + return this.client.getLroResult(response, ExtensionInner.class, + ExtensionInner.class, context); } /** @@ -658,28 +453,6 @@ private Mono createAsync(String resourceGroupName, String cluste .flatMap(this.client::getLroFinalResultOrError); } - /** - * Create Extension for HCI cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterName The name of the cluster. - * @param arcSettingName The name of the proxy resource holding details of HCI ArcSetting information. - * @param extensionName The name of the machine extension. - * @param extension Details of the Machine Extension to be created. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return details of a particular extension in HCI Cluster on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createAsync(String resourceGroupName, String clusterName, String arcSettingName, - String extensionName, ExtensionInner extension, Context context) { - return beginCreateAsync(resourceGroupName, clusterName, arcSettingName, extensionName, extension, context) - .last() - .flatMap(this.client::getLroFinalResultOrError); - } - /** * Create Extension for HCI cluster. * @@ -696,7 +469,7 @@ private Mono createAsync(String resourceGroupName, String cluste @ServiceMethod(returns = ReturnType.SINGLE) public ExtensionInner create(String resourceGroupName, String clusterName, String arcSettingName, String extensionName, ExtensionInner extension) { - return createAsync(resourceGroupName, clusterName, arcSettingName, extensionName, extension).block(); + return beginCreate(resourceGroupName, clusterName, arcSettingName, extensionName, extension).getFinalResult(); } /** @@ -716,7 +489,8 @@ public ExtensionInner create(String resourceGroupName, String clusterName, Strin @ServiceMethod(returns = ReturnType.SINGLE) public ExtensionInner create(String resourceGroupName, String clusterName, String arcSettingName, String extensionName, ExtensionInner extension, Context context) { - return createAsync(resourceGroupName, clusterName, arcSettingName, extensionName, extension, context).block(); + return beginCreate(resourceGroupName, clusterName, arcSettingName, extensionName, extension, context) + .getFinalResult(); } /** @@ -736,37 +510,12 @@ public ExtensionInner create(String resourceGroupName, String clusterName, Strin @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> updateWithResponseAsync(String resourceGroupName, String clusterName, String arcSettingName, String extensionName, ExtensionPatch extension) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (clusterName == null) { - return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); - } - if (arcSettingName == null) { - return Mono.error(new IllegalArgumentException("Parameter arcSettingName is required and cannot be null.")); - } - if (extensionName == null) { - return Mono.error(new IllegalArgumentException("Parameter extensionName is required and cannot be null.")); - } - if (extension == null) { - return Mono.error(new IllegalArgumentException("Parameter extension is required and cannot be null.")); - } else { - extension.validate(); - } + final String contentType = "application/json"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.update(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, clusterName, arcSettingName, extensionName, this.client.getApiVersion(), extension, - accept, context)) + .withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, clusterName, arcSettingName, extensionName, + contentType, accept, extension, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -778,46 +527,19 @@ private Mono>> updateWithResponseAsync(String resource * @param arcSettingName The name of the proxy resource holding details of HCI ArcSetting information. * @param extensionName The name of the machine extension. * @param extension Details of the Machine Extension to be created. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return details of a particular extension in HCI Cluster along with {@link Response} on successful completion of - * {@link Mono}. + * @return details of a particular extension in HCI Cluster along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateWithResponseAsync(String resourceGroupName, String clusterName, - String arcSettingName, String extensionName, ExtensionPatch extension, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (clusterName == null) { - return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); - } - if (arcSettingName == null) { - return Mono.error(new IllegalArgumentException("Parameter arcSettingName is required and cannot be null.")); - } - if (extensionName == null) { - return Mono.error(new IllegalArgumentException("Parameter extensionName is required and cannot be null.")); - } - if (extension == null) { - return Mono.error(new IllegalArgumentException("Parameter extension is required and cannot be null.")); - } else { - extension.validate(); - } + private Response updateWithResponse(String resourceGroupName, String clusterName, String arcSettingName, + String extensionName, ExtensionPatch extension) { + final String contentType = "application/json"; final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.update(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - clusterName, arcSettingName, extensionName, this.client.getApiVersion(), extension, accept, context); + return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, clusterName, arcSettingName, extensionName, contentType, + accept, extension, Context.NONE); } /** @@ -828,18 +550,20 @@ private Mono>> updateWithResponseAsync(String resource * @param arcSettingName The name of the proxy resource holding details of HCI ArcSetting information. * @param extensionName The name of the machine extension. * @param extension Details of the Machine Extension to be created. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of details of a particular extension in HCI Cluster. + * @return details of a particular extension in HCI Cluster along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, ExtensionInner> beginUpdateAsync(String resourceGroupName, - String clusterName, String arcSettingName, String extensionName, ExtensionPatch extension) { - Mono>> mono - = updateWithResponseAsync(resourceGroupName, clusterName, arcSettingName, extensionName, extension); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - ExtensionInner.class, ExtensionInner.class, this.client.getContext()); + @ServiceMethod(returns = ReturnType.SINGLE) + private Response updateWithResponse(String resourceGroupName, String clusterName, String arcSettingName, + String extensionName, ExtensionPatch extension, Context context) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, clusterName, arcSettingName, extensionName, contentType, + accept, extension, context); } /** @@ -850,7 +574,6 @@ private PollerFlux, ExtensionInner> beginUpdateAsync( * @param arcSettingName The name of the proxy resource holding details of HCI ArcSetting information. * @param extensionName The name of the machine extension. * @param extension Details of the Machine Extension to be created. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -858,12 +581,11 @@ private PollerFlux, ExtensionInner> beginUpdateAsync( */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, ExtensionInner> beginUpdateAsync(String resourceGroupName, - String clusterName, String arcSettingName, String extensionName, ExtensionPatch extension, Context context) { - context = this.client.mergeContext(context); - Mono>> mono = updateWithResponseAsync(resourceGroupName, clusterName, arcSettingName, - extensionName, extension, context); + String clusterName, String arcSettingName, String extensionName, ExtensionPatch extension) { + Mono>> mono + = updateWithResponseAsync(resourceGroupName, clusterName, arcSettingName, extensionName, extension); return this.client.getLroResult(mono, this.client.getHttpPipeline(), - ExtensionInner.class, ExtensionInner.class, context); + ExtensionInner.class, ExtensionInner.class, this.client.getContext()); } /** @@ -882,8 +604,10 @@ private PollerFlux, ExtensionInner> beginUpdateAsync( @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, ExtensionInner> beginUpdate(String resourceGroupName, String clusterName, String arcSettingName, String extensionName, ExtensionPatch extension) { - return this.beginUpdateAsync(resourceGroupName, clusterName, arcSettingName, extensionName, extension) - .getSyncPoller(); + Response response + = updateWithResponse(resourceGroupName, clusterName, arcSettingName, extensionName, extension); + return this.client.getLroResult(response, ExtensionInner.class, + ExtensionInner.class, Context.NONE); } /** @@ -903,8 +627,10 @@ public SyncPoller, ExtensionInner> beginUpdate(String @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, ExtensionInner> beginUpdate(String resourceGroupName, String clusterName, String arcSettingName, String extensionName, ExtensionPatch extension, Context context) { - return this.beginUpdateAsync(resourceGroupName, clusterName, arcSettingName, extensionName, extension, context) - .getSyncPoller(); + Response response + = updateWithResponse(resourceGroupName, clusterName, arcSettingName, extensionName, extension, context); + return this.client.getLroResult(response, ExtensionInner.class, + ExtensionInner.class, context); } /** @@ -927,28 +653,6 @@ private Mono updateAsync(String resourceGroupName, String cluste .flatMap(this.client::getLroFinalResultOrError); } - /** - * Update Extension for HCI cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterName The name of the cluster. - * @param arcSettingName The name of the proxy resource holding details of HCI ArcSetting information. - * @param extensionName The name of the machine extension. - * @param extension Details of the Machine Extension to be created. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return details of a particular extension in HCI Cluster on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync(String resourceGroupName, String clusterName, String arcSettingName, - String extensionName, ExtensionPatch extension, Context context) { - return beginUpdateAsync(resourceGroupName, clusterName, arcSettingName, extensionName, extension, context) - .last() - .flatMap(this.client::getLroFinalResultOrError); - } - /** * Update Extension for HCI cluster. * @@ -965,7 +669,7 @@ private Mono updateAsync(String resourceGroupName, String cluste @ServiceMethod(returns = ReturnType.SINGLE) public ExtensionInner update(String resourceGroupName, String clusterName, String arcSettingName, String extensionName, ExtensionPatch extension) { - return updateAsync(resourceGroupName, clusterName, arcSettingName, extensionName, extension).block(); + return beginUpdate(resourceGroupName, clusterName, arcSettingName, extensionName, extension).getFinalResult(); } /** @@ -985,7 +689,8 @@ public ExtensionInner update(String resourceGroupName, String clusterName, Strin @ServiceMethod(returns = ReturnType.SINGLE) public ExtensionInner update(String resourceGroupName, String clusterName, String arcSettingName, String extensionName, ExtensionPatch extension, Context context) { - return updateAsync(resourceGroupName, clusterName, arcSettingName, extensionName, extension, context).block(); + return beginUpdate(resourceGroupName, clusterName, arcSettingName, extensionName, extension, context) + .getFinalResult(); } /** @@ -1003,32 +708,8 @@ public ExtensionInner update(String resourceGroupName, String clusterName, Strin @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> deleteWithResponseAsync(String resourceGroupName, String clusterName, String arcSettingName, String extensionName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (clusterName == null) { - return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); - } - if (arcSettingName == null) { - return Mono.error(new IllegalArgumentException("Parameter arcSettingName is required and cannot be null.")); - } - if (extensionName == null) { - return Mono.error(new IllegalArgumentException("Parameter extensionName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - clusterName, arcSettingName, extensionName, this.client.getApiVersion(), accept, context)) + return FluxUtil.withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, clusterName, arcSettingName, extensionName, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -1039,40 +720,17 @@ private Mono>> deleteWithResponseAsync(String resource * @param clusterName The name of the cluster. * @param arcSettingName The name of the proxy resource holding details of HCI ArcSetting information. * @param extensionName The name of the machine extension. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync(String resourceGroupName, String clusterName, - String arcSettingName, String extensionName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (clusterName == null) { - return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); - } - if (arcSettingName == null) { - return Mono.error(new IllegalArgumentException("Parameter arcSettingName is required and cannot be null.")); - } - if (extensionName == null) { - return Mono.error(new IllegalArgumentException("Parameter extensionName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - clusterName, arcSettingName, extensionName, this.client.getApiVersion(), accept, context); + private Response deleteWithResponse(String resourceGroupName, String clusterName, String arcSettingName, + String extensionName) { + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, clusterName, arcSettingName, extensionName, + Context.NONE); } /** @@ -1082,18 +740,17 @@ private Mono>> deleteWithResponseAsync(String resource * @param clusterName The name of the cluster. * @param arcSettingName The name of the proxy resource holding details of HCI ArcSetting information. * @param extensionName The name of the machine extension. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. + * @return the response body along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String clusterName, - String arcSettingName, String extensionName) { - Mono>> mono - = deleteWithResponseAsync(resourceGroupName, clusterName, arcSettingName, extensionName); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - this.client.getContext()); + @ServiceMethod(returns = ReturnType.SINGLE) + private Response deleteWithResponse(String resourceGroupName, String clusterName, String arcSettingName, + String extensionName, Context context) { + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, clusterName, arcSettingName, extensionName, context); } /** @@ -1103,7 +760,6 @@ private PollerFlux, Void> beginDeleteAsync(String resourceGroup * @param clusterName The name of the cluster. * @param arcSettingName The name of the proxy resource holding details of HCI ArcSetting information. * @param extensionName The name of the machine extension. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -1111,12 +767,11 @@ private PollerFlux, Void> beginDeleteAsync(String resourceGroup */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String clusterName, - String arcSettingName, String extensionName, Context context) { - context = this.client.mergeContext(context); + String arcSettingName, String extensionName) { Mono>> mono - = deleteWithResponseAsync(resourceGroupName, clusterName, arcSettingName, extensionName, context); + = deleteWithResponseAsync(resourceGroupName, clusterName, arcSettingName, extensionName); return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - context); + this.client.getContext()); } /** @@ -1134,7 +789,9 @@ private PollerFlux, Void> beginDeleteAsync(String resourceGroup @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete(String resourceGroupName, String clusterName, String arcSettingName, String extensionName) { - return this.beginDeleteAsync(resourceGroupName, clusterName, arcSettingName, extensionName).getSyncPoller(); + Response response + = deleteWithResponse(resourceGroupName, clusterName, arcSettingName, extensionName); + return this.client.getLroResult(response, Void.class, Void.class, Context.NONE); } /** @@ -1153,8 +810,9 @@ public SyncPoller, Void> beginDelete(String resourceGroupName, @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete(String resourceGroupName, String clusterName, String arcSettingName, String extensionName, Context context) { - return this.beginDeleteAsync(resourceGroupName, clusterName, arcSettingName, extensionName, context) - .getSyncPoller(); + Response response + = deleteWithResponse(resourceGroupName, clusterName, arcSettingName, extensionName, context); + return this.client.getLroResult(response, Void.class, Void.class, context); } /** @@ -1183,17 +841,13 @@ private Mono deleteAsync(String resourceGroupName, String clusterName, Str * @param clusterName The name of the cluster. * @param arcSettingName The name of the proxy resource holding details of HCI ArcSetting information. * @param extensionName The name of the machine extension. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 clusterName, String arcSettingName, - String extensionName, Context context) { - return beginDeleteAsync(resourceGroupName, clusterName, arcSettingName, extensionName, context).last() - .flatMap(this.client::getLroFinalResultOrError); + public void delete(String resourceGroupName, String clusterName, String arcSettingName, String extensionName) { + beginDelete(resourceGroupName, clusterName, arcSettingName, extensionName).getFinalResult(); } /** @@ -1203,82 +857,140 @@ private Mono deleteAsync(String resourceGroupName, String clusterName, Str * @param clusterName The name of the cluster. * @param arcSettingName The name of the proxy resource holding details of HCI ArcSetting information. * @param extensionName The name of the machine extension. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @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 clusterName, String arcSettingName, String extensionName) { - deleteAsync(resourceGroupName, clusterName, arcSettingName, extensionName).block(); + public void delete(String resourceGroupName, String clusterName, String arcSettingName, String extensionName, + Context context) { + beginDelete(resourceGroupName, clusterName, arcSettingName, extensionName, context).getFinalResult(); } /** - * Delete particular Arc Extension of HCI Cluster. + * List all Extensions under ArcSetting resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param arcSettingName The name of the proxy resource holding details of HCI ArcSetting information. - * @param extensionName The name of the machine extension. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of Extensions in HCI cluster along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String clusterName, String arcSettingName, String extensionName, - Context context) { - deleteAsync(resourceGroupName, clusterName, arcSettingName, extensionName, context).block(); + private Mono> listByArcSettingSinglePageAsync(String resourceGroupName, + String clusterName, String arcSettingName) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listByArcSetting(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, clusterName, arcSettingName, 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())); } /** - * Upgrade a particular Arc Extension of HCI Cluster. + * List all Extensions under ArcSetting resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param arcSettingName The name of the proxy resource holding details of HCI ArcSetting information. - * @param extensionName The name of the machine extension. - * @param extensionUpgradeParameters Parameters supplied to the Upgrade Extensions operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. + * @return list of Extensions in HCI cluster as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByArcSettingAsync(String resourceGroupName, String clusterName, + String arcSettingName) { + return new PagedFlux<>(() -> listByArcSettingSinglePageAsync(resourceGroupName, clusterName, arcSettingName), + nextLink -> listByArcSettingNextSinglePageAsync(nextLink)); + } + + /** + * List all Extensions under ArcSetting resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param arcSettingName The name of the proxy resource holding details of HCI ArcSetting information. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of Extensions in HCI cluster along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> upgradeWithResponseAsync(String resourceGroupName, String clusterName, - String arcSettingName, String extensionName, ExtensionUpgradeParameters extensionUpgradeParameters) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (clusterName == null) { - return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); - } - if (arcSettingName == null) { - return Mono.error(new IllegalArgumentException("Parameter arcSettingName is required and cannot be null.")); - } - if (extensionName == null) { - return Mono.error(new IllegalArgumentException("Parameter extensionName is required and cannot be null.")); - } - if (extensionUpgradeParameters == null) { - return Mono.error( - new IllegalArgumentException("Parameter extensionUpgradeParameters is required and cannot be null.")); - } else { - extensionUpgradeParameters.validate(); - } + private PagedResponse listByArcSettingSinglePage(String resourceGroupName, String clusterName, + String arcSettingName) { final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.upgrade(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, clusterName, arcSettingName, extensionName, this.client.getApiVersion(), - extensionUpgradeParameters, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + Response res + = service.listByArcSettingSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, clusterName, arcSettingName, accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * List all Extensions under ArcSetting resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param arcSettingName The name of the proxy resource holding details of HCI ArcSetting information. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of Extensions in HCI cluster along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByArcSettingSinglePage(String resourceGroupName, String clusterName, + String arcSettingName, Context context) { + final String accept = "application/json"; + Response res + = service.listByArcSettingSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, clusterName, arcSettingName, accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * List all Extensions under ArcSetting resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param arcSettingName The name of the proxy resource holding details of HCI ArcSetting information. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of Extensions in HCI cluster as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByArcSetting(String resourceGroupName, String clusterName, + String arcSettingName) { + return new PagedIterable<>(() -> listByArcSettingSinglePage(resourceGroupName, clusterName, arcSettingName), + nextLink -> listByArcSettingNextSinglePage(nextLink)); + } + + /** + * List all Extensions under ArcSetting resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param arcSettingName The name of the proxy resource holding details of HCI ArcSetting information. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of Extensions in HCI cluster as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByArcSetting(String resourceGroupName, String clusterName, + String arcSettingName, Context context) { + return new PagedIterable<>( + () -> listByArcSettingSinglePage(resourceGroupName, clusterName, arcSettingName, context), + nextLink -> listByArcSettingNextSinglePage(nextLink, context)); } /** @@ -1289,7 +1001,6 @@ private Mono>> upgradeWithResponseAsync(String resourc * @param arcSettingName The name of the proxy resource holding details of HCI ArcSetting information. * @param extensionName The name of the machine extension. * @param extensionUpgradeParameters Parameters supplied to the Upgrade Extensions operation. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -1297,40 +1008,13 @@ private Mono>> upgradeWithResponseAsync(String resourc */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> upgradeWithResponseAsync(String resourceGroupName, String clusterName, - String arcSettingName, String extensionName, ExtensionUpgradeParameters extensionUpgradeParameters, - Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (clusterName == null) { - return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); - } - if (arcSettingName == null) { - return Mono.error(new IllegalArgumentException("Parameter arcSettingName is required and cannot be null.")); - } - if (extensionName == null) { - return Mono.error(new IllegalArgumentException("Parameter extensionName is required and cannot be null.")); - } - if (extensionUpgradeParameters == null) { - return Mono.error( - new IllegalArgumentException("Parameter extensionUpgradeParameters is required and cannot be null.")); - } else { - extensionUpgradeParameters.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.upgrade(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - clusterName, arcSettingName, extensionName, this.client.getApiVersion(), extensionUpgradeParameters, accept, - context); + String arcSettingName, String extensionName, ExtensionUpgradeParameters extensionUpgradeParameters) { + final String contentType = "application/json"; + return FluxUtil + .withContext(context -> service.upgrade(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, clusterName, arcSettingName, extensionName, + contentType, extensionUpgradeParameters, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** @@ -1344,15 +1028,15 @@ private Mono>> upgradeWithResponseAsync(String resourc * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. + * @return the response body along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginUpgradeAsync(String resourceGroupName, String clusterName, + @ServiceMethod(returns = ReturnType.SINGLE) + private Response upgradeWithResponse(String resourceGroupName, String clusterName, String arcSettingName, String extensionName, ExtensionUpgradeParameters extensionUpgradeParameters) { - Mono>> mono = upgradeWithResponseAsync(resourceGroupName, clusterName, arcSettingName, - extensionName, extensionUpgradeParameters); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - this.client.getContext()); + final String contentType = "application/json"; + return service.upgradeSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, clusterName, arcSettingName, extensionName, contentType, + extensionUpgradeParameters, Context.NONE); } /** @@ -1367,17 +1051,16 @@ private PollerFlux, Void> beginUpgradeAsync(String resourceGrou * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. + * @return the response body along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginUpgradeAsync(String resourceGroupName, String clusterName, + @ServiceMethod(returns = ReturnType.SINGLE) + private Response upgradeWithResponse(String resourceGroupName, String clusterName, String arcSettingName, String extensionName, ExtensionUpgradeParameters extensionUpgradeParameters, Context context) { - context = this.client.mergeContext(context); - Mono>> mono = upgradeWithResponseAsync(resourceGroupName, clusterName, arcSettingName, - extensionName, extensionUpgradeParameters, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - context); + final String contentType = "application/json"; + return service.upgradeSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, clusterName, arcSettingName, extensionName, contentType, + extensionUpgradeParameters, context); } /** @@ -1391,15 +1074,15 @@ private PollerFlux, Void> beginUpgradeAsync(String resourceGrou * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginUpgrade(String resourceGroupName, String clusterName, + private PollerFlux, Void> beginUpgradeAsync(String resourceGroupName, String clusterName, String arcSettingName, String extensionName, ExtensionUpgradeParameters extensionUpgradeParameters) { - return this - .beginUpgradeAsync(resourceGroupName, clusterName, arcSettingName, extensionName, - extensionUpgradeParameters) - .getSyncPoller(); + Mono>> mono = upgradeWithResponseAsync(resourceGroupName, clusterName, arcSettingName, + extensionName, extensionUpgradeParameters); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); } /** @@ -1410,7 +1093,6 @@ public SyncPoller, Void> beginUpgrade(String resourceGroupName, * @param arcSettingName The name of the proxy resource holding details of HCI ArcSetting information. * @param extensionName The name of the machine extension. * @param extensionUpgradeParameters Parameters supplied to the Upgrade Extensions operation. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -1418,12 +1100,10 @@ public SyncPoller, Void> beginUpgrade(String resourceGroupName, */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginUpgrade(String resourceGroupName, String clusterName, - String arcSettingName, String extensionName, ExtensionUpgradeParameters extensionUpgradeParameters, - Context context) { - return this - .beginUpgradeAsync(resourceGroupName, clusterName, arcSettingName, extensionName, - extensionUpgradeParameters, context) - .getSyncPoller(); + String arcSettingName, String extensionName, ExtensionUpgradeParameters extensionUpgradeParameters) { + Response response = upgradeWithResponse(resourceGroupName, clusterName, arcSettingName, + extensionName, extensionUpgradeParameters); + return this.client.getLroResult(response, Void.class, Void.class, Context.NONE); } /** @@ -1434,16 +1114,19 @@ public SyncPoller, Void> beginUpgrade(String resourceGroupName, * @param arcSettingName The name of the proxy resource holding details of HCI ArcSetting information. * @param extensionName The name of the machine extension. * @param extensionUpgradeParameters Parameters supplied to the Upgrade Extensions operation. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono upgradeAsync(String resourceGroupName, String clusterName, String arcSettingName, - String extensionName, ExtensionUpgradeParameters extensionUpgradeParameters) { - return beginUpgradeAsync(resourceGroupName, clusterName, arcSettingName, extensionName, - extensionUpgradeParameters).last().flatMap(this.client::getLroFinalResultOrError); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginUpgrade(String resourceGroupName, String clusterName, + String arcSettingName, String extensionName, ExtensionUpgradeParameters extensionUpgradeParameters, + Context context) { + Response response = upgradeWithResponse(resourceGroupName, clusterName, arcSettingName, + extensionName, extensionUpgradeParameters, context); + return this.client.getLroResult(response, Void.class, Void.class, context); } /** @@ -1454,7 +1137,6 @@ private Mono upgradeAsync(String resourceGroupName, String clusterName, St * @param arcSettingName The name of the proxy resource holding details of HCI ArcSetting information. * @param extensionName The name of the machine extension. * @param extensionUpgradeParameters Parameters supplied to the Upgrade Extensions operation. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -1462,9 +1144,9 @@ private Mono upgradeAsync(String resourceGroupName, String clusterName, St */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono upgradeAsync(String resourceGroupName, String clusterName, String arcSettingName, - String extensionName, ExtensionUpgradeParameters extensionUpgradeParameters, Context context) { + String extensionName, ExtensionUpgradeParameters extensionUpgradeParameters) { return beginUpgradeAsync(resourceGroupName, clusterName, arcSettingName, extensionName, - extensionUpgradeParameters, context).last().flatMap(this.client::getLroFinalResultOrError); + extensionUpgradeParameters).last().flatMap(this.client::getLroFinalResultOrError); } /** @@ -1482,7 +1164,8 @@ private Mono upgradeAsync(String resourceGroupName, String clusterName, St @ServiceMethod(returns = ReturnType.SINGLE) public void upgrade(String resourceGroupName, String clusterName, String arcSettingName, String extensionName, ExtensionUpgradeParameters extensionUpgradeParameters) { - upgradeAsync(resourceGroupName, clusterName, arcSettingName, extensionName, extensionUpgradeParameters).block(); + beginUpgrade(resourceGroupName, clusterName, arcSettingName, extensionName, extensionUpgradeParameters) + .getFinalResult(); } /** @@ -1501,8 +1184,8 @@ public void upgrade(String resourceGroupName, String clusterName, String arcSett @ServiceMethod(returns = ReturnType.SINGLE) public void upgrade(String resourceGroupName, String clusterName, String arcSettingName, String extensionName, ExtensionUpgradeParameters extensionUpgradeParameters, Context context) { - upgradeAsync(resourceGroupName, clusterName, arcSettingName, extensionName, extensionUpgradeParameters, context) - .block(); + beginUpgrade(resourceGroupName, clusterName, arcSettingName, extensionName, extensionUpgradeParameters, context) + .getFinalResult(); } /** @@ -1517,13 +1200,6 @@ public void upgrade(String resourceGroupName, String clusterName, String arcSett */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByArcSettingNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } final String accept = "application/json"; return FluxUtil .withContext(context -> service.listByArcSettingNext(nextLink, this.client.getEndpoint(), accept, context)) @@ -1532,6 +1208,24 @@ private Mono> listByArcSettingNextSinglePageAsync( .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 list of Extensions in HCI cluster along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByArcSettingNextSinglePage(String nextLink) { + final String accept = "application/json"; + Response res + = service.listByArcSettingNextSync(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. * @@ -1540,22 +1234,14 @@ private Mono> listByArcSettingNextSinglePageAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of Extensions in HCI cluster along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * @return list of Extensions in HCI cluster along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByArcSettingNextSinglePageAsync(String nextLink, Context context) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } + private PagedResponse listByArcSettingNextSinglePage(String nextLink, Context context) { final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.listByArcSettingNext(nextLink, this.client.getEndpoint(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); + Response res + = service.listByArcSettingNextSync(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/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/ExtensionsImpl.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/ExtensionsImpl.java index 996d03e65744..16facd1ca102 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/ExtensionsImpl.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/ExtensionsImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.implementation; @@ -12,8 +12,8 @@ import com.azure.resourcemanager.azurestackhci.fluent.ExtensionsClient; import com.azure.resourcemanager.azurestackhci.fluent.models.ExtensionInner; import com.azure.resourcemanager.azurestackhci.models.Extension; -import com.azure.resourcemanager.azurestackhci.models.Extensions; import com.azure.resourcemanager.azurestackhci.models.ExtensionUpgradeParameters; +import com.azure.resourcemanager.azurestackhci.models.Extensions; public final class ExtensionsImpl implements Extensions { private static final ClientLogger LOGGER = new ClientLogger(ExtensionsImpl.class); @@ -28,20 +28,6 @@ public ExtensionsImpl(ExtensionsClient innerClient, this.serviceManager = serviceManager; } - public PagedIterable listByArcSetting(String resourceGroupName, String clusterName, - String arcSettingName) { - PagedIterable inner - = this.serviceClient().listByArcSetting(resourceGroupName, clusterName, arcSettingName); - return ResourceManagerUtils.mapPage(inner, inner1 -> new ExtensionImpl(inner1, this.manager())); - } - - public PagedIterable listByArcSetting(String resourceGroupName, String clusterName, - String arcSettingName, Context context) { - PagedIterable inner - = this.serviceClient().listByArcSetting(resourceGroupName, clusterName, arcSettingName, context); - return ResourceManagerUtils.mapPage(inner, inner1 -> new ExtensionImpl(inner1, this.manager())); - } - public Response getWithResponse(String resourceGroupName, String clusterName, String arcSettingName, String extensionName, Context context) { Response inner = this.serviceClient() @@ -72,6 +58,20 @@ public void delete(String resourceGroupName, String clusterName, String arcSetti this.serviceClient().delete(resourceGroupName, clusterName, arcSettingName, extensionName, context); } + public PagedIterable listByArcSetting(String resourceGroupName, String clusterName, + String arcSettingName) { + PagedIterable inner + = this.serviceClient().listByArcSetting(resourceGroupName, clusterName, arcSettingName); + return ResourceManagerUtils.mapPage(inner, inner1 -> new ExtensionImpl(inner1, this.manager())); + } + + public PagedIterable listByArcSetting(String resourceGroupName, String clusterName, + String arcSettingName, Context context) { + PagedIterable inner + = this.serviceClient().listByArcSetting(resourceGroupName, clusterName, arcSettingName, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new ExtensionImpl(inner1, this.manager())); + } + public void upgrade(String resourceGroupName, String clusterName, String arcSettingName, String extensionName, ExtensionUpgradeParameters extensionUpgradeParameters) { this.serviceClient() diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/HciUpdateImpl.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/HciUpdateImpl.java index c0d5fef65ac6..3f30f3b65142 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/HciUpdateImpl.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/HciUpdateImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.implementation; @@ -109,7 +109,7 @@ public String packagePath() { return this.innerModel().packagePath(); } - public Float packageSizeInMb() { + public Double packageSizeInMb() { return this.innerModel().packageSizeInMb(); } @@ -141,7 +141,7 @@ public String additionalProperties() { return this.innerModel().additionalProperties(); } - public Float progressPercentage() { + public Double progressPercentage() { return this.innerModel().progressPercentage(); } @@ -321,7 +321,7 @@ public HciUpdateImpl withPackagePath(String packagePath) { return this; } - public HciUpdateImpl withPackageSizeInMb(Float packageSizeInMb) { + public HciUpdateImpl withPackageSizeInMb(Double packageSizeInMb) { this.innerModel().withPackageSizeInMb(packageSizeInMb); return this; } @@ -361,7 +361,7 @@ public HciUpdateImpl withAdditionalProperties(String additionalProperties) { return this; } - public HciUpdateImpl withProgressPercentage(Float progressPercentage) { + public HciUpdateImpl withProgressPercentage(Double progressPercentage) { this.innerModel().withProgressPercentage(progressPercentage); return this; } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/OfferImpl.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/OfferImpl.java index 2b1ebff07b91..9d1c2d41ac82 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/OfferImpl.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/OfferImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.implementation; diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/OffersClientImpl.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/OffersClientImpl.java index c8b098a95b57..ad733e261ae7 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/OffersClientImpl.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/OffersClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.implementation; @@ -27,7 +27,7 @@ import com.azure.core.util.FluxUtil; import com.azure.resourcemanager.azurestackhci.fluent.OffersClient; import com.azure.resourcemanager.azurestackhci.fluent.models.OfferInner; -import com.azure.resourcemanager.azurestackhci.models.OfferList; +import com.azure.resourcemanager.azurestackhci.implementation.models.OfferList; import reactor.core.publisher.Mono; /** @@ -42,158 +42,225 @@ public final class OffersClientImpl implements OffersClient { /** * The service client containing this operation class. */ - private final AzureStackHciClientImpl client; + private final AzureStackHciManagementClientImpl client; /** * Initializes an instance of OffersClientImpl. * * @param client the instance of the service client containing this operation class. */ - OffersClientImpl(AzureStackHciClientImpl client) { + OffersClientImpl(AzureStackHciManagementClientImpl client) { this.service = RestProxy.create(OffersService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for AzureStackHciClientOffers to be used by the proxy service to perform - * REST calls. + * The interface defining all the services for AzureStackHciManagementClientOffers to be used by the proxy service + * to perform REST calls. */ - @Host("{$host}") - @ServiceInterface(name = "AzureStackHciClientO") + @Host("{endpoint}") + @ServiceInterface(name = "AzureStackHciManagementClientOffers") public interface OffersService { @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/clusters/{clusterName}/publishers/{publisherName}/offers") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/clusters/{clusterName}/publishers/{publisherName}/offers/{offerName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByPublisher(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono> get(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("clusterName") String clusterName, - @PathParam("publisherName") String publisherName, @QueryParam("api-version") String apiVersion, + @PathParam("publisherName") String publisherName, @PathParam("offerName") String offerName, @QueryParam("$expand") String expand, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/clusters/{clusterName}/offers") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/clusters/{clusterName}/publishers/{publisherName}/offers/{offerName}") + @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("clusterName") String clusterName, + @PathParam("publisherName") String publisherName, @PathParam("offerName") String offerName, + @QueryParam("$expand") String expand, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/clusters/{clusterName}/publishers/{publisherName}/offers") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByCluster(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono> listByPublisher(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("clusterName") String clusterName, - @QueryParam("api-version") String apiVersion, @QueryParam("$expand") String expand, + @PathParam("publisherName") String publisherName, @QueryParam("$expand") String expand, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/clusters/{clusterName}/publishers/{publisherName}/offers/{offerName}") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/clusters/{clusterName}/publishers/{publisherName}/offers") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Response listByPublisherSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("clusterName") String clusterName, - @PathParam("publisherName") String publisherName, @PathParam("offerName") String offerName, - @QueryParam("api-version") String apiVersion, @QueryParam("$expand") String expand, + @PathParam("publisherName") String publisherName, @QueryParam("$expand") String expand, @HeaderParam("Accept") String accept, Context context); + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/clusters/{clusterName}/offers") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByCluster(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("clusterName") String clusterName, + @QueryParam("$expand") String expand, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/clusters/{clusterName}/offers") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listByClusterSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("clusterName") String clusterName, + @QueryParam("$expand") String expand, @HeaderParam("Accept") String accept, Context context); + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByPublisherNext(@PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); + @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listByPublisherNextSync(@PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByClusterNext(@PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); + @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listByClusterNextSync(@PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); } /** - * List Offers available for a publisher within the HCI Cluster. + * Get Offer resource details within a publisher of HCI Cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param publisherName The name of the publisher available within HCI cluster. + * @param offerName The name of the offer available within HCI cluster. * @param expand Specify $expand=content,contentVersion to populate additional fields related to the marketplace * offer. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of Offer proxy resources for the HCI cluster along with {@link PagedResponse} on successful + * @return offer resource details within a publisher of HCI Cluster along with {@link Response} on successful * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByPublisherSinglePageAsync(String resourceGroupName, String clusterName, - String publisherName, String expand) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (clusterName == null) { - return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); - } - if (publisherName == null) { - return Mono.error(new IllegalArgumentException("Parameter publisherName is required and cannot be null.")); - } + private Mono> getWithResponseAsync(String resourceGroupName, String clusterName, + String publisherName, String offerName, String expand) { final String accept = "application/json"; return FluxUtil - .withContext(context -> service.listByPublisher(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, clusterName, publisherName, this.client.getApiVersion(), expand, accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), - res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, clusterName, publisherName, offerName, expand, + accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * List Offers available for a publisher within the HCI Cluster. + * Get Offer resource details within a publisher of HCI Cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param publisherName The name of the publisher available within HCI cluster. + * @param offerName The name of the offer available within HCI cluster. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return offer resource details within a publisher of HCI Cluster on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getAsync(String resourceGroupName, String clusterName, String publisherName, + String offerName) { + final String expand = null; + return getWithResponseAsync(resourceGroupName, clusterName, publisherName, offerName, expand) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Get Offer resource details within a publisher of HCI Cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param publisherName The name of the publisher available within HCI cluster. + * @param offerName The name of the offer available within HCI cluster. * @param expand Specify $expand=content,contentVersion to populate additional fields related to the marketplace * offer. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return offer resource details within a publisher of HCI Cluster along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse(String resourceGroupName, String clusterName, String publisherName, + String offerName, String expand, Context context) { + final String accept = "application/json"; + return service.getSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, clusterName, publisherName, offerName, expand, accept, context); + } + + /** + * Get Offer resource details within a publisher of HCI Cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param publisherName The name of the publisher available within HCI cluster. + * @param offerName The name of the offer available within HCI cluster. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return offer resource details within a publisher of HCI Cluster. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public OfferInner get(String resourceGroupName, String clusterName, String publisherName, String offerName) { + final String expand = null; + return getWithResponse(resourceGroupName, clusterName, publisherName, offerName, expand, Context.NONE) + .getValue(); + } + + /** + * List Offers available for a publisher within the HCI Cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param publisherName The name of the publisher available within HCI cluster. + * @param expand Specify $expand=content,contentVersion to populate additional fields related to the marketplace + * offer. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return list of Offer proxy resources for the HCI cluster along with {@link PagedResponse} on successful * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByPublisherSinglePageAsync(String resourceGroupName, String clusterName, - String publisherName, String expand, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (clusterName == null) { - return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); - } - if (publisherName == null) { - return Mono.error(new IllegalArgumentException("Parameter publisherName is required and cannot be null.")); - } + String publisherName, String expand) { final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .listByPublisher(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, clusterName, - publisherName, this.client.getApiVersion(), expand, accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); + return FluxUtil + .withContext(context -> service.listByPublisher(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, clusterName, publisherName, expand, 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())); } /** @@ -237,6 +304,30 @@ private PagedFlux listByPublisherAsync(String resourceGroupName, Str nextLink -> listByPublisherNextSinglePageAsync(nextLink)); } + /** + * List Offers available for a publisher within the HCI Cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param publisherName The name of the publisher available within HCI cluster. + * @param expand Specify $expand=content,contentVersion to populate additional fields related to the marketplace + * offer. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of Offer proxy resources for the HCI cluster along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByPublisherSinglePage(String resourceGroupName, String clusterName, + String publisherName, String expand) { + final String accept = "application/json"; + Response res = service.listByPublisherSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, clusterName, publisherName, expand, accept, + Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + /** * List Offers available for a publisher within the HCI Cluster. * @@ -249,14 +340,16 @@ private PagedFlux listByPublisherAsync(String resourceGroupName, Str * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of Offer proxy resources for the HCI cluster as paginated response with {@link PagedFlux}. + * @return list of Offer proxy resources for the HCI cluster along with {@link PagedResponse}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByPublisherAsync(String resourceGroupName, String clusterName, + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByPublisherSinglePage(String resourceGroupName, String clusterName, String publisherName, String expand, Context context) { - return new PagedFlux<>( - () -> listByPublisherSinglePageAsync(resourceGroupName, clusterName, publisherName, expand, context), - nextLink -> listByPublisherNextSinglePageAsync(nextLink, context)); + final String accept = "application/json"; + Response res = service.listByPublisherSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, clusterName, publisherName, expand, accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** @@ -274,7 +367,9 @@ private PagedFlux listByPublisherAsync(String resourceGroupName, Str public PagedIterable listByPublisher(String resourceGroupName, String clusterName, String publisherName) { final String expand = null; - return new PagedIterable<>(listByPublisherAsync(resourceGroupName, clusterName, publisherName, expand)); + return new PagedIterable<>( + () -> listByPublisherSinglePage(resourceGroupName, clusterName, publisherName, expand), + nextLink -> listByPublisherNextSinglePage(nextLink)); } /** @@ -295,7 +390,8 @@ public PagedIterable listByPublisher(String resourceGroupName, Strin public PagedIterable listByPublisher(String resourceGroupName, String clusterName, String publisherName, String expand, Context context) { return new PagedIterable<>( - listByPublisherAsync(resourceGroupName, clusterName, publisherName, expand, context)); + () -> listByPublisherSinglePage(resourceGroupName, clusterName, publisherName, expand, context), + nextLink -> listByPublisherNextSinglePage(nextLink, context)); } /** @@ -314,25 +410,10 @@ public PagedIterable listByPublisher(String resourceGroupName, Strin @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByClusterSinglePageAsync(String resourceGroupName, String clusterName, String expand) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (clusterName == null) { - return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); - } final String accept = "application/json"; return FluxUtil - .withContext(context -> service.listByCluster(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, clusterName, this.client.getApiVersion(), expand, accept, context)) + .withContext(context -> service.listByCluster(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, clusterName, expand, 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())); @@ -345,38 +426,15 @@ private Mono> listByClusterSinglePageAsync(String reso * @param clusterName The name of the cluster. * @param expand Specify $expand=content,contentVersion to populate additional fields related to the marketplace * offer. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of Offer proxy resources for the HCI cluster along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * @return list of Offer proxy resources for the HCI cluster as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByClusterSinglePageAsync(String resourceGroupName, String clusterName, - String expand, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (clusterName == null) { - return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .listByCluster(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, clusterName, - this.client.getApiVersion(), expand, accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByClusterAsync(String resourceGroupName, String clusterName, String expand) { + return new PagedFlux<>(() -> listByClusterSinglePageAsync(resourceGroupName, clusterName, expand), + nextLink -> listByClusterNextSinglePageAsync(nextLink)); } /** @@ -384,15 +442,14 @@ private Mono> listByClusterSinglePageAsync(String reso * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. - * @param expand Specify $expand=content,contentVersion to populate additional fields related to the marketplace - * offer. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return list of Offer proxy resources for the HCI cluster as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByClusterAsync(String resourceGroupName, String clusterName, String expand) { + private PagedFlux listByClusterAsync(String resourceGroupName, String clusterName) { + final String expand = null; return new PagedFlux<>(() -> listByClusterSinglePageAsync(resourceGroupName, clusterName, expand), nextLink -> listByClusterNextSinglePageAsync(nextLink)); } @@ -402,16 +459,21 @@ private PagedFlux listByClusterAsync(String resourceGroupName, Strin * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. + * @param expand Specify $expand=content,contentVersion to populate additional fields related to the marketplace + * offer. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of Offer proxy resources for the HCI cluster as paginated response with {@link PagedFlux}. + * @return list of Offer proxy resources for the HCI cluster along with {@link PagedResponse}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByClusterAsync(String resourceGroupName, String clusterName) { - final String expand = null; - return new PagedFlux<>(() -> listByClusterSinglePageAsync(resourceGroupName, clusterName, expand), - nextLink -> listByClusterNextSinglePageAsync(nextLink)); + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByClusterSinglePage(String resourceGroupName, String clusterName, + String expand) { + final String accept = "application/json"; + Response res = service.listByClusterSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, clusterName, expand, accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** @@ -425,13 +487,16 @@ private PagedFlux listByClusterAsync(String resourceGroupName, Strin * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of Offer proxy resources for the HCI cluster as paginated response with {@link PagedFlux}. + * @return list of Offer proxy resources for the HCI cluster along with {@link PagedResponse}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByClusterAsync(String resourceGroupName, String clusterName, String expand, - Context context) { - return new PagedFlux<>(() -> listByClusterSinglePageAsync(resourceGroupName, clusterName, expand, context), - nextLink -> listByClusterNextSinglePageAsync(nextLink, context)); + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByClusterSinglePage(String resourceGroupName, String clusterName, + String expand, Context context) { + final String accept = "application/json"; + Response res = service.listByClusterSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, clusterName, expand, accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** @@ -447,7 +512,8 @@ private PagedFlux listByClusterAsync(String resourceGroupName, Strin @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByCluster(String resourceGroupName, String clusterName) { final String expand = null; - return new PagedIterable<>(listByClusterAsync(resourceGroupName, clusterName, expand)); + return new PagedIterable<>(() -> listByClusterSinglePage(resourceGroupName, clusterName, expand), + nextLink -> listByClusterNextSinglePage(nextLink)); } /** @@ -466,160 +532,64 @@ public PagedIterable listByCluster(String resourceGroupName, String @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByCluster(String resourceGroupName, String clusterName, String expand, Context context) { - return new PagedIterable<>(listByClusterAsync(resourceGroupName, clusterName, expand, context)); + return new PagedIterable<>(() -> listByClusterSinglePage(resourceGroupName, clusterName, expand, context), + nextLink -> listByClusterNextSinglePage(nextLink, context)); } /** - * Get Offer resource details within a publisher of HCI Cluster. + * Get the next page of items. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterName The name of the cluster. - * @param publisherName The name of the publisher available within HCI cluster. - * @param offerName The name of the offer available within HCI cluster. - * @param expand Specify $expand=content,contentVersion to populate additional fields related to the marketplace - * offer. + * @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 offer resource details within a publisher of HCI Cluster along with {@link Response} on successful + * @return list of Offer proxy resources for the HCI cluster along with {@link PagedResponse} on successful * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, String clusterName, - String publisherName, String offerName, String expand) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (clusterName == null) { - return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); - } - if (publisherName == null) { - return Mono.error(new IllegalArgumentException("Parameter publisherName is required and cannot be null.")); - } - if (offerName == null) { - return Mono.error(new IllegalArgumentException("Parameter offerName is required and cannot be null.")); - } + private Mono> listByPublisherNextSinglePageAsync(String nextLink) { final String accept = "application/json"; return FluxUtil - .withContext( - context -> service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - clusterName, publisherName, offerName, this.client.getApiVersion(), expand, accept, context)) + .withContext(context -> service.listByPublisherNext(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 Offer resource details within a publisher of HCI Cluster. + * Get the next page of items. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterName The name of the cluster. - * @param publisherName The name of the publisher available within HCI cluster. - * @param offerName The name of the offer available within HCI cluster. - * @param expand Specify $expand=content,contentVersion to populate additional fields related to the marketplace - * offer. - * @param context The context to associate with this operation. + * @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 offer resource details within a publisher of HCI Cluster along with {@link Response} on successful - * completion of {@link Mono}. + * @return list of Offer proxy resources for the HCI cluster along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, String clusterName, - String publisherName, String offerName, String expand, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (clusterName == null) { - return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); - } - if (publisherName == null) { - return Mono.error(new IllegalArgumentException("Parameter publisherName is required and cannot be null.")); - } - if (offerName == null) { - return Mono.error(new IllegalArgumentException("Parameter offerName is required and cannot be null.")); - } + private PagedResponse listByPublisherNextSinglePage(String nextLink) { final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, clusterName, - publisherName, offerName, this.client.getApiVersion(), expand, accept, context); + Response res + = service.listByPublisherNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * Get Offer resource details within a publisher of HCI Cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterName The name of the cluster. - * @param publisherName The name of the publisher available within HCI cluster. - * @param offerName The name of the offer available within HCI cluster. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return offer resource details within a publisher of HCI Cluster on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync(String resourceGroupName, String clusterName, String publisherName, - String offerName) { - final String expand = null; - return getWithResponseAsync(resourceGroupName, clusterName, publisherName, offerName, expand) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Get Offer resource details within a publisher of HCI Cluster. + * Get the next page of items. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterName The name of the cluster. - * @param publisherName The name of the publisher available within HCI cluster. - * @param offerName The name of the offer available within HCI cluster. - * @param expand Specify $expand=content,contentVersion to populate additional fields related to the marketplace - * offer. + * @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 offer resource details within a publisher of HCI Cluster along with {@link Response}. + * @return list of Offer proxy resources for the HCI cluster along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse(String resourceGroupName, String clusterName, String publisherName, - String offerName, String expand, Context context) { - return getWithResponseAsync(resourceGroupName, clusterName, publisherName, offerName, expand, context).block(); - } - - /** - * Get Offer resource details within a publisher of HCI Cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterName The name of the cluster. - * @param publisherName The name of the publisher available within HCI cluster. - * @param offerName The name of the offer available within HCI cluster. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return offer resource details within a publisher of HCI Cluster. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public OfferInner get(String resourceGroupName, String clusterName, String publisherName, String offerName) { - final String expand = null; - return getWithResponse(resourceGroupName, clusterName, publisherName, offerName, expand, Context.NONE) - .getValue(); + private PagedResponse listByPublisherNextSinglePage(String nextLink, Context context) { + final String accept = "application/json"; + Response res = service.listByPublisherNextSync(nextLink, this.client.getEndpoint(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** @@ -633,17 +603,10 @@ public OfferInner get(String resourceGroupName, String clusterName, String publi * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByPublisherNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } + private Mono> listByClusterNextSinglePageAsync(String nextLink) { final String accept = "application/json"; return FluxUtil - .withContext(context -> service.listByPublisherNext(nextLink, this.client.getEndpoint(), accept, context)) + .withContext(context -> service.listByClusterNext(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())); @@ -653,54 +616,18 @@ private Mono> listByPublisherNextSinglePageAsync(Strin * 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 list of Offer proxy resources for the HCI cluster along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * @return list of Offer proxy resources for the HCI cluster along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByPublisherNextSinglePageAsync(String nextLink, Context context) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } + private PagedResponse listByClusterNextSinglePage(String nextLink) { final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.listByPublisherNext(nextLink, this.client.getEndpoint(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of Offer proxy resources for the HCI cluster along with {@link PagedResponse} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByClusterNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listByClusterNext(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())); + Response res + = service.listByClusterNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** @@ -711,22 +638,13 @@ private Mono> listByClusterNextSinglePageAsync(String * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of Offer proxy resources for the HCI cluster along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * @return list of Offer proxy resources for the HCI cluster along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByClusterNextSinglePageAsync(String nextLink, Context context) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } + private PagedResponse listByClusterNextSinglePage(String nextLink, Context context) { final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.listByClusterNext(nextLink, this.client.getEndpoint(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); + Response res = service.listByClusterNextSync(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/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/OffersImpl.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/OffersImpl.java index 7fb259cdce4c..54e95c9853aa 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/OffersImpl.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/OffersImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.implementation; @@ -27,6 +27,27 @@ public OffersImpl(OffersClient innerClient, this.serviceManager = serviceManager; } + public Response getWithResponse(String resourceGroupName, String clusterName, String publisherName, + String offerName, String expand, Context context) { + Response inner = this.serviceClient() + .getWithResponse(resourceGroupName, clusterName, publisherName, offerName, expand, context); + if (inner != null) { + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new OfferImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public Offer get(String resourceGroupName, String clusterName, String publisherName, String offerName) { + OfferInner inner = this.serviceClient().get(resourceGroupName, clusterName, publisherName, offerName); + if (inner != null) { + return new OfferImpl(inner, this.manager()); + } else { + return null; + } + } + public PagedIterable listByPublisher(String resourceGroupName, String clusterName, String publisherName) { PagedIterable inner = this.serviceClient().listByPublisher(resourceGroupName, clusterName, publisherName); @@ -52,27 +73,6 @@ public PagedIterable listByCluster(String resourceGroupName, String clust return ResourceManagerUtils.mapPage(inner, inner1 -> new OfferImpl(inner1, this.manager())); } - public Response getWithResponse(String resourceGroupName, String clusterName, String publisherName, - String offerName, String expand, Context context) { - Response inner = this.serviceClient() - .getWithResponse(resourceGroupName, clusterName, publisherName, offerName, expand, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new OfferImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public Offer get(String resourceGroupName, String clusterName, String publisherName, String offerName) { - OfferInner inner = this.serviceClient().get(resourceGroupName, clusterName, publisherName, offerName); - if (inner != null) { - return new OfferImpl(inner, this.manager()); - } else { - return null; - } - } - private OffersClient serviceClient() { return this.innerClient; } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/OperationImpl.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/OperationImpl.java new file mode 100644 index 000000000000..6a1c00f7ac82 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/OperationImpl.java @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.azurestackhci.implementation; + +import com.azure.resourcemanager.azurestackhci.fluent.models.OperationInner; +import com.azure.resourcemanager.azurestackhci.models.ActionType; +import com.azure.resourcemanager.azurestackhci.models.Operation; +import com.azure.resourcemanager.azurestackhci.models.OperationDisplay; +import com.azure.resourcemanager.azurestackhci.models.Origin; + +public final class OperationImpl implements Operation { + private OperationInner innerObject; + + private final com.azure.resourcemanager.azurestackhci.AzureStackHciManager serviceManager; + + OperationImpl(OperationInner innerObject, + com.azure.resourcemanager.azurestackhci.AzureStackHciManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + } + + public String name() { + return this.innerModel().name(); + } + + public Boolean isDataAction() { + return this.innerModel().isDataAction(); + } + + public OperationDisplay display() { + return this.innerModel().display(); + } + + public Origin origin() { + return this.innerModel().origin(); + } + + public ActionType actionType() { + return this.innerModel().actionType(); + } + + public OperationInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/OperationListResultImpl.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/OperationListResultImpl.java deleted file mode 100644 index 27426092a831..000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/OperationListResultImpl.java +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.azurestackhci.implementation; - -import com.azure.resourcemanager.azurestackhci.fluent.models.OperationListResultInner; -import com.azure.resourcemanager.azurestackhci.models.Operation; -import com.azure.resourcemanager.azurestackhci.models.OperationListResult; -import java.util.Collections; -import java.util.List; - -public final class OperationListResultImpl implements OperationListResult { - private OperationListResultInner innerObject; - - private final com.azure.resourcemanager.azurestackhci.AzureStackHciManager serviceManager; - - OperationListResultImpl(OperationListResultInner innerObject, - com.azure.resourcemanager.azurestackhci.AzureStackHciManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - } - - public List value() { - List inner = this.innerModel().value(); - if (inner != null) { - return Collections.unmodifiableList(inner); - } else { - return Collections.emptyList(); - } - } - - public String nextLink() { - return this.innerModel().nextLink(); - } - - public OperationListResultInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/OperationsClientImpl.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/OperationsClientImpl.java index b46ba730b853..58ab702c0468 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/OperationsClientImpl.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/OperationsClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.implementation; @@ -10,18 +10,24 @@ import com.azure.core.annotation.Headers; import com.azure.core.annotation.Host; import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.PathParam; import com.azure.core.annotation.QueryParam; import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceInterface; import com.azure.core.annotation.ServiceMethod; import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.PagedResponse; +import com.azure.core.http.rest.PagedResponseBase; import com.azure.core.http.rest.Response; import com.azure.core.http.rest.RestProxy; import com.azure.core.management.exception.ManagementException; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; import com.azure.resourcemanager.azurestackhci.fluent.OperationsClient; -import com.azure.resourcemanager.azurestackhci.fluent.models.OperationListResultInner; +import com.azure.resourcemanager.azurestackhci.fluent.models.OperationInner; +import com.azure.resourcemanager.azurestackhci.implementation.models.OperationListResult; import reactor.core.publisher.Mono; /** @@ -36,112 +42,201 @@ public final class OperationsClientImpl implements OperationsClient { /** * The service client containing this operation class. */ - private final AzureStackHciClientImpl client; + private final AzureStackHciManagementClientImpl client; /** * Initializes an instance of OperationsClientImpl. * * @param client the instance of the service client containing this operation class. */ - OperationsClientImpl(AzureStackHciClientImpl client) { + OperationsClientImpl(AzureStackHciManagementClientImpl client) { this.service = RestProxy.create(OperationsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for AzureStackHciClientOperations to be used by the proxy service to - * perform REST calls. + * The interface defining all the services for AzureStackHciManagementClientOperations to be used by the proxy + * service to perform REST calls. */ - @Host("{$host}") - @ServiceInterface(name = "AzureStackHciClientO") + @Host("{endpoint}") + @ServiceInterface(name = "AzureStackHciManagementClientOperations") public interface OperationsService { @Headers({ "Content-Type: application/json" }) @Get("/providers/Microsoft.AzureStackHCI/operations") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("$host") String endpoint, + Mono> list(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/providers/Microsoft.AzureStackHCI/operations") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listNext(@PathParam(value = "nextLink", encoded = true) String nextLink, + @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 all available Microsoft.AzureStackHCI provider operations. + * List the operations for the provider. * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of REST API operations supported by an Azure Resource Provider along with {@link Response} on + * @return a list of REST API operations supported by an Azure Resource Provider along with {@link PagedResponse} on * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listWithResponseAsync() { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } + private Mono> listSinglePageAsync() { final String accept = "application/json"; return FluxUtil .withContext( context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * List all available Microsoft.AzureStackHCI provider operations. + * List the operations for the provider. + * + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of REST API operations supported by an Azure Resource Provider as paginated response with + * {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync() { + return new PagedFlux<>(() -> listSinglePageAsync(), nextLink -> listNextSinglePageAsync(nextLink)); + } + + /** + * List the operations for the provider. + * + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of REST API operations supported by an Azure Resource Provider along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listSinglePage() { + final String accept = "application/json"; + Response res + = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * List the operations for the provider. * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of REST API operations supported by an Azure Resource Provider along with {@link Response} on - * successful completion of {@link Mono}. + * @return a list of REST API operations supported by an Azure Resource Provider along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listWithResponseAsync(Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } + private PagedResponse listSinglePage(Context context) { final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.list(this.client.getEndpoint(), this.client.getApiVersion(), accept, context); + Response res + = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * List all available Microsoft.AzureStackHCI provider operations. + * List the operations for the provider. * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of REST API operations supported by an Azure Resource Provider on successful completion of - * {@link Mono}. + * @return a list of REST API operations supported by an Azure Resource Provider as paginated response with + * {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono listAsync() { - return listWithResponseAsync().flatMap(res -> Mono.justOrEmpty(res.getValue())); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list() { + return new PagedIterable<>(() -> listSinglePage(), nextLink -> listNextSinglePage(nextLink)); } /** - * List all available Microsoft.AzureStackHCI provider operations. + * List the operations for the provider. * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of REST API operations supported by an Azure Resource Provider along with {@link Response}. + * @return a list of REST API operations supported by an Azure Resource Provider as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(Context context) { + return new PagedIterable<>(() -> listSinglePage(context), nextLink -> listNextSinglePage(nextLink, context)); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of REST API operations supported by an Azure Resource Provider along with {@link PagedResponse} on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listNextSinglePageAsync(String nextLink) { + 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 a list of REST API operations supported by an Azure Resource Provider along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response listWithResponse(Context context) { - return listWithResponseAsync(context).block(); + 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); } /** - * List all available Microsoft.AzureStackHCI provider operations. + * Get the next page of items. * + * @param nextLink The URL to get the next list of items. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of REST API operations supported by an Azure Resource Provider. + * @return a list of REST API operations supported by an Azure Resource Provider along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public OperationListResultInner list() { - return listWithResponse(Context.NONE).getValue(); + 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/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/OperationsImpl.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/OperationsImpl.java index 55554d78e9b3..29ef8089f1a1 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/OperationsImpl.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/OperationsImpl.java @@ -1,16 +1,15 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.implementation; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.SimpleResponse; +import com.azure.core.http.rest.PagedIterable; import com.azure.core.util.Context; import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.azurestackhci.fluent.OperationsClient; -import com.azure.resourcemanager.azurestackhci.fluent.models.OperationListResultInner; -import com.azure.resourcemanager.azurestackhci.models.OperationListResult; +import com.azure.resourcemanager.azurestackhci.fluent.models.OperationInner; +import com.azure.resourcemanager.azurestackhci.models.Operation; import com.azure.resourcemanager.azurestackhci.models.Operations; public final class OperationsImpl implements Operations { @@ -26,23 +25,14 @@ public OperationsImpl(OperationsClient innerClient, this.serviceManager = serviceManager; } - public Response listWithResponse(Context context) { - Response inner = this.serviceClient().listWithResponse(context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new OperationListResultImpl(inner.getValue(), this.manager())); - } else { - return null; - } + public PagedIterable list() { + PagedIterable inner = this.serviceClient().list(); + return ResourceManagerUtils.mapPage(inner, inner1 -> new OperationImpl(inner1, this.manager())); } - public OperationListResult list() { - OperationListResultInner inner = this.serviceClient().list(); - if (inner != null) { - return new OperationListResultImpl(inner, this.manager()); - } else { - return null; - } + public PagedIterable list(Context context) { + PagedIterable inner = this.serviceClient().list(context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new OperationImpl(inner1, this.manager())); } private OperationsClient serviceClient() { diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/PasswordCredentialImpl.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/PasswordCredentialImpl.java index f58a4556f483..5d998c627bad 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/PasswordCredentialImpl.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/PasswordCredentialImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.implementation; diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/PublishersClientImpl.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/PublishersClientImpl.java deleted file mode 100644 index d0f93a6b4129..000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/PublishersClientImpl.java +++ /dev/null @@ -1,418 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.azurestackhci.implementation; - -import com.azure.core.annotation.ExpectedResponses; -import com.azure.core.annotation.Get; -import com.azure.core.annotation.HeaderParam; -import com.azure.core.annotation.Headers; -import com.azure.core.annotation.Host; -import com.azure.core.annotation.HostParam; -import com.azure.core.annotation.PathParam; -import com.azure.core.annotation.QueryParam; -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceInterface; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.annotation.UnexpectedResponseExceptionType; -import com.azure.core.http.rest.PagedFlux; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.PagedResponse; -import com.azure.core.http.rest.PagedResponseBase; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.RestProxy; -import com.azure.core.management.exception.ManagementException; -import com.azure.core.util.Context; -import com.azure.core.util.FluxUtil; -import com.azure.resourcemanager.azurestackhci.fluent.PublishersClient; -import com.azure.resourcemanager.azurestackhci.fluent.models.PublisherInner; -import com.azure.resourcemanager.azurestackhci.models.PublisherList; -import reactor.core.publisher.Mono; - -/** - * An instance of this class provides access to all the operations defined in PublishersClient. - */ -public final class PublishersClientImpl implements PublishersClient { - /** - * The proxy service used to perform REST calls. - */ - private final PublishersService service; - - /** - * The service client containing this operation class. - */ - private final AzureStackHciClientImpl client; - - /** - * Initializes an instance of PublishersClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - PublishersClientImpl(AzureStackHciClientImpl client) { - this.service - = RestProxy.create(PublishersService.class, client.getHttpPipeline(), client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for AzureStackHciClientPublishers to be used by the proxy service to - * perform REST calls. - */ - @Host("{$host}") - @ServiceInterface(name = "AzureStackHciClientP") - public interface PublishersService { - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/clusters/{clusterName}/publishers") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByCluster(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("clusterName") String clusterName, - @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/clusters/{clusterName}/publishers/{publisherName}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("clusterName") String clusterName, - @PathParam("publisherName") String publisherName, @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("{nextLink}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByClusterNext(@PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); - } - - /** - * List Publishers available for the HCI Cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterName The name of the cluster. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of Publisher proxy resources for the HCI cluster along with {@link PagedResponse} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByClusterSinglePageAsync(String resourceGroupName, - String clusterName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (clusterName == null) { - return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listByCluster(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, clusterName, this.client.getApiVersion(), 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 Publishers available for the HCI Cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterName The name of the cluster. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of Publisher proxy resources for the HCI cluster along with {@link PagedResponse} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByClusterSinglePageAsync(String resourceGroupName, - String clusterName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (clusterName == null) { - return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .listByCluster(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, clusterName, - this.client.getApiVersion(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * List Publishers available for the HCI Cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterName The name of the cluster. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of Publisher proxy resources for the HCI cluster as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByClusterAsync(String resourceGroupName, String clusterName) { - return new PagedFlux<>(() -> listByClusterSinglePageAsync(resourceGroupName, clusterName), - nextLink -> listByClusterNextSinglePageAsync(nextLink)); - } - - /** - * List Publishers available for the HCI Cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterName The name of the cluster. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of Publisher proxy resources for the HCI cluster as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByClusterAsync(String resourceGroupName, String clusterName, - Context context) { - return new PagedFlux<>(() -> listByClusterSinglePageAsync(resourceGroupName, clusterName, context), - nextLink -> listByClusterNextSinglePageAsync(nextLink, context)); - } - - /** - * List Publishers available for the HCI Cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterName The name of the cluster. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of Publisher proxy resources for the HCI cluster as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByCluster(String resourceGroupName, String clusterName) { - return new PagedIterable<>(listByClusterAsync(resourceGroupName, clusterName)); - } - - /** - * List Publishers available for the HCI Cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterName The name of the cluster. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of Publisher proxy resources for the HCI cluster as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByCluster(String resourceGroupName, String clusterName, Context context) { - return new PagedIterable<>(listByClusterAsync(resourceGroupName, clusterName, context)); - } - - /** - * Get Publisher resource details of HCI Cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterName The name of the cluster. - * @param publisherName The name of the publisher available within HCI cluster. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return publisher resource details of HCI Cluster along with {@link Response} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, String clusterName, - String publisherName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (clusterName == null) { - return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); - } - if (publisherName == null) { - return Mono.error(new IllegalArgumentException("Parameter publisherName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, clusterName, publisherName, this.client.getApiVersion(), accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get Publisher resource details of HCI Cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterName The name of the cluster. - * @param publisherName The name of the publisher available within HCI cluster. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return publisher resource details of HCI Cluster along with {@link Response} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, String clusterName, - String publisherName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (clusterName == null) { - return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); - } - if (publisherName == null) { - return Mono.error(new IllegalArgumentException("Parameter publisherName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, clusterName, - publisherName, this.client.getApiVersion(), accept, context); - } - - /** - * Get Publisher resource details of HCI Cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterName The name of the cluster. - * @param publisherName The name of the publisher available within HCI cluster. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return publisher resource details of HCI Cluster on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync(String resourceGroupName, String clusterName, String publisherName) { - return getWithResponseAsync(resourceGroupName, clusterName, publisherName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Get Publisher resource details of HCI Cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterName The name of the cluster. - * @param publisherName The name of the publisher available within HCI cluster. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return publisher resource details of HCI Cluster along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse(String resourceGroupName, String clusterName, String publisherName, - Context context) { - return getWithResponseAsync(resourceGroupName, clusterName, publisherName, context).block(); - } - - /** - * Get Publisher resource details of HCI Cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterName The name of the cluster. - * @param publisherName The name of the publisher available within HCI cluster. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return publisher resource details of HCI Cluster. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public PublisherInner get(String resourceGroupName, String clusterName, String publisherName) { - return getWithResponse(resourceGroupName, clusterName, publisherName, 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 list of Publisher proxy resources for the HCI cluster along with {@link PagedResponse} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByClusterNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listByClusterNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), - res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of Publisher proxy resources for the HCI cluster along with {@link PagedResponse} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByClusterNextSinglePageAsync(String nextLink, Context context) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.listByClusterNext(nextLink, this.client.getEndpoint(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/PublishersImpl.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/PublishersImpl.java deleted file mode 100644 index 633fca2b6424..000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/PublishersImpl.java +++ /dev/null @@ -1,69 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.azurestackhci.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.azurestackhci.fluent.PublishersClient; -import com.azure.resourcemanager.azurestackhci.fluent.models.PublisherInner; -import com.azure.resourcemanager.azurestackhci.models.Publisher; -import com.azure.resourcemanager.azurestackhci.models.Publishers; - -public final class PublishersImpl implements Publishers { - private static final ClientLogger LOGGER = new ClientLogger(PublishersImpl.class); - - private final PublishersClient innerClient; - - private final com.azure.resourcemanager.azurestackhci.AzureStackHciManager serviceManager; - - public PublishersImpl(PublishersClient innerClient, - com.azure.resourcemanager.azurestackhci.AzureStackHciManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public PagedIterable listByCluster(String resourceGroupName, String clusterName) { - PagedIterable inner = this.serviceClient().listByCluster(resourceGroupName, clusterName); - return ResourceManagerUtils.mapPage(inner, inner1 -> new PublisherImpl(inner1, this.manager())); - } - - public PagedIterable listByCluster(String resourceGroupName, String clusterName, Context context) { - PagedIterable inner - = this.serviceClient().listByCluster(resourceGroupName, clusterName, context); - return ResourceManagerUtils.mapPage(inner, inner1 -> new PublisherImpl(inner1, this.manager())); - } - - public Response getWithResponse(String resourceGroupName, String clusterName, String publisherName, - Context context) { - Response inner - = this.serviceClient().getWithResponse(resourceGroupName, clusterName, publisherName, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new PublisherImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public Publisher get(String resourceGroupName, String clusterName, String publisherName) { - PublisherInner inner = this.serviceClient().get(resourceGroupName, clusterName, publisherName); - if (inner != null) { - return new PublisherImpl(inner, this.manager()); - } else { - return null; - } - } - - private PublishersClient serviceClient() { - return this.innerClient; - } - - private com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/ResourceManagerUtils.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/ResourceManagerUtils.java index f691c2e09a2e..db4f42a1f02f 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/ResourceManagerUtils.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/ResourceManagerUtils.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.implementation; diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/SecuritySettingImpl.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/SecuritySettingImpl.java index 5d11a103fb30..724bbda5eb57 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/SecuritySettingImpl.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/SecuritySettingImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.implementation; @@ -158,9 +158,4 @@ public SecuritySettingImpl withSmbEncryptionForIntraClusterTrafficComplianceAssi smbEncryptionForIntraClusterTrafficComplianceAssignment); return this; } - - public SecuritySettingImpl withProvisioningState(ProvisioningState provisioningState) { - this.innerModel().withProvisioningState(provisioningState); - return this; - } } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/SecuritySettingsClientImpl.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/SecuritySettingsClientImpl.java index bc55205b9681..c00da96e2278 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/SecuritySettingsClientImpl.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/SecuritySettingsClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.implementation; @@ -27,13 +27,14 @@ 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.azurestackhci.fluent.SecuritySettingsClient; import com.azure.resourcemanager.azurestackhci.fluent.models.SecuritySettingInner; -import com.azure.resourcemanager.azurestackhci.models.SecuritySettingListResult; +import com.azure.resourcemanager.azurestackhci.implementation.models.SecuritySettingListResult; import java.nio.ByteBuffer; import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; @@ -50,216 +51,117 @@ public final class SecuritySettingsClientImpl implements SecuritySettingsClient /** * The service client containing this operation class. */ - private final AzureStackHciClientImpl client; + private final AzureStackHciManagementClientImpl client; /** * Initializes an instance of SecuritySettingsClientImpl. * * @param client the instance of the service client containing this operation class. */ - SecuritySettingsClientImpl(AzureStackHciClientImpl client) { + SecuritySettingsClientImpl(AzureStackHciManagementClientImpl client) { this.service = RestProxy.create(SecuritySettingsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for AzureStackHciClientSecuritySettings to be used by the proxy service - * to perform REST calls. + * The interface defining all the services for AzureStackHciManagementClientSecuritySettings to be used by the proxy + * service to perform REST calls. */ - @Host("{$host}") - @ServiceInterface(name = "AzureStackHciClientS") + @Host("{endpoint}") + @ServiceInterface(name = "AzureStackHciManagementClientSecuritySettings") public interface SecuritySettingsService { @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/clusters/{clusterName}/securitySettings") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/clusters/{clusterName}/securitySettings/{securitySettingsName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByClusters(@HostParam("$host") String endpoint, + Mono> get(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("clusterName") String clusterName, - @HeaderParam("Accept") String accept, Context context); + @PathParam("securitySettingsName") String securitySettingsName, @HeaderParam("Accept") String accept, + Context context); @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/clusters/{clusterName}/securitySettings/{securitySettingsName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("$host") String endpoint, + Response getSync(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("clusterName") String clusterName, @PathParam("securitySettingsName") String securitySettingsName, @HeaderParam("Accept") String accept, Context context); - @Headers({ "Content-Type: application/json" }) @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/clusters/{clusterName}/securitySettings/{securitySettingsName}") @ExpectedResponses({ 200, 201 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> createOrUpdate(@HostParam("$host") String endpoint, + Mono>> createOrUpdate(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("clusterName") String clusterName, @PathParam("securitySettingsName") String securitySettingsName, - @BodyParam("application/json") SecuritySettingInner resource, @HeaderParam("Accept") String accept, - Context context); + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") SecuritySettingInner resource, Context context); - @Headers({ "Content-Type: application/json" }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/clusters/{clusterName}/securitySettings/{securitySettingsName}") + @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("clusterName") String clusterName, + @PathParam("securitySettingsName") String securitySettingsName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") SecuritySettingInner resource, Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/clusters/{clusterName}/securitySettings/{securitySettingsName}") @ExpectedResponses({ 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete(@HostParam("$host") String endpoint, + Mono>> delete(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("clusterName") String clusterName, - @PathParam("securitySettingsName") String securitySettingsName, @HeaderParam("Accept") String accept, - Context context); + @PathParam("securitySettingsName") String securitySettingsName, Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/clusters/{clusterName}/securitySettings/{securitySettingsName}") + @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("clusterName") String clusterName, + @PathParam("securitySettingsName") String securitySettingsName, Context context); @Headers({ "Content-Type: application/json" }) - @Get("{nextLink}") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/clusters/{clusterName}/securitySettings") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByClustersNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + Mono> listByClusters(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("clusterName") String clusterName, @HeaderParam("Accept") String accept, Context context); - } - - /** - * List SecuritySetting resources by Clusters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterName The name of the cluster. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a SecuritySetting list operation along with {@link PagedResponse} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByClustersSinglePageAsync(String resourceGroupName, - String clusterName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (clusterName == null) { - return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listByClusters(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, clusterName, accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - /** - * List SecuritySetting resources by Clusters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterName The name of the cluster. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a SecuritySetting list operation along with {@link PagedResponse} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByClustersSinglePageAsync(String resourceGroupName, - String clusterName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (clusterName == null) { - return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .listByClusters(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, clusterName, accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * List SecuritySetting resources by Clusters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterName The name of the cluster. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a SecuritySetting list operation as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByClustersAsync(String resourceGroupName, String clusterName) { - return new PagedFlux<>(() -> listByClustersSinglePageAsync(resourceGroupName, clusterName), - nextLink -> listByClustersNextSinglePageAsync(nextLink)); - } - - /** - * List SecuritySetting resources by Clusters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterName The name of the cluster. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a SecuritySetting list operation as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByClustersAsync(String resourceGroupName, String clusterName, - Context context) { - return new PagedFlux<>(() -> listByClustersSinglePageAsync(resourceGroupName, clusterName, context), - nextLink -> listByClustersNextSinglePageAsync(nextLink, context)); - } + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/clusters/{clusterName}/securitySettings") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listByClustersSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("clusterName") String clusterName, + @HeaderParam("Accept") String accept, Context context); - /** - * List SecuritySetting resources by Clusters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterName The name of the cluster. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a SecuritySetting list operation as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByClusters(String resourceGroupName, String clusterName) { - return new PagedIterable<>(listByClustersAsync(resourceGroupName, clusterName)); - } + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByClustersNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, Context context); - /** - * List SecuritySetting resources by Clusters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterName The name of the cluster. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a SecuritySetting list operation as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByClusters(String resourceGroupName, String clusterName, - Context context) { - return new PagedIterable<>(listByClustersAsync(resourceGroupName, clusterName, context)); + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listByClustersNextSync( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, Context context); } /** @@ -276,25 +178,6 @@ public PagedIterable listByClusters(String resourceGroupNa @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync(String resourceGroupName, String clusterName, String securitySettingsName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (clusterName == null) { - return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); - } - if (securitySettingsName == null) { - return Mono - .error(new IllegalArgumentException("Parameter securitySettingsName is required and cannot be null.")); - } final String accept = "application/json"; return FluxUtil .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), @@ -302,46 +185,6 @@ private Mono> getWithResponseAsync(String resourc .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } - /** - * Get a SecuritySetting. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterName The name of the cluster. - * @param securitySettingsName Name of security setting. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a SecuritySetting along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, String clusterName, - String securitySettingsName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (clusterName == null) { - return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); - } - if (securitySettingsName == null) { - return Mono - .error(new IllegalArgumentException("Parameter securitySettingsName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.get(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, clusterName, securitySettingsName, accept, context); - } - /** * Get a SecuritySetting. * @@ -375,7 +218,9 @@ private Mono getAsync(String resourceGroupName, String clu @ServiceMethod(returns = ReturnType.SINGLE) public Response getWithResponse(String resourceGroupName, String clusterName, String securitySettingsName, Context context) { - return getWithResponseAsync(resourceGroupName, clusterName, securitySettingsName, context).block(); + final String accept = "application/json"; + return service.getSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, clusterName, securitySettingsName, accept, context); } /** @@ -409,35 +254,12 @@ public SecuritySettingInner get(String resourceGroupName, String clusterName, St @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, String clusterName, String securitySettingsName, SecuritySettingInner resource) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (clusterName == null) { - return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); - } - if (securitySettingsName == null) { - return Mono - .error(new IllegalArgumentException("Parameter securitySettingsName is required and cannot be null.")); - } - if (resource == null) { - return Mono.error(new IllegalArgumentException("Parameter resource is required and cannot be null.")); - } else { - resource.validate(); - } + final String contentType = "application/json"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, clusterName, securitySettingsName, resource, accept, - context)) + this.client.getSubscriptionId(), resourceGroupName, clusterName, securitySettingsName, contentType, + accept, resource, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -448,44 +270,19 @@ private Mono>> createOrUpdateWithResponseAsync(String * @param clusterName The name of the cluster. * @param securitySettingsName Name of security setting. * @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 security settings proxy resource along with {@link Response} on successful completion of {@link Mono}. + * @return security settings proxy resource along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, - String clusterName, String securitySettingsName, SecuritySettingInner resource, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (clusterName == null) { - return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); - } - if (securitySettingsName == null) { - return Mono - .error(new IllegalArgumentException("Parameter securitySettingsName is required and cannot be null.")); - } - if (resource == null) { - return Mono.error(new IllegalArgumentException("Parameter resource is required and cannot be null.")); - } else { - resource.validate(); - } + private Response createOrUpdateWithResponse(String resourceGroupName, String clusterName, + String securitySettingsName, SecuritySettingInner resource) { + final String contentType = "application/json"; final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, clusterName, securitySettingsName, resource, accept, - context); + return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, clusterName, securitySettingsName, contentType, accept, + resource, Context.NONE); } /** @@ -495,18 +292,20 @@ private Mono>> createOrUpdateWithResponseAsync(String * @param clusterName The name of the cluster. * @param securitySettingsName Name of security setting. * @param resource Resource create parameters. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of security settings proxy resource. + * @return security settings proxy resource along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, SecuritySettingInner> beginCreateOrUpdateAsync( - String resourceGroupName, String clusterName, String securitySettingsName, SecuritySettingInner resource) { - Mono>> mono - = createOrUpdateWithResponseAsync(resourceGroupName, clusterName, securitySettingsName, resource); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - SecuritySettingInner.class, SecuritySettingInner.class, this.client.getContext()); + @ServiceMethod(returns = ReturnType.SINGLE) + private Response createOrUpdateWithResponse(String resourceGroupName, String clusterName, + String securitySettingsName, SecuritySettingInner 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, clusterName, securitySettingsName, contentType, accept, + resource, context); } /** @@ -516,7 +315,6 @@ private PollerFlux, SecuritySettingInner> begin * @param clusterName The name of the cluster. * @param securitySettingsName Name of security setting. * @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. @@ -524,13 +322,11 @@ private PollerFlux, SecuritySettingInner> begin */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, SecuritySettingInner> beginCreateOrUpdateAsync( - String resourceGroupName, String clusterName, String securitySettingsName, SecuritySettingInner resource, - Context context) { - context = this.client.mergeContext(context); + String resourceGroupName, String clusterName, String securitySettingsName, SecuritySettingInner resource) { Mono>> mono - = createOrUpdateWithResponseAsync(resourceGroupName, clusterName, securitySettingsName, resource, context); + = createOrUpdateWithResponseAsync(resourceGroupName, clusterName, securitySettingsName, resource); return this.client.getLroResult(mono, this.client.getHttpPipeline(), - SecuritySettingInner.class, SecuritySettingInner.class, context); + SecuritySettingInner.class, SecuritySettingInner.class, this.client.getContext()); } /** @@ -548,8 +344,10 @@ private PollerFlux, SecuritySettingInner> begin @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, SecuritySettingInner> beginCreateOrUpdate( String resourceGroupName, String clusterName, String securitySettingsName, SecuritySettingInner resource) { - return this.beginCreateOrUpdateAsync(resourceGroupName, clusterName, securitySettingsName, resource) - .getSyncPoller(); + Response response + = createOrUpdateWithResponse(resourceGroupName, clusterName, securitySettingsName, resource); + return this.client.getLroResult(response, + SecuritySettingInner.class, SecuritySettingInner.class, Context.NONE); } /** @@ -569,8 +367,10 @@ public SyncPoller, SecuritySettingInner> beginC public SyncPoller, SecuritySettingInner> beginCreateOrUpdate( String resourceGroupName, String clusterName, String securitySettingsName, SecuritySettingInner resource, Context context) { - return this.beginCreateOrUpdateAsync(resourceGroupName, clusterName, securitySettingsName, resource, context) - .getSyncPoller(); + Response response + = createOrUpdateWithResponse(resourceGroupName, clusterName, securitySettingsName, resource, context); + return this.client.getLroResult(response, + SecuritySettingInner.class, SecuritySettingInner.class, context); } /** @@ -592,26 +392,6 @@ private Mono createOrUpdateAsync(String resourceGroupName, .flatMap(this.client::getLroFinalResultOrError); } - /** - * Create a security setting. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterName The name of the cluster. - * @param securitySettingsName Name of security setting. - * @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 security settings proxy resource on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync(String resourceGroupName, String clusterName, - String securitySettingsName, SecuritySettingInner resource, Context context) { - return beginCreateOrUpdateAsync(resourceGroupName, clusterName, securitySettingsName, resource, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - /** * Create a security setting. * @@ -627,7 +407,7 @@ private Mono createOrUpdateAsync(String resourceGroupName, @ServiceMethod(returns = ReturnType.SINGLE) public SecuritySettingInner createOrUpdate(String resourceGroupName, String clusterName, String securitySettingsName, SecuritySettingInner resource) { - return createOrUpdateAsync(resourceGroupName, clusterName, securitySettingsName, resource).block(); + return beginCreateOrUpdate(resourceGroupName, clusterName, securitySettingsName, resource).getFinalResult(); } /** @@ -646,7 +426,8 @@ public SecuritySettingInner createOrUpdate(String resourceGroupName, String clus @ServiceMethod(returns = ReturnType.SINGLE) public SecuritySettingInner createOrUpdate(String resourceGroupName, String clusterName, String securitySettingsName, SecuritySettingInner resource, Context context) { - return createOrUpdateAsync(resourceGroupName, clusterName, securitySettingsName, resource, context).block(); + return beginCreateOrUpdate(resourceGroupName, clusterName, securitySettingsName, resource, context) + .getFinalResult(); } /** @@ -663,29 +444,9 @@ public SecuritySettingInner createOrUpdate(String resourceGroupName, String clus @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> deleteWithResponseAsync(String resourceGroupName, String clusterName, String securitySettingsName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (clusterName == null) { - return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); - } - if (securitySettingsName == null) { - return Mono - .error(new IllegalArgumentException("Parameter securitySettingsName is required and cannot be null.")); - } - final String accept = "application/json"; return FluxUtil .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, clusterName, securitySettingsName, accept, context)) + this.client.getSubscriptionId(), resourceGroupName, clusterName, securitySettingsName, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -695,38 +456,16 @@ private Mono>> deleteWithResponseAsync(String resource * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param securitySettingsName Name of security setting. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync(String resourceGroupName, String clusterName, - String securitySettingsName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (clusterName == null) { - return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); - } - if (securitySettingsName == null) { - return Mono - .error(new IllegalArgumentException("Parameter securitySettingsName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.delete(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, clusterName, securitySettingsName, accept, context); + private Response deleteWithResponse(String resourceGroupName, String clusterName, + String securitySettingsName) { + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, clusterName, securitySettingsName, Context.NONE); } /** @@ -735,18 +474,17 @@ private Mono>> deleteWithResponseAsync(String resource * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param securitySettingsName Name of security setting. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. + * @return the response body along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String clusterName, - String securitySettingsName) { - Mono>> mono - = deleteWithResponseAsync(resourceGroupName, clusterName, securitySettingsName); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - this.client.getContext()); + @ServiceMethod(returns = ReturnType.SINGLE) + private Response deleteWithResponse(String resourceGroupName, String clusterName, + String securitySettingsName, Context context) { + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, clusterName, securitySettingsName, context); } /** @@ -755,7 +493,6 @@ private PollerFlux, Void> beginDeleteAsync(String resourceGroup * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param securitySettingsName Name of security setting. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -763,12 +500,11 @@ private PollerFlux, Void> beginDeleteAsync(String resourceGroup */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String clusterName, - String securitySettingsName, Context context) { - context = this.client.mergeContext(context); + String securitySettingsName) { Mono>> mono - = deleteWithResponseAsync(resourceGroupName, clusterName, securitySettingsName, context); + = deleteWithResponseAsync(resourceGroupName, clusterName, securitySettingsName); return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - context); + this.client.getContext()); } /** @@ -785,7 +521,8 @@ private PollerFlux, Void> beginDeleteAsync(String resourceGroup @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete(String resourceGroupName, String clusterName, String securitySettingsName) { - return this.beginDeleteAsync(resourceGroupName, clusterName, securitySettingsName).getSyncPoller(); + Response response = deleteWithResponse(resourceGroupName, clusterName, securitySettingsName); + return this.client.getLroResult(response, Void.class, Void.class, Context.NONE); } /** @@ -803,7 +540,9 @@ public SyncPoller, Void> beginDelete(String resourceGroupName, @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete(String resourceGroupName, String clusterName, String securitySettingsName, Context context) { - return this.beginDeleteAsync(resourceGroupName, clusterName, securitySettingsName, context).getSyncPoller(); + Response response + = deleteWithResponse(resourceGroupName, clusterName, securitySettingsName, context); + return this.client.getLroResult(response, Void.class, Void.class, context); } /** @@ -829,17 +568,13 @@ private Mono deleteAsync(String resourceGroupName, String clusterName, Str * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param securitySettingsName Name of security setting. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 clusterName, String securitySettingsName, - Context context) { - return beginDeleteAsync(resourceGroupName, clusterName, securitySettingsName, context).last() - .flatMap(this.client::getLroFinalResultOrError); + public void delete(String resourceGroupName, String clusterName, String securitySettingsName) { + beginDelete(resourceGroupName, clusterName, securitySettingsName).getFinalResult(); } /** @@ -848,29 +583,129 @@ private Mono deleteAsync(String resourceGroupName, String clusterName, Str * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param securitySettingsName Name of security setting. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @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 clusterName, String securitySettingsName) { - deleteAsync(resourceGroupName, clusterName, securitySettingsName).block(); + public void delete(String resourceGroupName, String clusterName, String securitySettingsName, Context context) { + beginDelete(resourceGroupName, clusterName, securitySettingsName, context).getFinalResult(); } /** - * Delete a SecuritySetting. + * List SecuritySetting resources by Clusters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a SecuritySetting list operation along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByClustersSinglePageAsync(String resourceGroupName, + String clusterName) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listByClusters(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, clusterName, accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * List SecuritySetting resources by Clusters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a SecuritySetting list operation as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByClustersAsync(String resourceGroupName, String clusterName) { + return new PagedFlux<>(() -> listByClustersSinglePageAsync(resourceGroupName, clusterName), + nextLink -> listByClustersNextSinglePageAsync(nextLink)); + } + + /** + * List SecuritySetting resources by Clusters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a SecuritySetting list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByClustersSinglePage(String resourceGroupName, String clusterName) { + final String accept = "application/json"; + Response res + = service.listByClustersSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, clusterName, accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * List SecuritySetting resources by Clusters. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. - * @param securitySettingsName Name of security setting. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a SecuritySetting list operation along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String clusterName, String securitySettingsName, Context context) { - deleteAsync(resourceGroupName, clusterName, securitySettingsName, context).block(); + private PagedResponse listByClustersSinglePage(String resourceGroupName, String clusterName, + Context context) { + final String accept = "application/json"; + Response res + = service.listByClustersSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, clusterName, accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * List SecuritySetting resources by Clusters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a SecuritySetting list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByClusters(String resourceGroupName, String clusterName) { + return new PagedIterable<>(() -> listByClustersSinglePage(resourceGroupName, clusterName), + nextLink -> listByClustersNextSinglePage(nextLink)); + } + + /** + * List SecuritySetting resources by Clusters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a SecuritySetting list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByClusters(String resourceGroupName, String clusterName, + Context context) { + return new PagedIterable<>(() -> listByClustersSinglePage(resourceGroupName, clusterName, context), + nextLink -> listByClustersNextSinglePage(nextLink, context)); } /** @@ -885,13 +720,6 @@ public void delete(String resourceGroupName, String clusterName, String security */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByClustersNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } final String accept = "application/json"; return FluxUtil .withContext(context -> service.listByClustersNext(nextLink, this.client.getEndpoint(), accept, context)) @@ -900,6 +728,24 @@ private Mono> listByClustersNextSinglePageAs .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 SecuritySetting list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByClustersNextSinglePage(String nextLink) { + final String accept = "application/json"; + Response res + = service.listByClustersNextSync(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. * @@ -908,23 +754,14 @@ private Mono> listByClustersNextSinglePageAs * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a SecuritySetting list operation along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * @return the response of a SecuritySetting list operation along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByClustersNextSinglePageAsync(String nextLink, - Context context) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } + private PagedResponse listByClustersNextSinglePage(String nextLink, Context context) { final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.listByClustersNext(nextLink, this.client.getEndpoint(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); + Response res + = service.listByClustersNextSync(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/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/SecuritySettingsImpl.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/SecuritySettingsImpl.java index 82420589dfab..c92fa49ed014 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/SecuritySettingsImpl.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/SecuritySettingsImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.implementation; @@ -27,18 +27,6 @@ public SecuritySettingsImpl(SecuritySettingsClient innerClient, this.serviceManager = serviceManager; } - public PagedIterable listByClusters(String resourceGroupName, String clusterName) { - PagedIterable inner = this.serviceClient().listByClusters(resourceGroupName, clusterName); - return ResourceManagerUtils.mapPage(inner, inner1 -> new SecuritySettingImpl(inner1, this.manager())); - } - - public PagedIterable listByClusters(String resourceGroupName, String clusterName, - Context context) { - PagedIterable inner - = this.serviceClient().listByClusters(resourceGroupName, clusterName, context); - return ResourceManagerUtils.mapPage(inner, inner1 -> new SecuritySettingImpl(inner1, this.manager())); - } - public Response getWithResponse(String resourceGroupName, String clusterName, String securitySettingsName, Context context) { Response inner @@ -68,6 +56,18 @@ public void delete(String resourceGroupName, String clusterName, String security this.serviceClient().delete(resourceGroupName, clusterName, securitySettingsName, context); } + public PagedIterable listByClusters(String resourceGroupName, String clusterName) { + PagedIterable inner = this.serviceClient().listByClusters(resourceGroupName, clusterName); + return ResourceManagerUtils.mapPage(inner, inner1 -> new SecuritySettingImpl(inner1, this.manager())); + } + + public PagedIterable listByClusters(String resourceGroupName, String clusterName, + Context context) { + PagedIterable inner + = this.serviceClient().listByClusters(resourceGroupName, clusterName, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new SecuritySettingImpl(inner1, this.manager())); + } + public SecuritySetting getById(String id) { String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/SkuImpl.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/SkuImpl.java index 8a2673751d6f..44788347daf0 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/SkuImpl.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/SkuImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.implementation; diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/SkusClientImpl.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/SkusClientImpl.java index ce65bcfa3a6c..bb547868bb22 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/SkusClientImpl.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/SkusClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.implementation; @@ -27,7 +27,7 @@ import com.azure.core.util.FluxUtil; import com.azure.resourcemanager.azurestackhci.fluent.SkusClient; import com.azure.resourcemanager.azurestackhci.fluent.models.SkuInner; -import com.azure.resourcemanager.azurestackhci.models.SkuList; +import com.azure.resourcemanager.azurestackhci.implementation.models.SkuList; import reactor.core.publisher.Mono; /** @@ -42,45 +42,65 @@ public final class SkusClientImpl implements SkusClient { /** * The service client containing this operation class. */ - private final AzureStackHciClientImpl client; + private final AzureStackHciManagementClientImpl client; /** * Initializes an instance of SkusClientImpl. * * @param client the instance of the service client containing this operation class. */ - SkusClientImpl(AzureStackHciClientImpl client) { + SkusClientImpl(AzureStackHciManagementClientImpl client) { this.service = RestProxy.create(SkusService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for AzureStackHciClientSkus to be used by the proxy service to perform - * REST calls. + * The interface defining all the services for AzureStackHciManagementClientSkus to be used by the proxy service to + * perform REST calls. */ - @Host("{$host}") - @ServiceInterface(name = "AzureStackHciClientS") + @Host("{endpoint}") + @ServiceInterface(name = "AzureStackHciManagementClientSkus") public interface SkusService { @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/clusters/{clusterName}/publishers/{publisherName}/offers/{offerName}/skus") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/clusters/{clusterName}/publishers/{publisherName}/offers/{offerName}/skus/{skuName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByOffer(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono> get(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("clusterName") String clusterName, @PathParam("publisherName") String publisherName, @PathParam("offerName") String offerName, - @QueryParam("api-version") String apiVersion, @QueryParam("$expand") String expand, + @PathParam("skuName") String skuName, @QueryParam("$expand") String expand, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/clusters/{clusterName}/publishers/{publisherName}/offers/{offerName}/skus/{skuName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("$host") String endpoint, + Response getSync(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("clusterName") String clusterName, @PathParam("publisherName") String publisherName, @PathParam("offerName") String offerName, - @PathParam("skuName") String skuName, @QueryParam("api-version") String apiVersion, + @PathParam("skuName") String skuName, @QueryParam("$expand") String expand, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/clusters/{clusterName}/publishers/{publisherName}/offers/{offerName}/skus") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByOffer(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("clusterName") String clusterName, + @PathParam("publisherName") String publisherName, @PathParam("offerName") String offerName, + @QueryParam("$expand") String expand, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/clusters/{clusterName}/publishers/{publisherName}/offers/{offerName}/skus") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listByOfferSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("clusterName") String clusterName, + @PathParam("publisherName") String publisherName, @PathParam("offerName") String offerName, @QueryParam("$expand") String expand, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @@ -88,148 +108,107 @@ Mono> get(@HostParam("$host") String endpoint, @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByOfferNext(@PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); + @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listByOfferNextSync(@PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); } /** - * List Skus available for a offer within the HCI Cluster. + * Get SKU resource details within a offer of HCI Cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param publisherName The name of the publisher available within HCI cluster. * @param offerName The name of the offer available within HCI cluster. + * @param skuName The name of the SKU available within HCI cluster. * @param expand Specify $expand=content,contentVersion to populate additional fields related to the marketplace * offer. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of SKU proxy resources for the HCI cluster along with {@link PagedResponse} on successful completion + * @return sKU resource details within a offer of HCI Cluster along with {@link Response} on successful completion * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByOfferSinglePageAsync(String resourceGroupName, String clusterName, - String publisherName, String offerName, String expand) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (clusterName == null) { - return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); - } - if (publisherName == null) { - return Mono.error(new IllegalArgumentException("Parameter publisherName is required and cannot be null.")); - } - if (offerName == null) { - return Mono.error(new IllegalArgumentException("Parameter offerName is required and cannot be null.")); - } + private Mono> getWithResponseAsync(String resourceGroupName, String clusterName, + String publisherName, String offerName, String skuName, String expand) { final String accept = "application/json"; return FluxUtil - .withContext(context -> service.listByOffer(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, clusterName, publisherName, offerName, this.client.getApiVersion(), expand, accept, - context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), - res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, clusterName, publisherName, offerName, skuName, + expand, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * List Skus available for a offer within the HCI Cluster. + * Get SKU resource details within a offer of HCI Cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param publisherName The name of the publisher available within HCI cluster. * @param offerName The name of the offer available within HCI cluster. - * @param expand Specify $expand=content,contentVersion to populate additional fields related to the marketplace - * offer. - * @param context The context to associate with this operation. + * @param skuName The name of the SKU available within HCI cluster. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of SKU proxy resources for the HCI cluster along with {@link PagedResponse} on successful completion - * of {@link Mono}. + * @return sKU resource details within a offer of HCI Cluster on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByOfferSinglePageAsync(String resourceGroupName, String clusterName, - String publisherName, String offerName, String expand, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (clusterName == null) { - return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); - } - if (publisherName == null) { - return Mono.error(new IllegalArgumentException("Parameter publisherName is required and cannot be null.")); - } - if (offerName == null) { - return Mono.error(new IllegalArgumentException("Parameter offerName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .listByOffer(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, clusterName, - publisherName, offerName, this.client.getApiVersion(), expand, accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); + private Mono getAsync(String resourceGroupName, String clusterName, String publisherName, + String offerName, String skuName) { + final String expand = null; + return getWithResponseAsync(resourceGroupName, clusterName, publisherName, offerName, skuName, expand) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** - * List Skus available for a offer within the HCI Cluster. + * Get SKU resource details within a offer of HCI Cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param publisherName The name of the publisher available within HCI cluster. * @param offerName The name of the offer available within HCI cluster. + * @param skuName The name of the SKU available within HCI cluster. * @param expand Specify $expand=content,contentVersion to populate additional fields related to the marketplace * offer. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of SKU proxy resources for the HCI cluster as paginated response with {@link PagedFlux}. + * @return sKU resource details within a offer of HCI Cluster along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByOfferAsync(String resourceGroupName, String clusterName, String publisherName, - String offerName, String expand) { - return new PagedFlux<>( - () -> listByOfferSinglePageAsync(resourceGroupName, clusterName, publisherName, offerName, expand), - nextLink -> listByOfferNextSinglePageAsync(nextLink)); + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse(String resourceGroupName, String clusterName, String publisherName, + String offerName, String skuName, String expand, Context context) { + final String accept = "application/json"; + return service.getSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, clusterName, publisherName, offerName, skuName, expand, accept, context); } /** - * List Skus available for a offer within the HCI Cluster. + * Get SKU resource details within a offer of HCI Cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param publisherName The name of the publisher available within HCI cluster. * @param offerName The name of the offer available within HCI cluster. + * @param skuName The name of the SKU available within HCI cluster. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of SKU proxy resources for the HCI cluster as paginated response with {@link PagedFlux}. + * @return sKU resource details within a offer of HCI Cluster. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByOfferAsync(String resourceGroupName, String clusterName, String publisherName, - String offerName) { + @ServiceMethod(returns = ReturnType.SINGLE) + public SkuInner get(String resourceGroupName, String clusterName, String publisherName, String offerName, + String skuName) { final String expand = null; - return new PagedFlux<>( - () -> listByOfferSinglePageAsync(resourceGroupName, clusterName, publisherName, offerName, expand), - nextLink -> listByOfferNextSinglePageAsync(nextLink)); + return getWithResponse(resourceGroupName, clusterName, publisherName, offerName, skuName, expand, Context.NONE) + .getValue(); } /** @@ -241,18 +220,23 @@ private PagedFlux listByOfferAsync(String resourceGroupName, String cl * @param offerName The name of the offer available within HCI cluster. * @param expand Specify $expand=content,contentVersion to populate additional fields related to the marketplace * offer. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of SKU proxy resources for the HCI cluster as paginated response with {@link PagedFlux}. + * @return list of SKU proxy resources for the HCI cluster along with {@link PagedResponse} on successful completion + * of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByOfferAsync(String resourceGroupName, String clusterName, String publisherName, - String offerName, String expand, Context context) { - return new PagedFlux<>( - () -> listByOfferSinglePageAsync(resourceGroupName, clusterName, publisherName, offerName, expand, context), - nextLink -> listByOfferNextSinglePageAsync(nextLink, context)); + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByOfferSinglePageAsync(String resourceGroupName, String clusterName, + String publisherName, String offerName, String expand) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listByOffer(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, clusterName, publisherName, offerName, expand, + 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())); } /** @@ -262,16 +246,19 @@ private PagedFlux listByOfferAsync(String resourceGroupName, String cl * @param clusterName The name of the cluster. * @param publisherName The name of the publisher available within HCI cluster. * @param offerName The name of the offer available within HCI cluster. + * @param expand Specify $expand=content,contentVersion to populate additional fields related to the marketplace + * offer. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of SKU proxy resources for the HCI cluster as paginated response with {@link PagedIterable}. + * @return list of SKU proxy resources for the HCI cluster as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByOffer(String resourceGroupName, String clusterName, String publisherName, - String offerName) { - final String expand = null; - return new PagedIterable<>(listByOfferAsync(resourceGroupName, clusterName, publisherName, offerName, expand)); + private PagedFlux listByOfferAsync(String resourceGroupName, String clusterName, String publisherName, + String offerName, String expand) { + return new PagedFlux<>( + () -> listByOfferSinglePageAsync(resourceGroupName, clusterName, publisherName, offerName, expand), + nextLink -> listByOfferNextSinglePageAsync(nextLink)); } /** @@ -281,185 +268,133 @@ public PagedIterable listByOffer(String resourceGroupName, String clus * @param clusterName The name of the cluster. * @param publisherName The name of the publisher available within HCI cluster. * @param offerName The name of the offer available within HCI cluster. - * @param expand Specify $expand=content,contentVersion to populate additional fields related to the marketplace - * offer. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of SKU proxy resources for the HCI cluster as paginated response with {@link PagedIterable}. + * @return list of SKU proxy resources for the HCI cluster as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByOffer(String resourceGroupName, String clusterName, String publisherName, - String offerName, String expand, Context context) { - return new PagedIterable<>( - listByOfferAsync(resourceGroupName, clusterName, publisherName, offerName, expand, context)); + private PagedFlux listByOfferAsync(String resourceGroupName, String clusterName, String publisherName, + String offerName) { + final String expand = null; + return new PagedFlux<>( + () -> listByOfferSinglePageAsync(resourceGroupName, clusterName, publisherName, offerName, expand), + nextLink -> listByOfferNextSinglePageAsync(nextLink)); } /** - * Get SKU resource details within a offer of HCI Cluster. + * List Skus available for a offer within the HCI Cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param publisherName The name of the publisher available within HCI cluster. * @param offerName The name of the offer available within HCI cluster. - * @param skuName The name of the SKU available within HCI cluster. * @param expand Specify $expand=content,contentVersion to populate additional fields related to the marketplace * offer. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return sKU resource details within a offer of HCI Cluster along with {@link Response} on successful completion - * of {@link Mono}. + * @return list of SKU proxy resources for the HCI cluster along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, String clusterName, - String publisherName, String offerName, String skuName, String expand) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (clusterName == null) { - return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); - } - if (publisherName == null) { - return Mono.error(new IllegalArgumentException("Parameter publisherName is required and cannot be null.")); - } - if (offerName == null) { - return Mono.error(new IllegalArgumentException("Parameter offerName is required and cannot be null.")); - } - if (skuName == null) { - return Mono.error(new IllegalArgumentException("Parameter skuName is required and cannot be null.")); - } + private PagedResponse listByOfferSinglePage(String resourceGroupName, String clusterName, + String publisherName, String offerName, String expand) { final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, clusterName, publisherName, offerName, skuName, this.client.getApiVersion(), expand, - accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + Response res = service.listByOfferSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, clusterName, publisherName, offerName, expand, accept, + Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * Get SKU resource details within a offer of HCI Cluster. + * List Skus available for a offer within the HCI Cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param publisherName The name of the publisher available within HCI cluster. * @param offerName The name of the offer available within HCI cluster. - * @param skuName The name of the SKU available within HCI cluster. * @param expand Specify $expand=content,contentVersion to populate additional fields related to the marketplace * offer. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return sKU resource details within a offer of HCI Cluster along with {@link Response} on successful completion - * of {@link Mono}. + * @return list of SKU proxy resources for the HCI cluster along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, String clusterName, - String publisherName, String offerName, String skuName, String expand, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (clusterName == null) { - return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); - } - if (publisherName == null) { - return Mono.error(new IllegalArgumentException("Parameter publisherName is required and cannot be null.")); - } - if (offerName == null) { - return Mono.error(new IllegalArgumentException("Parameter offerName is required and cannot be null.")); - } - if (skuName == null) { - return Mono.error(new IllegalArgumentException("Parameter skuName is required and cannot be null.")); - } + private PagedResponse listByOfferSinglePage(String resourceGroupName, String clusterName, + String publisherName, String offerName, String expand, Context context) { final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, clusterName, - publisherName, offerName, skuName, this.client.getApiVersion(), expand, accept, context); + Response res = service.listByOfferSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, clusterName, publisherName, offerName, expand, accept, + context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * Get SKU resource details within a offer of HCI Cluster. + * List Skus available for a offer within the HCI Cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param publisherName The name of the publisher available within HCI cluster. * @param offerName The name of the offer available within HCI cluster. - * @param skuName The name of the SKU available within HCI cluster. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return sKU resource details within a offer of HCI Cluster on successful completion of {@link Mono}. + * @return list of SKU proxy resources for the HCI cluster as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync(String resourceGroupName, String clusterName, String publisherName, - String offerName, String skuName) { + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByOffer(String resourceGroupName, String clusterName, String publisherName, + String offerName) { final String expand = null; - return getWithResponseAsync(resourceGroupName, clusterName, publisherName, offerName, skuName, expand) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); + return new PagedIterable<>( + () -> listByOfferSinglePage(resourceGroupName, clusterName, publisherName, offerName, expand), + nextLink -> listByOfferNextSinglePage(nextLink)); } /** - * Get SKU resource details within a offer of HCI Cluster. + * List Skus available for a offer within the HCI Cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param publisherName The name of the publisher available within HCI cluster. * @param offerName The name of the offer available within HCI cluster. - * @param skuName The name of the SKU available within HCI cluster. * @param expand Specify $expand=content,contentVersion to populate additional fields related to the marketplace * offer. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return sKU resource details within a offer of HCI Cluster along with {@link Response}. + * @return list of SKU proxy resources for the HCI cluster as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse(String resourceGroupName, String clusterName, String publisherName, - String offerName, String skuName, String expand, Context context) { - return getWithResponseAsync(resourceGroupName, clusterName, publisherName, offerName, skuName, expand, context) - .block(); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByOffer(String resourceGroupName, String clusterName, String publisherName, + String offerName, String expand, Context context) { + return new PagedIterable<>( + () -> listByOfferSinglePage(resourceGroupName, clusterName, publisherName, offerName, expand, context), + nextLink -> listByOfferNextSinglePage(nextLink, context)); } /** - * Get SKU resource details within a offer of HCI Cluster. + * Get the next page of items. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterName The name of the cluster. - * @param publisherName The name of the publisher available within HCI cluster. - * @param offerName The name of the offer available within HCI cluster. - * @param skuName The name of the SKU available within HCI cluster. + * @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 sKU resource details within a offer of HCI Cluster. + * @return list of SKU proxy resources for the HCI cluster along with {@link PagedResponse} on successful completion + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public SkuInner get(String resourceGroupName, String clusterName, String publisherName, String offerName, - String skuName) { - final String expand = null; - return getWithResponse(resourceGroupName, clusterName, publisherName, offerName, skuName, expand, Context.NONE) - .getValue(); + private Mono> listByOfferNextSinglePageAsync(String nextLink) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listByOfferNext(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())); } /** @@ -469,24 +404,14 @@ public SkuInner get(String resourceGroupName, String clusterName, String publish * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of SKU proxy resources for the HCI cluster along with {@link PagedResponse} on successful completion - * of {@link Mono}. + * @return list of SKU proxy resources for the HCI cluster along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByOfferNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } + private PagedResponse listByOfferNextSinglePage(String nextLink) { final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listByOfferNext(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())); + Response res = service.listByOfferNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** @@ -497,22 +422,13 @@ private Mono> listByOfferNextSinglePageAsync(String next * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of SKU proxy resources for the HCI cluster along with {@link PagedResponse} on successful completion - * of {@link Mono}. + * @return list of SKU proxy resources for the HCI cluster along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByOfferNextSinglePageAsync(String nextLink, Context context) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } + private PagedResponse listByOfferNextSinglePage(String nextLink, Context context) { final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.listByOfferNext(nextLink, this.client.getEndpoint(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); + Response res = service.listByOfferNextSync(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/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/SkusImpl.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/SkusImpl.java index e5c630dd246a..66463b3f6314 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/SkusImpl.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/SkusImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.implementation; @@ -27,20 +27,6 @@ public SkusImpl(SkusClient innerClient, this.serviceManager = serviceManager; } - public PagedIterable listByOffer(String resourceGroupName, String clusterName, String publisherName, - String offerName) { - PagedIterable inner - = this.serviceClient().listByOffer(resourceGroupName, clusterName, publisherName, offerName); - return ResourceManagerUtils.mapPage(inner, inner1 -> new SkuImpl(inner1, this.manager())); - } - - public PagedIterable listByOffer(String resourceGroupName, String clusterName, String publisherName, - String offerName, String expand, Context context) { - PagedIterable inner = this.serviceClient() - .listByOffer(resourceGroupName, clusterName, publisherName, offerName, expand, context); - return ResourceManagerUtils.mapPage(inner, inner1 -> new SkuImpl(inner1, this.manager())); - } - public Response getWithResponse(String resourceGroupName, String clusterName, String publisherName, String offerName, String skuName, String expand, Context context) { Response inner = this.serviceClient() @@ -63,6 +49,20 @@ public Sku get(String resourceGroupName, String clusterName, String publisherNam } } + public PagedIterable listByOffer(String resourceGroupName, String clusterName, String publisherName, + String offerName) { + PagedIterable inner + = this.serviceClient().listByOffer(resourceGroupName, clusterName, publisherName, offerName); + return ResourceManagerUtils.mapPage(inner, inner1 -> new SkuImpl(inner1, this.manager())); + } + + public PagedIterable listByOffer(String resourceGroupName, String clusterName, String publisherName, + String offerName, String expand, Context context) { + PagedIterable inner = this.serviceClient() + .listByOffer(resourceGroupName, clusterName, publisherName, offerName, expand, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new SkuImpl(inner1, this.manager())); + } + private SkusClient serviceClient() { return this.innerClient; } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/UpdateRunImpl.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/UpdateRunImpl.java index c2762b4da2e8..49d23d70d44a 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/UpdateRunImpl.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/UpdateRunImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.implementation; diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/UpdateRunsClientImpl.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/UpdateRunsClientImpl.java index 26c85281e2b8..a70d6d3988ee 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/UpdateRunsClientImpl.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/UpdateRunsClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.implementation; @@ -27,13 +27,14 @@ 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.azurestackhci.fluent.UpdateRunsClient; import com.azure.resourcemanager.azurestackhci.fluent.models.UpdateRunInner; -import com.azure.resourcemanager.azurestackhci.models.UpdateRunList; +import com.azure.resourcemanager.azurestackhci.implementation.models.UpdateRunList; import java.nio.ByteBuffer; import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; @@ -50,227 +51,287 @@ public final class UpdateRunsClientImpl implements UpdateRunsClient { /** * The service client containing this operation class. */ - private final AzureStackHciClientImpl client; + private final AzureStackHciManagementClientImpl client; /** * Initializes an instance of UpdateRunsClientImpl. * * @param client the instance of the service client containing this operation class. */ - UpdateRunsClientImpl(AzureStackHciClientImpl client) { + UpdateRunsClientImpl(AzureStackHciManagementClientImpl client) { this.service = RestProxy.create(UpdateRunsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for AzureStackHciClientUpdateRuns to be used by the proxy service to - * perform REST calls. + * The interface defining all the services for AzureStackHciManagementClientUpdateRuns to be used by the proxy + * service to perform REST calls. */ - @Host("{$host}") - @ServiceInterface(name = "AzureStackHciClientU") + @Host("{endpoint}") + @ServiceInterface(name = "AzureStackHciManagementClientUpdateRuns") public interface UpdateRunsService { @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/clusters/{clusterName}/updates/{updateName}/updateRuns") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/clusters/{clusterName}/updates/{updateName}/updateRuns/{updateRunName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono> get(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("clusterName") String clusterName, - @PathParam("updateName") String updateName, @QueryParam("api-version") String apiVersion, + @PathParam("updateName") String updateName, @PathParam("updateRunName") String updateRunName, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) - @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/clusters/{clusterName}/updates/{updateName}/updateRuns/{updateRunName}") - @ExpectedResponses({ 200, 202, 204 }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/clusters/{clusterName}/updates/{updateName}/updateRuns/{updateRunName}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Response getSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("clusterName") String clusterName, @PathParam("updateName") String updateName, @PathParam("updateRunName") String updateRunName, - @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + @HeaderParam("Accept") String accept, Context context); + + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/clusters/{clusterName}/updates/{updateName}/updateRuns/{updateRunName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> put(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("clusterName") String clusterName, + @PathParam("updateName") String updateName, @PathParam("updateRunName") String updateRunName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") UpdateRunInner updateRunsProperties, Context context); - @Headers({ "Content-Type: application/json" }) @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/clusters/{clusterName}/updates/{updateName}/updateRuns/{updateRunName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> put(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Response putSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("clusterName") String clusterName, + @PathParam("updateName") String updateName, @PathParam("updateRunName") String updateRunName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") UpdateRunInner updateRunsProperties, Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/clusters/{clusterName}/updates/{updateName}/updateRuns/{updateRunName}") + @ExpectedResponses({ 200, 202, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> delete(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("clusterName") String clusterName, + @PathParam("updateName") String updateName, @PathParam("updateRunName") String updateRunName, + Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/clusters/{clusterName}/updates/{updateName}/updateRuns/{updateRunName}") + @ExpectedResponses({ 200, 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("clusterName") String clusterName, @PathParam("updateName") String updateName, @PathParam("updateRunName") String updateRunName, - @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") UpdateRunInner updateRunsProperties, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/clusters/{clusterName}/updates/{updateName}/updateRuns/{updateRunName}") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/clusters/{clusterName}/updates/{updateName}/updateRuns") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono> list(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("clusterName") String clusterName, - @PathParam("updateName") String updateName, @PathParam("updateRunName") String updateRunName, - @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + @PathParam("updateName") String updateName, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/clusters/{clusterName}/updates/{updateName}/updateRuns") + @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("clusterName") String clusterName, + @PathParam("updateName") String updateName, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listNext(@PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); + @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 all Update runs for a specified update. + * Get the Update run for a specified update. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param updateName The name of the Update. + * @param updateRunName The name of the Update Run. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of Update runs along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return the Update run for a specified update along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String resourceGroupName, String clusterName, - String updateName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (clusterName == null) { - return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); - } - if (updateName == null) { - return Mono.error(new IllegalArgumentException("Parameter updateName is required and cannot be null.")); - } + private Mono> getWithResponseAsync(String resourceGroupName, String clusterName, + String updateName, String updateRunName) { final String accept = "application/json"; return FluxUtil - .withContext(context -> service.list(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, clusterName, updateName, this.client.getApiVersion(), accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), - res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, clusterName, updateName, updateRunName, accept, + context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * List all Update runs for a specified update. + * Get the Update run for a specified update. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param updateName The name of the Update. + * @param updateRunName The name of the Update Run. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Update run for a specified update on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getAsync(String resourceGroupName, String clusterName, String updateName, + String updateRunName) { + return getWithResponseAsync(resourceGroupName, clusterName, updateName, updateRunName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Get the Update run for a specified update. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param updateName The name of the Update. + * @param updateRunName The name of the Update Run. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of Update runs along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return the Update run for a specified update along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String resourceGroupName, String clusterName, - String updateName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (clusterName == null) { - return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); - } - if (updateName == null) { - return Mono.error(new IllegalArgumentException("Parameter updateName is required and cannot be null.")); - } + public Response getWithResponse(String resourceGroupName, String clusterName, String updateName, + String updateRunName, Context context) { final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .list(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, clusterName, - updateName, this.client.getApiVersion(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); + return service.getSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, clusterName, updateName, updateRunName, accept, context); } /** - * List all Update runs for a specified update. + * Get the Update run for a specified update. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param updateName The name of the Update. + * @param updateRunName The name of the Update Run. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of Update runs as paginated response with {@link PagedFlux}. + * @return the Update run for a specified update. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String clusterName, String updateName) { - return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, clusterName, updateName), - nextLink -> listNextSinglePageAsync(nextLink)); + @ServiceMethod(returns = ReturnType.SINGLE) + public UpdateRunInner get(String resourceGroupName, String clusterName, String updateName, String updateRunName) { + return getWithResponse(resourceGroupName, clusterName, updateName, updateRunName, Context.NONE).getValue(); } /** - * List all Update runs for a specified update. + * Put Update runs for a specified update. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param updateName The name of the Update. - * @param context The context to associate with this operation. + * @param updateRunName The name of the Update Run. + * @param updateRunsProperties Properties of the updateRuns object. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of Update runs as paginated response with {@link PagedFlux}. + * @return details of an Update run along with {@link Response} on successful completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String clusterName, String updateName, - Context context) { - return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, clusterName, updateName, context), - nextLink -> listNextSinglePageAsync(nextLink, context)); + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> putWithResponseAsync(String resourceGroupName, String clusterName, + String updateName, String updateRunName, UpdateRunInner updateRunsProperties) { + final String contentType = "application/json"; + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.put(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, clusterName, updateName, updateRunName, contentType, + accept, updateRunsProperties, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * List all Update runs for a specified update. + * Put Update runs for a specified update. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param updateName The name of the Update. + * @param updateRunName The name of the Update Run. + * @param updateRunsProperties Properties of the updateRuns object. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of Update runs as paginated response with {@link PagedIterable}. + * @return details of an Update run on successful completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String clusterName, String updateName) { - return new PagedIterable<>(listAsync(resourceGroupName, clusterName, updateName)); + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono putAsync(String resourceGroupName, String clusterName, String updateName, + String updateRunName, UpdateRunInner updateRunsProperties) { + return putWithResponseAsync(resourceGroupName, clusterName, updateName, updateRunName, updateRunsProperties) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** - * List all Update runs for a specified update. + * Put Update runs for a specified update. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param updateName The name of the Update. + * @param updateRunName The name of the Update Run. + * @param updateRunsProperties Properties of the updateRuns object. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of Update runs as paginated response with {@link PagedIterable}. + * @return details of an Update run along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String clusterName, String updateName, - Context context) { - return new PagedIterable<>(listAsync(resourceGroupName, clusterName, updateName, context)); + @ServiceMethod(returns = ReturnType.SINGLE) + public Response putWithResponse(String resourceGroupName, String clusterName, String updateName, + String updateRunName, UpdateRunInner updateRunsProperties, Context context) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.putSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, clusterName, updateName, updateRunName, contentType, accept, updateRunsProperties, + context); + } + + /** + * Put Update runs for a specified update. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param updateName The name of the Update. + * @param updateRunName The name of the Update Run. + * @param updateRunsProperties Properties of the updateRuns object. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return details of an Update run. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public UpdateRunInner put(String resourceGroupName, String clusterName, String updateName, String updateRunName, + UpdateRunInner updateRunsProperties) { + return putWithResponse(resourceGroupName, clusterName, updateName, updateRunName, updateRunsProperties, + Context.NONE).getValue(); } /** @@ -288,32 +349,9 @@ public PagedIterable list(String resourceGroupName, String clust @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> deleteWithResponseAsync(String resourceGroupName, String clusterName, String updateName, String updateRunName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (clusterName == null) { - return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); - } - if (updateName == null) { - return Mono.error(new IllegalArgumentException("Parameter updateName is required and cannot be null.")); - } - if (updateRunName == null) { - return Mono.error(new IllegalArgumentException("Parameter updateRunName is required and cannot be null.")); - } - final String accept = "application/json"; return FluxUtil - .withContext( - context -> service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - clusterName, updateName, updateRunName, this.client.getApiVersion(), accept, context)) + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, clusterName, updateName, updateRunName, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -324,40 +362,16 @@ private Mono>> deleteWithResponseAsync(String resource * @param clusterName The name of the cluster. * @param updateName The name of the Update. * @param updateRunName The name of the Update Run. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync(String resourceGroupName, String clusterName, - String updateName, String updateRunName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (clusterName == null) { - return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); - } - if (updateName == null) { - return Mono.error(new IllegalArgumentException("Parameter updateName is required and cannot be null.")); - } - if (updateRunName == null) { - return Mono.error(new IllegalArgumentException("Parameter updateRunName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - clusterName, updateName, updateRunName, this.client.getApiVersion(), accept, context); + private Response deleteWithResponse(String resourceGroupName, String clusterName, String updateName, + String updateRunName) { + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, clusterName, updateName, updateRunName, Context.NONE); } /** @@ -367,18 +381,17 @@ private Mono>> deleteWithResponseAsync(String resource * @param clusterName The name of the cluster. * @param updateName The name of the Update. * @param updateRunName The name of the Update Run. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. + * @return the response body along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String clusterName, - String updateName, String updateRunName) { - Mono>> mono - = deleteWithResponseAsync(resourceGroupName, clusterName, updateName, updateRunName); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - this.client.getContext()); + @ServiceMethod(returns = ReturnType.SINGLE) + private Response deleteWithResponse(String resourceGroupName, String clusterName, String updateName, + String updateRunName, Context context) { + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, clusterName, updateName, updateRunName, context); } /** @@ -388,7 +401,6 @@ private PollerFlux, Void> beginDeleteAsync(String resourceGroup * @param clusterName The name of the cluster. * @param updateName The name of the Update. * @param updateRunName The name of the Update Run. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -396,12 +408,11 @@ private PollerFlux, Void> beginDeleteAsync(String resourceGroup */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String clusterName, - String updateName, String updateRunName, Context context) { - context = this.client.mergeContext(context); + String updateName, String updateRunName) { Mono>> mono - = deleteWithResponseAsync(resourceGroupName, clusterName, updateName, updateRunName, context); + = deleteWithResponseAsync(resourceGroupName, clusterName, updateName, updateRunName); return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - context); + this.client.getContext()); } /** @@ -419,7 +430,8 @@ private PollerFlux, Void> beginDeleteAsync(String resourceGroup @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete(String resourceGroupName, String clusterName, String updateName, String updateRunName) { - return this.beginDeleteAsync(resourceGroupName, clusterName, updateName, updateRunName).getSyncPoller(); + Response response = deleteWithResponse(resourceGroupName, clusterName, updateName, updateRunName); + return this.client.getLroResult(response, Void.class, Void.class, Context.NONE); } /** @@ -438,8 +450,9 @@ public SyncPoller, Void> beginDelete(String resourceGroupName, @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete(String resourceGroupName, String clusterName, String updateName, String updateRunName, Context context) { - return this.beginDeleteAsync(resourceGroupName, clusterName, updateName, updateRunName, context) - .getSyncPoller(); + Response response + = deleteWithResponse(resourceGroupName, clusterName, updateName, updateRunName, context); + return this.client.getLroResult(response, Void.class, Void.class, context); } /** @@ -461,26 +474,6 @@ private Mono deleteAsync(String resourceGroupName, String clusterName, Str .flatMap(this.client::getLroFinalResultOrError); } - /** - * Delete specified Update Run. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterName The name of the cluster. - * @param updateName The name of the Update. - * @param updateRunName The name of the Update Run. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 clusterName, String updateName, - String updateRunName, Context context) { - return beginDeleteAsync(resourceGroupName, clusterName, updateName, updateRunName, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - /** * Delete specified Update Run. * @@ -494,7 +487,7 @@ private Mono deleteAsync(String resourceGroupName, String clusterName, Str */ @ServiceMethod(returns = ReturnType.SINGLE) public void delete(String resourceGroupName, String clusterName, String updateName, String updateRunName) { - deleteAsync(resourceGroupName, clusterName, updateName, updateRunName).block(); + beginDelete(resourceGroupName, clusterName, updateName, updateRunName).getFinalResult(); } /** @@ -512,313 +505,144 @@ public void delete(String resourceGroupName, String clusterName, String updateNa @ServiceMethod(returns = ReturnType.SINGLE) public void delete(String resourceGroupName, String clusterName, String updateName, String updateRunName, Context context) { - deleteAsync(resourceGroupName, clusterName, updateName, updateRunName, context).block(); + beginDelete(resourceGroupName, clusterName, updateName, updateRunName, context).getFinalResult(); } /** - * Put Update runs for a specified update. + * List all Update runs for a specified update. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param updateName The name of the Update. - * @param updateRunName The name of the Update Run. - * @param updateRunsProperties Properties of the updateRuns object. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return details of an Update run along with {@link Response} on successful completion of {@link Mono}. + * @return list of Update runs along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> putWithResponseAsync(String resourceGroupName, String clusterName, - String updateName, String updateRunName, UpdateRunInner updateRunsProperties) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (clusterName == null) { - return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); - } - if (updateName == null) { - return Mono.error(new IllegalArgumentException("Parameter updateName is required and cannot be null.")); - } - if (updateRunName == null) { - return Mono.error(new IllegalArgumentException("Parameter updateRunName is required and cannot be null.")); - } - if (updateRunsProperties == null) { - return Mono - .error(new IllegalArgumentException("Parameter updateRunsProperties is required and cannot be null.")); - } else { - updateRunsProperties.validate(); - } + private Mono> listSinglePageAsync(String resourceGroupName, String clusterName, + String updateName) { final String accept = "application/json"; return FluxUtil - .withContext(context -> service.put(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, clusterName, updateName, updateRunName, this.client.getApiVersion(), - updateRunsProperties, accept, context)) + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, clusterName, updateName, 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())); } /** - * Put Update runs for a specified update. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterName The name of the cluster. - * @param updateName The name of the Update. - * @param updateRunName The name of the Update Run. - * @param updateRunsProperties Properties of the updateRuns object. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return details of an Update run along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> putWithResponseAsync(String resourceGroupName, String clusterName, - String updateName, String updateRunName, UpdateRunInner updateRunsProperties, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (clusterName == null) { - return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); - } - if (updateName == null) { - return Mono.error(new IllegalArgumentException("Parameter updateName is required and cannot be null.")); - } - if (updateRunName == null) { - return Mono.error(new IllegalArgumentException("Parameter updateRunName is required and cannot be null.")); - } - if (updateRunsProperties == null) { - return Mono - .error(new IllegalArgumentException("Parameter updateRunsProperties is required and cannot be null.")); - } else { - updateRunsProperties.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.put(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, clusterName, - updateName, updateRunName, this.client.getApiVersion(), updateRunsProperties, accept, context); - } - - /** - * Put Update runs for a specified update. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterName The name of the cluster. - * @param updateName The name of the Update. - * @param updateRunName The name of the Update Run. - * @param updateRunsProperties Properties of the updateRuns object. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return details of an Update run on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono putAsync(String resourceGroupName, String clusterName, String updateName, - String updateRunName, UpdateRunInner updateRunsProperties) { - return putWithResponseAsync(resourceGroupName, clusterName, updateName, updateRunName, updateRunsProperties) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Put Update runs for a specified update. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterName The name of the cluster. - * @param updateName The name of the Update. - * @param updateRunName The name of the Update Run. - * @param updateRunsProperties Properties of the updateRuns object. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return details of an Update run along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response putWithResponse(String resourceGroupName, String clusterName, String updateName, - String updateRunName, UpdateRunInner updateRunsProperties, Context context) { - return putWithResponseAsync(resourceGroupName, clusterName, updateName, updateRunName, updateRunsProperties, - context).block(); - } - - /** - * Put Update runs for a specified update. + * List all Update runs for a specified update. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param updateName The name of the Update. - * @param updateRunName The name of the Update Run. - * @param updateRunsProperties Properties of the updateRuns object. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return details of an Update run. + * @return list of Update runs as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public UpdateRunInner put(String resourceGroupName, String clusterName, String updateName, String updateRunName, - UpdateRunInner updateRunsProperties) { - return putWithResponse(resourceGroupName, clusterName, updateName, updateRunName, updateRunsProperties, - Context.NONE).getValue(); + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String resourceGroupName, String clusterName, String updateName) { + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, clusterName, updateName), + nextLink -> listNextSinglePageAsync(nextLink)); } /** - * Get the Update run for a specified update. + * List all Update runs for a specified update. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param updateName The name of the Update. - * @param updateRunName The name of the Update Run. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Update run for a specified update along with {@link Response} on successful completion of - * {@link Mono}. + * @return list of Update runs along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, String clusterName, - String updateName, String updateRunName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (clusterName == null) { - return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); - } - if (updateName == null) { - return Mono.error(new IllegalArgumentException("Parameter updateName is required and cannot be null.")); - } - if (updateRunName == null) { - return Mono.error(new IllegalArgumentException("Parameter updateRunName is required and cannot be null.")); - } + private PagedResponse listSinglePage(String resourceGroupName, String clusterName, + String updateName) { final String accept = "application/json"; - return FluxUtil - .withContext( - context -> service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - clusterName, updateName, updateRunName, this.client.getApiVersion(), accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + Response res = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, clusterName, updateName, accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * Get the Update run for a specified update. + * List all Update runs for a specified update. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param updateName The name of the Update. - * @param updateRunName The name of the Update Run. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Update run for a specified update along with {@link Response} on successful completion of - * {@link Mono}. + * @return list of Update runs along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, String clusterName, - String updateName, String updateRunName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (clusterName == null) { - return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); - } - if (updateName == null) { - return Mono.error(new IllegalArgumentException("Parameter updateName is required and cannot be null.")); - } - if (updateRunName == null) { - return Mono.error(new IllegalArgumentException("Parameter updateRunName is required and cannot be null.")); - } + private PagedResponse listSinglePage(String resourceGroupName, String clusterName, + String updateName, Context context) { final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, clusterName, - updateName, updateRunName, this.client.getApiVersion(), accept, context); + Response res = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, clusterName, updateName, accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * Get the Update run for a specified update. + * List all Update runs for a specified update. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param updateName The name of the Update. - * @param updateRunName The name of the Update Run. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Update run for a specified update on successful completion of {@link Mono}. + * @return list of Update runs as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync(String resourceGroupName, String clusterName, String updateName, - String updateRunName) { - return getWithResponseAsync(resourceGroupName, clusterName, updateName, updateRunName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String resourceGroupName, String clusterName, String updateName) { + return new PagedIterable<>(() -> listSinglePage(resourceGroupName, clusterName, updateName), + nextLink -> listNextSinglePage(nextLink)); } /** - * Get the Update run for a specified update. + * List all Update runs for a specified update. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param updateName The name of the Update. - * @param updateRunName The name of the Update Run. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Update run for a specified update along with {@link Response}. + * @return list of Update runs as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse(String resourceGroupName, String clusterName, String updateName, - String updateRunName, Context context) { - return getWithResponseAsync(resourceGroupName, clusterName, updateName, updateRunName, context).block(); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String resourceGroupName, String clusterName, String updateName, + Context context) { + return new PagedIterable<>(() -> listSinglePage(resourceGroupName, clusterName, updateName, context), + nextLink -> listNextSinglePage(nextLink, context)); } /** - * Get the Update run for a specified update. + * Get the next page of items. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterName The name of the cluster. - * @param updateName The name of the Update. - * @param updateRunName The name of the Update Run. + * @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 Update run for a specified update. + * @return list of Update runs along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public UpdateRunInner get(String resourceGroupName, String clusterName, String updateName, String updateRunName) { - return getWithResponse(resourceGroupName, clusterName, updateName, updateRunName, Context.NONE).getValue(); + 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())); } /** @@ -828,22 +652,14 @@ public UpdateRunInner get(String resourceGroupName, String clusterName, String u * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of Update runs along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return list of Update runs along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } + private PagedResponse listNextSinglePage(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())); + 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); } /** @@ -854,21 +670,13 @@ private Mono> listNextSinglePageAsync(String nextL * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of Update runs along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return list of Update runs along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink, Context context) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } + private PagedResponse listNextSinglePage(String nextLink, Context context) { final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.listNext(nextLink, this.client.getEndpoint(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); + 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/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/UpdateRunsImpl.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/UpdateRunsImpl.java index b096203fef65..a0ec2f92ddf8 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/UpdateRunsImpl.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/UpdateRunsImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.implementation; @@ -27,27 +27,6 @@ public UpdateRunsImpl(UpdateRunsClient innerClient, this.serviceManager = serviceManager; } - public PagedIterable list(String resourceGroupName, String clusterName, String updateName) { - PagedIterable inner = this.serviceClient().list(resourceGroupName, clusterName, updateName); - return ResourceManagerUtils.mapPage(inner, inner1 -> new UpdateRunImpl(inner1, this.manager())); - } - - public PagedIterable list(String resourceGroupName, String clusterName, String updateName, - Context context) { - PagedIterable inner - = this.serviceClient().list(resourceGroupName, clusterName, updateName, context); - return ResourceManagerUtils.mapPage(inner, inner1 -> new UpdateRunImpl(inner1, this.manager())); - } - - public void delete(String resourceGroupName, String clusterName, String updateName, String updateRunName) { - this.serviceClient().delete(resourceGroupName, clusterName, updateName, updateRunName); - } - - public void delete(String resourceGroupName, String clusterName, String updateName, String updateRunName, - Context context) { - this.serviceClient().delete(resourceGroupName, clusterName, updateName, updateRunName, context); - } - public Response getWithResponse(String resourceGroupName, String clusterName, String updateName, String updateRunName, Context context) { Response inner @@ -69,6 +48,27 @@ public UpdateRun get(String resourceGroupName, String clusterName, String update } } + public void delete(String resourceGroupName, String clusterName, String updateName, String updateRunName) { + this.serviceClient().delete(resourceGroupName, clusterName, updateName, updateRunName); + } + + public void delete(String resourceGroupName, String clusterName, String updateName, String updateRunName, + Context context) { + this.serviceClient().delete(resourceGroupName, clusterName, updateName, updateRunName, context); + } + + public PagedIterable list(String resourceGroupName, String clusterName, String updateName) { + PagedIterable inner = this.serviceClient().list(resourceGroupName, clusterName, updateName); + return ResourceManagerUtils.mapPage(inner, inner1 -> new UpdateRunImpl(inner1, this.manager())); + } + + public PagedIterable list(String resourceGroupName, String clusterName, String updateName, + Context context) { + PagedIterable inner + = this.serviceClient().list(resourceGroupName, clusterName, updateName, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new UpdateRunImpl(inner1, this.manager())); + } + public UpdateRun getById(String id) { String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/UpdateSummariesImpl.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/UpdateSummariesImpl.java index a557121ba623..dfd73e398c89 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/UpdateSummariesImpl.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/UpdateSummariesImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.implementation; diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/UpdateSummariesOperationsClientImpl.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/UpdateSummariesOperationsClientImpl.java index 63080a357a83..524733d1a07f 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/UpdateSummariesOperationsClientImpl.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/UpdateSummariesOperationsClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.implementation; @@ -27,13 +27,14 @@ 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.azurestackhci.fluent.UpdateSummariesOperationsClient; import com.azure.resourcemanager.azurestackhci.fluent.models.UpdateSummariesInner; -import com.azure.resourcemanager.azurestackhci.models.UpdateSummariesList; +import com.azure.resourcemanager.azurestackhci.implementation.models.UpdateSummariesList; import java.nio.ByteBuffer; import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; @@ -50,111 +51,150 @@ public final class UpdateSummariesOperationsClientImpl implements UpdateSummarie /** * The service client containing this operation class. */ - private final AzureStackHciClientImpl client; + private final AzureStackHciManagementClientImpl client; /** * Initializes an instance of UpdateSummariesOperationsClientImpl. * * @param client the instance of the service client containing this operation class. */ - UpdateSummariesOperationsClientImpl(AzureStackHciClientImpl client) { + UpdateSummariesOperationsClientImpl(AzureStackHciManagementClientImpl client) { this.service = RestProxy.create(UpdateSummariesOperationsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for AzureStackHciClientUpdateSummariesOperations to be used by the proxy - * service to perform REST calls. + * The interface defining all the services for AzureStackHciManagementClientUpdateSummariesOperations to be used by + * the proxy service to perform REST calls. */ - @Host("{$host}") - @ServiceInterface(name = "AzureStackHciClientU") + @Host("{endpoint}") + @ServiceInterface(name = "AzureStackHciManagementClientUpdateSummariesOperations") public interface UpdateSummariesOperationsService { @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/clusters/{clusterName}/updateSummaries") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/clusters/{clusterName}/updateSummaries/default") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono> get(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("clusterName") String clusterName, - @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/clusters/{clusterName}/updateSummaries/default") + @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("clusterName") String clusterName, + @HeaderParam("Accept") String accept, Context context); + + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/clusters/{clusterName}/updateSummaries/default") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> put(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("clusterName") String clusterName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") UpdateSummariesInner updateLocationProperties, Context context); + + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/clusters/{clusterName}/updateSummaries/default") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response putSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("clusterName") String clusterName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") UpdateSummariesInner updateLocationProperties, Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/clusters/{clusterName}/updateSummaries/default") @ExpectedResponses({ 200, 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono>> delete(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("clusterName") String clusterName, - @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/clusters/{clusterName}/updateSummaries/default") + @ExpectedResponses({ 200, 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("clusterName") String clusterName, + Context context); @Headers({ "Content-Type: application/json" }) - @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/clusters/{clusterName}/updateSummaries/default") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/clusters/{clusterName}/updateSummaries") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> put(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono> list(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("clusterName") String clusterName, - @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") UpdateSummariesInner updateLocationProperties, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/clusters/{clusterName}/updateSummaries/default") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/clusters/{clusterName}/updateSummaries") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Response listSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("clusterName") String clusterName, - @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listNext(@PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); + @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 all Update summaries under the HCI cluster. + * Get all Update summaries under the HCI cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of Update Summaries along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return all Update summaries under the HCI cluster along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String resourceGroupName, - String clusterName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (clusterName == null) { - return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); - } + private Mono> getWithResponseAsync(String resourceGroupName, String clusterName) { final String accept = "application/json"; return FluxUtil - .withContext(context -> service.list(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, clusterName, this.client.getApiVersion(), accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, clusterName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * List all Update summaries under the HCI cluster. + * Get all Update summaries under the HCI cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return all Update summaries under the HCI cluster on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getAsync(String resourceGroupName, String clusterName) { + return getWithResponseAsync(resourceGroupName, clusterName).flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Get all Update summaries under the HCI cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. @@ -162,97 +202,109 @@ private Mono> listSinglePageAsync(String res * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of Update Summaries along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return all Update summaries under the HCI cluster along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String resourceGroupName, String clusterName, + public Response getWithResponse(String resourceGroupName, String clusterName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (clusterName == null) { - return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); - } final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .list(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, clusterName, - this.client.getApiVersion(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); + return service.getSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, clusterName, accept, context); } /** - * List all Update summaries under the HCI cluster. + * Get all Update summaries under the HCI cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of Update Summaries as paginated response with {@link PagedFlux}. + * @return all Update summaries under the HCI cluster. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String clusterName) { - return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, clusterName), - nextLink -> listNextSinglePageAsync(nextLink)); + @ServiceMethod(returns = ReturnType.SINGLE) + public UpdateSummariesInner get(String resourceGroupName, String clusterName) { + return getWithResponse(resourceGroupName, clusterName, Context.NONE).getValue(); } /** - * List all Update summaries under the HCI cluster. + * Put Update summaries under the HCI cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. - * @param context The context to associate with this operation. + * @param updateLocationProperties Properties of the UpdateSummaries resource. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of Update Summaries as paginated response with {@link PagedFlux}. + * @return get the update summaries for the cluster along with {@link Response} on successful completion of + * {@link Mono}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String clusterName, Context context) { - return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, clusterName, context), - nextLink -> listNextSinglePageAsync(nextLink, context)); + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> putWithResponseAsync(String resourceGroupName, String clusterName, + UpdateSummariesInner updateLocationProperties) { + final String contentType = "application/json"; + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.put(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, clusterName, contentType, accept, + updateLocationProperties, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * List all Update summaries under the HCI cluster. + * Put Update summaries under the HCI cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. + * @param updateLocationProperties Properties of the UpdateSummaries resource. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of Update Summaries as paginated response with {@link PagedIterable}. + * @return get the update summaries for the cluster on successful completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String clusterName) { - return new PagedIterable<>(listAsync(resourceGroupName, clusterName)); + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono putAsync(String resourceGroupName, String clusterName, + UpdateSummariesInner updateLocationProperties) { + return putWithResponseAsync(resourceGroupName, clusterName, updateLocationProperties) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** - * List all Update summaries under the HCI cluster. + * Put Update summaries under the HCI cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. + * @param updateLocationProperties Properties of the UpdateSummaries resource. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of Update Summaries as paginated response with {@link PagedIterable}. + * @return get the update summaries for the cluster along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String clusterName, Context context) { - return new PagedIterable<>(listAsync(resourceGroupName, clusterName, context)); + @ServiceMethod(returns = ReturnType.SINGLE) + public Response putWithResponse(String resourceGroupName, String clusterName, + UpdateSummariesInner updateLocationProperties, Context context) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.putSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, clusterName, contentType, accept, updateLocationProperties, context); + } + + /** + * Put Update summaries under the HCI cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param updateLocationProperties Properties of the UpdateSummaries resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return get the update summaries for the cluster. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public UpdateSummariesInner put(String resourceGroupName, String clusterName, + UpdateSummariesInner updateLocationProperties) { + return putWithResponse(resourceGroupName, clusterName, updateLocationProperties, Context.NONE).getValue(); } /** @@ -267,25 +319,9 @@ public PagedIterable list(String resourceGroupName, String */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> deleteWithResponseAsync(String resourceGroupName, String clusterName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (clusterName == null) { - return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); - } - final String accept = "application/json"; return FluxUtil - .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, clusterName, this.client.getApiVersion(), accept, context)) + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, clusterName, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -294,34 +330,15 @@ private Mono>> deleteWithResponseAsync(String resource * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync(String resourceGroupName, String clusterName, - Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (clusterName == null) { - return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - clusterName, this.client.getApiVersion(), accept, context); + private Response deleteWithResponse(String resourceGroupName, String clusterName) { + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, clusterName, Context.NONE); } /** @@ -329,16 +346,16 @@ private Mono>> deleteWithResponseAsync(String resource * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. + * @return the response body along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String clusterName) { - Mono>> mono = deleteWithResponseAsync(resourceGroupName, clusterName); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - this.client.getContext()); + @ServiceMethod(returns = ReturnType.SINGLE) + private Response deleteWithResponse(String resourceGroupName, String clusterName, Context context) { + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, clusterName, context); } /** @@ -346,19 +363,16 @@ private PollerFlux, Void> beginDeleteAsync(String resourceGroup * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String clusterName, - Context context) { - context = this.client.mergeContext(context); - Mono>> mono = deleteWithResponseAsync(resourceGroupName, clusterName, context); + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String clusterName) { + Mono>> mono = deleteWithResponseAsync(resourceGroupName, clusterName); return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - context); + this.client.getContext()); } /** @@ -373,7 +387,8 @@ private PollerFlux, Void> beginDeleteAsync(String resourceGroup */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete(String resourceGroupName, String clusterName) { - return this.beginDeleteAsync(resourceGroupName, clusterName).getSyncPoller(); + Response response = deleteWithResponse(resourceGroupName, clusterName); + return this.client.getLroResult(response, Void.class, Void.class, Context.NONE); } /** @@ -390,7 +405,8 @@ public SyncPoller, Void> beginDelete(String resourceGroupName, @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete(String resourceGroupName, String clusterName, Context context) { - return this.beginDeleteAsync(resourceGroupName, clusterName, context).getSyncPoller(); + Response response = deleteWithResponse(resourceGroupName, clusterName, context); + return this.client.getLroResult(response, Void.class, Void.class, context); } /** @@ -408,23 +424,6 @@ private Mono deleteAsync(String resourceGroupName, String clusterName) { return beginDeleteAsync(resourceGroupName, clusterName).last().flatMap(this.client::getLroFinalResultOrError); } - /** - * Delete Update Summaries. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterName The name of the cluster. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String clusterName, Context context) { - return beginDeleteAsync(resourceGroupName, clusterName, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - /** * Delete Update Summaries. * @@ -436,7 +435,7 @@ private Mono deleteAsync(String resourceGroupName, String clusterName, Con */ @ServiceMethod(returns = ReturnType.SINGLE) public void delete(String resourceGroupName, String clusterName) { - deleteAsync(resourceGroupName, clusterName).block(); + beginDelete(resourceGroupName, clusterName).getFinalResult(); } /** @@ -451,185 +450,68 @@ public void delete(String resourceGroupName, String clusterName) { */ @ServiceMethod(returns = ReturnType.SINGLE) public void delete(String resourceGroupName, String clusterName, Context context) { - deleteAsync(resourceGroupName, clusterName, context).block(); + beginDelete(resourceGroupName, clusterName, context).getFinalResult(); } /** - * Put Update summaries under the HCI cluster. + * List all Update summaries under the HCI cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. - * @param updateLocationProperties Properties of the UpdateSummaries resource. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return get the update summaries for the cluster along with {@link Response} on successful completion of - * {@link Mono}. + * @return list of Update Summaries along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> putWithResponseAsync(String resourceGroupName, String clusterName, - UpdateSummariesInner updateLocationProperties) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (clusterName == null) { - return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); - } - if (updateLocationProperties == null) { - return Mono.error( - new IllegalArgumentException("Parameter updateLocationProperties is required and cannot be null.")); - } else { - updateLocationProperties.validate(); - } + private Mono> listSinglePageAsync(String resourceGroupName, + String clusterName) { final String accept = "application/json"; return FluxUtil - .withContext(context -> service.put(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, clusterName, this.client.getApiVersion(), updateLocationProperties, accept, context)) + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, clusterName, accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Put Update summaries under the HCI cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterName The name of the cluster. - * @param updateLocationProperties Properties of the UpdateSummaries resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return get the update summaries for the cluster along with {@link Response} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> putWithResponseAsync(String resourceGroupName, String clusterName, - UpdateSummariesInner updateLocationProperties, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (clusterName == null) { - return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); - } - if (updateLocationProperties == null) { - return Mono.error( - new IllegalArgumentException("Parameter updateLocationProperties is required and cannot be null.")); - } else { - updateLocationProperties.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.put(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, clusterName, - this.client.getApiVersion(), updateLocationProperties, accept, context); - } - - /** - * Put Update summaries under the HCI cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterName The name of the cluster. - * @param updateLocationProperties Properties of the UpdateSummaries resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return get the update summaries for the cluster on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono putAsync(String resourceGroupName, String clusterName, - UpdateSummariesInner updateLocationProperties) { - return putWithResponseAsync(resourceGroupName, clusterName, updateLocationProperties) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Put Update summaries under the HCI cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterName The name of the cluster. - * @param updateLocationProperties Properties of the UpdateSummaries resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return get the update summaries for the cluster along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response putWithResponse(String resourceGroupName, String clusterName, - UpdateSummariesInner updateLocationProperties, Context context) { - return putWithResponseAsync(resourceGroupName, clusterName, updateLocationProperties, context).block(); - } - - /** - * Put Update summaries under the HCI cluster. + * List all Update summaries under the HCI cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. - * @param updateLocationProperties Properties of the UpdateSummaries resource. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return get the update summaries for the cluster. + * @return list of Update Summaries as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public UpdateSummariesInner put(String resourceGroupName, String clusterName, - UpdateSummariesInner updateLocationProperties) { - return putWithResponse(resourceGroupName, clusterName, updateLocationProperties, Context.NONE).getValue(); + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String resourceGroupName, String clusterName) { + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, clusterName), + nextLink -> listNextSinglePageAsync(nextLink)); } /** - * Get all Update summaries under the HCI cluster. + * List all Update summaries under the HCI cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all Update summaries under the HCI cluster along with {@link Response} on successful completion of - * {@link Mono}. + * @return list of Update Summaries along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, String clusterName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (clusterName == null) { - return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); - } + private PagedResponse listSinglePage(String resourceGroupName, String clusterName) { final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, clusterName, this.client.getApiVersion(), accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + Response res = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, clusterName, accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * Get all Update summaries under the HCI cluster. + * List all Update summaries under the HCI cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. @@ -637,50 +519,36 @@ private Mono> getWithResponseAsync(String resourc * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all Update summaries under the HCI cluster along with {@link Response} on successful completion of - * {@link Mono}. + * @return list of Update Summaries along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, String clusterName, + private PagedResponse listSinglePage(String resourceGroupName, String clusterName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (clusterName == null) { - return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); - } final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, clusterName, - this.client.getApiVersion(), accept, context); + Response res = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, clusterName, accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * Get all Update summaries under the HCI cluster. + * List all Update summaries under the HCI cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all Update summaries under the HCI cluster on successful completion of {@link Mono}. + * @return list of Update Summaries as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync(String resourceGroupName, String clusterName) { - return getWithResponseAsync(resourceGroupName, clusterName).flatMap(res -> Mono.justOrEmpty(res.getValue())); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String resourceGroupName, String clusterName) { + return new PagedIterable<>(() -> listSinglePage(resourceGroupName, clusterName), + nextLink -> listNextSinglePage(nextLink)); } /** - * Get all Update summaries under the HCI cluster. + * List all Update summaries under the HCI cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. @@ -688,27 +556,30 @@ private Mono getAsync(String resourceGroupName, String clu * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all Update summaries under the HCI cluster along with {@link Response}. + * @return list of Update Summaries as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse(String resourceGroupName, String clusterName, - Context context) { - return getWithResponseAsync(resourceGroupName, clusterName, context).block(); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String resourceGroupName, String clusterName, Context context) { + return new PagedIterable<>(() -> listSinglePage(resourceGroupName, clusterName, context), + nextLink -> listNextSinglePage(nextLink, context)); } /** - * Get all Update summaries under the HCI cluster. + * Get the next page of items. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterName The name of the cluster. + * @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 all Update summaries under the HCI cluster. + * @return list of Update Summaries along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public UpdateSummariesInner get(String resourceGroupName, String clusterName) { - return getWithResponse(resourceGroupName, clusterName, Context.NONE).getValue(); + 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())); } /** @@ -718,22 +589,15 @@ public UpdateSummariesInner get(String resourceGroupName, String clusterName) { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of Update Summaries along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return list of Update Summaries along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } + private PagedResponse listNextSinglePage(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())); + 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); } /** @@ -744,21 +608,13 @@ private Mono> listNextSinglePageAsync(String * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of Update Summaries along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return list of Update Summaries along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink, Context context) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } + private PagedResponse listNextSinglePage(String nextLink, Context context) { final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.listNext(nextLink, this.client.getEndpoint(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); + 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/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/UpdateSummariesOperationsImpl.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/UpdateSummariesOperationsImpl.java index 5645597784d9..92cfbc2d5511 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/UpdateSummariesOperationsImpl.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/UpdateSummariesOperationsImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.implementation; @@ -27,28 +27,9 @@ public UpdateSummariesOperationsImpl(UpdateSummariesOperationsClient innerClient this.serviceManager = serviceManager; } - public PagedIterable list(String resourceGroupName, String clusterName) { - PagedIterable inner = this.serviceClient().list(resourceGroupName, clusterName); - return ResourceManagerUtils.mapPage(inner, inner1 -> new UpdateSummariesImpl(inner1, this.manager())); - } - - public PagedIterable list(String resourceGroupName, String clusterName, Context context) { - PagedIterable inner = this.serviceClient().list(resourceGroupName, clusterName, context); - return ResourceManagerUtils.mapPage(inner, inner1 -> new UpdateSummariesImpl(inner1, this.manager())); - } - - public void deleteByResourceGroup(String resourceGroupName, String clusterName) { - this.serviceClient().delete(resourceGroupName, clusterName); - } - - public void delete(String resourceGroupName, String clusterName, Context context) { - this.serviceClient().delete(resourceGroupName, clusterName, context); - } - - public Response putWithResponse(String resourceGroupName, String clusterName, - UpdateSummariesInner updateLocationProperties, Context context) { + public Response getWithResponse(String resourceGroupName, String clusterName, Context context) { Response inner - = this.serviceClient().putWithResponse(resourceGroupName, clusterName, updateLocationProperties, context); + = this.serviceClient().getWithResponse(resourceGroupName, clusterName, context); if (inner != null) { return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), new UpdateSummariesImpl(inner.getValue(), this.manager())); @@ -57,9 +38,8 @@ public Response putWithResponse(String resourceGroupName, Strin } } - public UpdateSummaries put(String resourceGroupName, String clusterName, - UpdateSummariesInner updateLocationProperties) { - UpdateSummariesInner inner = this.serviceClient().put(resourceGroupName, clusterName, updateLocationProperties); + public UpdateSummaries get(String resourceGroupName, String clusterName) { + UpdateSummariesInner inner = this.serviceClient().get(resourceGroupName, clusterName); if (inner != null) { return new UpdateSummariesImpl(inner, this.manager()); } else { @@ -67,9 +47,10 @@ public UpdateSummaries put(String resourceGroupName, String clusterName, } } - public Response getWithResponse(String resourceGroupName, String clusterName, Context context) { + public Response putWithResponse(String resourceGroupName, String clusterName, + UpdateSummariesInner updateLocationProperties, Context context) { Response inner - = this.serviceClient().getWithResponse(resourceGroupName, clusterName, context); + = this.serviceClient().putWithResponse(resourceGroupName, clusterName, updateLocationProperties, context); if (inner != null) { return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), new UpdateSummariesImpl(inner.getValue(), this.manager())); @@ -78,8 +59,9 @@ public Response getWithResponse(String resourceGroupName, Strin } } - public UpdateSummaries get(String resourceGroupName, String clusterName) { - UpdateSummariesInner inner = this.serviceClient().get(resourceGroupName, clusterName); + public UpdateSummaries put(String resourceGroupName, String clusterName, + UpdateSummariesInner updateLocationProperties) { + UpdateSummariesInner inner = this.serviceClient().put(resourceGroupName, clusterName, updateLocationProperties); if (inner != null) { return new UpdateSummariesImpl(inner, this.manager()); } else { @@ -87,6 +69,24 @@ public UpdateSummaries get(String resourceGroupName, String clusterName) { } } + public void deleteByResourceGroup(String resourceGroupName, String clusterName) { + this.serviceClient().delete(resourceGroupName, clusterName); + } + + public void delete(String resourceGroupName, String clusterName, Context context) { + this.serviceClient().delete(resourceGroupName, clusterName, context); + } + + public PagedIterable list(String resourceGroupName, String clusterName) { + PagedIterable inner = this.serviceClient().list(resourceGroupName, clusterName); + return ResourceManagerUtils.mapPage(inner, inner1 -> new UpdateSummariesImpl(inner1, this.manager())); + } + + public PagedIterable list(String resourceGroupName, String clusterName, Context context) { + PagedIterable inner = this.serviceClient().list(resourceGroupName, clusterName, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new UpdateSummariesImpl(inner1, this.manager())); + } + private UpdateSummariesOperationsClient serviceClient() { return this.innerClient; } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/UpdatesClientImpl.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/UpdatesClientImpl.java index 370e34d69438..825dcec45b37 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/UpdatesClientImpl.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/UpdatesClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.implementation; @@ -28,13 +28,14 @@ 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.azurestackhci.fluent.UpdatesClient; import com.azure.resourcemanager.azurestackhci.fluent.models.HciUpdateInner; -import com.azure.resourcemanager.azurestackhci.models.UpdateList; +import com.azure.resourcemanager.azurestackhci.implementation.models.UpdateList; import java.nio.ByteBuffer; import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; @@ -51,85 +52,134 @@ public final class UpdatesClientImpl implements UpdatesClient { /** * The service client containing this operation class. */ - private final AzureStackHciClientImpl client; + private final AzureStackHciManagementClientImpl client; /** * Initializes an instance of UpdatesClientImpl. * * @param client the instance of the service client containing this operation class. */ - UpdatesClientImpl(AzureStackHciClientImpl client) { + UpdatesClientImpl(AzureStackHciManagementClientImpl client) { this.service = RestProxy.create(UpdatesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for AzureStackHciClientUpdates to be used by the proxy service to perform - * REST calls. + * The interface defining all the services for AzureStackHciManagementClientUpdates to be used by the proxy service + * to perform REST calls. */ - @Host("{$host}") - @ServiceInterface(name = "AzureStackHciClientU") + @Host("{endpoint}") + @ServiceInterface(name = "AzureStackHciManagementClientUpdates") public interface UpdatesService { @Headers({ "Content-Type: application/json" }) - @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/clusters/{clusterName}/updates/{updateName}/apply") - @ExpectedResponses({ 200, 202 }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/clusters/{clusterName}/updates/{updateName}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> post(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono> get(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("clusterName") String clusterName, - @PathParam("updateName") String updateName, @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, Context context); + @PathParam("updateName") String updateName, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/clusters/{clusterName}/updates") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/clusters/{clusterName}/updates/{updateName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Response getSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("clusterName") String clusterName, - @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + @PathParam("updateName") String updateName, @HeaderParam("Accept") String accept, Context context); - @Headers({ "Content-Type: application/json" }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/clusters/{clusterName}/updates/{updateName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> put(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("clusterName") String clusterName, + @PathParam("updateName") String updateName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") HciUpdateInner updateProperties, + Context context); + + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/clusters/{clusterName}/updates/{updateName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response putSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("clusterName") String clusterName, + @PathParam("updateName") String updateName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") HciUpdateInner updateProperties, + Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/clusters/{clusterName}/updates/{updateName}") @ExpectedResponses({ 200, 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono>> delete(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("clusterName") String clusterName, - @PathParam("updateName") String updateName, @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, Context context); + @PathParam("updateName") String updateName, Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/clusters/{clusterName}/updates/{updateName}") + @ExpectedResponses({ 200, 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("clusterName") String clusterName, + @PathParam("updateName") String updateName, Context context); @Headers({ "Content-Type: application/json" }) - @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/clusters/{clusterName}/updates/{updateName}") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/clusters/{clusterName}/updates") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> put(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono> list(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("clusterName") String clusterName, - @PathParam("updateName") String updateName, @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") HciUpdateInner updateProperties, @HeaderParam("Accept") String accept, - Context context); + @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/clusters/{clusterName}/updates/{updateName}") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/clusters/{clusterName}/updates") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Response listSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("clusterName") String clusterName, - @PathParam("updateName") String updateName, @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/clusters/{clusterName}/updates/{updateName}/apply") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> post(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("clusterName") String clusterName, + @PathParam("updateName") String updateName, Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/clusters/{clusterName}/updates/{updateName}/apply") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response postSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("clusterName") String clusterName, + @PathParam("updateName") String updateName, Context context); + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listNext(@PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); + @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); } /** - * Apply Update. + * Get specified Update. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. @@ -137,96 +187,37 @@ Mono> listNext(@PathParam(value = "nextLink", encoded = tru * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. + * @return specified Update along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> postWithResponseAsync(String resourceGroupName, String clusterName, + private Mono> getWithResponseAsync(String resourceGroupName, String clusterName, String updateName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (clusterName == null) { - return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); - } - if (updateName == null) { - return Mono.error(new IllegalArgumentException("Parameter updateName is required and cannot be null.")); - } final String accept = "application/json"; return FluxUtil - .withContext(context -> service.post(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, clusterName, updateName, this.client.getApiVersion(), accept, context)) + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, clusterName, updateName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Apply Update. + * Get specified Update. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param updateName The name of the Update. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. + * @return specified Update on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> postWithResponseAsync(String resourceGroupName, String clusterName, - String updateName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (clusterName == null) { - return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); - } - if (updateName == null) { - return Mono.error(new IllegalArgumentException("Parameter updateName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.post(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, clusterName, - updateName, this.client.getApiVersion(), accept, context); - } - - /** - * Apply Update. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterName The name of the cluster. - * @param updateName The name of the Update. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginPostAsync(String resourceGroupName, String clusterName, - String updateName) { - Mono>> mono = postWithResponseAsync(resourceGroupName, clusterName, updateName); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - this.client.getContext()); + private Mono getAsync(String resourceGroupName, String clusterName, String updateName) { + return getWithResponseAsync(resourceGroupName, clusterName, updateName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** - * Apply Update. + * Get specified Update. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. @@ -235,20 +226,18 @@ private PollerFlux, Void> beginPostAsync(String resourceGroupNa * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. + * @return specified Update along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginPostAsync(String resourceGroupName, String clusterName, - String updateName, Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = postWithResponseAsync(resourceGroupName, clusterName, updateName, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - context); + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse(String resourceGroupName, String clusterName, String updateName, + Context context) { + final String accept = "application/json"; + return service.getSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, clusterName, updateName, accept, context); } /** - * Apply Update. + * Get specified Update. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. @@ -256,234 +245,187 @@ private PollerFlux, Void> beginPostAsync(String resourceGroupNa * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. + * @return specified Update. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginPost(String resourceGroupName, String clusterName, - String updateName) { - return this.beginPostAsync(resourceGroupName, clusterName, updateName).getSyncPoller(); + @ServiceMethod(returns = ReturnType.SINGLE) + public HciUpdateInner get(String resourceGroupName, String clusterName, String updateName) { + return getWithResponse(resourceGroupName, clusterName, updateName, Context.NONE).getValue(); } /** - * Apply Update. + * Put specified Update. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param updateName The name of the Update. - * @param context The context to associate with this operation. + * @param updateProperties Properties of the Updates object. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. + * @return update details along with {@link Response} on successful completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginPost(String resourceGroupName, String clusterName, String updateName, - Context context) { - return this.beginPostAsync(resourceGroupName, clusterName, updateName, context).getSyncPoller(); + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> putWithResponseAsync(String resourceGroupName, String clusterName, + String updateName, HciUpdateInner updateProperties) { + final String contentType = "application/json"; + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.put(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, clusterName, updateName, contentType, accept, + updateProperties, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Apply Update. + * Put specified Update. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param updateName The name of the Update. + * @param updateProperties Properties of the Updates object. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. + * @return update details on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono postAsync(String resourceGroupName, String clusterName, String updateName) { - return beginPostAsync(resourceGroupName, clusterName, updateName).last() - .flatMap(this.client::getLroFinalResultOrError); + private Mono putAsync(String resourceGroupName, String clusterName, String updateName, + HciUpdateInner updateProperties) { + return putWithResponseAsync(resourceGroupName, clusterName, updateName, updateProperties) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** - * Apply Update. + * Put specified Update. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param updateName The name of the Update. + * @param updateProperties Properties of the Updates object. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. + * @return update details along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono postAsync(String resourceGroupName, String clusterName, String updateName, Context context) { - return beginPostAsync(resourceGroupName, clusterName, updateName, context).last() - .flatMap(this.client::getLroFinalResultOrError); + public Response putWithResponse(String resourceGroupName, String clusterName, String updateName, + HciUpdateInner updateProperties, Context context) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.putSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, clusterName, updateName, contentType, accept, updateProperties, context); } /** - * Apply Update. + * Put specified Update. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param updateName The name of the Update. + * @param updateProperties Properties of the Updates object. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return update details. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void post(String resourceGroupName, String clusterName, String updateName) { - postAsync(resourceGroupName, clusterName, updateName).block(); + public HciUpdateInner put(String resourceGroupName, String clusterName, String updateName, + HciUpdateInner updateProperties) { + return putWithResponse(resourceGroupName, clusterName, updateName, updateProperties, Context.NONE).getValue(); } /** - * Apply Update. + * Delete specified Update. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param updateName The name of the Update. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @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 post(String resourceGroupName, String clusterName, String updateName, Context context) { - postAsync(resourceGroupName, clusterName, updateName, context).block(); - } - - /** - * List all Updates. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterName The name of the cluster. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of Updates along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String resourceGroupName, String clusterName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (clusterName == null) { - return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); - } - final String accept = "application/json"; + private Mono>> deleteWithResponseAsync(String resourceGroupName, String clusterName, + String updateName) { return FluxUtil - .withContext(context -> service.list(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, clusterName, this.client.getApiVersion(), accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), - res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, clusterName, updateName, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * List all Updates. + * Delete specified Update. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. - * @param context The context to associate with this operation. + * @param updateName The name of the Update. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of Updates along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String resourceGroupName, String clusterName, - Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (clusterName == null) { - return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .list(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, clusterName, - this.client.getApiVersion(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * List all Updates. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterName The name of the cluster. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of Updates as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String clusterName) { - return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, clusterName), - nextLink -> listNextSinglePageAsync(nextLink)); + private Response deleteWithResponse(String resourceGroupName, String clusterName, String updateName) { + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, clusterName, updateName, Context.NONE); } /** - * List all Updates. + * Delete specified Update. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. + * @param updateName The name of the Update. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of Updates as paginated response with {@link PagedFlux}. + * @return the response body along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String clusterName, Context context) { - return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, clusterName, context), - nextLink -> listNextSinglePageAsync(nextLink, context)); + @ServiceMethod(returns = ReturnType.SINGLE) + private Response deleteWithResponse(String resourceGroupName, String clusterName, String updateName, + Context context) { + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, clusterName, updateName, context); } /** - * List all Updates. + * Delete specified Update. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. + * @param updateName The name of the Update. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of Updates as paginated response with {@link PagedIterable}. + * @return the {@link PollerFlux} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String clusterName) { - return new PagedIterable<>(listAsync(resourceGroupName, clusterName)); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String clusterName, + String updateName) { + Mono>> mono = deleteWithResponseAsync(resourceGroupName, clusterName, updateName); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); } /** - * List all Updates. + * Delete specified Update. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. - * @param context The context to associate with this operation. + * @param updateName The name of the Update. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of Updates as paginated response with {@link PagedIterable}. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String clusterName, Context context) { - return new PagedIterable<>(listAsync(resourceGroupName, clusterName, context)); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDelete(String resourceGroupName, String clusterName, + String updateName) { + Response response = deleteWithResponse(resourceGroupName, clusterName, updateName); + return this.client.getLroResult(response, Void.class, Void.class, Context.NONE); } /** @@ -492,37 +434,17 @@ public PagedIterable list(String resourceGroupName, String clust * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param updateName The name of the Update. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync(String resourceGroupName, String clusterName, - String updateName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (clusterName == null) { - return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); - } - if (updateName == null) { - return Mono.error(new IllegalArgumentException("Parameter updateName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, clusterName, updateName, this.client.getApiVersion(), accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDelete(String resourceGroupName, String clusterName, + String updateName, Context context) { + Response response = deleteWithResponse(resourceGroupName, clusterName, updateName, context); + return this.client.getLroResult(response, Void.class, Void.class, context); } /** @@ -531,37 +453,15 @@ private Mono>> deleteWithResponseAsync(String resource * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param updateName The name of the Update. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync(String resourceGroupName, String clusterName, - String updateName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (clusterName == null) { - return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); - } - if (updateName == null) { - return Mono.error(new IllegalArgumentException("Parameter updateName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - clusterName, updateName, this.client.getApiVersion(), accept, context); + private Mono deleteAsync(String resourceGroupName, String clusterName, String updateName) { + return beginDeleteAsync(resourceGroupName, clusterName, updateName).last() + .flatMap(this.client::getLroFinalResultOrError); } /** @@ -573,14 +473,10 @@ private Mono>> deleteWithResponseAsync(String resource * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String clusterName, - String updateName) { - Mono>> mono = deleteWithResponseAsync(resourceGroupName, clusterName, updateName); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - this.client.getContext()); + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String resourceGroupName, String clusterName, String updateName) { + beginDelete(resourceGroupName, clusterName, updateName).getFinalResult(); } /** @@ -593,348 +489,253 @@ private PollerFlux, Void> beginDeleteAsync(String resourceGroup * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String clusterName, - String updateName, Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = deleteWithResponseAsync(resourceGroupName, clusterName, updateName, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - context); + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String resourceGroupName, String clusterName, String updateName, Context context) { + beginDelete(resourceGroupName, clusterName, updateName, context).getFinalResult(); } /** - * Delete specified Update. + * List all Updates. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. - * @param updateName The name of the Update. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. + * @return list of Updates along with {@link PagedResponse} on successful completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete(String resourceGroupName, String clusterName, - String updateName) { - return this.beginDeleteAsync(resourceGroupName, clusterName, updateName).getSyncPoller(); + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync(String resourceGroupName, String clusterName) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, clusterName, accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Delete specified Update. + * List all Updates. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. - * @param updateName The name of the Update. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. + * @return list of Updates as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete(String resourceGroupName, String clusterName, - String updateName, Context context) { - return this.beginDeleteAsync(resourceGroupName, clusterName, updateName, context).getSyncPoller(); + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String resourceGroupName, String clusterName) { + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, clusterName), + nextLink -> listNextSinglePageAsync(nextLink)); } /** - * Delete specified Update. + * List all Updates. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. - * @param updateName The name of the Update. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. + * @return list of Updates along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String clusterName, String updateName) { - return beginDeleteAsync(resourceGroupName, clusterName, updateName).last() - .flatMap(this.client::getLroFinalResultOrError); + private PagedResponse listSinglePage(String resourceGroupName, String clusterName) { + final String accept = "application/json"; + Response res = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, clusterName, accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * Delete specified Update. + * List all Updates. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. - * @param updateName The name of the Update. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. + * @return list of Updates along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String clusterName, String updateName, Context context) { - return beginDeleteAsync(resourceGroupName, clusterName, updateName, context).last() - .flatMap(this.client::getLroFinalResultOrError); + private PagedResponse listSinglePage(String resourceGroupName, String clusterName, + Context context) { + final String accept = "application/json"; + Response res = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, clusterName, accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * Delete specified Update. + * List all Updates. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. - * @param updateName The name of the Update. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of Updates as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String clusterName, String updateName) { - deleteAsync(resourceGroupName, clusterName, updateName).block(); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String resourceGroupName, String clusterName) { + return new PagedIterable<>(() -> listSinglePage(resourceGroupName, clusterName), + nextLink -> listNextSinglePage(nextLink)); } /** - * Delete specified Update. + * List all Updates. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. - * @param updateName The name of the Update. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of Updates as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String clusterName, String updateName, Context context) { - deleteAsync(resourceGroupName, clusterName, updateName, context).block(); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String resourceGroupName, String clusterName, Context context) { + return new PagedIterable<>(() -> listSinglePage(resourceGroupName, clusterName, context), + nextLink -> listNextSinglePage(nextLink, context)); } /** - * Put specified Update. + * Apply Update. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param updateName The name of the Update. - * @param updateProperties Properties of the Updates object. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return update details along with {@link Response} on successful completion of {@link Mono}. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> putWithResponseAsync(String resourceGroupName, String clusterName, - String updateName, HciUpdateInner updateProperties) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (clusterName == null) { - return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); - } - if (updateName == null) { - return Mono.error(new IllegalArgumentException("Parameter updateName is required and cannot be null.")); - } - if (updateProperties == null) { - return Mono - .error(new IllegalArgumentException("Parameter updateProperties is required and cannot be null.")); - } else { - updateProperties.validate(); - } - final String accept = "application/json"; + private Mono>> postWithResponseAsync(String resourceGroupName, String clusterName, + String updateName) { return FluxUtil - .withContext( - context -> service.put(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - clusterName, updateName, this.client.getApiVersion(), updateProperties, accept, context)) + .withContext(context -> service.post(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, clusterName, updateName, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Put specified Update. + * Apply Update. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param updateName The name of the Update. - * @param updateProperties Properties of the Updates object. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return update details along with {@link Response} on successful completion of {@link Mono}. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> putWithResponseAsync(String resourceGroupName, String clusterName, - String updateName, HciUpdateInner updateProperties, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (clusterName == null) { - return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); - } - if (updateName == null) { - return Mono.error(new IllegalArgumentException("Parameter updateName is required and cannot be null.")); - } - if (updateProperties == null) { - return Mono - .error(new IllegalArgumentException("Parameter updateProperties is required and cannot be null.")); - } else { - updateProperties.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.put(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, clusterName, - updateName, this.client.getApiVersion(), updateProperties, accept, context); + private Response postWithResponse(String resourceGroupName, String clusterName, String updateName) { + return service.postSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, clusterName, updateName, Context.NONE); } /** - * Put specified Update. + * Apply Update. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param updateName The name of the Update. - * @param updateProperties Properties of the Updates object. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return update details on successful completion of {@link Mono}. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono putAsync(String resourceGroupName, String clusterName, String updateName, - HciUpdateInner updateProperties) { - return putWithResponseAsync(resourceGroupName, clusterName, updateName, updateProperties) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); + private Response postWithResponse(String resourceGroupName, String clusterName, String updateName, + Context context) { + return service.postSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, clusterName, updateName, context); } /** - * Put specified Update. + * Apply Update. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param updateName The name of the Update. - * @param updateProperties Properties of the Updates object. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return update details along with {@link Response}. + * @return the {@link PollerFlux} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response putWithResponse(String resourceGroupName, String clusterName, String updateName, - HciUpdateInner updateProperties, Context context) { - return putWithResponseAsync(resourceGroupName, clusterName, updateName, updateProperties, context).block(); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginPostAsync(String resourceGroupName, String clusterName, + String updateName) { + Mono>> mono = postWithResponseAsync(resourceGroupName, clusterName, updateName); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); } /** - * Put specified Update. + * Apply Update. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param updateName The name of the Update. - * @param updateProperties Properties of the Updates object. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return update details. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public HciUpdateInner put(String resourceGroupName, String clusterName, String updateName, - HciUpdateInner updateProperties) { - return putWithResponse(resourceGroupName, clusterName, updateName, updateProperties, Context.NONE).getValue(); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginPost(String resourceGroupName, String clusterName, + String updateName) { + Response response = postWithResponse(resourceGroupName, clusterName, updateName); + return this.client.getLroResult(response, Void.class, Void.class, Context.NONE); } /** - * Get specified Update. + * Apply Update. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param updateName The name of the Update. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return specified Update along with {@link Response} on successful completion of {@link Mono}. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, String clusterName, - String updateName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (clusterName == null) { - return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); - } - if (updateName == null) { - return Mono.error(new IllegalArgumentException("Parameter updateName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, clusterName, updateName, this.client.getApiVersion(), accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginPost(String resourceGroupName, String clusterName, String updateName, + Context context) { + Response response = postWithResponse(resourceGroupName, clusterName, updateName, context); + return this.client.getLroResult(response, Void.class, Void.class, context); } /** - * Get specified Update. + * Apply Update. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param updateName The name of the Update. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return specified Update along with {@link Response} on successful completion of {@link Mono}. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, String clusterName, - String updateName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (clusterName == null) { - return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); - } - if (updateName == null) { - return Mono.error(new IllegalArgumentException("Parameter updateName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, clusterName, - updateName, this.client.getApiVersion(), accept, context); + private Mono postAsync(String resourceGroupName, String clusterName, String updateName) { + return beginPostAsync(resourceGroupName, clusterName, updateName).last() + .flatMap(this.client::getLroFinalResultOrError); } /** - * Get specified Update. + * Apply Update. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. @@ -942,16 +743,14 @@ private Mono> getWithResponseAsync(String resourceGroup * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return specified Update on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync(String resourceGroupName, String clusterName, String updateName) { - return getWithResponseAsync(resourceGroupName, clusterName, updateName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); + public void post(String resourceGroupName, String clusterName, String updateName) { + beginPost(resourceGroupName, clusterName, updateName).getFinalResult(); } /** - * Get specified Update. + * Apply Update. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. @@ -960,28 +759,28 @@ private Mono getAsync(String resourceGroupName, String clusterNa * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return specified Update along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse(String resourceGroupName, String clusterName, String updateName, - Context context) { - return getWithResponseAsync(resourceGroupName, clusterName, updateName, context).block(); + public void post(String resourceGroupName, String clusterName, String updateName, Context context) { + beginPost(resourceGroupName, clusterName, updateName, context).getFinalResult(); } /** - * Get specified Update. + * Get the next page of items. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterName The name of the cluster. - * @param updateName The name of the Update. + * @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 specified Update. + * @return list of Updates along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public HciUpdateInner get(String resourceGroupName, String clusterName, String updateName) { - return getWithResponse(resourceGroupName, clusterName, updateName, Context.NONE).getValue(); + 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())); } /** @@ -991,22 +790,14 @@ public HciUpdateInner get(String resourceGroupName, String clusterName, String u * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of Updates along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return list of Updates along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } + private PagedResponse listNextSinglePage(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())); + 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); } /** @@ -1017,21 +808,13 @@ private Mono> listNextSinglePageAsync(String nextL * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of Updates along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return list of Updates along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink, Context context) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } + private PagedResponse listNextSinglePage(String nextLink, Context context) { final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.listNext(nextLink, this.client.getEndpoint(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); + 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/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/UpdatesImpl.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/UpdatesImpl.java index 1a84ed0d2274..bd5f03c1656d 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/UpdatesImpl.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/UpdatesImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.implementation; @@ -27,32 +27,6 @@ public UpdatesImpl(UpdatesClient innerClient, this.serviceManager = serviceManager; } - public void post(String resourceGroupName, String clusterName, String updateName) { - this.serviceClient().post(resourceGroupName, clusterName, updateName); - } - - public void post(String resourceGroupName, String clusterName, String updateName, Context context) { - this.serviceClient().post(resourceGroupName, clusterName, updateName, context); - } - - public PagedIterable list(String resourceGroupName, String clusterName) { - PagedIterable inner = this.serviceClient().list(resourceGroupName, clusterName); - return ResourceManagerUtils.mapPage(inner, inner1 -> new HciUpdateImpl(inner1, this.manager())); - } - - public PagedIterable list(String resourceGroupName, String clusterName, Context context) { - PagedIterable inner = this.serviceClient().list(resourceGroupName, clusterName, context); - return ResourceManagerUtils.mapPage(inner, inner1 -> new HciUpdateImpl(inner1, this.manager())); - } - - public void delete(String resourceGroupName, String clusterName, String updateName) { - this.serviceClient().delete(resourceGroupName, clusterName, updateName); - } - - public void delete(String resourceGroupName, String clusterName, String updateName, Context context) { - this.serviceClient().delete(resourceGroupName, clusterName, updateName, context); - } - public Response getWithResponse(String resourceGroupName, String clusterName, String updateName, Context context) { Response inner @@ -74,6 +48,32 @@ public HciUpdate get(String resourceGroupName, String clusterName, String update } } + public void delete(String resourceGroupName, String clusterName, String updateName) { + this.serviceClient().delete(resourceGroupName, clusterName, updateName); + } + + public void delete(String resourceGroupName, String clusterName, String updateName, Context context) { + this.serviceClient().delete(resourceGroupName, clusterName, updateName, context); + } + + public PagedIterable list(String resourceGroupName, String clusterName) { + PagedIterable inner = this.serviceClient().list(resourceGroupName, clusterName); + return ResourceManagerUtils.mapPage(inner, inner1 -> new HciUpdateImpl(inner1, this.manager())); + } + + public PagedIterable list(String resourceGroupName, String clusterName, Context context) { + PagedIterable inner = this.serviceClient().list(resourceGroupName, clusterName, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new HciUpdateImpl(inner1, this.manager())); + } + + public void post(String resourceGroupName, String clusterName, String updateName) { + this.serviceClient().post(resourceGroupName, clusterName, updateName); + } + + public void post(String resourceGroupName, String clusterName, String updateName, Context context) { + this.serviceClient().post(resourceGroupName, clusterName, updateName, context); + } + public HciUpdate getById(String id) { String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/ValidateResponseImpl.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/ValidateResponseImpl.java index f17ea09f0a9d..1ec8d1f1c71b 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/ValidateResponseImpl.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/ValidateResponseImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.implementation; diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/ValidatedSolutionRecipeImpl.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/ValidatedSolutionRecipeImpl.java new file mode 100644 index 000000000000..0c28a6709c60 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/ValidatedSolutionRecipeImpl.java @@ -0,0 +1,50 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.azurestackhci.implementation; + +import com.azure.core.management.SystemData; +import com.azure.resourcemanager.azurestackhci.fluent.models.ValidatedSolutionRecipeInner; +import com.azure.resourcemanager.azurestackhci.models.ValidatedSolutionRecipe; +import com.azure.resourcemanager.azurestackhci.models.ValidatedSolutionRecipeProperties; + +public final class ValidatedSolutionRecipeImpl implements ValidatedSolutionRecipe { + private ValidatedSolutionRecipeInner innerObject; + + private final com.azure.resourcemanager.azurestackhci.AzureStackHciManager serviceManager; + + ValidatedSolutionRecipeImpl(ValidatedSolutionRecipeInner innerObject, + com.azure.resourcemanager.azurestackhci.AzureStackHciManager 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 ValidatedSolutionRecipeProperties properties() { + return this.innerModel().properties(); + } + + public SystemData systemData() { + return this.innerModel().systemData(); + } + + public ValidatedSolutionRecipeInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/ValidatedSolutionRecipesClientImpl.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/ValidatedSolutionRecipesClientImpl.java new file mode 100644 index 000000000000..16d8fa45a294 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/ValidatedSolutionRecipesClientImpl.java @@ -0,0 +1,361 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.azurestackhci.implementation; + +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.Get; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Headers; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.PagedResponse; +import com.azure.core.http.rest.PagedResponseBase; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.management.exception.ManagementException; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.resourcemanager.azurestackhci.fluent.ValidatedSolutionRecipesClient; +import com.azure.resourcemanager.azurestackhci.fluent.models.ValidatedSolutionRecipeInner; +import com.azure.resourcemanager.azurestackhci.implementation.models.ValidatedSolutionRecipeListResult; +import reactor.core.publisher.Mono; + +/** + * An instance of this class provides access to all the operations defined in ValidatedSolutionRecipesClient. + */ +public final class ValidatedSolutionRecipesClientImpl implements ValidatedSolutionRecipesClient { + /** + * The proxy service used to perform REST calls. + */ + private final ValidatedSolutionRecipesService service; + + /** + * The service client containing this operation class. + */ + private final AzureStackHciManagementClientImpl client; + + /** + * Initializes an instance of ValidatedSolutionRecipesClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + ValidatedSolutionRecipesClientImpl(AzureStackHciManagementClientImpl client) { + this.service = RestProxy.create(ValidatedSolutionRecipesService.class, client.getHttpPipeline(), + client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for AzureStackHciManagementClientValidatedSolutionRecipes to be used by + * the proxy service to perform REST calls. + */ + @Host("{endpoint}") + @ServiceInterface(name = "AzureStackHciManagementClientValidatedSolutionRecipes") + public interface ValidatedSolutionRecipesService { + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/providers/Microsoft.AzureStackHCI/locations/{location}/validatedSolutionRecipes/{validatedSolutionRecipeName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> get(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("location") String location, + @PathParam("validatedSolutionRecipeName") String validatedSolutionRecipeName, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/providers/Microsoft.AzureStackHCI/locations/{location}/validatedSolutionRecipes/{validatedSolutionRecipeName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response getSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("location") String location, + @PathParam("validatedSolutionRecipeName") String validatedSolutionRecipeName, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/providers/Microsoft.AzureStackHCI/locations/{location}/validatedSolutionRecipes") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listBySubscriptionLocationResource( + @HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, @PathParam("location") String location, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/providers/Microsoft.AzureStackHCI/locations/{location}/validatedSolutionRecipes") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listBySubscriptionLocationResourceSync( + @HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, @PathParam("location") String location, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listBySubscriptionLocationResourceNext( + @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 listBySubscriptionLocationResourceNextSync( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, Context context); + } + + /** + * Get a validated solution recipe. + * + * @param location The name of the Azure region. + * @param validatedSolutionRecipeName The name of the ValidatedSolutionRecipe. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a validated solution recipe along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync(String location, + String validatedSolutionRecipeName) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), location, validatedSolutionRecipeName, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get a validated solution recipe. + * + * @param location The name of the Azure region. + * @param validatedSolutionRecipeName The name of the ValidatedSolutionRecipe. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a validated solution recipe on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getAsync(String location, String validatedSolutionRecipeName) { + return getWithResponseAsync(location, validatedSolutionRecipeName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Get a validated solution recipe. + * + * @param location The name of the Azure region. + * @param validatedSolutionRecipeName The name of the ValidatedSolutionRecipe. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a validated solution recipe along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse(String location, String validatedSolutionRecipeName, + Context context) { + final String accept = "application/json"; + return service.getSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + location, validatedSolutionRecipeName, accept, context); + } + + /** + * Get a validated solution recipe. + * + * @param location The name of the Azure region. + * @param validatedSolutionRecipeName The name of the ValidatedSolutionRecipe. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a validated solution recipe. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ValidatedSolutionRecipeInner get(String location, String validatedSolutionRecipeName) { + return getWithResponse(location, validatedSolutionRecipeName, Context.NONE).getValue(); + } + + /** + * List all validated solution recipes. + * + * @param location The name of the Azure region. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ValidatedSolutionRecipe list operation along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> + listBySubscriptionLocationResourceSinglePageAsync(String location) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listBySubscriptionLocationResource(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), location, 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 all validated solution recipes. + * + * @param location The name of the Azure region. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ValidatedSolutionRecipe list operation as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listBySubscriptionLocationResourceAsync(String location) { + return new PagedFlux<>(() -> listBySubscriptionLocationResourceSinglePageAsync(location), + nextLink -> listBySubscriptionLocationResourceNextSinglePageAsync(nextLink)); + } + + /** + * List all validated solution recipes. + * + * @param location The name of the Azure region. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ValidatedSolutionRecipe list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listBySubscriptionLocationResourceSinglePage(String location) { + final String accept = "application/json"; + Response res + = service.listBySubscriptionLocationResourceSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), location, accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * List all validated solution recipes. + * + * @param location The name of the Azure region. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ValidatedSolutionRecipe list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listBySubscriptionLocationResourceSinglePage(String location, + Context context) { + final String accept = "application/json"; + Response res + = service.listBySubscriptionLocationResourceSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), location, accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * List all validated solution recipes. + * + * @param location The name of the Azure region. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ValidatedSolutionRecipe list operation as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listBySubscriptionLocationResource(String location) { + return new PagedIterable<>(() -> listBySubscriptionLocationResourceSinglePage(location), + nextLink -> listBySubscriptionLocationResourceNextSinglePage(nextLink)); + } + + /** + * List all validated solution recipes. + * + * @param location The name of the Azure region. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ValidatedSolutionRecipe list operation as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listBySubscriptionLocationResource(String location, + Context context) { + return new PagedIterable<>(() -> listBySubscriptionLocationResourceSinglePage(location, context), + nextLink -> listBySubscriptionLocationResourceNextSinglePage(nextLink, context)); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ValidatedSolutionRecipe list operation along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> + listBySubscriptionLocationResourceNextSinglePageAsync(String nextLink) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listBySubscriptionLocationResourceNext(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 ValidatedSolutionRecipe list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse + listBySubscriptionLocationResourceNextSinglePage(String nextLink) { + final String accept = "application/json"; + Response res = service.listBySubscriptionLocationResourceNextSync(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 ValidatedSolutionRecipe list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse + listBySubscriptionLocationResourceNextSinglePage(String nextLink, Context context) { + final String accept = "application/json"; + Response res + = service.listBySubscriptionLocationResourceNextSync(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/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/ValidatedSolutionRecipesImpl.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/ValidatedSolutionRecipesImpl.java new file mode 100644 index 000000000000..ee5ed95482e5 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/ValidatedSolutionRecipesImpl.java @@ -0,0 +1,70 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.azurestackhci.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.azurestackhci.fluent.ValidatedSolutionRecipesClient; +import com.azure.resourcemanager.azurestackhci.fluent.models.ValidatedSolutionRecipeInner; +import com.azure.resourcemanager.azurestackhci.models.ValidatedSolutionRecipe; +import com.azure.resourcemanager.azurestackhci.models.ValidatedSolutionRecipes; + +public final class ValidatedSolutionRecipesImpl implements ValidatedSolutionRecipes { + private static final ClientLogger LOGGER = new ClientLogger(ValidatedSolutionRecipesImpl.class); + + private final ValidatedSolutionRecipesClient innerClient; + + private final com.azure.resourcemanager.azurestackhci.AzureStackHciManager serviceManager; + + public ValidatedSolutionRecipesImpl(ValidatedSolutionRecipesClient innerClient, + com.azure.resourcemanager.azurestackhci.AzureStackHciManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public Response getWithResponse(String location, String validatedSolutionRecipeName, + Context context) { + Response inner + = this.serviceClient().getWithResponse(location, validatedSolutionRecipeName, context); + if (inner != null) { + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new ValidatedSolutionRecipeImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public ValidatedSolutionRecipe get(String location, String validatedSolutionRecipeName) { + ValidatedSolutionRecipeInner inner = this.serviceClient().get(location, validatedSolutionRecipeName); + if (inner != null) { + return new ValidatedSolutionRecipeImpl(inner, this.manager()); + } else { + return null; + } + } + + public PagedIterable listBySubscriptionLocationResource(String location) { + PagedIterable inner + = this.serviceClient().listBySubscriptionLocationResource(location); + return ResourceManagerUtils.mapPage(inner, inner1 -> new ValidatedSolutionRecipeImpl(inner1, this.manager())); + } + + public PagedIterable listBySubscriptionLocationResource(String location, Context context) { + PagedIterable inner + = this.serviceClient().listBySubscriptionLocationResource(location, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new ValidatedSolutionRecipeImpl(inner1, this.manager())); + } + + private ValidatedSolutionRecipesClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/ArcSettingList.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/models/ArcSettingList.java similarity index 79% rename from sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/ArcSettingList.java rename to sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/models/ArcSettingList.java index 5c13d0ebace1..b51b92aa4510 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/ArcSettingList.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/models/ArcSettingList.java @@ -1,8 +1,8 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. -package com.azure.resourcemanager.azurestackhci.models; +package com.azure.resourcemanager.azurestackhci.implementation.models; import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; @@ -19,23 +19,23 @@ @Immutable public final class ArcSettingList implements JsonSerializable { /* - * List of ArcSetting proxy resources. + * The ArcSetting items on this page */ private List value; /* - * Link to the next set of results. + * The link to the next page of items */ private String nextLink; /** * Creates an instance of ArcSettingList class. */ - public ArcSettingList() { + private ArcSettingList() { } /** - * Get the value property: List of ArcSetting proxy resources. + * Get the value property: The ArcSetting items on this page. * * @return the value value. */ @@ -44,7 +44,7 @@ public List value() { } /** - * Get the nextLink property: Link to the next set of results. + * Get the nextLink property: The link to the next page of items. * * @return the nextLink value. */ @@ -52,23 +52,14 @@ public String nextLink() { return this.nextLink; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (value() != null) { - value().forEach(e -> e.validate()); - } - } - /** * {@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(); } @@ -78,6 +69,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @param jsonReader The JsonReader being read. * @return An instance of ArcSettingList 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 ArcSettingList. */ public static ArcSettingList fromJson(JsonReader jsonReader) throws IOException { diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/ClusterList.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/models/ClusterList.java similarity index 72% rename from sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/ClusterList.java rename to sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/models/ClusterList.java index 326fa1b0b8b1..e5fc0701b78b 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/ClusterList.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/models/ClusterList.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. -package com.azure.resourcemanager.azurestackhci.models; +package com.azure.resourcemanager.azurestackhci.implementation.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -16,26 +16,26 @@ /** * List of clusters. */ -@Fluent +@Immutable public final class ClusterList implements JsonSerializable { /* - * List of clusters. + * The Cluster items on this page */ private List value; /* - * Link to the next set of results. + * The link to the next page of items */ private String nextLink; /** * Creates an instance of ClusterList class. */ - public ClusterList() { + private ClusterList() { } /** - * Get the value property: List of clusters. + * Get the value property: The Cluster items on this page. * * @return the value value. */ @@ -44,18 +44,7 @@ public List value() { } /** - * Set the value property: List of clusters. - * - * @param value the value value to set. - * @return the ClusterList object itself. - */ - public ClusterList withValue(List value) { - this.value = value; - return this; - } - - /** - * Get the nextLink property: Link to the next set of results. + * Get the nextLink property: The link to the next page of items. * * @return the nextLink value. */ @@ -63,17 +52,6 @@ public String nextLink() { return this.nextLink; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (value() != null) { - value().forEach(e -> e.validate()); - } - } - /** * {@inheritDoc} */ @@ -81,6 +59,7 @@ public void validate() { 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(); } @@ -90,6 +69,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @param jsonReader The JsonReader being read. * @return An instance of ClusterList if the JsonReader was pointing to an instance of it, or null if it was * pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. * @throws IOException If an error occurs while reading the ClusterList. */ public static ClusterList fromJson(JsonReader jsonReader) throws IOException { diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/DeploymentSettingListResult.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/models/DeploymentSettingListResult.java similarity index 67% rename from sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/DeploymentSettingListResult.java rename to sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/models/DeploymentSettingListResult.java index 5d87c81bbd5e..317fa54090e6 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/DeploymentSettingListResult.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/models/DeploymentSettingListResult.java @@ -1,11 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. -package com.azure.resourcemanager.azurestackhci.models; +package com.azure.resourcemanager.azurestackhci.implementation.models; -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -17,7 +16,7 @@ /** * The response of a DeploymentSetting list operation. */ -@Fluent +@Immutable public final class DeploymentSettingListResult implements JsonSerializable { /* * The DeploymentSetting items on this page @@ -32,7 +31,7 @@ public final class DeploymentSettingListResult implements JsonSerializable value() { return this.value; } - /** - * Set the value property: The DeploymentSetting items on this page. - * - * @param value the value value to set. - * @return the DeploymentSettingListResult object itself. - */ - public DeploymentSettingListResult withValue(List value) { - this.value = value; - return this; - } - /** * Get the nextLink property: The link to the next page of items. * @@ -64,34 +52,6 @@ public String nextLink() { return this.nextLink; } - /** - * Set the nextLink property: The link to the next page of items. - * - * @param nextLink the nextLink value to set. - * @return the DeploymentSettingListResult object itself. - */ - public DeploymentSettingListResult withNextLink(String nextLink) { - this.nextLink = nextLink; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (value() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property value in model DeploymentSettingListResult")); - } else { - value().forEach(e -> e.validate()); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(DeploymentSettingListResult.class); - /** * {@inheritDoc} */ diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/models/EdgeDeviceJobListResult.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/models/EdgeDeviceJobListResult.java new file mode 100644 index 000000000000..a6036a263b6b --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/models/EdgeDeviceJobListResult.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.azurestackhci.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.azurestackhci.fluent.models.EdgeDeviceJobInner; +import java.io.IOException; +import java.util.List; + +/** + * The response of a EdgeDeviceJob list operation. + */ +@Immutable +public final class EdgeDeviceJobListResult implements JsonSerializable { + /* + * The EdgeDeviceJob items on this page + */ + private List value; + + /* + * The link to the next page of items + */ + private String nextLink; + + /** + * Creates an instance of EdgeDeviceJobListResult class. + */ + private EdgeDeviceJobListResult() { + } + + /** + * Get the value property: The EdgeDeviceJob 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 EdgeDeviceJobListResult from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of EdgeDeviceJobListResult 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 EdgeDeviceJobListResult. + */ + public static EdgeDeviceJobListResult fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + EdgeDeviceJobListResult deserializedEdgeDeviceJobListResult = new EdgeDeviceJobListResult(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value = reader.readArray(reader1 -> EdgeDeviceJobInner.fromJson(reader1)); + deserializedEdgeDeviceJobListResult.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedEdgeDeviceJobListResult.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedEdgeDeviceJobListResult; + }); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/EdgeDeviceListResult.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/models/EdgeDeviceListResult.java similarity index 67% rename from sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/EdgeDeviceListResult.java rename to sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/models/EdgeDeviceListResult.java index 891a38963da4..0c449b7712da 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/EdgeDeviceListResult.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/models/EdgeDeviceListResult.java @@ -1,11 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. -package com.azure.resourcemanager.azurestackhci.models; +package com.azure.resourcemanager.azurestackhci.implementation.models; -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -17,7 +16,7 @@ /** * The response of a EdgeDevice list operation. */ -@Fluent +@Immutable public final class EdgeDeviceListResult implements JsonSerializable { /* * The EdgeDevice items on this page @@ -32,7 +31,7 @@ public final class EdgeDeviceListResult implements JsonSerializable value() { return this.value; } - /** - * Set the value property: The EdgeDevice items on this page. - * - * @param value the value value to set. - * @return the EdgeDeviceListResult object itself. - */ - public EdgeDeviceListResult withValue(List value) { - this.value = value; - return this; - } - /** * Get the nextLink property: The link to the next page of items. * @@ -64,33 +52,6 @@ public String nextLink() { return this.nextLink; } - /** - * Set the nextLink property: The link to the next page of items. - * - * @param nextLink the nextLink value to set. - * @return the EdgeDeviceListResult object itself. - */ - public EdgeDeviceListResult withNextLink(String nextLink) { - this.nextLink = nextLink; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (value() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property value in model EdgeDeviceListResult")); - } else { - value().forEach(e -> e.validate()); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(EdgeDeviceListResult.class); - /** * {@inheritDoc} */ diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/ExtensionList.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/models/ExtensionList.java similarity index 79% rename from sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/ExtensionList.java rename to sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/models/ExtensionList.java index 262dca176b1d..0a47025e48ba 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/ExtensionList.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/models/ExtensionList.java @@ -1,8 +1,8 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. -package com.azure.resourcemanager.azurestackhci.models; +package com.azure.resourcemanager.azurestackhci.implementation.models; import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; @@ -19,23 +19,23 @@ @Immutable public final class ExtensionList implements JsonSerializable { /* - * List of Extensions in HCI cluster. + * The Extension items on this page */ private List value; /* - * Link to the next set of results. + * The link to the next page of items */ private String nextLink; /** * Creates an instance of ExtensionList class. */ - public ExtensionList() { + private ExtensionList() { } /** - * Get the value property: List of Extensions in HCI cluster. + * Get the value property: The Extension items on this page. * * @return the value value. */ @@ -44,7 +44,7 @@ public List value() { } /** - * Get the nextLink property: Link to the next set of results. + * Get the nextLink property: The link to the next page of items. * * @return the nextLink value. */ @@ -52,23 +52,14 @@ public String nextLink() { return this.nextLink; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (value() != null) { - value().forEach(e -> e.validate()); - } - } - /** * {@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(); } @@ -78,6 +69,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @param jsonReader The JsonReader being read. * @return An instance of ExtensionList 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 ExtensionList. */ public static ExtensionList fromJson(JsonReader jsonReader) throws IOException { diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/OfferList.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/models/OfferList.java similarity index 78% rename from sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/OfferList.java rename to sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/models/OfferList.java index e235947e6460..5961e14ca49c 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/OfferList.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/models/OfferList.java @@ -1,8 +1,8 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. -package com.azure.resourcemanager.azurestackhci.models; +package com.azure.resourcemanager.azurestackhci.implementation.models; import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; @@ -19,23 +19,23 @@ @Immutable public final class OfferList implements JsonSerializable { /* - * List of Offer proxy resources. + * The Offer items on this page */ private List value; /* - * Link to the next set of results. + * The link to the next page of items */ private String nextLink; /** * Creates an instance of OfferList class. */ - public OfferList() { + private OfferList() { } /** - * Get the value property: List of Offer proxy resources. + * Get the value property: The Offer items on this page. * * @return the value value. */ @@ -44,7 +44,7 @@ public List value() { } /** - * Get the nextLink property: Link to the next set of results. + * Get the nextLink property: The link to the next page of items. * * @return the nextLink value. */ @@ -52,23 +52,14 @@ public String nextLink() { return this.nextLink; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (value() != null) { - value().forEach(e -> e.validate()); - } - } - /** * {@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(); } @@ -78,6 +69,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @param jsonReader The JsonReader being read. * @return An instance of OfferList 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 OfferList. */ public static OfferList fromJson(JsonReader jsonReader) throws IOException { diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/models/OperationListResult.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/models/OperationListResult.java new file mode 100644 index 000000000000..efb7112eb829 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/models/OperationListResult.java @@ -0,0 +1,96 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.azurestackhci.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.azurestackhci.fluent.models.OperationInner; +import java.io.IOException; +import java.util.List; + +/** + * A list of REST API operations supported by an Azure Resource Provider. It contains an URL link to get the next set of + * results. + */ +@Immutable +public final class OperationListResult implements JsonSerializable { + /* + * The Operation items on this page + */ + private List value; + + /* + * The link to the next page of items + */ + private String nextLink; + + /** + * Creates an instance of OperationListResult class. + */ + private OperationListResult() { + } + + /** + * Get the value property: The Operation items on this page. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Get the nextLink property: The link to the next page of items. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeStringField("nextLink", this.nextLink); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of OperationListResult from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of OperationListResult if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the OperationListResult. + */ + public static OperationListResult fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + OperationListResult deserializedOperationListResult = new OperationListResult(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value = reader.readArray(reader1 -> OperationInner.fromJson(reader1)); + deserializedOperationListResult.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedOperationListResult.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedOperationListResult; + }); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/SecuritySettingListResult.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/models/SecuritySettingListResult.java similarity index 67% rename from sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/SecuritySettingListResult.java rename to sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/models/SecuritySettingListResult.java index fecf39e27e63..6e76e58dbad4 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/SecuritySettingListResult.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/models/SecuritySettingListResult.java @@ -1,11 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. -package com.azure.resourcemanager.azurestackhci.models; +package com.azure.resourcemanager.azurestackhci.implementation.models; -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -17,7 +16,7 @@ /** * The response of a SecuritySetting list operation. */ -@Fluent +@Immutable public final class SecuritySettingListResult implements JsonSerializable { /* * The SecuritySetting items on this page @@ -32,7 +31,7 @@ public final class SecuritySettingListResult implements JsonSerializable value() { return this.value; } - /** - * Set the value property: The SecuritySetting items on this page. - * - * @param value the value value to set. - * @return the SecuritySettingListResult object itself. - */ - public SecuritySettingListResult withValue(List value) { - this.value = value; - return this; - } - /** * Get the nextLink property: The link to the next page of items. * @@ -64,34 +52,6 @@ public String nextLink() { return this.nextLink; } - /** - * Set the nextLink property: The link to the next page of items. - * - * @param nextLink the nextLink value to set. - * @return the SecuritySettingListResult object itself. - */ - public SecuritySettingListResult withNextLink(String nextLink) { - this.nextLink = nextLink; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (value() == null) { - throw LOGGER.atError() - .log( - new IllegalArgumentException("Missing required property value in model SecuritySettingListResult")); - } else { - value().forEach(e -> e.validate()); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(SecuritySettingListResult.class); - /** * {@inheritDoc} */ diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/SkuList.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/models/SkuList.java similarity index 78% rename from sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/SkuList.java rename to sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/models/SkuList.java index 12783f9b69b9..c74b022f948f 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/SkuList.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/models/SkuList.java @@ -1,8 +1,8 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. -package com.azure.resourcemanager.azurestackhci.models; +package com.azure.resourcemanager.azurestackhci.implementation.models; import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; @@ -19,23 +19,23 @@ @Immutable public final class SkuList implements JsonSerializable { /* - * List of SKU proxy resources. + * The Sku items on this page */ private List value; /* - * Link to the next set of results. + * The link to the next page of items */ private String nextLink; /** * Creates an instance of SkuList class. */ - public SkuList() { + private SkuList() { } /** - * Get the value property: List of SKU proxy resources. + * Get the value property: The Sku items on this page. * * @return the value value. */ @@ -44,7 +44,7 @@ public List value() { } /** - * Get the nextLink property: Link to the next set of results. + * Get the nextLink property: The link to the next page of items. * * @return the nextLink value. */ @@ -52,23 +52,14 @@ public String nextLink() { return this.nextLink; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (value() != null) { - value().forEach(e -> e.validate()); - } - } - /** * {@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(); } @@ -78,6 +69,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @param jsonReader The JsonReader being read. * @return An instance of SkuList 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 SkuList. */ public static SkuList fromJson(JsonReader jsonReader) throws IOException { diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/UpdateList.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/models/UpdateList.java similarity index 72% rename from sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/UpdateList.java rename to sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/models/UpdateList.java index 76c2c2d6675b..c1dc09460b7f 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/UpdateList.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/models/UpdateList.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. -package com.azure.resourcemanager.azurestackhci.models; +package com.azure.resourcemanager.azurestackhci.implementation.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -16,26 +16,26 @@ /** * List of Updates. */ -@Fluent +@Immutable public final class UpdateList implements JsonSerializable { /* - * List of Updates + * The Update items on this page */ private List value; /* - * Link to the next set of results. + * The link to the next page of items */ private String nextLink; /** * Creates an instance of UpdateList class. */ - public UpdateList() { + private UpdateList() { } /** - * Get the value property: List of Updates. + * Get the value property: The Update items on this page. * * @return the value value. */ @@ -44,18 +44,7 @@ public List value() { } /** - * Set the value property: List of Updates. - * - * @param value the value value to set. - * @return the UpdateList object itself. - */ - public UpdateList withValue(List value) { - this.value = value; - return this; - } - - /** - * Get the nextLink property: Link to the next set of results. + * Get the nextLink property: The link to the next page of items. * * @return the nextLink value. */ @@ -63,17 +52,6 @@ public String nextLink() { return this.nextLink; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (value() != null) { - value().forEach(e -> e.validate()); - } - } - /** * {@inheritDoc} */ @@ -81,6 +59,7 @@ public void validate() { 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(); } @@ -90,6 +69,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @param jsonReader The JsonReader being read. * @return An instance of UpdateList 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 UpdateList. */ public static UpdateList fromJson(JsonReader jsonReader) throws IOException { diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/UpdateRunList.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/models/UpdateRunList.java similarity index 72% rename from sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/UpdateRunList.java rename to sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/models/UpdateRunList.java index f2606de6d457..a6896663bfcc 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/UpdateRunList.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/models/UpdateRunList.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. -package com.azure.resourcemanager.azurestackhci.models; +package com.azure.resourcemanager.azurestackhci.implementation.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -16,26 +16,26 @@ /** * List of Update runs. */ -@Fluent +@Immutable public final class UpdateRunList implements JsonSerializable { /* - * List of Update runs + * The UpdateRun items on this page */ private List value; /* - * Link to the next set of results. + * The link to the next page of items */ private String nextLink; /** * Creates an instance of UpdateRunList class. */ - public UpdateRunList() { + private UpdateRunList() { } /** - * Get the value property: List of Update runs. + * Get the value property: The UpdateRun items on this page. * * @return the value value. */ @@ -44,18 +44,7 @@ public List value() { } /** - * Set the value property: List of Update runs. - * - * @param value the value value to set. - * @return the UpdateRunList object itself. - */ - public UpdateRunList withValue(List value) { - this.value = value; - return this; - } - - /** - * Get the nextLink property: Link to the next set of results. + * Get the nextLink property: The link to the next page of items. * * @return the nextLink value. */ @@ -63,17 +52,6 @@ public String nextLink() { return this.nextLink; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (value() != null) { - value().forEach(e -> e.validate()); - } - } - /** * {@inheritDoc} */ @@ -81,6 +59,7 @@ public void validate() { 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(); } @@ -90,6 +69,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @param jsonReader The JsonReader being read. * @return An instance of UpdateRunList 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 UpdateRunList. */ public static UpdateRunList fromJson(JsonReader jsonReader) throws IOException { diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/UpdateSummariesList.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/models/UpdateSummariesList.java similarity index 73% rename from sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/UpdateSummariesList.java rename to sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/models/UpdateSummariesList.java index 257e633d2bf3..ae42076cb3d9 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/UpdateSummariesList.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/models/UpdateSummariesList.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. -package com.azure.resourcemanager.azurestackhci.models; +package com.azure.resourcemanager.azurestackhci.implementation.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -16,26 +16,26 @@ /** * List of Update Summaries. */ -@Fluent +@Immutable public final class UpdateSummariesList implements JsonSerializable { /* - * List of Update Summaries + * The UpdateSummaries items on this page */ private List value; /* - * Link to the next set of results. + * The link to the next page of items */ private String nextLink; /** * Creates an instance of UpdateSummariesList class. */ - public UpdateSummariesList() { + private UpdateSummariesList() { } /** - * Get the value property: List of Update Summaries. + * Get the value property: The UpdateSummaries items on this page. * * @return the value value. */ @@ -44,18 +44,7 @@ public List value() { } /** - * Set the value property: List of Update Summaries. - * - * @param value the value value to set. - * @return the UpdateSummariesList object itself. - */ - public UpdateSummariesList withValue(List value) { - this.value = value; - return this; - } - - /** - * Get the nextLink property: Link to the next set of results. + * Get the nextLink property: The link to the next page of items. * * @return the nextLink value. */ @@ -63,17 +52,6 @@ public String nextLink() { return this.nextLink; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (value() != null) { - value().forEach(e -> e.validate()); - } - } - /** * {@inheritDoc} */ @@ -81,6 +59,7 @@ public void validate() { 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(); } @@ -90,6 +69,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @param jsonReader The JsonReader being read. * @return An instance of UpdateSummariesList 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 UpdateSummariesList. */ public static UpdateSummariesList fromJson(JsonReader jsonReader) throws IOException { diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/models/ValidatedSolutionRecipeListResult.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/models/ValidatedSolutionRecipeListResult.java new file mode 100644 index 000000000000..25b04d32a70e --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/models/ValidatedSolutionRecipeListResult.java @@ -0,0 +1,97 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.azurestackhci.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.azurestackhci.fluent.models.ValidatedSolutionRecipeInner; +import java.io.IOException; +import java.util.List; + +/** + * The response of a ValidatedSolutionRecipe list operation. + */ +@Immutable +public final class ValidatedSolutionRecipeListResult implements JsonSerializable { + /* + * The ValidatedSolutionRecipe items on this page + */ + private List value; + + /* + * The link to the next page of items + */ + private String nextLink; + + /** + * Creates an instance of ValidatedSolutionRecipeListResult class. + */ + private ValidatedSolutionRecipeListResult() { + } + + /** + * Get the value property: The ValidatedSolutionRecipe 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 ValidatedSolutionRecipeListResult from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ValidatedSolutionRecipeListResult 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 ValidatedSolutionRecipeListResult. + */ + public static ValidatedSolutionRecipeListResult fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ValidatedSolutionRecipeListResult deserializedValidatedSolutionRecipeListResult + = new ValidatedSolutionRecipeListResult(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value + = reader.readArray(reader1 -> ValidatedSolutionRecipeInner.fromJson(reader1)); + deserializedValidatedSolutionRecipeListResult.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedValidatedSolutionRecipeListResult.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedValidatedSolutionRecipeListResult; + }); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/package-info.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/package-info.java index 8c4a6cee8630..bee31bce7e81 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/package-info.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/package-info.java @@ -1,9 +1,9 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. /** - * Package containing the implementations for AzureStackHciClient. - * Azure Stack HCI management service. + * Package containing the implementations for AzureStackHci. + * Azure Stack HCI service. */ package com.azure.resourcemanager.azurestackhci.implementation; diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/AccessLevel.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/AccessLevel.java index 866279b88a5f..880798f0a6b0 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/AccessLevel.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/AccessLevel.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.models; @@ -12,12 +12,12 @@ */ public final class AccessLevel extends ExpandableStringEnum { /** - * Static value Diagnostics for AccessLevel. + * Allows remote diagnostics operations only. */ public static final AccessLevel DIAGNOSTICS = fromString("Diagnostics"); /** - * Static value DiagnosticsAndRepair for AccessLevel. + * Allows both remote diagnostics and repair operations. */ public static final AccessLevel DIAGNOSTICS_AND_REPAIR = fromString("DiagnosticsAndRepair"); diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/ActionType.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/ActionType.java index 5215c99fb8ec..a4afe3524bbb 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/ActionType.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/ActionType.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.models; @@ -8,11 +8,11 @@ import java.util.Collection; /** - * Enum. Indicates the action type. "Internal" refers to actions that are for internal only APIs. + * Extensible enum. Indicates the action type. "Internal" refers to actions that are for internal only APIs. */ public final class ActionType extends ExpandableStringEnum { /** - * Static value Internal for ActionType. + * Actions are for internal-only APIs. */ public static final ActionType INTERNAL = fromString("Internal"); diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/ArcConnectivityProperties.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/ArcConnectivityProperties.java new file mode 100644 index 000000000000..de370b391d3a --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/ArcConnectivityProperties.java @@ -0,0 +1,120 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.azurestackhci.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.List; + +/** + * Connectivity related configuration required by arc server. + */ +@Fluent +public final class ArcConnectivityProperties implements JsonSerializable { + /* + * True indicates ARC connectivity is enabled + */ + private Boolean enabled; + + /* + * Service configurations associated with the connectivity resource. They are only processed by the server if + * 'enabled' property is set to 'true'. + */ + private List serviceConfigurations; + + /** + * Creates an instance of ArcConnectivityProperties class. + */ + public ArcConnectivityProperties() { + } + + /** + * Get the enabled property: True indicates ARC connectivity is enabled. + * + * @return the enabled value. + */ + public Boolean enabled() { + return this.enabled; + } + + /** + * Set the enabled property: True indicates ARC connectivity is enabled. + * + * @param enabled the enabled value to set. + * @return the ArcConnectivityProperties object itself. + */ + public ArcConnectivityProperties withEnabled(Boolean enabled) { + this.enabled = enabled; + return this; + } + + /** + * Get the serviceConfigurations property: Service configurations associated with the connectivity resource. They + * are only processed by the server if 'enabled' property is set to 'true'. + * + * @return the serviceConfigurations value. + */ + public List serviceConfigurations() { + return this.serviceConfigurations; + } + + /** + * Set the serviceConfigurations property: Service configurations associated with the connectivity resource. They + * are only processed by the server if 'enabled' property is set to 'true'. + * + * @param serviceConfigurations the serviceConfigurations value to set. + * @return the ArcConnectivityProperties object itself. + */ + public ArcConnectivityProperties withServiceConfigurations(List serviceConfigurations) { + this.serviceConfigurations = serviceConfigurations; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeBooleanField("enabled", this.enabled); + jsonWriter.writeArrayField("serviceConfigurations", this.serviceConfigurations, + (writer, element) -> writer.writeJson(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ArcConnectivityProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ArcConnectivityProperties 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 ArcConnectivityProperties. + */ + public static ArcConnectivityProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ArcConnectivityProperties deserializedArcConnectivityProperties = new ArcConnectivityProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("enabled".equals(fieldName)) { + deserializedArcConnectivityProperties.enabled = reader.getNullable(JsonReader::getBoolean); + } else if ("serviceConfigurations".equals(fieldName)) { + List serviceConfigurations + = reader.readArray(reader1 -> ServiceConfiguration.fromJson(reader1)); + deserializedArcConnectivityProperties.serviceConfigurations = serviceConfigurations; + } else { + reader.skipChildren(); + } + } + + return deserializedArcConnectivityProperties; + }); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/ArcExtensionState.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/ArcExtensionState.java index ce07e9c36823..c61654099e64 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/ArcExtensionState.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/ArcExtensionState.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.models; @@ -12,52 +12,52 @@ */ public final class ArcExtensionState extends ExpandableStringEnum { /** - * Static value NotSpecified for ArcExtensionState. + * Arc extension state is not specified. */ public static final ArcExtensionState NOT_SPECIFIED = fromString("NotSpecified"); /** - * Static value Succeeded for ArcExtensionState. + * Arc extension state is Succeeded. */ public static final ArcExtensionState SUCCEEDED = fromString("Succeeded"); /** - * Static value Failed for ArcExtensionState. + * Arc extension state is Failed. */ public static final ArcExtensionState FAILED = fromString("Failed"); /** - * Static value Canceled for ArcExtensionState. + * Arc extension state is Canceled. */ public static final ArcExtensionState CANCELED = fromString("Canceled"); /** - * Static value Accepted for ArcExtensionState. + * Arc extension state is Accepted when extension installation triggered. */ public static final ArcExtensionState ACCEPTED = fromString("Accepted"); /** - * Static value Creating for ArcExtensionState. + * Arc extension is in Creating State. */ public static final ArcExtensionState CREATING = fromString("Creating"); /** - * Static value Updating for ArcExtensionState. + * Arc extension is in Updating State. */ public static final ArcExtensionState UPDATING = fromString("Updating"); /** - * Static value Moving for ArcExtensionState. + * Arc extension is in Moving State. */ public static final ArcExtensionState MOVING = fromString("Moving"); /** - * Static value Deleting for ArcExtensionState. + * Arc extension is in Deleting State. */ public static final ArcExtensionState DELETING = fromString("Deleting"); /** - * Static value Deleted for ArcExtensionState. + * Arc extension is in Deleted State. */ public static final ArcExtensionState DELETED = fromString("Deleted"); diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/ArcIdentityResponse.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/ArcIdentityResponse.java index efe6947ba297..85fd328c68dc 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/ArcIdentityResponse.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/ArcIdentityResponse.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.models; diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/ArcSetting.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/ArcSetting.java index e528c6cac869..e573037ecf5e 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/ArcSetting.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/ArcSetting.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.models; @@ -105,7 +105,7 @@ public interface ArcSetting { * * @return the connectivityProperties value. */ - Object connectivityProperties(); + ArcConnectivityProperties connectivityProperties(); /** * Gets the defaultExtensions property: Properties for each of the default extensions category. @@ -261,7 +261,7 @@ interface WithConnectivityProperties { * @param connectivityProperties contains connectivity related configuration for ARC resources. * @return the next definition stage. */ - WithCreate withConnectivityProperties(Object connectivityProperties); + WithCreate withConnectivityProperties(ArcConnectivityProperties connectivityProperties); } } @@ -320,7 +320,7 @@ interface WithConnectivityProperties { * @param connectivityProperties contains connectivity related configuration for ARC resources. * @return the next definition stage. */ - Update withConnectivityProperties(Object connectivityProperties); + Update withConnectivityProperties(ArcConnectivityProperties connectivityProperties); } } @@ -364,7 +364,7 @@ interface WithConnectivityProperties { * * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return arcIdentity details. + * @return the response. */ ArcIdentityResponse createIdentity(); @@ -375,10 +375,33 @@ interface WithConnectivityProperties { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return arcIdentity details. + * @return the response. */ ArcIdentityResponse createIdentity(Context context); + /** + * Reconcile Arc Settings with information related to all nodes. + * + * @param reconcileArcSettingsRequest Request for reconciling Arc Settings. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + ArcSetting reconcile(ReconcileArcSettingsRequest reconcileArcSettingsRequest); + + /** + * Reconcile Arc Settings with information related to all nodes. + * + * @param reconcileArcSettingsRequest Request for reconciling Arc Settings. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + ArcSetting reconcile(ReconcileArcSettingsRequest reconcileArcSettingsRequest, Context context); + /** * Add consent time for default extensions and initiate extensions installation. * diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/ArcSettingAggregateState.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/ArcSettingAggregateState.java index e7a7f4682165..e670f2fd5f69 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/ArcSettingAggregateState.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/ArcSettingAggregateState.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.models; @@ -12,92 +12,92 @@ */ public final class ArcSettingAggregateState extends ExpandableStringEnum { /** - * Static value NotSpecified for ArcSettingAggregateState. + * The aggregate state is not specified. */ public static final ArcSettingAggregateState NOT_SPECIFIED = fromString("NotSpecified"); /** - * Static value Error for ArcSettingAggregateState. + * An error occurred in the aggregate state. */ public static final ArcSettingAggregateState ERROR = fromString("Error"); /** - * Static value Succeeded for ArcSettingAggregateState. + * The operation successfully completed across all nodes. */ public static final ArcSettingAggregateState SUCCEEDED = fromString("Succeeded"); /** - * Static value Canceled for ArcSettingAggregateState. + * The operation was canceled across the nodes. */ public static final ArcSettingAggregateState CANCELED = fromString("Canceled"); /** - * Static value Failed for ArcSettingAggregateState. + * The operation failed on all or most nodes. */ public static final ArcSettingAggregateState FAILED = fromString("Failed"); /** - * Static value Connected for ArcSettingAggregateState. + * All nodes are connected. */ public static final ArcSettingAggregateState CONNECTED = fromString("Connected"); /** - * Static value Disconnected for ArcSettingAggregateState. + * All nodes are disconnected. */ public static final ArcSettingAggregateState DISCONNECTED = fromString("Disconnected"); /** - * Static value Deleted for ArcSettingAggregateState. + * The Arc agent has been deleted from all nodes. */ public static final ArcSettingAggregateState DELETED = fromString("Deleted"); /** - * Static value Creating for ArcSettingAggregateState. + * The Arc agent is being created across the nodes. */ public static final ArcSettingAggregateState CREATING = fromString("Creating"); /** - * Static value Updating for ArcSettingAggregateState. + * The Arc agent is being updated across the nodes. */ public static final ArcSettingAggregateState UPDATING = fromString("Updating"); /** - * Static value Deleting for ArcSettingAggregateState. + * The Arc agent is being deleted across the nodes. */ public static final ArcSettingAggregateState DELETING = fromString("Deleting"); /** - * Static value Moving for ArcSettingAggregateState. + * The Arc agent is being moved across the nodes. */ public static final ArcSettingAggregateState MOVING = fromString("Moving"); /** - * Static value PartiallySucceeded for ArcSettingAggregateState. + * The operation succeeded on some nodes. */ public static final ArcSettingAggregateState PARTIALLY_SUCCEEDED = fromString("PartiallySucceeded"); /** - * Static value PartiallyConnected for ArcSettingAggregateState. + * Some nodes are connected, others are not. */ public static final ArcSettingAggregateState PARTIALLY_CONNECTED = fromString("PartiallyConnected"); /** - * Static value InProgress for ArcSettingAggregateState. + * The operation is currently in progress across the nodes. */ public static final ArcSettingAggregateState IN_PROGRESS = fromString("InProgress"); /** - * Static value Accepted for ArcSettingAggregateState. + * The operation has been accepted and is pending execution. */ public static final ArcSettingAggregateState ACCEPTED = fromString("Accepted"); /** - * Static value Provisioning for ArcSettingAggregateState. + * The Arc agent is being provisioned across the nodes. */ public static final ArcSettingAggregateState PROVISIONING = fromString("Provisioning"); /** - * Static value DisableInProgress for ArcSettingAggregateState. + * The Arc agent is being disabled across the nodes. */ public static final ArcSettingAggregateState DISABLE_IN_PROGRESS = fromString("DisableInProgress"); diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/ArcSettings.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/ArcSettings.java index c6bd1caac823..3999ef43239a 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/ArcSettings.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/ArcSettings.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.models; @@ -13,82 +13,82 @@ */ public interface ArcSettings { /** - * Get ArcSetting resources of HCI Cluster. + * Get ArcSetting resource details of HCI Cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. + * @param arcSettingName The name of the proxy resource holding details of HCI ArcSetting information. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return arcSetting resources of HCI Cluster as paginated response with {@link PagedIterable}. + * @return arcSetting resource details of HCI Cluster along with {@link Response}. */ - PagedIterable listByCluster(String resourceGroupName, String clusterName); + Response getWithResponse(String resourceGroupName, String clusterName, String arcSettingName, + Context context); /** - * Get ArcSetting resources of HCI Cluster. + * Get ArcSetting resource details of HCI Cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. - * @param context The context to associate with this operation. + * @param arcSettingName The name of the proxy resource holding details of HCI ArcSetting information. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return arcSetting resources of HCI Cluster as paginated response with {@link PagedIterable}. + * @return arcSetting resource details of HCI Cluster. */ - PagedIterable listByCluster(String resourceGroupName, String clusterName, Context context); + ArcSetting get(String resourceGroupName, String clusterName, String arcSettingName); /** - * Get ArcSetting resource details of HCI Cluster. + * Delete ArcSetting resource details of HCI Cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param arcSettingName The name of the proxy resource holding details of HCI ArcSetting information. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return arcSetting resource details of HCI Cluster along with {@link Response}. */ - Response getWithResponse(String resourceGroupName, String clusterName, String arcSettingName, - Context context); + void delete(String resourceGroupName, String clusterName, String arcSettingName); /** - * Get ArcSetting resource details of HCI Cluster. + * Delete ArcSetting resource details of HCI Cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param arcSettingName The name of the proxy resource holding details of HCI ArcSetting information. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return arcSetting resource details of HCI Cluster. */ - ArcSetting get(String resourceGroupName, String clusterName, String arcSettingName); + void delete(String resourceGroupName, String clusterName, String arcSettingName, Context context); /** - * Delete ArcSetting resource details of HCI Cluster. + * Get ArcSetting resources of HCI Cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. - * @param arcSettingName The name of the proxy resource holding details of HCI ArcSetting information. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return arcSetting resources of HCI Cluster as paginated response with {@link PagedIterable}. */ - void delete(String resourceGroupName, String clusterName, String arcSettingName); + PagedIterable listByCluster(String resourceGroupName, String clusterName); /** - * Delete ArcSetting resource details of HCI Cluster. + * Get ArcSetting resources of HCI Cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. - * @param arcSettingName The name of the proxy resource holding details of HCI ArcSetting information. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return arcSetting resources of HCI Cluster as paginated response with {@link PagedIterable}. */ - void delete(String resourceGroupName, String clusterName, String arcSettingName, Context context); + PagedIterable listByCluster(String resourceGroupName, String clusterName, Context context); /** * Generate password for arc settings. @@ -127,7 +127,7 @@ Response generatePasswordWithResponse(String resourceGroupNa * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return arcIdentity details. + * @return the response. */ ArcIdentityResponse createIdentity(String resourceGroupName, String clusterName, String arcSettingName); @@ -141,11 +141,42 @@ Response generatePasswordWithResponse(String resourceGroupNa * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return arcIdentity details. + * @return the response. */ ArcIdentityResponse createIdentity(String resourceGroupName, String clusterName, String arcSettingName, Context context); + /** + * Reconcile Arc Settings with information related to all nodes. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param arcSettingName The name of the proxy resource holding details of HCI ArcSetting information. + * @param reconcileArcSettingsRequest Request for reconciling Arc Settings. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + ArcSetting reconcile(String resourceGroupName, String clusterName, String arcSettingName, + ReconcileArcSettingsRequest reconcileArcSettingsRequest); + + /** + * Reconcile Arc Settings with information related to all nodes. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param arcSettingName The name of the proxy resource holding details of HCI ArcSetting information. + * @param reconcileArcSettingsRequest Request for reconciling Arc Settings. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + ArcSetting reconcile(String resourceGroupName, String clusterName, String arcSettingName, + ReconcileArcSettingsRequest reconcileArcSettingsRequest, Context context); + /** * Add consent time for default extensions and initiate extensions installation. * diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/ArcSettingsPatch.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/ArcSettingsPatch.java index d6e1c366a560..41844de8ac42 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/ArcSettingsPatch.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/ArcSettingsPatch.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.models; @@ -68,7 +68,7 @@ private ArcSettingsPatchProperties innerProperties() { * * @return the connectivityProperties value. */ - public Object connectivityProperties() { + public ArcConnectivityProperties connectivityProperties() { return this.innerProperties() == null ? null : this.innerProperties().connectivityProperties(); } @@ -78,7 +78,7 @@ public Object connectivityProperties() { * @param connectivityProperties the connectivityProperties value to set. * @return the ArcSettingsPatch object itself. */ - public ArcSettingsPatch withConnectivityProperties(Object connectivityProperties) { + public ArcSettingsPatch withConnectivityProperties(ArcConnectivityProperties connectivityProperties) { if (this.innerProperties() == null) { this.innerProperties = new ArcSettingsPatchProperties(); } @@ -86,17 +86,6 @@ public ArcSettingsPatch withConnectivityProperties(Object connectivityProperties return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (innerProperties() != null) { - innerProperties().validate(); - } - } - /** * {@inheritDoc} */ diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/AssemblyInfo.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/AssemblyInfo.java new file mode 100644 index 000000000000..fd61c20f095b --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/AssemblyInfo.java @@ -0,0 +1,93 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.azurestackhci.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; + +/** + * Assembly Package details for Validated Solution Recipe for AzureStackHCI Cluster. + */ +@Immutable +public final class AssemblyInfo implements JsonSerializable { + /* + * Assembly Package version for Validated Solution Recipe for AzureStackHCI Cluster + */ + private String packageVersion; + + /* + * Payload properties for Validated Solution Recipe for AzureStackHCI Cluster + */ + private List payload; + + /** + * Creates an instance of AssemblyInfo class. + */ + public AssemblyInfo() { + } + + /** + * Get the packageVersion property: Assembly Package version for Validated Solution Recipe for AzureStackHCI + * Cluster. + * + * @return the packageVersion value. + */ + public String packageVersion() { + return this.packageVersion; + } + + /** + * Get the payload property: Payload properties for Validated Solution Recipe for AzureStackHCI Cluster. + * + * @return the payload value. + */ + public List payload() { + return this.payload; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of AssemblyInfo from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of AssemblyInfo 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 AssemblyInfo. + */ + public static AssemblyInfo fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + AssemblyInfo deserializedAssemblyInfo = new AssemblyInfo(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("packageVersion".equals(fieldName)) { + deserializedAssemblyInfo.packageVersion = reader.getString(); + } else if ("payload".equals(fieldName)) { + List payload + = reader.readArray(reader1 -> AssemblyInfoPayload.fromJson(reader1)); + deserializedAssemblyInfo.payload = payload; + } else { + reader.skipChildren(); + } + } + + return deserializedAssemblyInfo; + }); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/AssemblyInfoPayload.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/AssemblyInfoPayload.java new file mode 100644 index 000000000000..befef3e83495 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/AssemblyInfoPayload.java @@ -0,0 +1,121 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.azurestackhci.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; + +/** + * Payload properties for Validated Solution Recipe for AzureStackHCI Cluster. + */ +@Immutable +public final class AssemblyInfoPayload implements JsonSerializable { + /* + * assembly identifier for Validated Solution Recipe for AzureStackHCI Cluster + */ + private String identifier; + + /* + * Hash of assembly package for Validated Solution Recipe for AzureStackHCI Cluster + */ + private String hash; + + /* + * File name of assembly package for Validated Solution Recipe for AzureStackHCI Cluster + */ + private String fileName; + + /* + * Url of assembly package for Validated Solution Recipe for AzureStackHCI Cluster + */ + private String url; + + /** + * Creates an instance of AssemblyInfoPayload class. + */ + private AssemblyInfoPayload() { + } + + /** + * Get the identifier property: assembly identifier for Validated Solution Recipe for AzureStackHCI Cluster. + * + * @return the identifier value. + */ + public String identifier() { + return this.identifier; + } + + /** + * Get the hash property: Hash of assembly package for Validated Solution Recipe for AzureStackHCI Cluster. + * + * @return the hash value. + */ + public String hash() { + return this.hash; + } + + /** + * Get the fileName property: File name of assembly package for Validated Solution Recipe for AzureStackHCI Cluster. + * + * @return the fileName value. + */ + public String fileName() { + return this.fileName; + } + + /** + * Get the url property: Url of assembly package for Validated Solution Recipe for AzureStackHCI Cluster. + * + * @return the url value. + */ + public String url() { + return this.url; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of AssemblyInfoPayload from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of AssemblyInfoPayload 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 AssemblyInfoPayload. + */ + public static AssemblyInfoPayload fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + AssemblyInfoPayload deserializedAssemblyInfoPayload = new AssemblyInfoPayload(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("identifier".equals(fieldName)) { + deserializedAssemblyInfoPayload.identifier = reader.getString(); + } else if ("hash".equals(fieldName)) { + deserializedAssemblyInfoPayload.hash = reader.getString(); + } else if ("fileName".equals(fieldName)) { + deserializedAssemblyInfoPayload.fileName = reader.getString(); + } else if ("url".equals(fieldName)) { + deserializedAssemblyInfoPayload.url = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedAssemblyInfoPayload; + }); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/AvailabilityType.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/AvailabilityType.java index 27912da893e7..b8877805e3bc 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/AvailabilityType.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/AvailabilityType.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.models; @@ -8,21 +8,22 @@ import java.util.Collection; /** - * Indicates the way the update content can be downloaded. + * Indicates how the update content is made available for download. This determines whether the update is sourced + * locally, from an online repository, or requires user notification. */ public final class AvailabilityType extends ExpandableStringEnum { /** - * Static value Local for AvailabilityType. + * The update content is available locally within the environment. */ public static final AvailabilityType LOCAL = fromString("Local"); /** - * Static value Online for AvailabilityType. + * The update content is available from an online source. */ public static final AvailabilityType ONLINE = fromString("Online"); /** - * Static value Notify for AvailabilityType. + * The system will notify the user when update content becomes available. */ public static final AvailabilityType NOTIFY = fromString("Notify"); diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/Cluster.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/Cluster.java index 916dc730f58e..5d665320206c 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/Cluster.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/Cluster.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.models; @@ -9,8 +9,8 @@ import com.azure.core.util.Context; import com.azure.resourcemanager.azurestackhci.fluent.models.ClusterInner; import java.time.OffsetDateTime; +import java.util.List; import java.util.Map; -import java.util.UUID; /** * An immutable client-side representation of Cluster. @@ -59,55 +59,24 @@ public interface Cluster { SystemData systemData(); /** - * Gets the principalId property: The service principal ID of the system assigned identity. This property will only - * be provided for a system assigned identity. - * - * @return the principalId value. - */ - UUID principalId(); - - /** - * Gets the tenantId property: The tenant ID of the system assigned identity. This property will only be provided - * for a system assigned identity. - * - * @return the tenantId value. - */ - UUID tenantId(); - - /** - * Gets the typeIdentityType property: Type of managed service identity (where both SystemAssigned and UserAssigned - * types are allowed). - * - * @return the typeIdentityType value. - */ - ManagedServiceIdentityType typeIdentityType(); - - /** - * Gets the userAssignedIdentities property: The set of user assigned identities associated with the resource. The - * userAssignedIdentities dictionary keys will be ARM resource ids in the form: - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}. - * The dictionary values can be empty objects ({}) in requests. - * - * @return the userAssignedIdentities value. - */ - Map userAssignedIdentities(); - - /** - * Gets the provisioningState property: Provisioning state. + * Gets the provisioningState property: Provisioning state. Indicates the current lifecycle status of the resource, + * including creation, update, deletion, connectivity, and error states. * * @return the provisioningState value. */ ProvisioningState provisioningState(); /** - * Gets the status property: Status of the cluster agent. + * Gets the status property: Status of the cluster agent. Indicates the current connectivity, validation, and + * deployment state of the agent within the cluster. * * @return the status value. */ Status status(); /** - * Gets the connectivityStatus property: Overall connectivity status for the cluster resource. + * Gets the connectivityStatus property: Overall connectivity status for the cluster resource. Indicates whether the + * cluster is connected to Azure, partially connected, or has not recently communicated. * * @return the connectivityStatus value. */ @@ -162,6 +131,14 @@ public interface Cluster { */ SoftwareAssuranceProperties softwareAssuranceProperties(); + /** + * Gets the isManagementCluster property: Is Management Cluster, when true indicates that the cluster is used for + * managing other clusters. + * + * @return the isManagementCluster value. + */ + Boolean isManagementCluster(); + /** * Gets the logCollectionProperties property: Log Collection properties of the cluster. * @@ -203,7 +180,7 @@ public interface Cluster { * * @return the trialDaysRemaining value. */ - Float trialDaysRemaining(); + Double trialDaysRemaining(); /** * Gets the billingModel property: Type of billing applied to the resource. @@ -247,6 +224,64 @@ public interface Cluster { */ String resourceProviderObjectId(); + /** + * Gets the secretsLocations property: List of secret locations. + * + * @return the secretsLocations value. + */ + List secretsLocations(); + + /** + * Gets the clusterPattern property: Supported Storage Type for HCI Cluster. + * + * @return the clusterPattern value. + */ + ClusterPattern clusterPattern(); + + /** + * Gets the localAvailabilityZones property: Local Availability Zone information for HCI cluster. + * + * @return the localAvailabilityZones value. + */ + List localAvailabilityZones(); + + /** + * Gets the identityProvider property: Identity Provider for the cluster. + * + * @return the identityProvider value. + */ + IdentityProvider identityProvider(); + + /** + * Gets the principalId property: The service principal ID of the system assigned identity. This property will only + * be provided for a system assigned identity. + * + * @return the principalId value. + */ + String principalId(); + + /** + * Gets the tenantId property: The tenant ID of the system assigned identity. This property will only be provided + * for a system assigned identity. + * + * @return the tenantId value. + */ + String tenantId(); + + /** + * Gets the typeIdentityType property: The type of managed identity assigned to this resource. + * + * @return the typeIdentityType value. + */ + ManagedServiceIdentityType typeIdentityType(); + + /** + * Gets the userAssignedIdentities property: The identities assigned to this resource by the user. + * + * @return the userAssignedIdentities value. + */ + Map userAssignedIdentities(); + /** * Gets the region of the resource. * @@ -330,12 +365,13 @@ interface WithResourceGroup { * The stage of the Cluster definition which contains all the minimum required properties for the resource to be * created, but also allows for any other optional properties to be specified. */ - interface WithCreate extends DefinitionStages.WithTags, DefinitionStages.WithTypeIdentityType, - DefinitionStages.WithUserAssignedIdentities, DefinitionStages.WithCloudManagementEndpoint, + interface WithCreate extends DefinitionStages.WithTags, DefinitionStages.WithCloudManagementEndpoint, DefinitionStages.WithAadClientId, DefinitionStages.WithAadTenantId, DefinitionStages.WithAadApplicationObjectId, DefinitionStages.WithAadServicePrincipalObjectId, DefinitionStages.WithSoftwareAssuranceProperties, DefinitionStages.WithLogCollectionProperties, - DefinitionStages.WithRemoteSupportProperties, DefinitionStages.WithDesiredProperties { + DefinitionStages.WithRemoteSupportProperties, DefinitionStages.WithDesiredProperties, + DefinitionStages.WithSecretsLocations, DefinitionStages.WithLocalAvailabilityZones, + DefinitionStages.WithTypeIdentityType, DefinitionStages.WithUserAssignedIdentities { /** * Executes the create request. * @@ -365,40 +401,6 @@ interface WithTags { WithCreate withTags(Map tags); } - /** - * The stage of the Cluster definition allowing to specify typeIdentityType. - */ - interface WithTypeIdentityType { - /** - * Specifies the typeIdentityType property: Type of managed service identity (where both SystemAssigned and - * UserAssigned types are allowed).. - * - * @param typeIdentityType Type of managed service identity (where both SystemAssigned and UserAssigned - * types are allowed). - * @return the next definition stage. - */ - WithCreate withTypeIdentityType(ManagedServiceIdentityType typeIdentityType); - } - - /** - * The stage of the Cluster definition allowing to specify userAssignedIdentities. - */ - interface WithUserAssignedIdentities { - /** - * Specifies the userAssignedIdentities property: The set of user assigned identities associated with the - * resource. The userAssignedIdentities dictionary keys will be ARM resource ids in the form: - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}. - * The dictionary values can be empty objects ({}) in requests.. - * - * @param userAssignedIdentities The set of user assigned identities associated with the resource. The - * userAssignedIdentities dictionary keys will be ARM resource ids in the form: - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}. - * The dictionary values can be empty objects ({}) in requests. - * @return the next definition stage. - */ - WithCreate withUserAssignedIdentities(Map userAssignedIdentities); - } - /** * The stage of the Cluster definition allowing to specify cloudManagementEndpoint. */ @@ -516,6 +518,58 @@ interface WithDesiredProperties { */ WithCreate withDesiredProperties(ClusterDesiredProperties desiredProperties); } + + /** + * The stage of the Cluster definition allowing to specify secretsLocations. + */ + interface WithSecretsLocations { + /** + * Specifies the secretsLocations property: List of secret locations.. + * + * @param secretsLocations List of secret locations. + * @return the next definition stage. + */ + WithCreate withSecretsLocations(List secretsLocations); + } + + /** + * The stage of the Cluster definition allowing to specify localAvailabilityZones. + */ + interface WithLocalAvailabilityZones { + /** + * Specifies the localAvailabilityZones property: Local Availability Zone information for HCI cluster. + * + * @param localAvailabilityZones Local Availability Zone information for HCI cluster. + * @return the next definition stage. + */ + WithCreate withLocalAvailabilityZones(List localAvailabilityZones); + } + + /** + * The stage of the Cluster definition allowing to specify typeIdentityType. + */ + interface WithTypeIdentityType { + /** + * Specifies the typeIdentityType property: The type of managed identity assigned to this resource.. + * + * @param typeIdentityType The type of managed identity assigned to this resource. + * @return the next definition stage. + */ + WithCreate withTypeIdentityType(ManagedServiceIdentityType typeIdentityType); + } + + /** + * The stage of the Cluster definition allowing to specify userAssignedIdentities. + */ + interface WithUserAssignedIdentities { + /** + * Specifies the userAssignedIdentities property: The identities assigned to this resource by the user.. + * + * @param userAssignedIdentities The identities assigned to this resource by the user. + * @return the next definition stage. + */ + WithCreate withUserAssignedIdentities(Map userAssignedIdentities); + } } /** @@ -569,11 +623,9 @@ interface WithTags { */ interface WithType { /** - * Specifies the type property: Type of managed service identity (where both SystemAssigned and UserAssigned - * types are allowed).. + * Specifies the type property: The type of managed identity assigned to this resource.. * - * @param type Type of managed service identity (where both SystemAssigned and UserAssigned types are - * allowed). + * @param type The type of managed identity assigned to this resource. * @return the next definition stage. */ Update withType(ManagedServiceIdentityType type); @@ -584,15 +636,9 @@ interface WithType { */ interface WithUserAssignedIdentities { /** - * Specifies the userAssignedIdentities property: The set of user assigned identities associated with the - * resource. The userAssignedIdentities dictionary keys will be ARM resource ids in the form: - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}. - * The dictionary values can be empty objects ({}) in requests.. + * Specifies the userAssignedIdentities property: The identities assigned to this resource by the user.. * - * @param userAssignedIdentities The set of user assigned identities associated with the resource. The - * userAssignedIdentities dictionary keys will be ARM resource ids in the form: - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}. - * The dictionary values can be empty objects ({}) in requests. + * @param userAssignedIdentities The identities assigned to this resource by the user. * @return the next definition stage. */ Update withUserAssignedIdentities(Map userAssignedIdentities); @@ -666,6 +712,29 @@ interface WithDesiredProperties { */ Cluster refresh(Context context); + /** + * Update cluster secrets locations. + * + * @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 the response. + */ + Cluster updateSecretsLocations(SecretsLocationsChangeRequest body); + + /** + * Update cluster secrets locations. + * + * @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 the response. + */ + Cluster updateSecretsLocations(SecretsLocationsChangeRequest body, Context context); + /** * Upload certificate. * @@ -692,7 +761,7 @@ interface WithDesiredProperties { * * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return cluster Identity details. + * @return the response. */ ClusterIdentityResponse createIdentity(); @@ -703,7 +772,7 @@ interface WithDesiredProperties { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return cluster Identity details. + * @return the response. */ ClusterIdentityResponse createIdentity(Context context); @@ -714,7 +783,7 @@ interface WithDesiredProperties { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return cluster details. + * @return the response. */ Cluster extendSoftwareAssuranceBenefit(SoftwareAssuranceChangeRequest softwareAssuranceChangeRequest); @@ -726,7 +795,7 @@ interface WithDesiredProperties { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return cluster details. + * @return the response. */ Cluster extendSoftwareAssuranceBenefit(SoftwareAssuranceChangeRequest softwareAssuranceChangeRequest, Context context); @@ -738,7 +807,7 @@ Cluster extendSoftwareAssuranceBenefit(SoftwareAssuranceChangeRequest softwareAs * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return cluster details. + * @return the response. */ Cluster triggerLogCollection(LogCollectionRequest logCollectionRequest); @@ -750,7 +819,7 @@ Cluster extendSoftwareAssuranceBenefit(SoftwareAssuranceChangeRequest softwareAs * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return cluster details. + * @return the response. */ Cluster triggerLogCollection(LogCollectionRequest logCollectionRequest, Context context); @@ -761,7 +830,7 @@ Cluster extendSoftwareAssuranceBenefit(SoftwareAssuranceChangeRequest softwareAs * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return cluster details. + * @return the response. */ Cluster configureRemoteSupport(RemoteSupportRequest remoteSupportRequest); @@ -773,7 +842,7 @@ Cluster extendSoftwareAssuranceBenefit(SoftwareAssuranceChangeRequest softwareAs * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return cluster details. + * @return the response. */ Cluster configureRemoteSupport(RemoteSupportRequest remoteSupportRequest, Context context); } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/ClusterDesiredProperties.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/ClusterDesiredProperties.java index 1d8108f674f7..1b5919737b2d 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/ClusterDesiredProperties.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/ClusterDesiredProperties.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.models; @@ -72,14 +72,6 @@ public ClusterDesiredProperties withDiagnosticLevel(DiagnosticLevel diagnosticLe return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/ClusterIdentityResponse.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/ClusterIdentityResponse.java index 0def28f160e2..5ec315bbedeb 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/ClusterIdentityResponse.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/ClusterIdentityResponse.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.models; diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/ClusterNode.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/ClusterNode.java index efbcc29e5f06..b2d49b7a24ed 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/ClusterNode.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/ClusterNode.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.models; @@ -26,7 +26,7 @@ public final class ClusterNode implements JsonSerializable { /* * Id of the node in the cluster. */ - private Float id; + private Double id; /* * State of Windows Server Subscription. @@ -76,12 +76,12 @@ public final class ClusterNode implements JsonSerializable { /* * Number of physical cores on the cluster node. */ - private Float coreCount; + private Double coreCount; /* * Total available memory on the cluster node (in GiB). */ - private Float memoryInGiB; + private Double memoryInGiB; /* * Most recent licensing timestamp. @@ -96,7 +96,7 @@ public final class ClusterNode implements JsonSerializable { /** * Creates an instance of ClusterNode class. */ - public ClusterNode() { + private ClusterNode() { } /** @@ -113,7 +113,7 @@ public String name() { * * @return the id value. */ - public Float id() { + public Double id() { return this.id; } @@ -203,7 +203,7 @@ public String serialNumber() { * * @return the coreCount value. */ - public Float coreCount() { + public Double coreCount() { return this.coreCount; } @@ -212,7 +212,7 @@ public Float coreCount() { * * @return the memoryInGiB value. */ - public Float memoryInGiB() { + public Double memoryInGiB() { return this.memoryInGiB; } @@ -234,14 +234,6 @@ public OemActivation oemActivation() { return this.oemActivation; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ @@ -269,7 +261,7 @@ public static ClusterNode fromJson(JsonReader jsonReader) throws IOException { if ("name".equals(fieldName)) { deserializedClusterNode.name = reader.getString(); } else if ("id".equals(fieldName)) { - deserializedClusterNode.id = reader.getNullable(JsonReader::getFloat); + deserializedClusterNode.id = reader.getNullable(JsonReader::getDouble); } else if ("windowsServerSubscription".equals(fieldName)) { deserializedClusterNode.windowsServerSubscription = WindowsServerSubscription.fromString(reader.getString()); @@ -290,9 +282,9 @@ public static ClusterNode fromJson(JsonReader jsonReader) throws IOException { } else if ("serialNumber".equals(fieldName)) { deserializedClusterNode.serialNumber = reader.getString(); } else if ("coreCount".equals(fieldName)) { - deserializedClusterNode.coreCount = reader.getNullable(JsonReader::getFloat); + deserializedClusterNode.coreCount = reader.getNullable(JsonReader::getDouble); } else if ("memoryInGiB".equals(fieldName)) { - deserializedClusterNode.memoryInGiB = reader.getNullable(JsonReader::getFloat); + deserializedClusterNode.memoryInGiB = reader.getNullable(JsonReader::getDouble); } else if ("lastLicensingTimestamp".equals(fieldName)) { deserializedClusterNode.lastLicensingTimestamp = reader .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/ClusterNodeType.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/ClusterNodeType.java index dfbab1e8db5f..82547c0ff4ac 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/ClusterNodeType.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/ClusterNodeType.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.models; @@ -8,16 +8,17 @@ import java.util.Collection; /** - * The node type of all the nodes of the cluster. + * Specifies the type of hardware vendor for all nodes in the cluster. Indicates whether the nodes are provided by + * Microsoft or a third-party vendor. */ public final class ClusterNodeType extends ExpandableStringEnum { /** - * Static value FirstParty for ClusterNodeType. + * All nodes in the cluster are provided and managed by Microsoft. */ public static final ClusterNodeType FIRST_PARTY = fromString("FirstParty"); /** - * Static value ThirdParty for ClusterNodeType. + * All nodes in the cluster are provided and managed by a third-party vendor. */ public static final ClusterNodeType THIRD_PARTY = fromString("ThirdParty"); diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/ClusterPatch.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/ClusterPatch.java index 660365b821e4..f45a8201f05b 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/ClusterPatch.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/ClusterPatch.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.models; @@ -13,7 +13,6 @@ import com.azure.resourcemanager.azurestackhci.fluent.models.ManagedServiceIdentity; import java.io.IOException; import java.util.Map; -import java.util.UUID; /** * Cluster details to update. @@ -85,7 +84,7 @@ private ClusterPatchProperties innerProperties() { * * @return the principalId value. */ - public UUID principalId() { + public String principalId() { return this.innerIdentity() == null ? null : this.innerIdentity().principalId(); } @@ -95,13 +94,12 @@ public UUID principalId() { * * @return the tenantId value. */ - public UUID tenantId() { + public String tenantId() { return this.innerIdentity() == null ? null : this.innerIdentity().tenantId(); } /** - * Get the type property: Type of managed service identity (where both SystemAssigned and UserAssigned types are - * allowed). + * Get the type property: The type of managed identity assigned to this resource. * * @return the type value. */ @@ -110,8 +108,7 @@ public ManagedServiceIdentityType type() { } /** - * Set the type property: Type of managed service identity (where both SystemAssigned and UserAssigned types are - * allowed). + * Set the type property: The type of managed identity assigned to this resource. * * @param type the type value to set. * @return the ClusterPatch object itself. @@ -125,10 +122,7 @@ public ClusterPatch withType(ManagedServiceIdentityType type) { } /** - * Get the userAssignedIdentities property: The set of user assigned identities associated with the resource. The - * userAssignedIdentities dictionary keys will be ARM resource ids in the form: - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}. - * The dictionary values can be empty objects ({}) in requests. + * Get the userAssignedIdentities property: The identities assigned to this resource by the user. * * @return the userAssignedIdentities value. */ @@ -137,10 +131,7 @@ public Map userAssignedIdentities() { } /** - * Set the userAssignedIdentities property: The set of user assigned identities associated with the resource. The - * userAssignedIdentities dictionary keys will be ARM resource ids in the form: - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}. - * The dictionary values can be empty objects ({}) in requests. + * Set the userAssignedIdentities property: The identities assigned to this resource by the user. * * @param userAssignedIdentities the userAssignedIdentities value to set. * @return the ClusterPatch object itself. @@ -245,20 +236,6 @@ public ClusterPatch withDesiredProperties(ClusterDesiredProperties desiredProper return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (innerIdentity() != null) { - innerIdentity().validate(); - } - if (innerProperties() != null) { - innerProperties().validate(); - } - } - /** * {@inheritDoc} */ diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/ClusterPattern.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/ClusterPattern.java new file mode 100644 index 000000000000..79b773be0118 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/ClusterPattern.java @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.azurestackhci.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Supported Storage Pattern for HCI Cluster. + */ +public final class ClusterPattern extends ExpandableStringEnum { + /** + * Standard cluster. + */ + public static final ClusterPattern STANDARD = fromString("Standard"); + + /** + * RackAware cluster. + */ + public static final ClusterPattern RACK_AWARE = fromString("RackAware"); + + /** + * Creates a new instance of ClusterPattern value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public ClusterPattern() { + } + + /** + * Creates or finds a ClusterPattern from its string representation. + * + * @param name a name to look for. + * @return the corresponding ClusterPattern. + */ + public static ClusterPattern fromString(String name) { + return fromString(name, ClusterPattern.class); + } + + /** + * Gets known ClusterPattern values. + * + * @return known ClusterPattern values. + */ + public static Collection values() { + return values(ClusterPattern.class); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/ClusterReportedProperties.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/ClusterReportedProperties.java index 2643f6e52e8b..0194210223a5 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/ClusterReportedProperties.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/ClusterReportedProperties.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.core.util.CoreUtils; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; @@ -17,7 +17,7 @@ /** * Properties reported by cluster agent. */ -@Fluent +@Immutable public final class ClusterReportedProperties implements JsonSerializable { /* * Name of the on-prem cluster connected to this resource. @@ -44,6 +44,12 @@ public final class ClusterReportedProperties implements JsonSerializable supportedCapabilities; /* - * The node type of all the nodes of the cluster. + * Specifies the type of hardware vendor for all nodes in the cluster. Indicates whether the nodes are provided by + * Microsoft or a third-party vendor. */ private ClusterNodeType clusterType; @@ -74,10 +81,15 @@ public final class ClusterReportedProperties implements JsonSerializable supportedCapabilities() { } /** - * Get the clusterType property: The node type of all the nodes of the cluster. + * Get the clusterType property: Specifies the type of hardware vendor for all nodes in the cluster. Indicates + * whether the nodes are provided by Microsoft or a third-party vendor. * * @return the clusterType value. */ @@ -191,14 +203,12 @@ public OemActivation oemActivation() { } /** - * Validates the instance. + * Get the hardwareClass property: Hardware class of the cluster. * - * @throws IllegalArgumentException thrown if the instance is not valid. + * @return the hardwareClass value. */ - public void validate() { - if (nodes() != null) { - nodes().forEach(e -> e.validate()); - } + public HardwareClass hardwareClass() { + return this.hardwareClass; } /** @@ -239,6 +249,9 @@ public static ClusterReportedProperties fromJson(JsonReader jsonReader) throws I } else if ("lastUpdated".equals(fieldName)) { deserializedClusterReportedProperties.lastUpdated = reader .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("msiExpirationTimeStamp".equals(fieldName)) { + deserializedClusterReportedProperties.msiExpirationTimeStamp = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); } else if ("imdsAttestation".equals(fieldName)) { deserializedClusterReportedProperties.imdsAttestation = ImdsAttestation.fromString(reader.getString()); @@ -254,6 +267,8 @@ public static ClusterReportedProperties fromJson(JsonReader jsonReader) throws I deserializedClusterReportedProperties.manufacturer = reader.getString(); } else if ("oemActivation".equals(fieldName)) { deserializedClusterReportedProperties.oemActivation = OemActivation.fromString(reader.getString()); + } else if ("hardwareClass".equals(fieldName)) { + deserializedClusterReportedProperties.hardwareClass = HardwareClass.fromString(reader.getString()); } else { reader.skipChildren(); } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/Clusters.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/Clusters.java index 2850e30313cf..13114bf755a7 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/Clusters.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/Clusters.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.models; @@ -13,24 +13,52 @@ */ public interface Clusters { /** - * List all HCI clusters in a subscription. + * Get HCI cluster. * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of clusters as paginated response with {@link PagedIterable}. + * @return hCI cluster along with {@link Response}. */ - PagedIterable list(); + Response getByResourceGroupWithResponse(String resourceGroupName, String clusterName, Context context); /** - * List all HCI clusters in a subscription. + * Get HCI cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return hCI cluster. + */ + Cluster getByResourceGroup(String resourceGroupName, String clusterName); + + /** + * Delete an HCI cluster. * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void deleteByResourceGroup(String resourceGroupName, String clusterName); + + /** + * Delete an HCI cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of clusters as paginated response with {@link PagedIterable}. */ - PagedIterable list(Context context); + void delete(String resourceGroupName, String clusterName, Context context); /** * List all HCI clusters in a resource group. @@ -56,52 +84,52 @@ public interface Clusters { PagedIterable listByResourceGroup(String resourceGroupName, Context context); /** - * Get HCI cluster. + * List all HCI clusters in a subscription. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterName The name of the cluster. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return hCI cluster along with {@link Response}. + * @return list of clusters as paginated response with {@link PagedIterable}. */ - Response getByResourceGroupWithResponse(String resourceGroupName, String clusterName, Context context); + PagedIterable list(); /** - * Get HCI cluster. + * List all HCI clusters in a subscription. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterName The name of the cluster. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return hCI cluster. + * @return list of clusters as paginated response with {@link PagedIterable}. */ - Cluster getByResourceGroup(String resourceGroupName, String clusterName); + PagedIterable list(Context context); /** - * Delete an HCI cluster. + * Update cluster secrets locations. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. + * @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 the response. */ - void deleteByResourceGroup(String resourceGroupName, String clusterName); + Cluster updateSecretsLocations(String resourceGroupName, String clusterName, SecretsLocationsChangeRequest body); /** - * Delete an HCI cluster. + * Update cluster secrets locations. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. + * @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 the response. */ - void delete(String resourceGroupName, String clusterName, Context context); + Cluster updateSecretsLocations(String resourceGroupName, String clusterName, SecretsLocationsChangeRequest body, + Context context); /** * Upload certificate. @@ -138,7 +166,7 @@ void uploadCertificate(String resourceGroupName, String clusterName, * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return cluster Identity details. + * @return the response. */ ClusterIdentityResponse createIdentity(String resourceGroupName, String clusterName); @@ -151,7 +179,7 @@ void uploadCertificate(String resourceGroupName, String clusterName, * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return cluster Identity details. + * @return the response. */ ClusterIdentityResponse createIdentity(String resourceGroupName, String clusterName, Context context); @@ -164,7 +192,7 @@ void uploadCertificate(String resourceGroupName, String clusterName, * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return cluster details. + * @return the response. */ Cluster extendSoftwareAssuranceBenefit(String resourceGroupName, String clusterName, SoftwareAssuranceChangeRequest softwareAssuranceChangeRequest); @@ -179,7 +207,7 @@ Cluster extendSoftwareAssuranceBenefit(String resourceGroupName, String clusterN * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return cluster details. + * @return the response. */ Cluster extendSoftwareAssuranceBenefit(String resourceGroupName, String clusterName, SoftwareAssuranceChangeRequest softwareAssuranceChangeRequest, Context context); @@ -193,7 +221,7 @@ Cluster extendSoftwareAssuranceBenefit(String resourceGroupName, String clusterN * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return cluster details. + * @return the response. */ Cluster triggerLogCollection(String resourceGroupName, String clusterName, LogCollectionRequest logCollectionRequest); @@ -208,7 +236,7 @@ Cluster triggerLogCollection(String resourceGroupName, String clusterName, * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return cluster details. + * @return the response. */ Cluster triggerLogCollection(String resourceGroupName, String clusterName, LogCollectionRequest logCollectionRequest, Context context); @@ -222,7 +250,7 @@ Cluster triggerLogCollection(String resourceGroupName, String clusterName, * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return cluster details. + * @return the response. */ Cluster configureRemoteSupport(String resourceGroupName, String clusterName, RemoteSupportRequest remoteSupportRequest); @@ -237,7 +265,7 @@ Cluster configureRemoteSupport(String resourceGroupName, String clusterName, * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return cluster details. + * @return the response. */ Cluster configureRemoteSupport(String resourceGroupName, String clusterName, RemoteSupportRequest remoteSupportRequest, Context context); diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/ComplianceAssignmentType.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/ComplianceAssignmentType.java index bb97b08713ed..a5e17590795c 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/ComplianceAssignmentType.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/ComplianceAssignmentType.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.models; @@ -12,12 +12,13 @@ */ public final class ComplianceAssignmentType extends ExpandableStringEnum { /** - * Static value Audit for ComplianceAssignmentType. + * Report on the state of the machine, but don't make changes. */ public static final ComplianceAssignmentType AUDIT = fromString("Audit"); /** - * Static value ApplyAndAutoCorrect for ComplianceAssignmentType. + * Applied to the machine. If it drifts, the local service inside the machine makes a correction at the next + * evaluation. */ public static final ComplianceAssignmentType APPLY_AND_AUTO_CORRECT = fromString("ApplyAndAutoCorrect"); diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/ComplianceStatus.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/ComplianceStatus.java index 96b3f164fd21..5d18286fbee0 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/ComplianceStatus.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/ComplianceStatus.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.models; @@ -12,17 +12,17 @@ */ public final class ComplianceStatus extends ExpandableStringEnum { /** - * Static value Compliant for ComplianceStatus. + * The resource is compliant. */ public static final ComplianceStatus COMPLIANT = fromString("Compliant"); /** - * Static value NonCompliant for ComplianceStatus. + * The resource is non-compliant. */ public static final ComplianceStatus NON_COMPLIANT = fromString("NonCompliant"); /** - * Static value Pending for ComplianceStatus. + * The resource compliance status is pending. */ public static final ComplianceStatus PENDING = fromString("Pending"); diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/ConnectivityStatus.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/ConnectivityStatus.java index ffab5014fd02..7708b0e82212 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/ConnectivityStatus.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/ConnectivityStatus.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.models; @@ -8,36 +8,37 @@ import java.util.Collection; /** - * Overall connectivity status for the cluster resource. + * Overall connectivity status for the cluster resource. Indicates whether the cluster is connected to Azure, partially + * connected, or has not recently communicated. */ public final class ConnectivityStatus extends ExpandableStringEnum { /** - * Static value NotYetRegistered for ConnectivityStatus. + * The cluster has not yet registered with Azure. */ public static final ConnectivityStatus NOT_YET_REGISTERED = fromString("NotYetRegistered"); /** - * Static value Connected for ConnectivityStatus. + * The cluster is fully connected to Azure. */ public static final ConnectivityStatus CONNECTED = fromString("Connected"); /** - * Static value NotConnectedRecently for ConnectivityStatus. + * The cluster has not connected to Azure recently. */ public static final ConnectivityStatus NOT_CONNECTED_RECENTLY = fromString("NotConnectedRecently"); /** - * Static value PartiallyConnected for ConnectivityStatus. + * Some components of the cluster are connected, while others are not. */ public static final ConnectivityStatus PARTIALLY_CONNECTED = fromString("PartiallyConnected"); /** - * Static value Disconnected for ConnectivityStatus. + * The cluster is not connected to Azure. */ public static final ConnectivityStatus DISCONNECTED = fromString("Disconnected"); /** - * Static value NotSpecified for ConnectivityStatus. + * The connectivity status is not specified. */ public static final ConnectivityStatus NOT_SPECIFIED = fromString("NotSpecified"); diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/DefaultExtensionDetails.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/DefaultExtensionDetails.java index 9b85e3f4587c..7420153b0d23 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/DefaultExtensionDetails.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/DefaultExtensionDetails.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.models; @@ -31,7 +31,7 @@ public final class DefaultExtensionDetails implements JsonSerializable scaleUnits) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (scaleUnits() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property scaleUnits in model DeploymentConfiguration")); - } else { - scaleUnits().forEach(e -> e.validate()); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(DeploymentConfiguration.class); - /** * {@inheritDoc} */ diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/DeploymentData.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/DeploymentData.java index 542a8a634388..4057f12e5b86 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/DeploymentData.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/DeploymentData.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.models; @@ -32,6 +32,11 @@ public final class DeploymentData implements JsonSerializable { */ private DeploymentCluster cluster; + /* + * Identity Provider for the cluster + */ + private IdentityProvider identityProvider; + /* * Storage config to deploy AzureStackHCI Cluster. */ @@ -67,13 +72,18 @@ public final class DeploymentData implements JsonSerializable { */ private SdnIntegration sdnIntegration; + /* + * Is Management Cluster, when true indicates that the cluster is used for managing other clusters + */ + private Boolean isManagementCluster; + /* * The path to the Active Directory Organizational Unit container object prepared for the deployment. */ private String adouPath; /* - * Azure keyvault endpoint. This property is deprecated from 2023-12-01-preview. Please use secrets property + * Azure key vault endpoint. This property is deprecated from 2023-12-01-preview. Please use secrets property * instead. */ private String secretsLocation; @@ -88,6 +98,16 @@ public final class DeploymentData implements JsonSerializable { */ private OptionalServices optionalServices; + /* + * Local Availability Zone information for HCI cluster + */ + private List localAvailabilityZones; + + /* + * Assembly Package details for Validated Solution Recipe for AzureStackHCI Cluster + */ + private AssemblyInfo assemblyInfo; + /** * Creates an instance of DeploymentData class. */ @@ -154,6 +174,26 @@ public DeploymentData withCluster(DeploymentCluster cluster) { return this; } + /** + * Get the identityProvider property: Identity Provider for the cluster. + * + * @return the identityProvider value. + */ + public IdentityProvider identityProvider() { + return this.identityProvider; + } + + /** + * Set the identityProvider property: Identity Provider for the cluster. + * + * @param identityProvider the identityProvider value to set. + * @return the DeploymentData object itself. + */ + public DeploymentData withIdentityProvider(IdentityProvider identityProvider) { + this.identityProvider = identityProvider; + return this; + } + /** * Get the storage property: Storage config to deploy AzureStackHCI Cluster. * @@ -294,6 +334,28 @@ public DeploymentData withSdnIntegration(SdnIntegration sdnIntegration) { return this; } + /** + * Get the isManagementCluster property: Is Management Cluster, when true indicates that the cluster is used for + * managing other clusters. + * + * @return the isManagementCluster value. + */ + public Boolean isManagementCluster() { + return this.isManagementCluster; + } + + /** + * Set the isManagementCluster property: Is Management Cluster, when true indicates that the cluster is used for + * managing other clusters. + * + * @param isManagementCluster the isManagementCluster value to set. + * @return the DeploymentData object itself. + */ + public DeploymentData withIsManagementCluster(Boolean isManagementCluster) { + this.isManagementCluster = isManagementCluster; + return this; + } + /** * Get the adouPath property: The path to the Active Directory Organizational Unit container object prepared for the * deployment. @@ -317,7 +379,7 @@ public DeploymentData withAdouPath(String adouPath) { } /** - * Get the secretsLocation property: Azure keyvault endpoint. This property is deprecated from 2023-12-01-preview. + * Get the secretsLocation property: Azure key vault endpoint. This property is deprecated from 2023-12-01-preview. * Please use secrets property instead. * * @return the secretsLocation value. @@ -327,7 +389,7 @@ public String secretsLocation() { } /** - * Set the secretsLocation property: Azure keyvault endpoint. This property is deprecated from 2023-12-01-preview. + * Set the secretsLocation property: Azure key vault endpoint. This property is deprecated from 2023-12-01-preview. * Please use secrets property instead. * * @param secretsLocation the secretsLocation value to set. @@ -379,41 +441,43 @@ public DeploymentData withOptionalServices(OptionalServices optionalServices) { } /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (securitySettings() != null) { - securitySettings().validate(); - } - if (observability() != null) { - observability().validate(); - } - if (cluster() != null) { - cluster().validate(); - } - if (storage() != null) { - storage().validate(); - } - if (infrastructureNetwork() != null) { - infrastructureNetwork().forEach(e -> e.validate()); - } - if (physicalNodes() != null) { - physicalNodes().forEach(e -> e.validate()); - } - if (hostNetwork() != null) { - hostNetwork().validate(); - } - if (sdnIntegration() != null) { - sdnIntegration().validate(); - } - if (secrets() != null) { - secrets().forEach(e -> e.validate()); - } - if (optionalServices() != null) { - optionalServices().validate(); - } + * Get the localAvailabilityZones property: Local Availability Zone information for HCI cluster. + * + * @return the localAvailabilityZones value. + */ + public List localAvailabilityZones() { + return this.localAvailabilityZones; + } + + /** + * Set the localAvailabilityZones property: Local Availability Zone information for HCI cluster. + * + * @param localAvailabilityZones the localAvailabilityZones value to set. + * @return the DeploymentData object itself. + */ + public DeploymentData withLocalAvailabilityZones(List localAvailabilityZones) { + this.localAvailabilityZones = localAvailabilityZones; + return this; + } + + /** + * Get the assemblyInfo property: Assembly Package details for Validated Solution Recipe for AzureStackHCI Cluster. + * + * @return the assemblyInfo value. + */ + public AssemblyInfo assemblyInfo() { + return this.assemblyInfo; + } + + /** + * Set the assemblyInfo property: Assembly Package details for Validated Solution Recipe for AzureStackHCI Cluster. + * + * @param assemblyInfo the assemblyInfo value to set. + * @return the DeploymentData object itself. + */ + public DeploymentData withAssemblyInfo(AssemblyInfo assemblyInfo) { + this.assemblyInfo = assemblyInfo; + return this; } /** @@ -425,6 +489,8 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeJsonField("securitySettings", this.securitySettings); jsonWriter.writeJsonField("observability", this.observability); jsonWriter.writeJsonField("cluster", this.cluster); + jsonWriter.writeStringField("identityProvider", + this.identityProvider == null ? null : this.identityProvider.toString()); jsonWriter.writeJsonField("storage", this.storage); jsonWriter.writeStringField("namingPrefix", this.namingPrefix); jsonWriter.writeStringField("domainFqdn", this.domainFqdn); @@ -433,10 +499,14 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeArrayField("physicalNodes", this.physicalNodes, (writer, element) -> writer.writeJson(element)); jsonWriter.writeJsonField("hostNetwork", this.hostNetwork); jsonWriter.writeJsonField("sdnIntegration", this.sdnIntegration); + jsonWriter.writeBooleanField("isManagementCluster", this.isManagementCluster); jsonWriter.writeStringField("adouPath", this.adouPath); jsonWriter.writeStringField("secretsLocation", this.secretsLocation); jsonWriter.writeArrayField("secrets", this.secrets, (writer, element) -> writer.writeJson(element)); jsonWriter.writeJsonField("optionalServices", this.optionalServices); + jsonWriter.writeArrayField("localAvailabilityZones", this.localAvailabilityZones, + (writer, element) -> writer.writeJson(element)); + jsonWriter.writeJsonField("assemblyInfo", this.assemblyInfo); return jsonWriter.writeEndObject(); } @@ -461,6 +531,8 @@ public static DeploymentData fromJson(JsonReader jsonReader) throws IOException deserializedDeploymentData.observability = Observability.fromJson(reader); } else if ("cluster".equals(fieldName)) { deserializedDeploymentData.cluster = DeploymentCluster.fromJson(reader); + } else if ("identityProvider".equals(fieldName)) { + deserializedDeploymentData.identityProvider = IdentityProvider.fromString(reader.getString()); } else if ("storage".equals(fieldName)) { deserializedDeploymentData.storage = Storage.fromJson(reader); } else if ("namingPrefix".equals(fieldName)) { @@ -478,6 +550,8 @@ public static DeploymentData fromJson(JsonReader jsonReader) throws IOException deserializedDeploymentData.hostNetwork = DeploymentSettingHostNetwork.fromJson(reader); } else if ("sdnIntegration".equals(fieldName)) { deserializedDeploymentData.sdnIntegration = SdnIntegration.fromJson(reader); + } else if ("isManagementCluster".equals(fieldName)) { + deserializedDeploymentData.isManagementCluster = reader.getNullable(JsonReader::getBoolean); } else if ("adouPath".equals(fieldName)) { deserializedDeploymentData.adouPath = reader.getString(); } else if ("secretsLocation".equals(fieldName)) { @@ -488,6 +562,12 @@ public static DeploymentData fromJson(JsonReader jsonReader) throws IOException deserializedDeploymentData.secrets = secrets; } else if ("optionalServices".equals(fieldName)) { deserializedDeploymentData.optionalServices = OptionalServices.fromJson(reader); + } else if ("localAvailabilityZones".equals(fieldName)) { + List localAvailabilityZones + = reader.readArray(reader1 -> LocalAvailabilityZones.fromJson(reader1)); + deserializedDeploymentData.localAvailabilityZones = localAvailabilityZones; + } else if ("assemblyInfo".equals(fieldName)) { + deserializedDeploymentData.assemblyInfo = AssemblyInfo.fromJson(reader); } else { reader.skipChildren(); } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/DeploymentMode.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/DeploymentMode.java index 16a9b1d81720..bcda709cc689 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/DeploymentMode.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/DeploymentMode.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.models; @@ -8,16 +8,16 @@ import java.util.Collection; /** - * The deployment mode of EnterpriseCloudEngine(ECE) action for a cluster. + * Deployment mode to trigger job. */ public final class DeploymentMode extends ExpandableStringEnum { /** - * Static value Validate for DeploymentMode. + * Validate ECE action deployment for a cluster. */ public static final DeploymentMode VALIDATE = fromString("Validate"); /** - * Static value Deploy for DeploymentMode. + * Deploy ECE action deployment for a cluster. */ public static final DeploymentMode DEPLOY = fromString("Deploy"); diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/DeploymentSecuritySettings.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/DeploymentSecuritySettings.java index 6980daa95a3f..c8cf6ebf6423 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/DeploymentSecuritySettings.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/DeploymentSecuritySettings.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.models; @@ -287,14 +287,6 @@ public DeploymentSecuritySettings withWdacEnforced(Boolean wdacEnforced) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/DeploymentSetting.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/DeploymentSetting.java index 7604f9b90c2d..4840e4372f1d 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/DeploymentSetting.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/DeploymentSetting.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.models; diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/DeploymentSettingAdapterPropertyOverrides.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/DeploymentSettingAdapterPropertyOverrides.java index e906f7950cfe..d39c2dc81909 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/DeploymentSettingAdapterPropertyOverrides.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/DeploymentSettingAdapterPropertyOverrides.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.models; @@ -107,14 +107,6 @@ public DeploymentSettingAdapterPropertyOverrides withNetworkDirectTechnology(Str return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/DeploymentSettingHostNetwork.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/DeploymentSettingHostNetwork.java index d7290c5d99f0..a09db8e0131b 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/DeploymentSettingHostNetwork.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/DeploymentSettingHostNetwork.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.models; @@ -133,20 +133,6 @@ public DeploymentSettingHostNetwork withEnableStorageAutoIp(Boolean enableStorag return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (intents() != null) { - intents().forEach(e -> e.validate()); - } - if (storageNetworks() != null) { - storageNetworks().forEach(e -> e.validate()); - } - } - /** * {@inheritDoc} */ diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/DeploymentSettingIntents.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/DeploymentSettingIntents.java index ea452bc49fe2..4a2cb74b2cb2 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/DeploymentSettingIntents.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/DeploymentSettingIntents.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.models; @@ -261,23 +261,6 @@ public DeploymentSettingAdapterPropertyOverrides adapterPropertyOverrides() { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (virtualSwitchConfigurationOverrides() != null) { - virtualSwitchConfigurationOverrides().validate(); - } - if (qosPolicyOverrides() != null) { - qosPolicyOverrides().validate(); - } - if (adapterPropertyOverrides() != null) { - adapterPropertyOverrides().validate(); - } - } - /** * {@inheritDoc} */ diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/DeploymentSettingStorageAdapterIpInfo.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/DeploymentSettingStorageAdapterIpInfo.java index dc10edec4c2e..234e214ccf09 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/DeploymentSettingStorageAdapterIpInfo.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/DeploymentSettingStorageAdapterIpInfo.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.models; @@ -102,14 +102,6 @@ public DeploymentSettingStorageAdapterIpInfo withSubnetMask(String subnetMask) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/DeploymentSettingStorageNetworks.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/DeploymentSettingStorageNetworks.java index 40276457bf2d..e22d8c2aa2d4 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/DeploymentSettingStorageNetworks.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/DeploymentSettingStorageNetworks.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.models; @@ -129,17 +129,6 @@ public List storageAdapterIpInfo() { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (storageAdapterIpInfo() != null) { - storageAdapterIpInfo().forEach(e -> e.validate()); - } - } - /** * {@inheritDoc} */ diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/DeploymentSettingVirtualSwitchConfigurationOverrides.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/DeploymentSettingVirtualSwitchConfigurationOverrides.java index 7c7ce2850d03..68c4ca89ced3 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/DeploymentSettingVirtualSwitchConfigurationOverrides.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/DeploymentSettingVirtualSwitchConfigurationOverrides.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.models; @@ -74,14 +74,6 @@ public String loadBalancingAlgorithm() { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/DeploymentSettings.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/DeploymentSettings.java index 9d1728609363..053dd5a8f1b3 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/DeploymentSettings.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/DeploymentSettings.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.models; @@ -13,82 +13,82 @@ */ public interface DeploymentSettings { /** - * List DeploymentSetting resources by Clusters. + * Get a DeploymentSetting. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. + * @param deploymentSettingsName Name of Deployment Setting. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a DeploymentSetting list operation as paginated response with {@link PagedIterable}. + * @return a DeploymentSetting along with {@link Response}. */ - PagedIterable listByClusters(String resourceGroupName, String clusterName); + Response getWithResponse(String resourceGroupName, String clusterName, + String deploymentSettingsName, Context context); /** - * List DeploymentSetting resources by Clusters. + * Get a DeploymentSetting. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. - * @param context The context to associate with this operation. + * @param deploymentSettingsName Name of Deployment Setting. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a DeploymentSetting list operation as paginated response with {@link PagedIterable}. + * @return a DeploymentSetting. */ - PagedIterable listByClusters(String resourceGroupName, String clusterName, Context context); + DeploymentSetting get(String resourceGroupName, String clusterName, String deploymentSettingsName); /** - * Get a DeploymentSetting. + * Delete a DeploymentSetting. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param deploymentSettingsName Name of Deployment Setting. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a DeploymentSetting along with {@link Response}. */ - Response getWithResponse(String resourceGroupName, String clusterName, - String deploymentSettingsName, Context context); + void delete(String resourceGroupName, String clusterName, String deploymentSettingsName); /** - * Get a DeploymentSetting. + * Delete a DeploymentSetting. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param deploymentSettingsName Name of Deployment Setting. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a DeploymentSetting. */ - DeploymentSetting get(String resourceGroupName, String clusterName, String deploymentSettingsName); + void delete(String resourceGroupName, String clusterName, String deploymentSettingsName, Context context); /** - * Delete a DeploymentSetting. + * List DeploymentSetting resources by Clusters. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. - * @param deploymentSettingsName Name of Deployment Setting. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a DeploymentSetting list operation as paginated response with {@link PagedIterable}. */ - void delete(String resourceGroupName, String clusterName, String deploymentSettingsName); + PagedIterable listByClusters(String resourceGroupName, String clusterName); /** - * Delete a DeploymentSetting. + * List DeploymentSetting resources by Clusters. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. - * @param deploymentSettingsName Name of Deployment Setting. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a DeploymentSetting list operation as paginated response with {@link PagedIterable}. */ - void delete(String resourceGroupName, String clusterName, String deploymentSettingsName, Context context); + PagedIterable listByClusters(String resourceGroupName, String clusterName, Context context); /** * Get a DeploymentSetting. diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/DeploymentStep.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/DeploymentStep.java index 974bc57fe0f4..c0391434d095 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/DeploymentStep.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/DeploymentStep.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.models; @@ -60,7 +60,7 @@ public final class DeploymentStep implements JsonSerializable { /** * Creates an instance of DeploymentStep class. */ - public DeploymentStep() { + private DeploymentStep() { } /** @@ -135,17 +135,6 @@ public List exception() { return this.exception; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (steps() != null) { - steps().forEach(e -> e.validate()); - } - } - /** * {@inheritDoc} */ diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/DeviceConfiguration.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/DeviceConfiguration.java index 7d16e34e96ca..85977b2a2289 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/DeviceConfiguration.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/DeviceConfiguration.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.models; @@ -73,17 +73,6 @@ public DeviceConfiguration withDeviceMetadata(String deviceMetadata) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (nicDetails() != null) { - nicDetails().forEach(e -> e.validate()); - } - } - /** * {@inheritDoc} */ diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/DeviceKind.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/DeviceKind.java index abac8012b799..a978baa570ab 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/DeviceKind.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/DeviceKind.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.models; @@ -12,7 +12,7 @@ */ public final class DeviceKind extends ExpandableStringEnum { /** - * Static value HCI for DeviceKind. + * Arc-enabled edge device with HCI OS. */ public static final DeviceKind HCI = fromString("HCI"); diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/DeviceLogCollectionStatus.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/DeviceLogCollectionStatus.java new file mode 100644 index 000000000000..a87f470f228e --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/DeviceLogCollectionStatus.java @@ -0,0 +1,66 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.azurestackhci.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Represents the status of a log collection operation. + */ +public final class DeviceLogCollectionStatus extends ExpandableStringEnum { + /** + * Log collection operation has not been initiated. + */ + public static final DeviceLogCollectionStatus NOT_STARTED = fromString("NotStarted"); + + /** + * Indicates that the log collection operation is currently running. + */ + public static final DeviceLogCollectionStatus RUNNING = fromString("Running"); + + /** + * Indicates that the log collection operation has failed. + */ + public static final DeviceLogCollectionStatus FAILED = fromString("Failed"); + + /** + * Indicates that the log collection operation has completed successfully. + */ + public static final DeviceLogCollectionStatus SUCCEEDED = fromString("Succeeded"); + + /** + * Indicates that the log collection operation has completed successfully. + */ + public static final DeviceLogCollectionStatus CANCELED = fromString("Canceled"); + + /** + * Creates a new instance of DeviceLogCollectionStatus value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public DeviceLogCollectionStatus() { + } + + /** + * Creates or finds a DeviceLogCollectionStatus from its string representation. + * + * @param name a name to look for. + * @return the corresponding DeviceLogCollectionStatus. + */ + public static DeviceLogCollectionStatus fromString(String name) { + return fromString(name, DeviceLogCollectionStatus.class); + } + + /** + * Gets known DeviceLogCollectionStatus values. + * + * @return known DeviceLogCollectionStatus values. + */ + public static Collection values() { + return values(DeviceLogCollectionStatus.class); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/DeviceState.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/DeviceState.java index d44e61e86584..744e0c1ce6ee 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/DeviceState.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/DeviceState.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.models; @@ -12,42 +12,42 @@ */ public final class DeviceState extends ExpandableStringEnum { /** - * Static value NotSpecified for DeviceState. + * The edge device state is not specified. */ public static final DeviceState NOT_SPECIFIED = fromString("NotSpecified"); /** - * Static value Connected for DeviceState. + * The edge device state is in connected state. */ public static final DeviceState CONNECTED = fromString("Connected"); /** - * Static value Disconnected for DeviceState. + * The edge device state is in disconnected state. */ public static final DeviceState DISCONNECTED = fromString("Disconnected"); /** - * Static value Repairing for DeviceState. + * The edge device state is in repairing state. */ public static final DeviceState REPAIRING = fromString("Repairing"); /** - * Static value Draining for DeviceState. + * The edge device state is in draining state. */ public static final DeviceState DRAINING = fromString("Draining"); /** - * Static value InMaintenance for DeviceState. + * The edge device state is in maintenance state. */ public static final DeviceState IN_MAINTENANCE = fromString("InMaintenance"); /** - * Static value Resuming for DeviceState. + * The edge device state is in resuming state. */ public static final DeviceState RESUMING = fromString("Resuming"); /** - * Static value Processing for DeviceState. + * The edge device state is in processing state. */ public static final DeviceState PROCESSING = fromString("Processing"); diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/DiagnosticLevel.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/DiagnosticLevel.java index 732cf139f997..da71ebaf1bd9 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/DiagnosticLevel.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/DiagnosticLevel.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.models; @@ -12,17 +12,17 @@ */ public final class DiagnosticLevel extends ExpandableStringEnum { /** - * Static value Off for DiagnosticLevel. + * No diagnostic data will be emitted. */ public static final DiagnosticLevel OFF = fromString("Off"); /** - * Static value Basic for DiagnosticLevel. + * Basic diagnostic data will be emitted, including essential health metrics. */ public static final DiagnosticLevel BASIC = fromString("Basic"); /** - * Static value Enhanced for DiagnosticLevel. + * Enhanced diagnostic data will be emitted, including detailed performance and usage metrics. */ public static final DiagnosticLevel ENHANCED = fromString("Enhanced"); diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/DnsServerConfig.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/DnsServerConfig.java new file mode 100644 index 000000000000..dd3a9aa5c5dc --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/DnsServerConfig.java @@ -0,0 +1,52 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.azurestackhci.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Specifies how DNS servers are configured for the infrastructure network. Allowed values are 'UseDnsServer' to use the + * provided DNS servers, and 'UseForwarder' to use DNS forwarders. + */ +public final class DnsServerConfig extends ExpandableStringEnum { + /** + * Use the provided DNS servers for the infrastructure network. + */ + public static final DnsServerConfig USE_DNS_SERVER = fromString("UseDnsServer"); + + /** + * Use DNS forwarders for the infrastructure network. + */ + public static final DnsServerConfig USE_FORWARDER = fromString("UseForwarder"); + + /** + * Creates a new instance of DnsServerConfig value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public DnsServerConfig() { + } + + /** + * Creates or finds a DnsServerConfig from its string representation. + * + * @param name a name to look for. + * @return the corresponding DnsServerConfig. + */ + public static DnsServerConfig fromString(String name) { + return fromString(name, DnsServerConfig.class); + } + + /** + * Gets known DnsServerConfig values. + * + * @return known DnsServerConfig values. + */ + public static Collection values() { + return values(DnsServerConfig.class); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/DnsZones.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/DnsZones.java new file mode 100644 index 000000000000..157e44bc2881 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/DnsZones.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.azurestackhci.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.List; + +/** + * Details of the DNS Zones to be configured. + */ +@Fluent +public final class DnsZones implements JsonSerializable { + /* + * Name of the DNS Zone to be configured. + */ + private String dnsZoneName; + + /* + * Forwarder details of the DNS Zone to be configured. + */ + private List dnsForwarder; + + /** + * Creates an instance of DnsZones class. + */ + public DnsZones() { + } + + /** + * Get the dnsZoneName property: Name of the DNS Zone to be configured. + * + * @return the dnsZoneName value. + */ + public String dnsZoneName() { + return this.dnsZoneName; + } + + /** + * Set the dnsZoneName property: Name of the DNS Zone to be configured. + * + * @param dnsZoneName the dnsZoneName value to set. + * @return the DnsZones object itself. + */ + public DnsZones withDnsZoneName(String dnsZoneName) { + this.dnsZoneName = dnsZoneName; + return this; + } + + /** + * Get the dnsForwarder property: Forwarder details of the DNS Zone to be configured. + * + * @return the dnsForwarder value. + */ + public List dnsForwarder() { + return this.dnsForwarder; + } + + /** + * Set the dnsForwarder property: Forwarder details of the DNS Zone to be configured. + * + * @param dnsForwarder the dnsForwarder value to set. + * @return the DnsZones object itself. + */ + public DnsZones withDnsForwarder(List dnsForwarder) { + this.dnsForwarder = dnsForwarder; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("dnsZoneName", this.dnsZoneName); + jsonWriter.writeArrayField("dnsForwarder", this.dnsForwarder, (writer, element) -> writer.writeString(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of DnsZones from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of DnsZones 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 DnsZones. + */ + public static DnsZones fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + DnsZones deserializedDnsZones = new DnsZones(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("dnsZoneName".equals(fieldName)) { + deserializedDnsZones.dnsZoneName = reader.getString(); + } else if ("dnsForwarder".equals(fieldName)) { + List dnsForwarder = reader.readArray(reader1 -> reader1.getString()); + deserializedDnsZones.dnsForwarder = dnsForwarder; + } else { + reader.skipChildren(); + } + } + + return deserializedDnsZones; + }); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/EceActionStatus.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/EceActionStatus.java index 312a18a55dcd..0b683e10d74b 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/EceActionStatus.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/EceActionStatus.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.models; @@ -30,7 +30,7 @@ public final class EceActionStatus implements JsonSerializable /** * Creates an instance of EceActionStatus class. */ - public EceActionStatus() { + private EceActionStatus() { } /** @@ -51,17 +51,6 @@ public List steps() { return this.steps; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (steps() != null) { - steps().forEach(e -> e.validate()); - } - } - /** * {@inheritDoc} */ diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/EceDeploymentSecrets.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/EceDeploymentSecrets.java index f1d95ce710ee..02b322787c59 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/EceDeploymentSecrets.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/EceDeploymentSecrets.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.models; @@ -97,14 +97,6 @@ public EceDeploymentSecrets withSecretLocation(String secretLocation) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/EceReportedProperties.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/EceReportedProperties.java index 85698ddb5770..d917f9ee46b9 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/EceReportedProperties.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/EceReportedProperties.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.models; @@ -29,7 +29,7 @@ public final class EceReportedProperties implements JsonSerializable { /** - * Static value AzureStackLCMUserCredential for EceSecrets. + * AzureStackLCMUserCredential used for LCM operations for AzureStackHCI cluster. */ public static final EceSecrets AZURE_STACK_LCMUSER_CREDENTIAL = fromString("AzureStackLCMUserCredential"); /** - * Static value DefaultARBApplication for EceSecrets. + * DefaultARBApplication used to manage Azure Arc resource bridge (ARB) for AzureStackHCI cluster. */ public static final EceSecrets DEFAULT_ARBAPPLICATION = fromString("DefaultARBApplication"); /** - * Static value LocalAdminCredential for EceSecrets. + * LocalAdminCredential used for admin operations for AzureStackHCI cluster. */ public static final EceSecrets LOCAL_ADMIN_CREDENTIAL = fromString("LocalAdminCredential"); /** - * Static value WitnessStorageKey for EceSecrets. + * WitnessStorageKey used for setting up a cloud witness for AzureStackHCI cluster. */ public static final EceSecrets WITNESS_STORAGE_KEY = fromString("WitnessStorageKey"); diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/EdgeDevice.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/EdgeDevice.java index 2a465117debe..e99b4cf4abfa 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/EdgeDevice.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/EdgeDevice.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.models; @@ -33,7 +33,9 @@ public interface EdgeDevice { String type(); /** - * Gets the kind property: Device kind to support polymorphic resource. + * Gets the kind property: Metadata used by portal/tooling/etc to render different UX experiences for resources of + * the same type; e.g. ApiApps are a kind of Microsoft.Web/sites type. If supported, the resource provider must + * validate and persist this value. * * @return the kind value. */ diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/EdgeDeviceJob.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/EdgeDeviceJob.java new file mode 100644 index 000000000000..7c134b286315 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/EdgeDeviceJob.java @@ -0,0 +1,57 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.azurestackhci.models; + +import com.azure.core.management.SystemData; +import com.azure.resourcemanager.azurestackhci.fluent.models.EdgeDeviceJobInner; + +/** + * An immutable client-side representation of EdgeDeviceJob. + */ +public interface EdgeDeviceJob { + /** + * Gets the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + String id(); + + /** + * Gets the name property: The name of the resource. + * + * @return the name value. + */ + String name(); + + /** + * Gets the type property: The type of the resource. + * + * @return the type value. + */ + String type(); + + /** + * Gets the kind property: Metadata used by portal/tooling/etc to render different UX experiences for resources of + * the same type; e.g. ApiApps are a kind of Microsoft.Web/sites type. If supported, the resource provider must + * validate and persist this value. + * + * @return the kind value. + */ + EdgeDeviceKind kind(); + + /** + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + SystemData systemData(); + + /** + * Gets the inner com.azure.resourcemanager.azurestackhci.fluent.models.EdgeDeviceJobInner object. + * + * @return the inner object. + */ + EdgeDeviceJobInner innerModel(); +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/EdgeDeviceJobs.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/EdgeDeviceJobs.java new file mode 100644 index 000000000000..a94f4d9531a6 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/EdgeDeviceJobs.java @@ -0,0 +1,124 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.azurestackhci.models; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; +import com.azure.resourcemanager.azurestackhci.fluent.models.EdgeDeviceJobInner; + +/** + * Resource collection API of EdgeDeviceJobs. + */ +public interface EdgeDeviceJobs { + /** + * Get a EdgeDeviceJob. + * + * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. + * @param edgeDeviceName Name of Device. + * @param jobsName Name of EdgeDevice Job. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a EdgeDeviceJob along with {@link Response}. + */ + Response getWithResponse(String resourceUri, String edgeDeviceName, String jobsName, + Context context); + + /** + * Get a EdgeDeviceJob. + * + * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. + * @param edgeDeviceName Name of Device. + * @param jobsName Name of EdgeDevice Job. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a EdgeDeviceJob. + */ + EdgeDeviceJob get(String resourceUri, String edgeDeviceName, String jobsName); + + /** + * Create a EdgeDeviceJob. + * + * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. + * @param edgeDeviceName Name of Device. + * @param jobsName Name of EdgeDevice Job. + * @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 edgeDevice Jobs resource. + */ + EdgeDeviceJob createOrUpdate(String resourceUri, String edgeDeviceName, String jobsName, + EdgeDeviceJobInner resource); + + /** + * Create a EdgeDeviceJob. + * + * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. + * @param edgeDeviceName Name of Device. + * @param jobsName Name of EdgeDevice Job. + * @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 edgeDevice Jobs resource. + */ + EdgeDeviceJob createOrUpdate(String resourceUri, String edgeDeviceName, String jobsName, + EdgeDeviceJobInner resource, Context context); + + /** + * Delete a EdgeDeviceJob. + * + * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. + * @param edgeDeviceName Name of Device. + * @param jobsName Name of EdgeDevice Job. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void delete(String resourceUri, String edgeDeviceName, String jobsName); + + /** + * Delete a EdgeDeviceJob. + * + * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. + * @param edgeDeviceName Name of Device. + * @param jobsName Name of EdgeDevice Job. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void delete(String resourceUri, String edgeDeviceName, String jobsName, Context context); + + /** + * List EdgeDeviceJob resources by EdgeDevice. + * + * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. + * @param edgeDeviceName Name of Device. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a EdgeDeviceJob list operation as paginated response with {@link PagedIterable}. + */ + PagedIterable listByEdgeDevice(String resourceUri, String edgeDeviceName); + + /** + * List EdgeDeviceJob resources by EdgeDevice. + * + * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. + * @param edgeDeviceName Name of Device. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a EdgeDeviceJob list operation as paginated response with {@link PagedIterable}. + */ + PagedIterable listByEdgeDevice(String resourceUri, String edgeDeviceName, Context context); +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/EdgeDeviceKind.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/EdgeDeviceKind.java new file mode 100644 index 000000000000..39137170fd51 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/EdgeDeviceKind.java @@ -0,0 +1,46 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.azurestackhci.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Edge device kind. + */ +public final class EdgeDeviceKind extends ExpandableStringEnum { + /** + * Arc-enabled edge device with HCI OS. + */ + public static final EdgeDeviceKind HCI = fromString("HCI"); + + /** + * Creates a new instance of EdgeDeviceKind value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public EdgeDeviceKind() { + } + + /** + * Creates or finds a EdgeDeviceKind from its string representation. + * + * @param name a name to look for. + * @return the corresponding EdgeDeviceKind. + */ + public static EdgeDeviceKind fromString(String name) { + return fromString(name, EdgeDeviceKind.class); + } + + /** + * Gets known EdgeDeviceKind values. + * + * @return known EdgeDeviceKind values. + */ + public static Collection values() { + return values(EdgeDeviceKind.class); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/EdgeDeviceProperties.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/EdgeDeviceProperties.java index cac657831a4b..effddb6c4fe1 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/EdgeDeviceProperties.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/EdgeDeviceProperties.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.models; @@ -72,17 +72,6 @@ EdgeDeviceProperties withProvisioningState(ProvisioningState provisioningState) return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (deviceConfiguration() != null) { - deviceConfiguration().validate(); - } - } - /** * {@inheritDoc} */ diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/EdgeDevices.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/EdgeDevices.java index f433de19d1ea..c8d92356d29a 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/EdgeDevices.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/EdgeDevices.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.models; @@ -13,29 +13,6 @@ * Resource collection API of EdgeDevices. */ public interface EdgeDevices { - /** - * List EdgeDevice resources by parent. - * - * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a EdgeDevice list operation as paginated response with {@link PagedIterable}. - */ - PagedIterable list(String resourceUri); - - /** - * List EdgeDevice resources by parent. - * - * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a EdgeDevice list operation as paginated response with {@link PagedIterable}. - */ - PagedIterable list(String resourceUri, Context context); - /** * Get a EdgeDevice. * @@ -111,6 +88,29 @@ public interface EdgeDevices { */ void delete(String resourceUri, String edgeDeviceName, Context context); + /** + * List EdgeDevice resources by parent. + * + * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a EdgeDevice list operation as paginated response with {@link PagedIterable}. + */ + PagedIterable list(String resourceUri); + + /** + * List EdgeDevice resources by parent. + * + * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a EdgeDevice list operation as paginated response with {@link PagedIterable}. + */ + PagedIterable list(String resourceUri, Context context); + /** * A long-running resource action. * @@ -120,7 +120,7 @@ public interface EdgeDevices { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an Accepted response with an Operation-Location header. + * @return the response. */ ValidateResponse validate(String resourceUri, String edgeDeviceName, ValidateRequest validateRequest); @@ -134,7 +134,7 @@ public interface EdgeDevices { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an Accepted response with an Operation-Location header. + * @return the response. */ ValidateResponse validate(String resourceUri, String edgeDeviceName, ValidateRequest validateRequest, Context context); diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/Extension.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/Extension.java index f119781d3f1d..026c7cbb1801 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/Extension.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/Extension.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.models; @@ -42,14 +42,17 @@ public interface Extension { SystemData systemData(); /** - * Gets the provisioningState property: Provisioning state of the Extension proxy resource. + * Gets the provisioningState property: Provisioning state of the Extension proxy resource. Indicates the current + * lifecycle status of the resource, such as whether it's being created, updated, deleted, or has encountered an + * error. * * @return the provisioningState value. */ ProvisioningState provisioningState(); /** - * Gets the aggregateState property: Aggregate state of Arc Extensions across the nodes in this HCI cluster. + * Gets the aggregateState property: Aggregate state of Arc Extensions across the nodes in this HCI cluster. This + * reflects the overall status of the extension deployment and operation across all nodes. * * @return the aggregateState value. */ @@ -63,7 +66,8 @@ public interface Extension { List perNodeExtensionDetails(); /** - * Gets the managedBy property: Indicates if the extension is managed by azure or the user. + * Gets the managedBy property: Indicates if the extension is managed by Azure or the user. This determines who + * controls the deployment and lifecycle of the extension. * * @return the managedBy value. */ diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/ExtensionAggregateState.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/ExtensionAggregateState.java index 93c6cefe6ec2..6a369f9d7a82 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/ExtensionAggregateState.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/ExtensionAggregateState.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.models; @@ -8,96 +8,97 @@ import java.util.Collection; /** - * Aggregate state of Arc Extensions across the nodes in this HCI cluster. + * Aggregate state of Arc Extensions across the nodes in this HCI cluster. This reflects the overall status of the + * extension deployment and operation across all nodes. */ public final class ExtensionAggregateState extends ExpandableStringEnum { /** - * Static value NotSpecified for ExtensionAggregateState. + * The aggregate state is not specified. */ public static final ExtensionAggregateState NOT_SPECIFIED = fromString("NotSpecified"); /** - * Static value Error for ExtensionAggregateState. + * An error occurred in the aggregate state. */ public static final ExtensionAggregateState ERROR = fromString("Error"); /** - * Static value Succeeded for ExtensionAggregateState. + * The operation succeeded across all nodes. */ public static final ExtensionAggregateState SUCCEEDED = fromString("Succeeded"); /** - * Static value Canceled for ExtensionAggregateState. + * The operation was canceled across the nodes. */ public static final ExtensionAggregateState CANCELED = fromString("Canceled"); /** - * Static value Failed for ExtensionAggregateState. + * The operation failed on all or most nodes. */ public static final ExtensionAggregateState FAILED = fromString("Failed"); /** - * Static value Connected for ExtensionAggregateState. + * All nodes are connected. */ public static final ExtensionAggregateState CONNECTED = fromString("Connected"); /** - * Static value Disconnected for ExtensionAggregateState. + * All nodes are disconnected. */ public static final ExtensionAggregateState DISCONNECTED = fromString("Disconnected"); /** - * Static value Deleted for ExtensionAggregateState. + * The extension has been deleted from all nodes. */ public static final ExtensionAggregateState DELETED = fromString("Deleted"); /** - * Static value Creating for ExtensionAggregateState. + * The extension is being created across the nodes. */ public static final ExtensionAggregateState CREATING = fromString("Creating"); /** - * Static value Updating for ExtensionAggregateState. + * The extension is being updated across the nodes. */ public static final ExtensionAggregateState UPDATING = fromString("Updating"); /** - * Static value Deleting for ExtensionAggregateState. + * The extension is being deleted across the nodes. */ public static final ExtensionAggregateState DELETING = fromString("Deleting"); /** - * Static value Moving for ExtensionAggregateState. + * The extension is being moved across the nodes. */ public static final ExtensionAggregateState MOVING = fromString("Moving"); /** - * Static value PartiallySucceeded for ExtensionAggregateState. + * The operation succeeded on some nodes. */ public static final ExtensionAggregateState PARTIALLY_SUCCEEDED = fromString("PartiallySucceeded"); /** - * Static value PartiallyConnected for ExtensionAggregateState. + * Some nodes are connected, others are not. */ public static final ExtensionAggregateState PARTIALLY_CONNECTED = fromString("PartiallyConnected"); /** - * Static value InProgress for ExtensionAggregateState. + * The operation is currently in progress across the nodes. */ public static final ExtensionAggregateState IN_PROGRESS = fromString("InProgress"); /** - * Static value Accepted for ExtensionAggregateState. + * The operation has been accepted and is pending execution. */ public static final ExtensionAggregateState ACCEPTED = fromString("Accepted"); /** - * Static value Provisioning for ExtensionAggregateState. + * The extension is currently being provisioned across the nodes. */ public static final ExtensionAggregateState PROVISIONING = fromString("Provisioning"); /** - * Static value UpgradeFailedRollbackSucceeded for ExtensionAggregateState. + * Extension upgrade failed, but rollback succeeded across the nodes. */ public static final ExtensionAggregateState UPGRADE_FAILED_ROLLBACK_SUCCEEDED = fromString("UpgradeFailedRollbackSucceeded"); diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/ExtensionInstanceView.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/ExtensionInstanceView.java index f0c46efa3b94..d5384f927183 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/ExtensionInstanceView.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/ExtensionInstanceView.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -14,7 +14,7 @@ /** * Describes the Extension Instance View. */ -@Fluent +@Immutable public final class ExtensionInstanceView implements JsonSerializable { /* * The extension name. @@ -39,7 +39,7 @@ public final class ExtensionInstanceView implements JsonSerializable { /* * The status code. @@ -25,7 +25,7 @@ public final class ExtensionInstanceViewStatus implements JsonSerializable { /** - * Static value User for ExtensionManagedBy. + * The extension is managed by the user. */ public static final ExtensionManagedBy USER = fromString("User"); /** - * Static value Azure for ExtensionManagedBy. + * The extension is managed by Azure. */ public static final ExtensionManagedBy AZURE = fromString("Azure"); diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/ExtensionPatch.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/ExtensionPatch.java index 969c7b634d97..06fcb4b90714 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/ExtensionPatch.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/ExtensionPatch.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.models; @@ -60,17 +60,6 @@ public ExtensionPatch withExtensionParameters(ExtensionPatchParameters extension return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (innerProperties() != null) { - innerProperties().validate(); - } - } - /** * {@inheritDoc} */ diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/ExtensionPatchParameters.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/ExtensionPatchParameters.java index 5dd7da164a1e..a27f5894b858 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/ExtensionPatchParameters.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/ExtensionPatchParameters.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.models; @@ -127,14 +127,6 @@ public ExtensionPatchParameters withProtectedSettings(Object protectedSettings) return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ @@ -143,8 +135,12 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); jsonWriter.writeStringField("typeHandlerVersion", this.typeHandlerVersion); jsonWriter.writeBooleanField("enableAutomaticUpgrade", this.enableAutomaticUpgrade); - jsonWriter.writeUntypedField("settings", this.settings); - jsonWriter.writeUntypedField("protectedSettings", this.protectedSettings); + if (this.settings != null) { + jsonWriter.writeUntypedField("settings", this.settings); + } + if (this.protectedSettings != null) { + jsonWriter.writeUntypedField("protectedSettings", this.protectedSettings); + } return jsonWriter.writeEndObject(); } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/ExtensionProfile.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/ExtensionProfile.java index fbc49dfd74d6..9cd489d3bf16 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/ExtensionProfile.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/ExtensionProfile.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.models; @@ -25,7 +25,7 @@ public final class ExtensionProfile implements JsonSerializable extensions() { return this.extensions; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (extensions() != null) { - extensions().forEach(e -> e.validate()); - } - } - /** * {@inheritDoc} */ diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/ExtensionUpgradeParameters.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/ExtensionUpgradeParameters.java index 62a1d098a2b8..f689fbdf5035 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/ExtensionUpgradeParameters.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/ExtensionUpgradeParameters.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.models; @@ -47,14 +47,6 @@ public ExtensionUpgradeParameters withTargetVersion(String targetVersion) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/Extensions.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/Extensions.java index 1b682bec8ee8..b3dc464d0291 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/Extensions.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/Extensions.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.models; @@ -13,89 +13,89 @@ */ public interface Extensions { /** - * List all Extensions under ArcSetting resource. + * Get particular Arc Extension of HCI Cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param arcSettingName The name of the proxy resource holding details of HCI ArcSetting information. + * @param extensionName The name of the machine extension. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of Extensions in HCI cluster as paginated response with {@link PagedIterable}. + * @return particular Arc Extension of HCI Cluster along with {@link Response}. */ - PagedIterable listByArcSetting(String resourceGroupName, String clusterName, String arcSettingName); + Response getWithResponse(String resourceGroupName, String clusterName, String arcSettingName, + String extensionName, Context context); /** - * List all Extensions under ArcSetting resource. + * Get particular Arc Extension of HCI Cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param arcSettingName The name of the proxy resource holding details of HCI ArcSetting information. - * @param context The context to associate with this operation. + * @param extensionName The name of the machine extension. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of Extensions in HCI cluster as paginated response with {@link PagedIterable}. + * @return particular Arc Extension of HCI Cluster. */ - PagedIterable listByArcSetting(String resourceGroupName, String clusterName, String arcSettingName, - Context context); + Extension get(String resourceGroupName, String clusterName, String arcSettingName, String extensionName); /** - * Get particular Arc Extension of HCI Cluster. + * Delete particular Arc Extension of HCI Cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param arcSettingName The name of the proxy resource holding details of HCI ArcSetting information. * @param extensionName The name of the machine extension. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return particular Arc Extension of HCI Cluster along with {@link Response}. */ - Response getWithResponse(String resourceGroupName, String clusterName, String arcSettingName, - String extensionName, Context context); + void delete(String resourceGroupName, String clusterName, String arcSettingName, String extensionName); /** - * Get particular Arc Extension of HCI Cluster. + * Delete particular Arc Extension of HCI Cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param arcSettingName The name of the proxy resource holding details of HCI ArcSetting information. * @param extensionName The name of the machine extension. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return particular Arc Extension of HCI Cluster. */ - Extension get(String resourceGroupName, String clusterName, String arcSettingName, String extensionName); + void delete(String resourceGroupName, String clusterName, String arcSettingName, String extensionName, + Context context); /** - * Delete particular Arc Extension of HCI Cluster. + * List all Extensions under ArcSetting resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param arcSettingName The name of the proxy resource holding details of HCI ArcSetting information. - * @param extensionName The name of the machine extension. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of Extensions in HCI cluster as paginated response with {@link PagedIterable}. */ - void delete(String resourceGroupName, String clusterName, String arcSettingName, String extensionName); + PagedIterable listByArcSetting(String resourceGroupName, String clusterName, String arcSettingName); /** - * Delete particular Arc Extension of HCI Cluster. + * List all Extensions under ArcSetting resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param arcSettingName The name of the proxy resource holding details of HCI ArcSetting information. - * @param extensionName The name of the machine extension. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of Extensions in HCI cluster as paginated response with {@link PagedIterable}. */ - void delete(String resourceGroupName, String clusterName, String arcSettingName, String extensionName, + PagedIterable listByArcSetting(String resourceGroupName, String clusterName, String arcSettingName, Context context); /** diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/HardwareClass.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/HardwareClass.java new file mode 100644 index 000000000000..967c9e05f10d --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/HardwareClass.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.azurestackhci.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Hardware class of the cluster. + */ +public final class HardwareClass extends ExpandableStringEnum { + /** + * The hardware class is small. + */ + public static final HardwareClass SMALL = fromString("Small"); + + /** + * The hardware class is medium. This corresponds to the default. + */ + public static final HardwareClass MEDIUM = fromString("Medium"); + + /** + * The hardware class is large. + */ + public static final HardwareClass LARGE = fromString("Large"); + + /** + * Creates a new instance of HardwareClass value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public HardwareClass() { + } + + /** + * Creates or finds a HardwareClass from its string representation. + * + * @param name a name to look for. + * @return the corresponding HardwareClass. + */ + public static HardwareClass fromString(String name) { + return fromString(name, HardwareClass.class); + } + + /** + * Gets known HardwareClass values. + * + * @return known HardwareClass values. + */ + public static Collection values() { + return values(HardwareClass.class); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/HciCollectLogJobProperties.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/HciCollectLogJobProperties.java new file mode 100644 index 000000000000..f6fd2905014e --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/HciCollectLogJobProperties.java @@ -0,0 +1,199 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.azurestackhci.models; + +import com.azure.core.annotation.Fluent; +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; +import java.time.format.DateTimeFormatter; + +/** + * Represents the properties of an HCI Collect Log job. + */ +@Fluent +public final class HciCollectLogJobProperties extends HciEdgeDeviceJobProperties { + /* + * Job Type to support polymorphic resource. + */ + private HciEdgeDeviceJobType jobType = HciEdgeDeviceJobType.COLLECT_LOG; + + /* + * From date for log collection. + */ + private OffsetDateTime fromDate; + + /* + * To date for log collection. + */ + private OffsetDateTime toDate; + + /* + * To date for log collection. + */ + private OffsetDateTime lastLogGenerated; + + /* + * log collection job reported properties. + */ + private LogCollectionReportedProperties reportedProperties; + + /** + * Creates an instance of HciCollectLogJobProperties class. + */ + public HciCollectLogJobProperties() { + } + + /** + * Get the jobType property: Job Type to support polymorphic resource. + * + * @return the jobType value. + */ + @Override + public HciEdgeDeviceJobType jobType() { + return this.jobType; + } + + /** + * Get the fromDate property: From date for log collection. + * + * @return the fromDate value. + */ + public OffsetDateTime fromDate() { + return this.fromDate; + } + + /** + * Set the fromDate property: From date for log collection. + * + * @param fromDate the fromDate value to set. + * @return the HciCollectLogJobProperties object itself. + */ + public HciCollectLogJobProperties withFromDate(OffsetDateTime fromDate) { + this.fromDate = fromDate; + return this; + } + + /** + * Get the toDate property: To date for log collection. + * + * @return the toDate value. + */ + public OffsetDateTime toDate() { + return this.toDate; + } + + /** + * Set the toDate property: To date for log collection. + * + * @param toDate the toDate value to set. + * @return the HciCollectLogJobProperties object itself. + */ + public HciCollectLogJobProperties withToDate(OffsetDateTime toDate) { + this.toDate = toDate; + return this; + } + + /** + * Get the lastLogGenerated property: To date for log collection. + * + * @return the lastLogGenerated value. + */ + public OffsetDateTime lastLogGenerated() { + return this.lastLogGenerated; + } + + /** + * Get the reportedProperties property: log collection job reported properties. + * + * @return the reportedProperties value. + */ + public LogCollectionReportedProperties reportedProperties() { + return this.reportedProperties; + } + + /** + * {@inheritDoc} + */ + @Override + public HciCollectLogJobProperties withDeploymentMode(DeploymentMode deploymentMode) { + super.withDeploymentMode(deploymentMode); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("deploymentMode", deploymentMode() == null ? null : deploymentMode().toString()); + jsonWriter.writeStringField("fromDate", + this.fromDate == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.fromDate)); + jsonWriter.writeStringField("toDate", + this.toDate == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.toDate)); + jsonWriter.writeStringField("jobType", this.jobType == null ? null : this.jobType.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of HciCollectLogJobProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of HciCollectLogJobProperties 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 HciCollectLogJobProperties. + */ + public static HciCollectLogJobProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + HciCollectLogJobProperties deserializedHciCollectLogJobProperties = new HciCollectLogJobProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("deploymentMode".equals(fieldName)) { + deserializedHciCollectLogJobProperties + .withDeploymentMode(DeploymentMode.fromString(reader.getString())); + } else if ("provisioningState".equals(fieldName)) { + deserializedHciCollectLogJobProperties + .withProvisioningState(ProvisioningState.fromString(reader.getString())); + } else if ("jobId".equals(fieldName)) { + deserializedHciCollectLogJobProperties.withJobId(reader.getString()); + } else if ("startTimeUtc".equals(fieldName)) { + deserializedHciCollectLogJobProperties.withStartTimeUtc(reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString()))); + } else if ("endTimeUtc".equals(fieldName)) { + deserializedHciCollectLogJobProperties.withEndTimeUtc(reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString()))); + } else if ("status".equals(fieldName)) { + deserializedHciCollectLogJobProperties.withStatus(JobStatus.fromString(reader.getString())); + } else if ("fromDate".equals(fieldName)) { + deserializedHciCollectLogJobProperties.fromDate = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("toDate".equals(fieldName)) { + deserializedHciCollectLogJobProperties.toDate = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("jobType".equals(fieldName)) { + deserializedHciCollectLogJobProperties.jobType + = HciEdgeDeviceJobType.fromString(reader.getString()); + } else if ("lastLogGenerated".equals(fieldName)) { + deserializedHciCollectLogJobProperties.lastLogGenerated = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("reportedProperties".equals(fieldName)) { + deserializedHciCollectLogJobProperties.reportedProperties + = LogCollectionReportedProperties.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedHciCollectLogJobProperties; + }); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/HciEdgeDevice.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/HciEdgeDevice.java index df12eaed1d2d..dccc1d31f6a1 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/HciEdgeDevice.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/HciEdgeDevice.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.models; @@ -18,7 +18,9 @@ @Fluent public final class HciEdgeDevice extends EdgeDeviceInner { /* - * Device kind to support polymorphic resource. + * Metadata used by portal/tooling/etc to render different UX experiences for resources of the same type; e.g. + * ApiApps are a kind of Microsoft.Web/sites type. If supported, the resource provider must validate and persist + * this value. */ private DeviceKind kind = DeviceKind.HCI; @@ -28,24 +30,24 @@ public final class HciEdgeDevice extends EdgeDeviceInner { private HciEdgeDeviceProperties properties; /* - * Fully qualified resource Id for the resource. + * Azure Resource Manager metadata containing createdBy and modifiedBy information. */ - private String id; + private SystemData systemData; /* - * The name of the resource. + * The type of the resource. */ - private String name; + private String type; /* - * The type of the resource. + * The name of the resource. */ - private String type; + private String name; /* - * Azure Resource Manager metadata containing createdBy and modifiedBy information. + * Fully qualified resource Id for the resource. */ - private SystemData systemData; + private String id; /** * Creates an instance of HciEdgeDevice class. @@ -54,7 +56,9 @@ public HciEdgeDevice() { } /** - * Get the kind property: Device kind to support polymorphic resource. + * Get the kind property: Metadata used by portal/tooling/etc to render different UX experiences for resources of + * the same type; e.g. ApiApps are a kind of Microsoft.Web/sites type. If supported, the resource provider must + * validate and persist this value. * * @return the kind value. */ @@ -84,23 +88,13 @@ public HciEdgeDevice withProperties(HciEdgeDeviceProperties properties) { } /** - * Get the id property: Fully qualified resource Id for the resource. - * - * @return the id value. - */ - @Override - public String id() { - return this.id; - } - - /** - * Get the name property: The name of the resource. + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. * - * @return the name value. + * @return the systemData value. */ @Override - public String name() { - return this.name; + public SystemData systemData() { + return this.systemData; } /** @@ -114,26 +108,23 @@ public String type() { } /** - * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * Get the name property: The name of the resource. * - * @return the systemData value. + * @return the name value. */ @Override - public SystemData systemData() { - return this.systemData; + public String name() { + return this.name; } /** - * Validates the instance. + * Get the id property: Fully qualified resource Id for the resource. * - * @throws IllegalArgumentException thrown if the instance is not valid. + * @return the id value. */ @Override - public void validate() { - super.validate(); - if (properties() != null) { - properties().validate(); - } + public String id() { + return this.id; } /** diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/HciEdgeDeviceAdapterPropertyOverrides.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/HciEdgeDeviceAdapterPropertyOverrides.java index bd6cd773da02..1c547009725f 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/HciEdgeDeviceAdapterPropertyOverrides.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/HciEdgeDeviceAdapterPropertyOverrides.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.models; @@ -38,7 +38,7 @@ public final class HciEdgeDeviceAdapterPropertyOverrides /** * Creates an instance of HciEdgeDeviceAdapterPropertyOverrides class. */ - public HciEdgeDeviceAdapterPropertyOverrides() { + private HciEdgeDeviceAdapterPropertyOverrides() { } /** @@ -71,14 +71,6 @@ public String networkDirectTechnology() { return this.networkDirectTechnology; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/HciEdgeDeviceArcExtension.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/HciEdgeDeviceArcExtension.java index d2eec0715cce..61a11dc1b171 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/HciEdgeDeviceArcExtension.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/HciEdgeDeviceArcExtension.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.models; @@ -43,14 +43,14 @@ public final class HciEdgeDeviceArcExtension implements JsonSerializable e.validate()); - } - } - /** * {@inheritDoc} */ diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/HciEdgeDeviceHostNetwork.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/HciEdgeDeviceHostNetwork.java index 0f48bef719ec..6720d87bab76 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/HciEdgeDeviceHostNetwork.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/HciEdgeDeviceHostNetwork.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.models; @@ -42,7 +42,7 @@ public final class HciEdgeDeviceHostNetwork implements JsonSerializable e.validate()); - } - if (storageNetworks() != null) { - storageNetworks().forEach(e -> e.validate()); - } - } - /** * {@inheritDoc} */ diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/HciEdgeDeviceIntents.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/HciEdgeDeviceIntents.java index f9869d09becd..e6950d3ea2bb 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/HciEdgeDeviceIntents.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/HciEdgeDeviceIntents.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.models; @@ -108,7 +108,7 @@ public final class HciEdgeDeviceIntents implements JsonSerializable { + HciEdgeDeviceJob deserializedHciEdgeDeviceJob = new HciEdgeDeviceJob(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedHciEdgeDeviceJob.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedHciEdgeDeviceJob.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedHciEdgeDeviceJob.type = reader.getString(); + } else if ("systemData".equals(fieldName)) { + deserializedHciEdgeDeviceJob.systemData = SystemData.fromJson(reader); + } else if ("properties".equals(fieldName)) { + deserializedHciEdgeDeviceJob.properties = HciEdgeDeviceJobProperties.fromJson(reader); + } else if ("kind".equals(fieldName)) { + deserializedHciEdgeDeviceJob.kind = EdgeDeviceKind.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedHciEdgeDeviceJob; + }); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/HciEdgeDeviceJobProperties.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/HciEdgeDeviceJobProperties.java new file mode 100644 index 000000000000..4e24d66bcd83 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/HciEdgeDeviceJobProperties.java @@ -0,0 +1,272 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.azurestackhci.models; + +import com.azure.core.annotation.Fluent; +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; + +/** + * HCI Edge device job properties. + */ +@Fluent +public class HciEdgeDeviceJobProperties implements JsonSerializable { + /* + * Job Type to support polymorphic resource. + */ + private HciEdgeDeviceJobType jobType = HciEdgeDeviceJobType.fromString("HciEdgeDeviceJobProperties"); + + /* + * Deployment mode to trigger job. + */ + private DeploymentMode deploymentMode; + + /* + * Job provisioning state + */ + private ProvisioningState provisioningState; + + /* + * Unique, immutable job id. + */ + private String jobId; + + /* + * The UTC date and time at which the job started. + */ + private OffsetDateTime startTimeUtc; + + /* + * The UTC date and time at which the job completed. + */ + private OffsetDateTime endTimeUtc; + + /* + * Status of Edge device job. + */ + private JobStatus status; + + /** + * Creates an instance of HciEdgeDeviceJobProperties class. + */ + public HciEdgeDeviceJobProperties() { + } + + /** + * Get the jobType property: Job Type to support polymorphic resource. + * + * @return the jobType value. + */ + public HciEdgeDeviceJobType jobType() { + return this.jobType; + } + + /** + * Get the deploymentMode property: Deployment mode to trigger job. + * + * @return the deploymentMode value. + */ + public DeploymentMode deploymentMode() { + return this.deploymentMode; + } + + /** + * Set the deploymentMode property: Deployment mode to trigger job. + * + * @param deploymentMode the deploymentMode value to set. + * @return the HciEdgeDeviceJobProperties object itself. + */ + public HciEdgeDeviceJobProperties withDeploymentMode(DeploymentMode deploymentMode) { + this.deploymentMode = deploymentMode; + return this; + } + + /** + * Get the provisioningState property: Job provisioning state. + * + * @return the provisioningState value. + */ + public ProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Set the provisioningState property: Job provisioning state. + * + * @param provisioningState the provisioningState value to set. + * @return the HciEdgeDeviceJobProperties object itself. + */ + HciEdgeDeviceJobProperties withProvisioningState(ProvisioningState provisioningState) { + this.provisioningState = provisioningState; + return this; + } + + /** + * Get the jobId property: Unique, immutable job id. + * + * @return the jobId value. + */ + public String jobId() { + return this.jobId; + } + + /** + * Set the jobId property: Unique, immutable job id. + * + * @param jobId the jobId value to set. + * @return the HciEdgeDeviceJobProperties object itself. + */ + HciEdgeDeviceJobProperties withJobId(String jobId) { + this.jobId = jobId; + return this; + } + + /** + * Get the startTimeUtc property: The UTC date and time at which the job started. + * + * @return the startTimeUtc value. + */ + public OffsetDateTime startTimeUtc() { + return this.startTimeUtc; + } + + /** + * Set the startTimeUtc property: The UTC date and time at which the job started. + * + * @param startTimeUtc the startTimeUtc value to set. + * @return the HciEdgeDeviceJobProperties object itself. + */ + HciEdgeDeviceJobProperties withStartTimeUtc(OffsetDateTime startTimeUtc) { + this.startTimeUtc = startTimeUtc; + return this; + } + + /** + * Get the endTimeUtc property: The UTC date and time at which the job completed. + * + * @return the endTimeUtc value. + */ + public OffsetDateTime endTimeUtc() { + return this.endTimeUtc; + } + + /** + * Set the endTimeUtc property: The UTC date and time at which the job completed. + * + * @param endTimeUtc the endTimeUtc value to set. + * @return the HciEdgeDeviceJobProperties object itself. + */ + HciEdgeDeviceJobProperties withEndTimeUtc(OffsetDateTime endTimeUtc) { + this.endTimeUtc = endTimeUtc; + return this; + } + + /** + * Get the status property: Status of Edge device job. + * + * @return the status value. + */ + public JobStatus status() { + return this.status; + } + + /** + * Set the status property: Status of Edge device job. + * + * @param status the status value to set. + * @return the HciEdgeDeviceJobProperties object itself. + */ + HciEdgeDeviceJobProperties withStatus(JobStatus status) { + this.status = status; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("jobType", this.jobType == null ? null : this.jobType.toString()); + jsonWriter.writeStringField("deploymentMode", + this.deploymentMode == null ? null : this.deploymentMode.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of HciEdgeDeviceJobProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of HciEdgeDeviceJobProperties 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 HciEdgeDeviceJobProperties. + */ + public static HciEdgeDeviceJobProperties 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 ("jobType".equals(fieldName)) { + discriminatorValue = readerToUse.getString(); + break; + } else { + readerToUse.skipChildren(); + } + } + // Use the discriminator value to determine which subtype should be deserialized. + if ("CollectLog".equals(discriminatorValue)) { + return HciCollectLogJobProperties.fromJson(readerToUse.reset()); + } else if ("RemoteSupport".equals(discriminatorValue)) { + return HciRemoteSupportJobProperties.fromJson(readerToUse.reset()); + } else { + return fromJsonKnownDiscriminator(readerToUse.reset()); + } + } + }); + } + + static HciEdgeDeviceJobProperties fromJsonKnownDiscriminator(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + HciEdgeDeviceJobProperties deserializedHciEdgeDeviceJobProperties = new HciEdgeDeviceJobProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("jobType".equals(fieldName)) { + deserializedHciEdgeDeviceJobProperties.jobType + = HciEdgeDeviceJobType.fromString(reader.getString()); + } else if ("deploymentMode".equals(fieldName)) { + deserializedHciEdgeDeviceJobProperties.deploymentMode + = DeploymentMode.fromString(reader.getString()); + } else if ("provisioningState".equals(fieldName)) { + deserializedHciEdgeDeviceJobProperties.provisioningState + = ProvisioningState.fromString(reader.getString()); + } else if ("jobId".equals(fieldName)) { + deserializedHciEdgeDeviceJobProperties.jobId = reader.getString(); + } else if ("startTimeUtc".equals(fieldName)) { + deserializedHciEdgeDeviceJobProperties.startTimeUtc = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("endTimeUtc".equals(fieldName)) { + deserializedHciEdgeDeviceJobProperties.endTimeUtc = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("status".equals(fieldName)) { + deserializedHciEdgeDeviceJobProperties.status = JobStatus.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedHciEdgeDeviceJobProperties; + }); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/HciEdgeDeviceJobType.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/HciEdgeDeviceJobType.java new file mode 100644 index 000000000000..afc96ffecc57 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/HciEdgeDeviceJobType.java @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.azurestackhci.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Job Type supported. + */ +public final class HciEdgeDeviceJobType extends ExpandableStringEnum { + /** + * Job to collect logs from the device. + */ + public static final HciEdgeDeviceJobType COLLECT_LOG = fromString("CollectLog"); + + /** + * Job to provide remote support to the device. + */ + public static final HciEdgeDeviceJobType REMOTE_SUPPORT = fromString("RemoteSupport"); + + /** + * Creates a new instance of HciEdgeDeviceJobType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public HciEdgeDeviceJobType() { + } + + /** + * Creates or finds a HciEdgeDeviceJobType from its string representation. + * + * @param name a name to look for. + * @return the corresponding HciEdgeDeviceJobType. + */ + public static HciEdgeDeviceJobType fromString(String name) { + return fromString(name, HciEdgeDeviceJobType.class); + } + + /** + * Gets known HciEdgeDeviceJobType values. + * + * @return known HciEdgeDeviceJobType values. + */ + public static Collection values() { + return values(HciEdgeDeviceJobType.class); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/HciEdgeDeviceProperties.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/HciEdgeDeviceProperties.java index 1947cf4c902c..a87c71b27613 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/HciEdgeDeviceProperties.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/HciEdgeDeviceProperties.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.models; @@ -59,19 +59,6 @@ public HciEdgeDeviceProperties withDeviceConfiguration(DeviceConfiguration devic return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (reportedProperties() != null) { - reportedProperties().validate(); - } - } - /** * {@inheritDoc} */ diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/HciEdgeDeviceStorageAdapterIpInfo.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/HciEdgeDeviceStorageAdapterIpInfo.java index abf3682bf06a..f690c3b2548f 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/HciEdgeDeviceStorageAdapterIpInfo.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/HciEdgeDeviceStorageAdapterIpInfo.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.models; @@ -34,7 +34,7 @@ public final class HciEdgeDeviceStorageAdapterIpInfo implements JsonSerializable /** * Creates an instance of HciEdgeDeviceStorageAdapterIpInfo class. */ - public HciEdgeDeviceStorageAdapterIpInfo() { + private HciEdgeDeviceStorageAdapterIpInfo() { } /** @@ -66,14 +66,6 @@ public String subnetMask() { return this.subnetMask; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/HciEdgeDeviceStorageNetworks.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/HciEdgeDeviceStorageNetworks.java index 73798488d0a3..8fc606cc68af 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/HciEdgeDeviceStorageNetworks.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/HciEdgeDeviceStorageNetworks.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.models; @@ -41,7 +41,7 @@ public final class HciEdgeDeviceStorageNetworks implements JsonSerializable storageAdapterIpInfo() { return this.storageAdapterIpInfo; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (storageAdapterIpInfo() != null) { - storageAdapterIpInfo().forEach(e -> e.validate()); - } - } - /** * {@inheritDoc} */ diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/HciEdgeDeviceVirtualSwitchConfigurationOverrides.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/HciEdgeDeviceVirtualSwitchConfigurationOverrides.java index 7f7b247998b0..ca5ff3a04ac2 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/HciEdgeDeviceVirtualSwitchConfigurationOverrides.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/HciEdgeDeviceVirtualSwitchConfigurationOverrides.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.models; @@ -30,7 +30,7 @@ public final class HciEdgeDeviceVirtualSwitchConfigurationOverrides /** * Creates an instance of HciEdgeDeviceVirtualSwitchConfigurationOverrides class. */ - public HciEdgeDeviceVirtualSwitchConfigurationOverrides() { + private HciEdgeDeviceVirtualSwitchConfigurationOverrides() { } /** @@ -51,14 +51,6 @@ public String loadBalancingAlgorithm() { return this.loadBalancingAlgorithm; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/HciHardwareProfile.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/HciHardwareProfile.java new file mode 100644 index 000000000000..fff91cc3e679 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/HciHardwareProfile.java @@ -0,0 +1,73 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.azurestackhci.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; + +/** + * Hardware configurations for HCI device. + */ +@Immutable +public final class HciHardwareProfile implements JsonSerializable { + /* + * Process type of the device + */ + private String processorType; + + /** + * Creates an instance of HciHardwareProfile class. + */ + private HciHardwareProfile() { + } + + /** + * Get the processorType property: Process type of the device. + * + * @return the processorType value. + */ + public String processorType() { + return this.processorType; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of HciHardwareProfile from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of HciHardwareProfile 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 HciHardwareProfile. + */ + public static HciHardwareProfile fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + HciHardwareProfile deserializedHciHardwareProfile = new HciHardwareProfile(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("processorType".equals(fieldName)) { + deserializedHciHardwareProfile.processorType = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedHciHardwareProfile; + }); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/HciNetworkProfile.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/HciNetworkProfile.java index 07da0ce1c6b3..af2af764acc1 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/HciNetworkProfile.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/HciNetworkProfile.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.models; @@ -35,7 +35,7 @@ public final class HciNetworkProfile implements JsonSerializable e.validate()); - } - if (switchDetails() != null) { - switchDetails().forEach(e -> e.validate()); - } - if (hostNetwork() != null) { - hostNetwork().validate(); - } - } - /** * {@inheritDoc} */ diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/HciNicDetail.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/HciNicDetail.java index 50e379e1a0ca..c1546e7ec5f3 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/HciNicDetail.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/HciNicDetail.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.models; @@ -92,10 +92,15 @@ public final class HciNicDetail implements JsonSerializable { */ private String nicStatus; + /* + * Describes the RDMA capability of the network adapter. + */ + private RdmaCapability rdmaCapability; + /** * Creates an instance of HciNicDetail class. */ - public HciNicDetail() { + private HciNicDetail() { } /** @@ -234,11 +239,12 @@ public String nicStatus() { } /** - * Validates the instance. + * Get the rdmaCapability property: Describes the RDMA capability of the network adapter. * - * @throws IllegalArgumentException thrown if the instance is not valid. + * @return the rdmaCapability value. */ - public void validate() { + public RdmaCapability rdmaCapability() { + return this.rdmaCapability; } /** @@ -296,6 +302,8 @@ public static HciNicDetail fromJson(JsonReader jsonReader) throws IOException { deserializedHciNicDetail.vlanId = reader.getString(); } else if ("nicStatus".equals(fieldName)) { deserializedHciNicDetail.nicStatus = reader.getString(); + } else if ("rdmaCapability".equals(fieldName)) { + deserializedHciNicDetail.rdmaCapability = RdmaCapability.fromString(reader.getString()); } else { reader.skipChildren(); } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/HciOsProfile.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/HciOsProfile.java index 5834b66d3046..0ab281137294 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/HciOsProfile.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/HciOsProfile.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.models; @@ -29,7 +29,7 @@ public final class HciOsProfile implements JsonSerializable { /** * Creates an instance of HciOsProfile class. */ - public HciOsProfile() { + private HciOsProfile() { } /** @@ -50,14 +50,6 @@ public String assemblyVersion() { return this.assemblyVersion; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/HciRemoteSupportJobProperties.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/HciRemoteSupportJobProperties.java new file mode 100644 index 000000000000..b8bdc1c769e2 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/HciRemoteSupportJobProperties.java @@ -0,0 +1,212 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.azurestackhci.models; + +import com.azure.core.annotation.Fluent; +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; +import java.time.format.DateTimeFormatter; + +/** + * Represents the properties of a remote support job for HCI. + */ +@Fluent +public final class HciRemoteSupportJobProperties extends HciEdgeDeviceJobProperties { + /* + * Job Type to support polymorphic resource. + */ + private HciEdgeDeviceJobType jobType = HciEdgeDeviceJobType.REMOTE_SUPPORT; + + /* + * Remote support access level. + */ + private RemoteSupportAccessLevel accessLevel; + + /* + * Remote support expiration timestamp. + */ + private OffsetDateTime expirationTimestamp; + + /* + * Remote support type. + */ + private RemoteSupportType type; + + /* + * log collection job reported properties. + */ + private RemoteSupportJobReportedProperties reportedProperties; + + /** + * Creates an instance of HciRemoteSupportJobProperties class. + */ + public HciRemoteSupportJobProperties() { + } + + /** + * Get the jobType property: Job Type to support polymorphic resource. + * + * @return the jobType value. + */ + @Override + public HciEdgeDeviceJobType jobType() { + return this.jobType; + } + + /** + * Get the accessLevel property: Remote support access level. + * + * @return the accessLevel value. + */ + public RemoteSupportAccessLevel accessLevel() { + return this.accessLevel; + } + + /** + * Set the accessLevel property: Remote support access level. + * + * @param accessLevel the accessLevel value to set. + * @return the HciRemoteSupportJobProperties object itself. + */ + public HciRemoteSupportJobProperties withAccessLevel(RemoteSupportAccessLevel accessLevel) { + this.accessLevel = accessLevel; + return this; + } + + /** + * Get the expirationTimestamp property: Remote support expiration timestamp. + * + * @return the expirationTimestamp value. + */ + public OffsetDateTime expirationTimestamp() { + return this.expirationTimestamp; + } + + /** + * Set the expirationTimestamp property: Remote support expiration timestamp. + * + * @param expirationTimestamp the expirationTimestamp value to set. + * @return the HciRemoteSupportJobProperties object itself. + */ + public HciRemoteSupportJobProperties withExpirationTimestamp(OffsetDateTime expirationTimestamp) { + this.expirationTimestamp = expirationTimestamp; + return this; + } + + /** + * Get the type property: Remote support type. + * + * @return the type value. + */ + public RemoteSupportType type() { + return this.type; + } + + /** + * Set the type property: Remote support type. + * + * @param type the type value to set. + * @return the HciRemoteSupportJobProperties object itself. + */ + public HciRemoteSupportJobProperties withType(RemoteSupportType type) { + this.type = type; + return this; + } + + /** + * Get the reportedProperties property: log collection job reported properties. + * + * @return the reportedProperties value. + */ + public RemoteSupportJobReportedProperties reportedProperties() { + return this.reportedProperties; + } + + /** + * {@inheritDoc} + */ + @Override + public HciRemoteSupportJobProperties withDeploymentMode(DeploymentMode deploymentMode) { + super.withDeploymentMode(deploymentMode); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("deploymentMode", deploymentMode() == null ? null : deploymentMode().toString()); + jsonWriter.writeStringField("accessLevel", this.accessLevel == null ? null : this.accessLevel.toString()); + jsonWriter.writeStringField("expirationTimestamp", + this.expirationTimestamp == null + ? null + : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.expirationTimestamp)); + jsonWriter.writeStringField("type", this.type == null ? null : this.type.toString()); + jsonWriter.writeStringField("jobType", this.jobType == null ? null : this.jobType.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of HciRemoteSupportJobProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of HciRemoteSupportJobProperties 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 HciRemoteSupportJobProperties. + */ + public static HciRemoteSupportJobProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + HciRemoteSupportJobProperties deserializedHciRemoteSupportJobProperties + = new HciRemoteSupportJobProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("deploymentMode".equals(fieldName)) { + deserializedHciRemoteSupportJobProperties + .withDeploymentMode(DeploymentMode.fromString(reader.getString())); + } else if ("provisioningState".equals(fieldName)) { + deserializedHciRemoteSupportJobProperties + .withProvisioningState(ProvisioningState.fromString(reader.getString())); + } else if ("jobId".equals(fieldName)) { + deserializedHciRemoteSupportJobProperties.withJobId(reader.getString()); + } else if ("startTimeUtc".equals(fieldName)) { + deserializedHciRemoteSupportJobProperties.withStartTimeUtc(reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString()))); + } else if ("endTimeUtc".equals(fieldName)) { + deserializedHciRemoteSupportJobProperties.withEndTimeUtc(reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString()))); + } else if ("status".equals(fieldName)) { + deserializedHciRemoteSupportJobProperties.withStatus(JobStatus.fromString(reader.getString())); + } else if ("accessLevel".equals(fieldName)) { + deserializedHciRemoteSupportJobProperties.accessLevel + = RemoteSupportAccessLevel.fromString(reader.getString()); + } else if ("expirationTimestamp".equals(fieldName)) { + deserializedHciRemoteSupportJobProperties.expirationTimestamp = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("type".equals(fieldName)) { + deserializedHciRemoteSupportJobProperties.type = RemoteSupportType.fromString(reader.getString()); + } else if ("jobType".equals(fieldName)) { + deserializedHciRemoteSupportJobProperties.jobType + = HciEdgeDeviceJobType.fromString(reader.getString()); + } else if ("reportedProperties".equals(fieldName)) { + deserializedHciRemoteSupportJobProperties.reportedProperties + = RemoteSupportJobReportedProperties.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedHciRemoteSupportJobProperties; + }); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/HciReportedProperties.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/HciReportedProperties.java index 216517f4c625..76c77ee48f9d 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/HciReportedProperties.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/HciReportedProperties.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.models; @@ -31,19 +31,29 @@ public final class HciReportedProperties extends ReportedProperties { private SbeDeploymentPackageInfo sbeDeploymentPackageInfo; /* - * edge device state. + * Hci device storage specific information. */ - private DeviceState deviceState; + private HciStorageProfile storageProfile; + + /* + * Hci device hardware specific information. + */ + private HciHardwareProfile hardwareProfile; /* * Extensions details for edge device. */ private ExtensionProfile extensionProfile; + /* + * edge device state. + */ + private DeviceState deviceState; + /** * Creates an instance of HciReportedProperties class. */ - public HciReportedProperties() { + private HciReportedProperties() { } /** @@ -74,13 +84,21 @@ public SbeDeploymentPackageInfo sbeDeploymentPackageInfo() { } /** - * Get the deviceState property: edge device state. + * Get the storageProfile property: Hci device storage specific information. * - * @return the deviceState value. + * @return the storageProfile value. */ - @Override - public DeviceState deviceState() { - return this.deviceState; + public HciStorageProfile storageProfile() { + return this.storageProfile; + } + + /** + * Get the hardwareProfile property: Hci device hardware specific information. + * + * @return the hardwareProfile value. + */ + public HciHardwareProfile hardwareProfile() { + return this.hardwareProfile; } /** @@ -94,22 +112,13 @@ public ExtensionProfile extensionProfile() { } /** - * Validates the instance. + * Get the deviceState property: edge device state. * - * @throws IllegalArgumentException thrown if the instance is not valid. + * @return the deviceState value. */ @Override - public void validate() { - super.validate(); - if (networkProfile() != null) { - networkProfile().validate(); - } - if (osProfile() != null) { - osProfile().validate(); - } - if (sbeDeploymentPackageInfo() != null) { - sbeDeploymentPackageInfo().validate(); - } + public DeviceState deviceState() { + return this.deviceState; } /** @@ -147,6 +156,10 @@ public static HciReportedProperties fromJson(JsonReader jsonReader) throws IOExc } else if ("sbeDeploymentPackageInfo".equals(fieldName)) { deserializedHciReportedProperties.sbeDeploymentPackageInfo = SbeDeploymentPackageInfo.fromJson(reader); + } else if ("storageProfile".equals(fieldName)) { + deserializedHciReportedProperties.storageProfile = HciStorageProfile.fromJson(reader); + } else if ("hardwareProfile".equals(fieldName)) { + deserializedHciReportedProperties.hardwareProfile = HciHardwareProfile.fromJson(reader); } else { reader.skipChildren(); } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/HciStorageProfile.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/HciStorageProfile.java new file mode 100644 index 000000000000..fef59c5b11da --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/HciStorageProfile.java @@ -0,0 +1,73 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.azurestackhci.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; + +/** + * Storage configurations for HCI device. + */ +@Immutable +public final class HciStorageProfile implements JsonSerializable { + /* + * Number of storage disks in the device with $CanPool as true. + */ + private Long poolableDisksCount; + + /** + * Creates an instance of HciStorageProfile class. + */ + private HciStorageProfile() { + } + + /** + * Get the poolableDisksCount property: Number of storage disks in the device with $CanPool as true. + * + * @return the poolableDisksCount value. + */ + public Long poolableDisksCount() { + return this.poolableDisksCount; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of HciStorageProfile from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of HciStorageProfile 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 HciStorageProfile. + */ + public static HciStorageProfile fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + HciStorageProfile deserializedHciStorageProfile = new HciStorageProfile(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("poolableDisksCount".equals(fieldName)) { + deserializedHciStorageProfile.poolableDisksCount = reader.getNullable(JsonReader::getLong); + } else { + reader.skipChildren(); + } + } + + return deserializedHciStorageProfile; + }); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/HciUpdate.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/HciUpdate.java index fa38d4bfa313..24cd1d8d6971 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/HciUpdate.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/HciUpdate.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.models; @@ -51,7 +51,8 @@ public interface HciUpdate { SystemData systemData(); /** - * Gets the provisioningState property: Provisioning state of the Updates proxy resource. + * Gets the provisioningState property: Provisioning state of the Updates proxy resource. Indicates the current + * lifecycle status of the update operation, such as whether it has been accepted, is in progress, or has completed. * * @return the provisioningState value. */ @@ -79,7 +80,9 @@ public interface HciUpdate { String minSbeVersionRequired(); /** - * Gets the state property: State of the update as it relates to this stamp. + * Gets the state property: Represents the current state of the update as it relates to this stamp. This includes + * phases such as preparation, installation, scanning, and error handling, providing insight into the update's + * progress and any issues encountered. * * @return the state value. */ @@ -102,7 +105,8 @@ public interface HciUpdate { List componentVersions(); /** - * Gets the rebootRequired property: The rebootRequired property. + * Gets the rebootRequired property: Indicates whether a reboot is required after the update or operation. Helps + * determine if a system restart is necessary to complete the process. * * @return the rebootRequired value. */ @@ -142,7 +146,7 @@ public interface HciUpdate { * * @return the packageSizeInMb value. */ - Float packageSizeInMb(); + Double packageSizeInMb(); /** * Gets the displayName property: Display name of the Update. @@ -173,7 +177,8 @@ public interface HciUpdate { String releaseLink(); /** - * Gets the availabilityType property: Indicates the way the update content can be downloaded. + * Gets the availabilityType property: Indicates how the update content is made available for download. This + * determines whether the update is sourced locally, from an online repository, or requires user notification. * * @return the availabilityType value. */ @@ -202,7 +207,7 @@ public interface HciUpdate { * * @return the progressPercentage value. */ - Float progressPercentage(); + Double progressPercentage(); /** * Gets the notifyMessage property: Brief message with instructions for updates of AvailabilityType Notify. @@ -365,9 +370,13 @@ interface WithMinSbeVersionRequired { */ interface WithState { /** - * Specifies the state property: State of the update as it relates to this stamp.. + * Specifies the state property: Represents the current state of the update as it relates to this stamp. + * This includes phases such as preparation, installation, scanning, and error handling, providing insight + * into the update's progress and any issues encountered.. * - * @param state State of the update as it relates to this stamp. + * @param state Represents the current state of the update as it relates to this stamp. This includes phases + * such as preparation, installation, scanning, and error handling, providing insight into the update's + * progress and any issues encountered. * @return the next definition stage. */ WithCreate withState(State state); @@ -394,7 +403,7 @@ interface WithPrerequisites { interface WithComponentVersions { /** * Specifies the componentVersions property: An array of component versions for a Solution Bundle update, - * and an empty array otherwise. . + * and an empty array otherwise.. * * @param componentVersions An array of component versions for a Solution Bundle update, and an empty array * otherwise. @@ -408,9 +417,11 @@ interface WithComponentVersions { */ interface WithRebootRequired { /** - * Specifies the rebootRequired property: The rebootRequired property.. + * Specifies the rebootRequired property: Indicates whether a reboot is required after the update or + * operation. Helps determine if a system restart is necessary to complete the process.. * - * @param rebootRequired The rebootRequired property. + * @param rebootRequired Indicates whether a reboot is required after the update or operation. Helps + * determine if a system restart is necessary to complete the process. * @return the next definition stage. */ WithCreate withRebootRequired(RebootRequirement rebootRequired); @@ -480,7 +491,7 @@ interface WithPackageSizeInMb { * and size of the payload that results from the live scan operation for OS update content. * @return the next definition stage. */ - WithCreate withPackageSizeInMb(Float packageSizeInMb); + WithCreate withPackageSizeInMb(Double packageSizeInMb); } /** @@ -540,9 +551,12 @@ interface WithReleaseLink { */ interface WithAvailabilityType { /** - * Specifies the availabilityType property: Indicates the way the update content can be downloaded.. + * Specifies the availabilityType property: Indicates how the update content is made available for download. + * This determines whether the update is sourced locally, from an online repository, or requires user + * notification.. * - * @param availabilityType Indicates the way the update content can be downloaded. + * @param availabilityType Indicates how the update content is made available for download. This determines + * whether the update is sourced locally, from an online repository, or requires user notification. * @return the next definition stage. */ WithCreate withAvailabilityType(AvailabilityType availabilityType); @@ -592,7 +606,7 @@ interface WithProgressPercentage { * downloaded. * @return the next definition stage. */ - WithCreate withProgressPercentage(Float progressPercentage); + WithCreate withProgressPercentage(Double progressPercentage); } /** @@ -692,9 +706,13 @@ interface WithMinSbeVersionRequired { */ interface WithState { /** - * Specifies the state property: State of the update as it relates to this stamp.. + * Specifies the state property: Represents the current state of the update as it relates to this stamp. + * This includes phases such as preparation, installation, scanning, and error handling, providing insight + * into the update's progress and any issues encountered.. * - * @param state State of the update as it relates to this stamp. + * @param state Represents the current state of the update as it relates to this stamp. This includes phases + * such as preparation, installation, scanning, and error handling, providing insight into the update's + * progress and any issues encountered. * @return the next definition stage. */ Update withState(State state); @@ -721,7 +739,7 @@ interface WithPrerequisites { interface WithComponentVersions { /** * Specifies the componentVersions property: An array of component versions for a Solution Bundle update, - * and an empty array otherwise. . + * and an empty array otherwise.. * * @param componentVersions An array of component versions for a Solution Bundle update, and an empty array * otherwise. @@ -735,9 +753,11 @@ interface WithComponentVersions { */ interface WithRebootRequired { /** - * Specifies the rebootRequired property: The rebootRequired property.. + * Specifies the rebootRequired property: Indicates whether a reboot is required after the update or + * operation. Helps determine if a system restart is necessary to complete the process.. * - * @param rebootRequired The rebootRequired property. + * @param rebootRequired Indicates whether a reboot is required after the update or operation. Helps + * determine if a system restart is necessary to complete the process. * @return the next definition stage. */ Update withRebootRequired(RebootRequirement rebootRequired); @@ -807,7 +827,7 @@ interface WithPackageSizeInMb { * and size of the payload that results from the live scan operation for OS update content. * @return the next definition stage. */ - Update withPackageSizeInMb(Float packageSizeInMb); + Update withPackageSizeInMb(Double packageSizeInMb); } /** @@ -867,9 +887,12 @@ interface WithReleaseLink { */ interface WithAvailabilityType { /** - * Specifies the availabilityType property: Indicates the way the update content can be downloaded.. + * Specifies the availabilityType property: Indicates how the update content is made available for download. + * This determines whether the update is sourced locally, from an online repository, or requires user + * notification.. * - * @param availabilityType Indicates the way the update content can be downloaded. + * @param availabilityType Indicates how the update content is made available for download. This determines + * whether the update is sourced locally, from an online repository, or requires user notification. * @return the next definition stage. */ Update withAvailabilityType(AvailabilityType availabilityType); @@ -919,7 +942,7 @@ interface WithProgressPercentage { * downloaded. * @return the next definition stage. */ - Update withProgressPercentage(Float progressPercentage); + Update withProgressPercentage(Double progressPercentage); } /** diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/HciValidationFailureDetail.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/HciValidationFailureDetail.java index 171bd91b1e12..3b60bcbaddd7 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/HciValidationFailureDetail.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/HciValidationFailureDetail.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.models; @@ -24,7 +24,7 @@ public final class HciValidationFailureDetail implements JsonSerializable { /** - * Static value Unknown for HealthState. + * The health state is not known or cannot be determined. */ public static final HealthState UNKNOWN = fromString("Unknown"); /** - * Static value Success for HealthState. + * The health check completed successfully and the system is healthy. */ public static final HealthState SUCCESS = fromString("Success"); /** - * Static value Failure for HealthState. + * The health check failed, indicating a critical issue. */ public static final HealthState FAILURE = fromString("Failure"); /** - * Static value Warning for HealthState. + * The health check detected a non-critical issue that may require attention. */ public static final HealthState WARNING = fromString("Warning"); /** - * Static value Error for HealthState. + * An error occurred during the health check process. */ public static final HealthState ERROR = fromString("Error"); /** - * Static value InProgress for HealthState. + * The health check is currently in progress. */ public static final HealthState IN_PROGRESS = fromString("InProgress"); diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/IdentityProvider.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/IdentityProvider.java new file mode 100644 index 000000000000..690b21017b0e --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/IdentityProvider.java @@ -0,0 +1,53 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.azurestackhci.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Identity Provider for the cluster. + */ +public final class IdentityProvider extends ExpandableStringEnum { + /** + * Uses Active Directory as the identity provider, enabling domain-based authentication and centralized identity + * management. This is the default option. + */ + public static final IdentityProvider ACTIVE_DIRECTORY = fromString("ActiveDirectory"); + + /** + * Uses a local identity system integrated with Azure Key Vault for authentication. Suitable for AD-less + * environments where Active Directory is not available or required. + */ + public static final IdentityProvider LOCAL_IDENTITY = fromString("LocalIdentity"); + + /** + * Creates a new instance of IdentityProvider value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public IdentityProvider() { + } + + /** + * Creates or finds a IdentityProvider from its string representation. + * + * @param name a name to look for. + * @return the corresponding IdentityProvider. + */ + public static IdentityProvider fromString(String name) { + return fromString(name, IdentityProvider.class); + } + + /** + * Gets known IdentityProvider values. + * + * @return known IdentityProvider values. + */ + public static Collection values() { + return values(IdentityProvider.class); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/ImdsAttestation.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/ImdsAttestation.java index c5d63ac808b2..153d5491d776 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/ImdsAttestation.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/ImdsAttestation.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.models; @@ -12,12 +12,12 @@ */ public final class ImdsAttestation extends ExpandableStringEnum { /** - * Static value Disabled for ImdsAttestation. + * IMDS attestation is disabled for the cluster. */ public static final ImdsAttestation DISABLED = fromString("Disabled"); /** - * Static value Enabled for ImdsAttestation. + * IMDS attestation is enabled for the cluster. */ public static final ImdsAttestation ENABLED = fromString("Enabled"); diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/InfrastructureNetwork.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/InfrastructureNetwork.java index 61da13d90ea0..208856a0d1b9 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/InfrastructureNetwork.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/InfrastructureNetwork.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.models; @@ -32,6 +32,17 @@ public final class InfrastructureNetwork implements JsonSerializable ipPools; + /* + * Specifies how DNS servers are configured for the infrastructure network. Allowed values are 'UseDnsServer' to use + * the provided DNS servers, and 'UseForwarder' to use DNS forwarders. + */ + private DnsServerConfig dnsServerConfig; + + /* + * Details of the DNS Zones to be configured. + */ + private List dnsZones; + /* * IPv4 address of the DNS servers in your environment. */ @@ -109,6 +120,48 @@ public InfrastructureNetwork withIpPools(List ipPools) { return this; } + /** + * Get the dnsServerConfig property: Specifies how DNS servers are configured for the infrastructure network. + * Allowed values are 'UseDnsServer' to use the provided DNS servers, and 'UseForwarder' to use DNS forwarders. + * + * @return the dnsServerConfig value. + */ + public DnsServerConfig dnsServerConfig() { + return this.dnsServerConfig; + } + + /** + * Set the dnsServerConfig property: Specifies how DNS servers are configured for the infrastructure network. + * Allowed values are 'UseDnsServer' to use the provided DNS servers, and 'UseForwarder' to use DNS forwarders. + * + * @param dnsServerConfig the dnsServerConfig value to set. + * @return the InfrastructureNetwork object itself. + */ + public InfrastructureNetwork withDnsServerConfig(DnsServerConfig dnsServerConfig) { + this.dnsServerConfig = dnsServerConfig; + return this; + } + + /** + * Get the dnsZones property: Details of the DNS Zones to be configured. + * + * @return the dnsZones value. + */ + public List dnsZones() { + return this.dnsZones; + } + + /** + * Set the dnsZones property: Details of the DNS Zones to be configured. + * + * @param dnsZones the dnsZones value to set. + * @return the InfrastructureNetwork object itself. + */ + public InfrastructureNetwork withDnsZones(List dnsZones) { + this.dnsZones = dnsZones; + return this; + } + /** * Get the dnsServers property: IPv4 address of the DNS servers in your environment. * @@ -151,17 +204,6 @@ public InfrastructureNetwork withUseDhcp(Boolean useDhcp) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (ipPools() != null) { - ipPools().forEach(e -> e.validate()); - } - } - /** * {@inheritDoc} */ @@ -171,6 +213,9 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStringField("subnetMask", this.subnetMask); jsonWriter.writeStringField("gateway", this.gateway); jsonWriter.writeArrayField("ipPools", this.ipPools, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeStringField("dnsServerConfig", + this.dnsServerConfig == null ? null : this.dnsServerConfig.toString()); + jsonWriter.writeArrayField("dnsZones", this.dnsZones, (writer, element) -> writer.writeJson(element)); jsonWriter.writeArrayField("dnsServers", this.dnsServers, (writer, element) -> writer.writeString(element)); jsonWriter.writeBooleanField("useDhcp", this.useDhcp); return jsonWriter.writeEndObject(); @@ -198,6 +243,11 @@ public static InfrastructureNetwork fromJson(JsonReader jsonReader) throws IOExc } else if ("ipPools".equals(fieldName)) { List ipPools = reader.readArray(reader1 -> IpPools.fromJson(reader1)); deserializedInfrastructureNetwork.ipPools = ipPools; + } else if ("dnsServerConfig".equals(fieldName)) { + deserializedInfrastructureNetwork.dnsServerConfig = DnsServerConfig.fromString(reader.getString()); + } else if ("dnsZones".equals(fieldName)) { + List dnsZones = reader.readArray(reader1 -> DnsZones.fromJson(reader1)); + deserializedInfrastructureNetwork.dnsZones = dnsZones; } else if ("dnsServers".equals(fieldName)) { List dnsServers = reader.readArray(reader1 -> reader1.getString()); deserializedInfrastructureNetwork.dnsServers = dnsServers; diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/IpPools.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/IpPools.java index dbc78df4ffff..c135f7dc917a 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/IpPools.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/IpPools.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.models; @@ -78,14 +78,6 @@ public IpPools withEndingAddress(String endingAddress) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/IsolatedVmAttestationConfiguration.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/IsolatedVmAttestationConfiguration.java index 79ad6b9cde8c..326fe5bd8d71 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/IsolatedVmAttestationConfiguration.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/IsolatedVmAttestationConfiguration.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.models; @@ -34,7 +34,7 @@ public final class IsolatedVmAttestationConfiguration implements JsonSerializabl /** * Creates an instance of IsolatedVmAttestationConfiguration class. */ - public IsolatedVmAttestationConfiguration() { + private IsolatedVmAttestationConfiguration() { } /** @@ -66,14 +66,6 @@ public String attestationServiceEndpoint() { return this.attestationServiceEndpoint; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/JobStatus.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/JobStatus.java new file mode 100644 index 000000000000..c52b455d5e10 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/JobStatus.java @@ -0,0 +1,101 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.azurestackhci.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Represents the various statuses a job can have throughout its lifecycle. + */ +public final class JobStatus extends ExpandableStringEnum { + /** + * The job status has not been specified. + */ + public static final JobStatus NOT_SPECIFIED = fromString("NotSpecified"); + + /** + * The job is currently undergoing validation. + */ + public static final JobStatus VALIDATION_IN_PROGRESS = fromString("ValidationInProgress"); + + /** + * The job has successfully passed validation. + */ + public static final JobStatus VALIDATION_SUCCESS = fromString("ValidationSuccess"); + + /** + * The job has failed validation. + */ + public static final JobStatus VALIDATION_FAILED = fromString("ValidationFailed"); + + /** + * The job's deployment is currently in progress. + */ + public static final JobStatus DEPLOYMENT_IN_PROGRESS = fromString("DeploymentInProgress"); + + /** + * The job's deployment has failed. + */ + public static final JobStatus DEPLOYMENT_FAILED = fromString("DeploymentFailed"); + + /** + * The job has been successfully deployed. + */ + public static final JobStatus DEPLOYMENT_SUCCESS = fromString("DeploymentSuccess"); + + /** + * The job has succeeded. + */ + public static final JobStatus SUCCEEDED = fromString("Succeeded"); + + /** + * The job has failed. + */ + public static final JobStatus FAILED = fromString("Failed"); + + /** + * The job has been canceled. + */ + public static final JobStatus CANCELED = fromString("Canceled"); + + /** + * The job is paused. + */ + public static final JobStatus PAUSED = fromString("Paused"); + + /** + * The job is scheduled to run. + */ + public static final JobStatus SCHEDULED = fromString("Scheduled"); + + /** + * Creates a new instance of JobStatus value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public JobStatus() { + } + + /** + * Creates or finds a JobStatus from its string representation. + * + * @param name a name to look for. + * @return the corresponding JobStatus. + */ + public static JobStatus fromString(String name) { + return fromString(name, JobStatus.class); + } + + /** + * Gets known JobStatus values. + * + * @return known JobStatus values. + */ + public static Collection values() { + return values(JobStatus.class); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/LocalAvailabilityZones.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/LocalAvailabilityZones.java new file mode 100644 index 000000000000..3006ca968e5f --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/LocalAvailabilityZones.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.azurestackhci.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.List; + +/** + * Local Availability Zone information for HCI cluster. + */ +@Fluent +public final class LocalAvailabilityZones implements JsonSerializable { + /* + * Local Availability Zone name for HCI cluster + */ + private String localAvailabilityZoneName; + + /* + * Nodes belonging to a particular zone + */ + private List nodes; + + /** + * Creates an instance of LocalAvailabilityZones class. + */ + public LocalAvailabilityZones() { + } + + /** + * Get the localAvailabilityZoneName property: Local Availability Zone name for HCI cluster. + * + * @return the localAvailabilityZoneName value. + */ + public String localAvailabilityZoneName() { + return this.localAvailabilityZoneName; + } + + /** + * Set the localAvailabilityZoneName property: Local Availability Zone name for HCI cluster. + * + * @param localAvailabilityZoneName the localAvailabilityZoneName value to set. + * @return the LocalAvailabilityZones object itself. + */ + public LocalAvailabilityZones withLocalAvailabilityZoneName(String localAvailabilityZoneName) { + this.localAvailabilityZoneName = localAvailabilityZoneName; + return this; + } + + /** + * Get the nodes property: Nodes belonging to a particular zone. + * + * @return the nodes value. + */ + public List nodes() { + return this.nodes; + } + + /** + * Set the nodes property: Nodes belonging to a particular zone. + * + * @param nodes the nodes value to set. + * @return the LocalAvailabilityZones object itself. + */ + public LocalAvailabilityZones withNodes(List nodes) { + this.nodes = nodes; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("localAvailabilityZoneName", this.localAvailabilityZoneName); + jsonWriter.writeArrayField("nodes", this.nodes, (writer, element) -> writer.writeString(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of LocalAvailabilityZones from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of LocalAvailabilityZones 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 LocalAvailabilityZones. + */ + public static LocalAvailabilityZones fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + LocalAvailabilityZones deserializedLocalAvailabilityZones = new LocalAvailabilityZones(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("localAvailabilityZoneName".equals(fieldName)) { + deserializedLocalAvailabilityZones.localAvailabilityZoneName = reader.getString(); + } else if ("nodes".equals(fieldName)) { + List nodes = reader.readArray(reader1 -> reader1.getString()); + deserializedLocalAvailabilityZones.nodes = nodes; + } else { + reader.skipChildren(); + } + } + + return deserializedLocalAvailabilityZones; + }); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/LogCollectionError.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/LogCollectionError.java index a52bc6fad38e..044e408f22eb 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/LogCollectionError.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/LogCollectionError.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.models; @@ -29,7 +29,7 @@ public final class LogCollectionError implements JsonSerializable { + /* + * The timestamp when log collection started, in ISO 8601 format. + */ + private String startTime; + + /* + * The timestamp when log collection ended, in ISO 8601 format. + */ + private String endTime; + + /* + * The total time logs were collected for, in ISO 8601 duration format. + */ + private String timeCollected; + + /* + * The size of the collected logs in bytes. + */ + private Integer logSize; + + /* + * The status of the log collection session. + */ + private DeviceLogCollectionStatus status; + + /* + * A unique identifier for correlating this log collection session with other operations or sessions. + */ + private String correlationId; + + /** + * Creates an instance of LogCollectionJobSession class. + */ + private LogCollectionJobSession() { + } + + /** + * Get the startTime property: The timestamp when log collection started, in ISO 8601 format. + * + * @return the startTime value. + */ + public String startTime() { + return this.startTime; + } + + /** + * Get the endTime property: The timestamp when log collection ended, in ISO 8601 format. + * + * @return the endTime value. + */ + public String endTime() { + return this.endTime; + } + + /** + * Get the timeCollected property: The total time logs were collected for, in ISO 8601 duration format. + * + * @return the timeCollected value. + */ + public String timeCollected() { + return this.timeCollected; + } + + /** + * Get the logSize property: The size of the collected logs in bytes. + * + * @return the logSize value. + */ + public Integer logSize() { + return this.logSize; + } + + /** + * Get the status property: The status of the log collection session. + * + * @return the status value. + */ + public DeviceLogCollectionStatus status() { + return this.status; + } + + /** + * Get the correlationId property: A unique identifier for correlating this log collection session with other + * operations or sessions. + * + * @return the correlationId value. + */ + public String correlationId() { + return this.correlationId; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of LogCollectionJobSession from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of LogCollectionJobSession 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 LogCollectionJobSession. + */ + public static LogCollectionJobSession fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + LogCollectionJobSession deserializedLogCollectionJobSession = new LogCollectionJobSession(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("startTime".equals(fieldName)) { + deserializedLogCollectionJobSession.startTime = reader.getString(); + } else if ("endTime".equals(fieldName)) { + deserializedLogCollectionJobSession.endTime = reader.getString(); + } else if ("timeCollected".equals(fieldName)) { + deserializedLogCollectionJobSession.timeCollected = reader.getString(); + } else if ("logSize".equals(fieldName)) { + deserializedLogCollectionJobSession.logSize = reader.getNullable(JsonReader::getInt); + } else if ("status".equals(fieldName)) { + deserializedLogCollectionJobSession.status + = DeviceLogCollectionStatus.fromString(reader.getString()); + } else if ("correlationId".equals(fieldName)) { + deserializedLogCollectionJobSession.correlationId = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedLogCollectionJobSession; + }); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/LogCollectionJobType.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/LogCollectionJobType.java index 49b2153f9365..0defa2eeb9c6 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/LogCollectionJobType.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/LogCollectionJobType.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.models; @@ -8,16 +8,17 @@ import java.util.Collection; /** - * LogCollection job type. + * Specifies the type of log collection job. Determines whether the logs are collected immediately on demand or as part + * of a scheduled operation. */ public final class LogCollectionJobType extends ExpandableStringEnum { /** - * Static value OnDemand for LogCollectionJobType. + * Log collection is triggered manually and executed immediately. */ public static final LogCollectionJobType ON_DEMAND = fromString("OnDemand"); /** - * Static value Scheduled for LogCollectionJobType. + * Log collection is scheduled to run at a predefined time or interval. */ public static final LogCollectionJobType SCHEDULED = fromString("Scheduled"); diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/LogCollectionProperties.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/LogCollectionProperties.java index 411754355614..6c20df749f01 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/LogCollectionProperties.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/LogCollectionProperties.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.models; @@ -81,17 +81,6 @@ public List logCollectionSessionDetails() { return this.logCollectionSessionDetails; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (logCollectionSessionDetails() != null) { - logCollectionSessionDetails().forEach(e -> e.validate()); - } - } - /** * {@inheritDoc} */ diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/LogCollectionReportedProperties.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/LogCollectionReportedProperties.java new file mode 100644 index 000000000000..926207c05ce9 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/LogCollectionReportedProperties.java @@ -0,0 +1,127 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.azurestackhci.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; + +/** + * Represents the reported properties of a log collection job. + */ +@Immutable +public final class LogCollectionReportedProperties implements JsonSerializable { + /* + * The percentage of the job that is complete. + */ + private Integer percentComplete; + + /* + * Validation status of job. + */ + private EceActionStatus validationStatus; + + /* + * Deployment status of job. + */ + private EceActionStatus deploymentStatus; + + /* + * Details of the log collection session. + */ + private List logCollectionSessionDetails; + + /** + * Creates an instance of LogCollectionReportedProperties class. + */ + private LogCollectionReportedProperties() { + } + + /** + * Get the percentComplete property: The percentage of the job that is complete. + * + * @return the percentComplete value. + */ + public Integer percentComplete() { + return this.percentComplete; + } + + /** + * Get the validationStatus property: Validation status of job. + * + * @return the validationStatus value. + */ + public EceActionStatus validationStatus() { + return this.validationStatus; + } + + /** + * Get the deploymentStatus property: Deployment status of job. + * + * @return the deploymentStatus value. + */ + public EceActionStatus deploymentStatus() { + return this.deploymentStatus; + } + + /** + * Get the logCollectionSessionDetails property: Details of the log collection session. + * + * @return the logCollectionSessionDetails value. + */ + public List logCollectionSessionDetails() { + return this.logCollectionSessionDetails; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of LogCollectionReportedProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of LogCollectionReportedProperties 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 LogCollectionReportedProperties. + */ + public static LogCollectionReportedProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + LogCollectionReportedProperties deserializedLogCollectionReportedProperties + = new LogCollectionReportedProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("percentComplete".equals(fieldName)) { + deserializedLogCollectionReportedProperties.percentComplete + = reader.getNullable(JsonReader::getInt); + } else if ("validationStatus".equals(fieldName)) { + deserializedLogCollectionReportedProperties.validationStatus = EceActionStatus.fromJson(reader); + } else if ("deploymentStatus".equals(fieldName)) { + deserializedLogCollectionReportedProperties.deploymentStatus = EceActionStatus.fromJson(reader); + } else if ("logCollectionSessionDetails".equals(fieldName)) { + List logCollectionSessionDetails + = reader.readArray(reader1 -> LogCollectionJobSession.fromJson(reader1)); + deserializedLogCollectionReportedProperties.logCollectionSessionDetails + = logCollectionSessionDetails; + } else { + reader.skipChildren(); + } + } + + return deserializedLogCollectionReportedProperties; + }); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/LogCollectionRequest.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/LogCollectionRequest.java index 825ef6eee47d..ae27ff4e1f5e 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/LogCollectionRequest.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/LogCollectionRequest.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.models; @@ -47,17 +47,6 @@ public LogCollectionRequest withProperties(LogCollectionRequestProperties proper return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (properties() != null) { - properties().validate(); - } - } - /** * {@inheritDoc} */ diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/LogCollectionRequestProperties.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/LogCollectionRequestProperties.java index 06b45cde7dc8..421ea9622892 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/LogCollectionRequestProperties.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/LogCollectionRequestProperties.java @@ -1,12 +1,11 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.models; import com.azure.core.annotation.Fluent; import com.azure.core.util.CoreUtils; -import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -76,26 +75,6 @@ public LogCollectionRequestProperties withToDate(OffsetDateTime toDate) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (fromDate() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property fromDate in model LogCollectionRequestProperties")); - } - if (toDate() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property toDate in model LogCollectionRequestProperties")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(LogCollectionRequestProperties.class); - /** * {@inheritDoc} */ diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/LogCollectionSession.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/LogCollectionSession.java index ca5c21616188..c97d318908eb 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/LogCollectionSession.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/LogCollectionSession.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.models; @@ -44,14 +44,15 @@ public final class LogCollectionSession implements JsonSerializable CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/LogCollectionStatus.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/LogCollectionStatus.java index 3a2704e2866b..81f868344d37 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/LogCollectionStatus.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/LogCollectionStatus.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.models; @@ -12,22 +12,22 @@ */ public final class LogCollectionStatus extends ExpandableStringEnum { /** - * Static value None for LogCollectionStatus. + * No log collection has been initiated. */ public static final LogCollectionStatus NONE = fromString("None"); /** - * Static value InProgress for LogCollectionStatus. + * Log collection is currently in progress. */ public static final LogCollectionStatus IN_PROGRESS = fromString("InProgress"); /** - * Static value Failed for LogCollectionStatus. + * Log collection has failed. */ public static final LogCollectionStatus FAILED = fromString("Failed"); /** - * Static value Succeeded for LogCollectionStatus. + * Log collection completed successfully. */ public static final LogCollectionStatus SUCCEEDED = fromString("Succeeded"); diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/ManagedServiceIdentityType.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/ManagedServiceIdentityType.java index 1c59b4172aa6..f33b3df1d77b 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/ManagedServiceIdentityType.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/ManagedServiceIdentityType.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.models; @@ -12,25 +12,25 @@ */ public final class ManagedServiceIdentityType extends ExpandableStringEnum { /** - * Static value None for ManagedServiceIdentityType. + * No managed identity. */ public static final ManagedServiceIdentityType NONE = fromString("None"); /** - * Static value SystemAssigned for ManagedServiceIdentityType. + * System assigned managed identity. */ public static final ManagedServiceIdentityType SYSTEM_ASSIGNED = fromString("SystemAssigned"); /** - * Static value UserAssigned for ManagedServiceIdentityType. + * User assigned managed identity. */ public static final ManagedServiceIdentityType USER_ASSIGNED = fromString("UserAssigned"); /** - * Static value SystemAssigned, UserAssigned for ManagedServiceIdentityType. + * System and user assigned managed identity. */ public static final ManagedServiceIdentityType SYSTEM_ASSIGNED_USER_ASSIGNED - = fromString("SystemAssigned, UserAssigned"); + = fromString("SystemAssigned,UserAssigned"); /** * Creates a new instance of ManagedServiceIdentityType value. diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/NetworkController.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/NetworkController.java index 689cd7bf757f..23cb0374897d 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/NetworkController.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/NetworkController.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.models; @@ -99,14 +99,6 @@ public NetworkController withNetworkVirtualizationEnabled(Boolean networkVirtual return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/NicDetail.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/NicDetail.java index 0b751f5819b3..0224ae63dc56 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/NicDetail.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/NicDetail.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.models; @@ -248,14 +248,6 @@ public NicDetail withDefaultIsolationId(String defaultIsolationId) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/NodeArcState.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/NodeArcState.java index a0fd0ad73ab4..1a63de047818 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/NodeArcState.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/NodeArcState.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.models; @@ -8,96 +8,97 @@ import java.util.Collection; /** - * State of Arc agent in this node. + * State of the Arc agent in this node. Indicates the current lifecycle status of the agent, such as whether it's being + * provisioned, connected, updated, or has encountered an error. */ public final class NodeArcState extends ExpandableStringEnum { /** - * Static value NotSpecified for NodeArcState. + * The state is not specified. */ public static final NodeArcState NOT_SPECIFIED = fromString("NotSpecified"); /** - * Static value Error for NodeArcState. + * An error occurred during the agent's lifecycle. */ public static final NodeArcState ERROR = fromString("Error"); /** - * Static value Succeeded for NodeArcState. + * The operation completed successfully. */ public static final NodeArcState SUCCEEDED = fromString("Succeeded"); /** - * Static value Canceled for NodeArcState. + * The operation was canceled before completion. */ public static final NodeArcState CANCELED = fromString("Canceled"); /** - * Static value Failed for NodeArcState. + * The operation failed. */ public static final NodeArcState FAILED = fromString("Failed"); /** - * Static value Connected for NodeArcState. + * The Arc agent is connected on this node. */ public static final NodeArcState CONNECTED = fromString("Connected"); /** - * Static value Disconnected for NodeArcState. + * The Arc agent is disconnected on this node. */ public static final NodeArcState DISCONNECTED = fromString("Disconnected"); /** - * Static value Deleted for NodeArcState. + * The Arc agent has been deleted from this node. */ public static final NodeArcState DELETED = fromString("Deleted"); /** - * Static value Creating for NodeArcState. + * The Arc agent is being created on this node. */ public static final NodeArcState CREATING = fromString("Creating"); /** - * Static value Updating for NodeArcState. + * The Arc agent is being updated on this node. */ public static final NodeArcState UPDATING = fromString("Updating"); /** - * Static value Deleting for NodeArcState. + * The Arc agent is being deleted from this node. */ public static final NodeArcState DELETING = fromString("Deleting"); /** - * Static value Moving for NodeArcState. + * The Arc agent is being moved on this node. */ public static final NodeArcState MOVING = fromString("Moving"); /** - * Static value PartiallySucceeded for NodeArcState. + * The operation partially succeeded. */ public static final NodeArcState PARTIALLY_SUCCEEDED = fromString("PartiallySucceeded"); /** - * Static value PartiallyConnected for NodeArcState. + * The Arc agent is partially connected on this node. */ public static final NodeArcState PARTIALLY_CONNECTED = fromString("PartiallyConnected"); /** - * Static value InProgress for NodeArcState. + * The operation is currently in progress. */ public static final NodeArcState IN_PROGRESS = fromString("InProgress"); /** - * Static value Accepted for NodeArcState. + * The operation has been accepted and is pending execution. */ public static final NodeArcState ACCEPTED = fromString("Accepted"); /** - * Static value Provisioning for NodeArcState. + * The Arc agent is currently being provisioned on this node. */ public static final NodeArcState PROVISIONING = fromString("Provisioning"); /** - * Static value DisableInProgress for NodeArcState. + * The Arc agent is in the process of being disabled on this node. */ public static final NodeArcState DISABLE_IN_PROGRESS = fromString("DisableInProgress"); diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/NodeExtensionState.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/NodeExtensionState.java index 56a948d82c2a..3718d8e11c21 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/NodeExtensionState.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/NodeExtensionState.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.models; @@ -8,91 +8,92 @@ import java.util.Collection; /** - * State of Arc Extension in this node. + * State of Arc Extension in this node. Reflects the current lifecycle status of the extension on the individual node, + * such as whether it's being created, updated, deleted, or has encountered an error. */ public final class NodeExtensionState extends ExpandableStringEnum { /** - * Static value NotSpecified for NodeExtensionState. + * The state is not specified. */ public static final NodeExtensionState NOT_SPECIFIED = fromString("NotSpecified"); /** - * Static value Error for NodeExtensionState. + * An error occurred during the extension lifecycle. */ public static final NodeExtensionState ERROR = fromString("Error"); /** - * Static value Succeeded for NodeExtensionState. + * The extension operation completed successfully. */ public static final NodeExtensionState SUCCEEDED = fromString("Succeeded"); /** - * Static value Canceled for NodeExtensionState. + * The extension operation was canceled. */ public static final NodeExtensionState CANCELED = fromString("Canceled"); /** - * Static value Failed for NodeExtensionState. + * The extension operation failed. */ public static final NodeExtensionState FAILED = fromString("Failed"); /** - * Static value Connected for NodeExtensionState. + * The extension is connected on the node. */ public static final NodeExtensionState CONNECTED = fromString("Connected"); /** - * Static value Disconnected for NodeExtensionState. + * The extension is disconnected on the node. */ public static final NodeExtensionState DISCONNECTED = fromString("Disconnected"); /** - * Static value Deleted for NodeExtensionState. + * The extension has been deleted from the node. */ public static final NodeExtensionState DELETED = fromString("Deleted"); /** - * Static value Creating for NodeExtensionState. + * The extension is being created on the node. */ public static final NodeExtensionState CREATING = fromString("Creating"); /** - * Static value Updating for NodeExtensionState. + * The extension is being updated on the node. */ public static final NodeExtensionState UPDATING = fromString("Updating"); /** - * Static value Deleting for NodeExtensionState. + * The extension is being deleted from the node. */ public static final NodeExtensionState DELETING = fromString("Deleting"); /** - * Static value Moving for NodeExtensionState. + * The extension is being moved on the node. */ public static final NodeExtensionState MOVING = fromString("Moving"); /** - * Static value PartiallySucceeded for NodeExtensionState. + * The extension operation partially succeeded. */ public static final NodeExtensionState PARTIALLY_SUCCEEDED = fromString("PartiallySucceeded"); /** - * Static value PartiallyConnected for NodeExtensionState. + * The extension is partially connected on the node. */ public static final NodeExtensionState PARTIALLY_CONNECTED = fromString("PartiallyConnected"); /** - * Static value InProgress for NodeExtensionState. + * The extension operation is currently in progress. */ public static final NodeExtensionState IN_PROGRESS = fromString("InProgress"); /** - * Static value Accepted for NodeExtensionState. + * The extension operation has been accepted and is pending execution. */ public static final NodeExtensionState ACCEPTED = fromString("Accepted"); /** - * Static value Provisioning for NodeExtensionState. + * The extension is currently being provisioned on the node. */ public static final NodeExtensionState PROVISIONING = fromString("Provisioning"); diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/Observability.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/Observability.java index 55e320fb2745..ecaed7ea095f 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/Observability.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/Observability.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.models; @@ -103,14 +103,6 @@ public Observability withEpisodicDataUpload(Boolean episodicDataUpload) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/OemActivation.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/OemActivation.java index 2212846f9ce2..dad9325f0629 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/OemActivation.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/OemActivation.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.models; @@ -12,12 +12,12 @@ */ public final class OemActivation extends ExpandableStringEnum { /** - * Static value Disabled for OemActivation. + * OEM activation is disabled for the cluster. */ public static final OemActivation DISABLED = fromString("Disabled"); /** - * Static value Enabled for OemActivation. + * OEM activation is enabled for the cluster. */ public static final OemActivation ENABLED = fromString("Enabled"); diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/Offer.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/Offer.java index 7ff6efbab5bd..1227d34dde83 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/Offer.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/Offer.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.models; diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/Offers.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/Offers.java index 5e90dee67f55..3a3591fab68d 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/Offers.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/Offers.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.models; @@ -13,52 +13,56 @@ */ public interface Offers { /** - * List Offers available for a publisher within the HCI Cluster. + * Get Offer resource details within a publisher of HCI Cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param publisherName The name of the publisher available within HCI cluster. + * @param offerName The name of the offer available within HCI cluster. + * @param expand Specify $expand=content,contentVersion to populate additional fields related to the marketplace + * offer. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of Offer proxy resources for the HCI cluster as paginated response with {@link PagedIterable}. + * @return offer resource details within a publisher of HCI Cluster along with {@link Response}. */ - PagedIterable listByPublisher(String resourceGroupName, String clusterName, String publisherName); + Response getWithResponse(String resourceGroupName, String clusterName, String publisherName, + String offerName, String expand, Context context); /** - * List Offers available for a publisher within the HCI Cluster. + * Get Offer resource details within a publisher of HCI Cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param publisherName The name of the publisher available within HCI cluster. - * @param expand Specify $expand=content,contentVersion to populate additional fields related to the marketplace - * offer. - * @param context The context to associate with this operation. + * @param offerName The name of the offer available within HCI cluster. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of Offer proxy resources for the HCI cluster as paginated response with {@link PagedIterable}. + * @return offer resource details within a publisher of HCI Cluster. */ - PagedIterable listByPublisher(String resourceGroupName, String clusterName, String publisherName, - String expand, Context context); + Offer get(String resourceGroupName, String clusterName, String publisherName, String offerName); /** - * List Offers available across publishers for the HCI Cluster. + * List Offers available for a publisher within the HCI Cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. + * @param publisherName The name of the publisher available within HCI cluster. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return list of Offer proxy resources for the HCI cluster as paginated response with {@link PagedIterable}. */ - PagedIterable listByCluster(String resourceGroupName, String clusterName); + PagedIterable listByPublisher(String resourceGroupName, String clusterName, String publisherName); /** - * List Offers available across publishers for the HCI Cluster. + * List Offers available for a publisher within the HCI Cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. + * @param publisherName The name of the publisher available within HCI cluster. * @param expand Specify $expand=content,contentVersion to populate additional fields related to the marketplace * offer. * @param context The context to associate with this operation. @@ -67,37 +71,33 @@ PagedIterable listByPublisher(String resourceGroupName, String clusterNam * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return list of Offer proxy resources for the HCI cluster as paginated response with {@link PagedIterable}. */ - PagedIterable listByCluster(String resourceGroupName, String clusterName, String expand, Context context); + PagedIterable listByPublisher(String resourceGroupName, String clusterName, String publisherName, + String expand, Context context); /** - * Get Offer resource details within a publisher of HCI Cluster. + * List Offers available across publishers for the HCI Cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. - * @param publisherName The name of the publisher available within HCI cluster. - * @param offerName The name of the offer available within HCI cluster. - * @param expand Specify $expand=content,contentVersion to populate additional fields related to the marketplace - * offer. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return offer resource details within a publisher of HCI Cluster along with {@link Response}. + * @return list of Offer proxy resources for the HCI cluster as paginated response with {@link PagedIterable}. */ - Response getWithResponse(String resourceGroupName, String clusterName, String publisherName, - String offerName, String expand, Context context); + PagedIterable listByCluster(String resourceGroupName, String clusterName); /** - * Get Offer resource details within a publisher of HCI Cluster. + * List Offers available across publishers for the HCI Cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. - * @param publisherName The name of the publisher available within HCI cluster. - * @param offerName The name of the offer available within HCI cluster. + * @param expand Specify $expand=content,contentVersion to populate additional fields related to the marketplace + * offer. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return offer resource details within a publisher of HCI Cluster. + * @return list of Offer proxy resources for the HCI cluster as paginated response with {@link PagedIterable}. */ - Offer get(String resourceGroupName, String clusterName, String publisherName, String offerName); + PagedIterable listByCluster(String resourceGroupName, String clusterName, String expand, Context context); } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/Operation.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/Operation.java index a0be8072f0aa..dd1cd7a17291 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/Operation.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/Operation.java @@ -1,169 +1,58 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.models; -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; +import com.azure.resourcemanager.azurestackhci.fluent.models.OperationInner; /** - * REST API Operation - * - * Details of a REST API operation, returned from the Resource Provider Operations API. + * An immutable client-side representation of Operation. */ -@Fluent -public final class Operation implements JsonSerializable { - /* - * The name of the operation, as per Resource-Based Access Control (RBAC). Examples: - * "Microsoft.Compute/virtualMachines/write", "Microsoft.Compute/virtualMachines/capture/action" - */ - private String name; - - /* - * Whether the operation applies to data-plane. This is "true" for data-plane operations and "false" for - * ARM/control-plane operations. - */ - private Boolean isDataAction; - - /* - * Localized display information for this particular operation. - */ - private OperationDisplay display; - - /* - * The intended executor of the operation; as in Resource Based Access Control (RBAC) and audit logs UX. Default - * value is "user,system" - */ - private Origin origin; - - /* - * Enum. Indicates the action type. "Internal" refers to actions that are for internal only APIs. - */ - private ActionType actionType; - - /** - * Creates an instance of Operation class. - */ - public Operation() { - } - +public interface Operation { /** - * Get the name property: The name of the operation, as per Resource-Based Access Control (RBAC). Examples: + * Gets the name property: The name of the operation, as per Resource-Based Access Control (RBAC). Examples: * "Microsoft.Compute/virtualMachines/write", "Microsoft.Compute/virtualMachines/capture/action". * * @return the name value. */ - public String name() { - return this.name; - } + String name(); /** - * Get the isDataAction property: Whether the operation applies to data-plane. This is "true" for data-plane - * operations and "false" for ARM/control-plane operations. + * Gets the isDataAction property: Whether the operation applies to data-plane. This is "true" for data-plane + * operations and "false" for Azure Resource Manager/control-plane operations. * * @return the isDataAction value. */ - public Boolean isDataAction() { - return this.isDataAction; - } + Boolean isDataAction(); /** - * Get the display property: Localized display information for this particular operation. + * Gets the display property: Localized display information for this particular operation. * * @return the display value. */ - public OperationDisplay display() { - return this.display; - } + OperationDisplay display(); /** - * Set the display property: Localized display information for this particular operation. - * - * @param display the display value to set. - * @return the Operation object itself. - */ - public Operation withDisplay(OperationDisplay display) { - this.display = display; - return this; - } - - /** - * Get the origin property: The intended executor of the operation; as in Resource Based Access Control (RBAC) and + * Gets the origin property: The intended executor of the operation; as in Resource Based Access Control (RBAC) and * audit logs UX. Default value is "user,system". * * @return the origin value. */ - public Origin origin() { - return this.origin; - } + Origin origin(); /** - * Get the actionType property: Enum. Indicates the action type. "Internal" refers to actions that are for internal - * only APIs. + * Gets the actionType property: Extensible enum. Indicates the action type. "Internal" refers to actions that are + * for internal only APIs. * * @return the actionType value. */ - public ActionType actionType() { - return this.actionType; - } + ActionType actionType(); /** - * Validates the instance. + * Gets the inner com.azure.resourcemanager.azurestackhci.fluent.models.OperationInner object. * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (display() != null) { - display().validate(); - } - } - - /** - * {@inheritDoc} + * @return the inner object. */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("display", this.display); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of Operation from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of Operation 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 Operation. - */ - public static Operation fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - Operation deserializedOperation = new Operation(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("name".equals(fieldName)) { - deserializedOperation.name = reader.getString(); - } else if ("isDataAction".equals(fieldName)) { - deserializedOperation.isDataAction = reader.getNullable(JsonReader::getBoolean); - } else if ("display".equals(fieldName)) { - deserializedOperation.display = OperationDisplay.fromJson(reader); - } else if ("origin".equals(fieldName)) { - deserializedOperation.origin = Origin.fromString(reader.getString()); - } else if ("actionType".equals(fieldName)) { - deserializedOperation.actionType = ActionType.fromString(reader.getString()); - } else { - reader.skipChildren(); - } - } - - return deserializedOperation; - }); - } + OperationInner innerModel(); } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/OperationDisplay.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/OperationDisplay.java index 0da364a94c1b..92fecadee18b 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/OperationDisplay.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/OperationDisplay.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.models; @@ -12,7 +12,7 @@ import java.io.IOException; /** - * Localized display information for this particular operation. + * Localized display information for an operation. */ @Immutable public final class OperationDisplay implements JsonSerializable { @@ -42,7 +42,7 @@ public final class OperationDisplay implements JsonSerializable value(); - - /** - * Gets the nextLink property: URL to get the next set of operation list results (if there are any). - * - * @return the nextLink value. - */ - String nextLink(); - - /** - * Gets the inner com.azure.resourcemanager.azurestackhci.fluent.models.OperationListResultInner object. - * - * @return the inner object. - */ - OperationListResultInner innerModel(); -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/OperationType.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/OperationType.java index d33ea74ac5e0..dd6c2f8872f9 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/OperationType.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/OperationType.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.models; @@ -12,12 +12,12 @@ */ public final class OperationType extends ExpandableStringEnum { /** - * Static value ClusterProvisioning for OperationType. + * Cluster provisioning operation. */ public static final OperationType CLUSTER_PROVISIONING = fromString("ClusterProvisioning"); /** - * Static value ClusterUpgrade for OperationType. + * Cluster upgrade operation. */ public static final OperationType CLUSTER_UPGRADE = fromString("ClusterUpgrade"); diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/Operations.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/Operations.java index 5ee0ff63bb53..90cd92269856 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/Operations.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/Operations.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.models; -import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.PagedIterable; import com.azure.core.util.Context; /** @@ -12,22 +12,24 @@ */ public interface Operations { /** - * List all available Microsoft.AzureStackHCI provider operations. + * List the operations for the provider. * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of REST API operations supported by an Azure Resource Provider along with {@link Response}. + * @return a list of REST API operations supported by an Azure Resource Provider as paginated response with + * {@link PagedIterable}. */ - Response listWithResponse(Context context); + PagedIterable list(); /** - * List all available Microsoft.AzureStackHCI provider operations. + * List the operations for the provider. * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of REST API operations supported by an Azure Resource Provider. + * @return a list of REST API operations supported by an Azure Resource Provider as paginated response with + * {@link PagedIterable}. */ - OperationListResult list(); + PagedIterable list(Context context); } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/OptionalServices.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/OptionalServices.java index 001560cc7410..f5f094cbcf54 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/OptionalServices.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/OptionalServices.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.models; @@ -47,14 +47,6 @@ public OptionalServices withCustomLocation(String customLocation) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/Origin.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/Origin.java index 9bf1d9951e44..82de754f8e54 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/Origin.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/Origin.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.models; @@ -13,17 +13,17 @@ */ public final class Origin extends ExpandableStringEnum { /** - * Static value user for Origin. + * Indicates the operation is initiated by a user. */ public static final Origin USER = fromString("user"); /** - * Static value system for Origin. + * Indicates the operation is initiated by a system. */ public static final Origin SYSTEM = fromString("system"); /** - * Static value user,system for Origin. + * Indicates the operation is initiated by a user or system. */ public static final Origin USER_SYSTEM = fromString("user,system"); diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/PackageVersionInfo.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/PackageVersionInfo.java index 79553c30a669..327208fbbbfd 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/PackageVersionInfo.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/PackageVersionInfo.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.models; @@ -100,14 +100,6 @@ public PackageVersionInfo withLastUpdated(OffsetDateTime lastUpdated) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/PasswordCredential.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/PasswordCredential.java index a148be1e3cc8..2f04ac3aceb5 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/PasswordCredential.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/PasswordCredential.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.models; diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/PerNodeExtensionState.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/PerNodeExtensionState.java index e6ca5d9c40a7..847f2847899a 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/PerNodeExtensionState.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/PerNodeExtensionState.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.models; @@ -32,7 +32,8 @@ public final class PerNodeExtensionState implements JsonSerializable { private String arcNodeServicePrincipalObjectId; /* - * State of Arc agent in this node. + * State of the Arc agent in this node. Indicates the current lifecycle status of the agent, such as whether it's + * being provisioned, connected, updated, or has encountered an error. */ private NodeArcState state; /** * Creates an instance of PerNodeState class. */ - public PerNodeState() { + private PerNodeState() { } /** @@ -70,7 +71,8 @@ public String arcNodeServicePrincipalObjectId() { } /** - * Get the state property: State of Arc agent in this node. + * Get the state property: State of the Arc agent in this node. Indicates the current lifecycle status of the agent, + * such as whether it's being provisioned, connected, updated, or has encountered an error. * * @return the state value. */ @@ -78,14 +80,6 @@ public NodeArcState state() { return this.state; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/PhysicalNodes.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/PhysicalNodes.java index 2e66cf730b73..587c1f5b60f7 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/PhysicalNodes.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/PhysicalNodes.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.models; @@ -72,14 +72,6 @@ public PhysicalNodes withIpv4Address(String ipv4Address) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/PrecheckResult.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/PrecheckResult.java index 307594b43fad..5d6023f7514f 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/PrecheckResult.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/PrecheckResult.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.models; @@ -45,14 +45,14 @@ public final class PrecheckResult implements JsonSerializable { private String title; /* - * The status of the check running (i.e. Failed, Succeeded, In Progress). This answers whether the check ran, and - * passed or failed. + * Represents the current status of the check being performed. Indicates whether the check has completed + * successfully, failed, or is still in progress. */ private Status status; /* - * Severity of the result (Critical, Warning, Informational, Hidden). This answers how important the result is. - * Critical is the only update-blocking severity. + * Indicates the importance or impact level of the result. Determines whether the result is informational, a + * warning, or a critical issue that may block updates. */ private Severity severity; @@ -205,8 +205,8 @@ public PrecheckResult withTitle(String title) { } /** - * Get the status property: The status of the check running (i.e. Failed, Succeeded, In Progress). This answers - * whether the check ran, and passed or failed. + * Get the status property: Represents the current status of the check being performed. Indicates whether the check + * has completed successfully, failed, or is still in progress. * * @return the status value. */ @@ -215,8 +215,8 @@ public Status status() { } /** - * Set the status property: The status of the check running (i.e. Failed, Succeeded, In Progress). This answers - * whether the check ran, and passed or failed. + * Set the status property: Represents the current status of the check being performed. Indicates whether the check + * has completed successfully, failed, or is still in progress. * * @param status the status value to set. * @return the PrecheckResult object itself. @@ -227,8 +227,8 @@ public PrecheckResult withStatus(Status status) { } /** - * Get the severity property: Severity of the result (Critical, Warning, Informational, Hidden). This answers how - * important the result is. Critical is the only update-blocking severity. + * Get the severity property: Indicates the importance or impact level of the result. Determines whether the result + * is informational, a warning, or a critical issue that may block updates. * * @return the severity value. */ @@ -237,8 +237,8 @@ public Severity severity() { } /** - * Set the severity property: Severity of the result (Critical, Warning, Informational, Hidden). This answers how - * important the result is. Critical is the only update-blocking severity. + * Set the severity property: Indicates the importance or impact level of the result. Determines whether the result + * is informational, a warning, or a critical issue that may block updates. * * @param severity the severity value to set. * @return the PrecheckResult object itself. @@ -412,17 +412,6 @@ public PrecheckResult withHealthCheckSource(String healthCheckSource) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (tags() != null) { - tags().validate(); - } - } - /** * {@inheritDoc} */ @@ -432,7 +421,9 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStringField("name", this.name); jsonWriter.writeStringField("displayName", this.displayName); jsonWriter.writeJsonField("tags", this.tags); - jsonWriter.writeUntypedField("healthCheckTags", this.healthCheckTags); + if (this.healthCheckTags != null) { + jsonWriter.writeUntypedField("healthCheckTags", this.healthCheckTags); + } jsonWriter.writeStringField("title", this.title); jsonWriter.writeStringField("status", this.status == null ? null : this.status.toString()); jsonWriter.writeStringField("severity", this.severity == null ? null : this.severity.toString()); diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/PrecheckResultTags.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/PrecheckResultTags.java index 0ec61ccc58fe..eda3f8d34709 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/PrecheckResultTags.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/PrecheckResultTags.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.models; @@ -72,14 +72,6 @@ public PrecheckResultTags withValue(String value) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/ProvisioningState.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/ProvisioningState.java index 2f0e58f7b039..7b6af5adef98 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/ProvisioningState.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/ProvisioningState.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.models; @@ -12,92 +12,92 @@ */ public final class ProvisioningState extends ExpandableStringEnum { /** - * Static value NotSpecified for ProvisioningState. + * The provisioning state is not specified. */ public static final ProvisioningState NOT_SPECIFIED = fromString("NotSpecified"); /** - * Static value Error for ProvisioningState. + * An error occurred during provisioning. */ public static final ProvisioningState ERROR = fromString("Error"); /** - * Static value Succeeded for ProvisioningState. + * Provisioning completed successfully. */ public static final ProvisioningState SUCCEEDED = fromString("Succeeded"); /** - * Static value Failed for ProvisioningState. + * Provisioning failed. */ public static final ProvisioningState FAILED = fromString("Failed"); /** - * Static value Canceled for ProvisioningState. + * Provisioning was canceled. */ public static final ProvisioningState CANCELED = fromString("Canceled"); /** - * Static value Connected for ProvisioningState. + * The resource is connected. */ public static final ProvisioningState CONNECTED = fromString("Connected"); /** - * Static value Disconnected for ProvisioningState. + * The resource is disconnected. */ public static final ProvisioningState DISCONNECTED = fromString("Disconnected"); /** - * Static value Deleted for ProvisioningState. + * The resource has been deleted. */ public static final ProvisioningState DELETED = fromString("Deleted"); /** - * Static value Creating for ProvisioningState. + * The resource is being created. */ public static final ProvisioningState CREATING = fromString("Creating"); /** - * Static value Updating for ProvisioningState. + * The resource is being updated. */ public static final ProvisioningState UPDATING = fromString("Updating"); /** - * Static value Deleting for ProvisioningState. + * The resource is being deleted. */ public static final ProvisioningState DELETING = fromString("Deleting"); /** - * Static value Moving for ProvisioningState. + * The resource is being moved. */ public static final ProvisioningState MOVING = fromString("Moving"); /** - * Static value PartiallySucceeded for ProvisioningState. + * Provisioning partially succeeded. */ public static final ProvisioningState PARTIALLY_SUCCEEDED = fromString("PartiallySucceeded"); /** - * Static value PartiallyConnected for ProvisioningState. + * The resource is partially connected. */ public static final ProvisioningState PARTIALLY_CONNECTED = fromString("PartiallyConnected"); /** - * Static value InProgress for ProvisioningState. + * Provisioning is in progress. */ public static final ProvisioningState IN_PROGRESS = fromString("InProgress"); /** - * Static value Accepted for ProvisioningState. + * Provisioning request has been accepted. */ public static final ProvisioningState ACCEPTED = fromString("Accepted"); /** - * Static value Provisioning for ProvisioningState. + * The resource is currently provisioning. */ public static final ProvisioningState PROVISIONING = fromString("Provisioning"); /** - * Static value DisableInProgress for ProvisioningState. + * The resource is being disabled. */ public static final ProvisioningState DISABLE_IN_PROGRESS = fromString("DisableInProgress"); diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/PublisherList.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/PublisherList.java deleted file mode 100644 index ab1f70e8d201..000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/PublisherList.java +++ /dev/null @@ -1,103 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.azurestackhci.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.azurestackhci.fluent.models.PublisherInner; -import java.io.IOException; -import java.util.List; - -/** - * List of Publisher proxy resources for the HCI cluster. - */ -@Immutable -public final class PublisherList implements JsonSerializable { - /* - * List of Publisher proxy resources. - */ - private List value; - - /* - * Link to the next set of results. - */ - private String nextLink; - - /** - * Creates an instance of PublisherList class. - */ - public PublisherList() { - } - - /** - * Get the value property: List of Publisher proxy resources. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Get the nextLink property: Link to the next set of results. - * - * @return the nextLink value. - */ - public String nextLink() { - return this.nextLink; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (value() != null) { - value().forEach(e -> e.validate()); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of PublisherList from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of PublisherList 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 PublisherList. - */ - public static PublisherList fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - PublisherList deserializedPublisherList = new PublisherList(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("value".equals(fieldName)) { - List value = reader.readArray(reader1 -> PublisherInner.fromJson(reader1)); - deserializedPublisherList.value = value; - } else if ("nextLink".equals(fieldName)) { - deserializedPublisherList.nextLink = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedPublisherList; - }); - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/Publishers.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/Publishers.java deleted file mode 100644 index e948fc8e2997..000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/Publishers.java +++ /dev/null @@ -1,67 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.azurestackhci.models; - -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.util.Context; - -/** - * Resource collection API of Publishers. - */ -public interface Publishers { - /** - * List Publishers available for the HCI Cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterName The name of the cluster. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of Publisher proxy resources for the HCI cluster as paginated response with {@link PagedIterable}. - */ - PagedIterable listByCluster(String resourceGroupName, String clusterName); - - /** - * List Publishers available for the HCI Cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterName The name of the cluster. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of Publisher proxy resources for the HCI cluster as paginated response with {@link PagedIterable}. - */ - PagedIterable listByCluster(String resourceGroupName, String clusterName, Context context); - - /** - * Get Publisher resource details of HCI Cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterName The name of the cluster. - * @param publisherName The name of the publisher available within HCI cluster. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return publisher resource details of HCI Cluster along with {@link Response}. - */ - Response getWithResponse(String resourceGroupName, String clusterName, String publisherName, - Context context); - - /** - * Get Publisher resource details of HCI Cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterName The name of the cluster. - * @param publisherName The name of the publisher available within HCI cluster. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return publisher resource details of HCI Cluster. - */ - Publisher get(String resourceGroupName, String clusterName, String publisherName); -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/QosPolicyOverrides.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/QosPolicyOverrides.java index 015d4914555e..2e7ec809667f 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/QosPolicyOverrides.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/QosPolicyOverrides.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.models; @@ -106,14 +106,6 @@ public QosPolicyOverrides withBandwidthPercentageSmb(String bandwidthPercentageS return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/RawCertificateData.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/RawCertificateData.java index ea79acc5d7ce..61fdcc708c5f 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/RawCertificateData.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/RawCertificateData.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.models; @@ -48,14 +48,6 @@ public RawCertificateData withCertificates(List certificates) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/RdmaCapability.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/RdmaCapability.java new file mode 100644 index 000000000000..5bf9a90e1b81 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/RdmaCapability.java @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.azurestackhci.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Describes the RDMA capability of the network adapter. + */ +public final class RdmaCapability extends ExpandableStringEnum { + /** + * Network Adapter on the device is RDMA Capable. + */ + public static final RdmaCapability ENABLED = fromString("Enabled"); + + /** + * Network Adapter on the device is RDMA Capable. + */ + public static final RdmaCapability DISABLED = fromString("Disabled"); + + /** + * Creates a new instance of RdmaCapability value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public RdmaCapability() { + } + + /** + * Creates or finds a RdmaCapability from its string representation. + * + * @param name a name to look for. + * @return the corresponding RdmaCapability. + */ + public static RdmaCapability fromString(String name) { + return fromString(name, RdmaCapability.class); + } + + /** + * Gets known RdmaCapability values. + * + * @return known RdmaCapability values. + */ + public static Collection values() { + return values(RdmaCapability.class); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/RebootRequirement.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/RebootRequirement.java index b5c480f9751b..02d4874c007c 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/RebootRequirement.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/RebootRequirement.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.models; @@ -8,21 +8,22 @@ import java.util.Collection; /** - * Defines values for RebootRequirement. + * Indicates whether a reboot is required after the update or operation. Helps determine if a system restart is + * necessary to complete the process. */ public final class RebootRequirement extends ExpandableStringEnum { /** - * Static value Unknown for RebootRequirement. + * It is not known whether a reboot is required. */ public static final RebootRequirement UNKNOWN = fromString("Unknown"); /** - * Static value True for RebootRequirement. + * A reboot is required to complete the operation. */ public static final RebootRequirement TRUE = fromString("True"); /** - * Static value False for RebootRequirement. + * No reboot is required after the operation. */ public static final RebootRequirement FALSE = fromString("False"); diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/ReconcileArcSettingsRequest.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/ReconcileArcSettingsRequest.java new file mode 100644 index 000000000000..c759ae615ca0 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/ReconcileArcSettingsRequest.java @@ -0,0 +1,86 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.azurestackhci.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; + +/** + * Request for reconciling Arc Settings. + */ +@Fluent +public final class ReconcileArcSettingsRequest implements JsonSerializable { + /* + * List of Arc Nodes in the cluster + */ + private ReconcileArcSettingsRequestProperties properties; + + /** + * Creates an instance of ReconcileArcSettingsRequest class. + */ + public ReconcileArcSettingsRequest() { + } + + /** + * Get the properties property: List of Arc Nodes in the cluster. + * + * @return the properties value. + */ + public ReconcileArcSettingsRequestProperties properties() { + return this.properties; + } + + /** + * Set the properties property: List of Arc Nodes in the cluster. + * + * @param properties the properties value to set. + * @return the ReconcileArcSettingsRequest object itself. + */ + public ReconcileArcSettingsRequest withProperties(ReconcileArcSettingsRequestProperties properties) { + this.properties = properties; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("properties", this.properties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ReconcileArcSettingsRequest from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ReconcileArcSettingsRequest 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 ReconcileArcSettingsRequest. + */ + public static ReconcileArcSettingsRequest fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ReconcileArcSettingsRequest deserializedReconcileArcSettingsRequest = new ReconcileArcSettingsRequest(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("properties".equals(fieldName)) { + deserializedReconcileArcSettingsRequest.properties + = ReconcileArcSettingsRequestProperties.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedReconcileArcSettingsRequest; + }); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/ReconcileArcSettingsRequestProperties.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/ReconcileArcSettingsRequestProperties.java new file mode 100644 index 000000000000..476ce7eee328 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/ReconcileArcSettingsRequestProperties.java @@ -0,0 +1,89 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.azurestackhci.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.List; + +/** + * List of Arc Nodes in the cluster. + */ +@Fluent +public final class ReconcileArcSettingsRequestProperties + implements JsonSerializable { + /* + * The clusterNodes property. + */ + private List clusterNodes; + + /** + * Creates an instance of ReconcileArcSettingsRequestProperties class. + */ + public ReconcileArcSettingsRequestProperties() { + } + + /** + * Get the clusterNodes property: The clusterNodes property. + * + * @return the clusterNodes value. + */ + public List clusterNodes() { + return this.clusterNodes; + } + + /** + * Set the clusterNodes property: The clusterNodes property. + * + * @param clusterNodes the clusterNodes value to set. + * @return the ReconcileArcSettingsRequestProperties object itself. + */ + public ReconcileArcSettingsRequestProperties withClusterNodes(List clusterNodes) { + this.clusterNodes = clusterNodes; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("clusterNodes", this.clusterNodes, (writer, element) -> writer.writeString(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ReconcileArcSettingsRequestProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ReconcileArcSettingsRequestProperties 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 ReconcileArcSettingsRequestProperties. + */ + public static ReconcileArcSettingsRequestProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ReconcileArcSettingsRequestProperties deserializedReconcileArcSettingsRequestProperties + = new ReconcileArcSettingsRequestProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("clusterNodes".equals(fieldName)) { + List clusterNodes = reader.readArray(reader1 -> reader1.getString()); + deserializedReconcileArcSettingsRequestProperties.clusterNodes = clusterNodes; + } else { + reader.skipChildren(); + } + } + + return deserializedReconcileArcSettingsRequestProperties; + }); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/RemoteSupportAccessLevel.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/RemoteSupportAccessLevel.java new file mode 100644 index 000000000000..414d5f3e7a87 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/RemoteSupportAccessLevel.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.azurestackhci.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Defines the level of remote support access granted. + */ +public final class RemoteSupportAccessLevel extends ExpandableStringEnum { + /** + * No remote support access is granted. + */ + public static final RemoteSupportAccessLevel NONE = fromString("None"); + + /** + * Access is limited to diagnostics information only. + */ + public static final RemoteSupportAccessLevel DIAGNOSTICS = fromString("Diagnostics"); + + /** + * Access includes diagnostics information and the ability to perform repairs. + */ + public static final RemoteSupportAccessLevel DIAGNOSTICS_AND_REPAIR = fromString("DiagnosticsAndRepair"); + + /** + * Creates a new instance of RemoteSupportAccessLevel value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public RemoteSupportAccessLevel() { + } + + /** + * Creates or finds a RemoteSupportAccessLevel from its string representation. + * + * @param name a name to look for. + * @return the corresponding RemoteSupportAccessLevel. + */ + public static RemoteSupportAccessLevel fromString(String name) { + return fromString(name, RemoteSupportAccessLevel.class); + } + + /** + * Gets known RemoteSupportAccessLevel values. + * + * @return known RemoteSupportAccessLevel values. + */ + public static Collection values() { + return values(RemoteSupportAccessLevel.class); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/RemoteSupportJobNodeSettings.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/RemoteSupportJobNodeSettings.java new file mode 100644 index 000000000000..81b954dc10fe --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/RemoteSupportJobNodeSettings.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.azurestackhci.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; + +/** + * Represents the settings of a remote support node. + */ +@Immutable +public final class RemoteSupportJobNodeSettings implements JsonSerializable { + /* + * The state of the remote support node. + */ + private String state; + + /* + * The timestamp when the node settings were created, in UTC. + */ + private OffsetDateTime createdAt; + + /* + * The timestamp when the node settings were last updated, in UTC. + */ + private OffsetDateTime updatedAt; + + /* + * The current connection status of the remote support session. + */ + private String connectionStatus; + + /* + * The error message, if any, from the last connection attempt. + */ + private String connectionErrorMessage; + + /** + * Creates an instance of RemoteSupportJobNodeSettings class. + */ + private RemoteSupportJobNodeSettings() { + } + + /** + * Get the state property: The state of the remote support node. + * + * @return the state value. + */ + public String state() { + return this.state; + } + + /** + * Get the createdAt property: The timestamp when the node settings were created, in UTC. + * + * @return the createdAt value. + */ + public OffsetDateTime createdAt() { + return this.createdAt; + } + + /** + * Get the updatedAt property: The timestamp when the node settings were last updated, in UTC. + * + * @return the updatedAt value. + */ + public OffsetDateTime updatedAt() { + return this.updatedAt; + } + + /** + * Get the connectionStatus property: The current connection status of the remote support session. + * + * @return the connectionStatus value. + */ + public String connectionStatus() { + return this.connectionStatus; + } + + /** + * Get the connectionErrorMessage property: The error message, if any, from the last connection attempt. + * + * @return the connectionErrorMessage value. + */ + public String connectionErrorMessage() { + return this.connectionErrorMessage; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of RemoteSupportJobNodeSettings from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of RemoteSupportJobNodeSettings 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 RemoteSupportJobNodeSettings. + */ + public static RemoteSupportJobNodeSettings fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + RemoteSupportJobNodeSettings deserializedRemoteSupportJobNodeSettings = new RemoteSupportJobNodeSettings(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("state".equals(fieldName)) { + deserializedRemoteSupportJobNodeSettings.state = reader.getString(); + } else if ("createdAt".equals(fieldName)) { + deserializedRemoteSupportJobNodeSettings.createdAt = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("updatedAt".equals(fieldName)) { + deserializedRemoteSupportJobNodeSettings.updatedAt = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("connectionStatus".equals(fieldName)) { + deserializedRemoteSupportJobNodeSettings.connectionStatus = reader.getString(); + } else if ("connectionErrorMessage".equals(fieldName)) { + deserializedRemoteSupportJobNodeSettings.connectionErrorMessage = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedRemoteSupportJobNodeSettings; + }); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/RemoteSupportJobReportedProperties.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/RemoteSupportJobReportedProperties.java new file mode 100644 index 000000000000..597f2fa4e3a1 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/RemoteSupportJobReportedProperties.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.azurestackhci.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; + +/** + * Represents the reported properties of a remote support job. + */ +@Immutable +public final class RemoteSupportJobReportedProperties implements JsonSerializable { + /* + * The percentage of the job that is complete. + */ + private Integer percentComplete; + + /* + * Validation status of job. + */ + private EceActionStatus validationStatus; + + /* + * Deployment status of job. + */ + private EceActionStatus deploymentStatus; + + /* + * Optional settings for configuring the node for remote support. + */ + private RemoteSupportJobNodeSettings nodeSettings; + + /* + * Details of the remote support session. + */ + private List sessionDetails; + + /** + * Creates an instance of RemoteSupportJobReportedProperties class. + */ + private RemoteSupportJobReportedProperties() { + } + + /** + * Get the percentComplete property: The percentage of the job that is complete. + * + * @return the percentComplete value. + */ + public Integer percentComplete() { + return this.percentComplete; + } + + /** + * Get the validationStatus property: Validation status of job. + * + * @return the validationStatus value. + */ + public EceActionStatus validationStatus() { + return this.validationStatus; + } + + /** + * Get the deploymentStatus property: Deployment status of job. + * + * @return the deploymentStatus value. + */ + public EceActionStatus deploymentStatus() { + return this.deploymentStatus; + } + + /** + * Get the nodeSettings property: Optional settings for configuring the node for remote support. + * + * @return the nodeSettings value. + */ + public RemoteSupportJobNodeSettings nodeSettings() { + return this.nodeSettings; + } + + /** + * Get the sessionDetails property: Details of the remote support session. + * + * @return the sessionDetails value. + */ + public List sessionDetails() { + return this.sessionDetails; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of RemoteSupportJobReportedProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of RemoteSupportJobReportedProperties 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 RemoteSupportJobReportedProperties. + */ + public static RemoteSupportJobReportedProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + RemoteSupportJobReportedProperties deserializedRemoteSupportJobReportedProperties + = new RemoteSupportJobReportedProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("percentComplete".equals(fieldName)) { + deserializedRemoteSupportJobReportedProperties.percentComplete + = reader.getNullable(JsonReader::getInt); + } else if ("validationStatus".equals(fieldName)) { + deserializedRemoteSupportJobReportedProperties.validationStatus = EceActionStatus.fromJson(reader); + } else if ("deploymentStatus".equals(fieldName)) { + deserializedRemoteSupportJobReportedProperties.deploymentStatus = EceActionStatus.fromJson(reader); + } else if ("nodeSettings".equals(fieldName)) { + deserializedRemoteSupportJobReportedProperties.nodeSettings + = RemoteSupportJobNodeSettings.fromJson(reader); + } else if ("sessionDetails".equals(fieldName)) { + List sessionDetails + = reader.readArray(reader1 -> RemoteSupportSession.fromJson(reader1)); + deserializedRemoteSupportJobReportedProperties.sessionDetails = sessionDetails; + } else { + reader.skipChildren(); + } + } + + return deserializedRemoteSupportJobReportedProperties; + }); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/RemoteSupportNodeSettings.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/RemoteSupportNodeSettings.java index 9dc320e13015..ce9510a07bf4 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/RemoteSupportNodeSettings.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/RemoteSupportNodeSettings.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.models; @@ -56,7 +56,7 @@ public final class RemoteSupportNodeSettings implements JsonSerializable remoteSupportSessionDetails() { return this.remoteSupportSessionDetails; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (remoteSupportNodeSettings() != null) { - remoteSupportNodeSettings().forEach(e -> e.validate()); - } - if (remoteSupportSessionDetails() != null) { - remoteSupportSessionDetails().forEach(e -> e.validate()); - } - } - /** * {@inheritDoc} */ diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/RemoteSupportRequest.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/RemoteSupportRequest.java index 42a6f7a4afc5..b2c8f512dafb 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/RemoteSupportRequest.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/RemoteSupportRequest.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.models; @@ -47,17 +47,6 @@ public RemoteSupportRequest withProperties(RemoteSupportRequestProperties proper return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (properties() != null) { - properties().validate(); - } - } - /** * {@inheritDoc} */ diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/RemoteSupportRequestProperties.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/RemoteSupportRequestProperties.java index 164c7f699db6..68e74dadfd32 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/RemoteSupportRequestProperties.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/RemoteSupportRequestProperties.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.models; @@ -89,14 +89,6 @@ public RemoteSupportRequestProperties withRemoteSupportType(RemoteSupportType re return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/RemoteSupportSession.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/RemoteSupportSession.java new file mode 100644 index 000000000000..628c13fa6ab8 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/RemoteSupportSession.java @@ -0,0 +1,142 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.azurestackhci.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; + +/** + * Represents a remote support session. + */ +@Immutable +public final class RemoteSupportSession implements JsonSerializable { + /* + * Unique session Id. + */ + private String sessionId; + + /* + * The start time of the remote support session, in UTC. + */ + private OffsetDateTime sessionStartTime; + + /* + * The end time of the remote support session, in UTC. + */ + private OffsetDateTime sessionEndTime; + + /* + * The level of access granted during the remote support session. + */ + private RemoteSupportAccessLevel accessLevel; + + /* + * The location where the session transcript is stored. + */ + private String transcriptLocation; + + /** + * Creates an instance of RemoteSupportSession class. + */ + private RemoteSupportSession() { + } + + /** + * Get the sessionId property: Unique session Id. + * + * @return the sessionId value. + */ + public String sessionId() { + return this.sessionId; + } + + /** + * Get the sessionStartTime property: The start time of the remote support session, in UTC. + * + * @return the sessionStartTime value. + */ + public OffsetDateTime sessionStartTime() { + return this.sessionStartTime; + } + + /** + * Get the sessionEndTime property: The end time of the remote support session, in UTC. + * + * @return the sessionEndTime value. + */ + public OffsetDateTime sessionEndTime() { + return this.sessionEndTime; + } + + /** + * Get the accessLevel property: The level of access granted during the remote support session. + * + * @return the accessLevel value. + */ + public RemoteSupportAccessLevel accessLevel() { + return this.accessLevel; + } + + /** + * Get the transcriptLocation property: The location where the session transcript is stored. + * + * @return the transcriptLocation value. + */ + public String transcriptLocation() { + return this.transcriptLocation; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of RemoteSupportSession from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of RemoteSupportSession 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 RemoteSupportSession. + */ + public static RemoteSupportSession fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + RemoteSupportSession deserializedRemoteSupportSession = new RemoteSupportSession(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("sessionId".equals(fieldName)) { + deserializedRemoteSupportSession.sessionId = reader.getString(); + } else if ("sessionStartTime".equals(fieldName)) { + deserializedRemoteSupportSession.sessionStartTime = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("sessionEndTime".equals(fieldName)) { + deserializedRemoteSupportSession.sessionEndTime = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("accessLevel".equals(fieldName)) { + deserializedRemoteSupportSession.accessLevel + = RemoteSupportAccessLevel.fromString(reader.getString()); + } else if ("transcriptLocation".equals(fieldName)) { + deserializedRemoteSupportSession.transcriptLocation = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedRemoteSupportSession; + }); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/RemoteSupportType.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/RemoteSupportType.java index 01bfc68dbf65..27ed7fc8e17f 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/RemoteSupportType.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/RemoteSupportType.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.models; @@ -12,12 +12,12 @@ */ public final class RemoteSupportType extends ExpandableStringEnum { /** - * Static value Enable for RemoteSupportType. + * Enable remote support for the cluster. */ public static final RemoteSupportType ENABLE = fromString("Enable"); /** - * Static value Revoke for RemoteSupportType. + * Revoke previously enabled remote support for the cluster. */ public static final RemoteSupportType REVOKE = fromString("Revoke"); diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/ReportedProperties.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/ReportedProperties.java index aae1bf0e90aa..139c63c8a1b6 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/ReportedProperties.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/ReportedProperties.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.models; @@ -29,7 +29,7 @@ public class ReportedProperties implements JsonSerializable /** * Creates an instance of ReportedProperties class. */ - public ReportedProperties() { + protected ReportedProperties() { } /** @@ -72,17 +72,6 @@ ReportedProperties withExtensionProfile(ExtensionProfile extensionProfile) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (extensionProfile() != null) { - extensionProfile().validate(); - } - } - /** * {@inheritDoc} */ diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/SbeCredentials.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/SbeCredentials.java index f59dc1414cfa..669718e0950f 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/SbeCredentials.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/SbeCredentials.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.models; @@ -97,14 +97,6 @@ public SbeCredentials withSecretLocation(String secretLocation) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/SbeDeploymentInfo.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/SbeDeploymentInfo.java index 5f61f8974781..2cf6311bdfdb 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/SbeDeploymentInfo.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/SbeDeploymentInfo.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.models; @@ -151,14 +151,6 @@ public SbeDeploymentInfo withSbeManifestCreationDate(OffsetDateTime sbeManifestC return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/SbeDeploymentPackageInfo.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/SbeDeploymentPackageInfo.java index 90eee34dbcad..086ceca91273 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/SbeDeploymentPackageInfo.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/SbeDeploymentPackageInfo.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.models; @@ -34,7 +34,7 @@ public final class SbeDeploymentPackageInfo implements JsonSerializable credentialList) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (sbeDeploymentInfo() != null) { - sbeDeploymentInfo().validate(); - } - if (partnerProperties() != null) { - partnerProperties().forEach(e -> e.validate()); - } - if (credentialList() != null) { - credentialList().forEach(e -> e.validate()); - } - } - /** * {@inheritDoc} */ diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/SbePartnerProperties.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/SbePartnerProperties.java index 8c1a53511465..863c1e4fca9b 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/SbePartnerProperties.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/SbePartnerProperties.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.models; @@ -72,14 +72,6 @@ public SbePartnerProperties withValue(String value) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/ScaleUnits.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/ScaleUnits.java index 0974a442d0ea..4063ffd986fe 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/ScaleUnits.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/ScaleUnits.java @@ -1,11 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -73,25 +72,6 @@ public ScaleUnits withSbePartnerInfo(SbePartnerInfo sbePartnerInfo) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (deploymentData() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property deploymentData in model ScaleUnits")); - } else { - deploymentData().validate(); - } - if (sbePartnerInfo() != null) { - sbePartnerInfo().validate(); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(ScaleUnits.class); - /** * {@inheritDoc} */ diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/SdnIntegration.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/SdnIntegration.java index 06ca4cc2b1f0..2047f3d5e6d3 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/SdnIntegration.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/SdnIntegration.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.models; @@ -49,17 +49,6 @@ public SdnIntegration withNetworkController(NetworkController networkController) return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (networkController() != null) { - networkController().validate(); - } - } - /** * {@inheritDoc} */ diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/SecretsLocationDetails.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/SecretsLocationDetails.java new file mode 100644 index 000000000000..ea4020a7e206 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/SecretsLocationDetails.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.azurestackhci.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; + +/** + * Secrets location details. + */ +@Fluent +public final class SecretsLocationDetails implements JsonSerializable { + /* + * Type of secrets to store + */ + private SecretsType secretsType; + + /* + * secrets location + */ + private String secretsLocation; + + /** + * Creates an instance of SecretsLocationDetails class. + */ + public SecretsLocationDetails() { + } + + /** + * Get the secretsType property: Type of secrets to store. + * + * @return the secretsType value. + */ + public SecretsType secretsType() { + return this.secretsType; + } + + /** + * Set the secretsType property: Type of secrets to store. + * + * @param secretsType the secretsType value to set. + * @return the SecretsLocationDetails object itself. + */ + public SecretsLocationDetails withSecretsType(SecretsType secretsType) { + this.secretsType = secretsType; + return this; + } + + /** + * Get the secretsLocation property: secrets location. + * + * @return the secretsLocation value. + */ + public String secretsLocation() { + return this.secretsLocation; + } + + /** + * Set the secretsLocation property: secrets location. + * + * @param secretsLocation the secretsLocation value to set. + * @return the SecretsLocationDetails object itself. + */ + public SecretsLocationDetails withSecretsLocation(String secretsLocation) { + this.secretsLocation = secretsLocation; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("secretsType", this.secretsType == null ? null : this.secretsType.toString()); + jsonWriter.writeStringField("secretsLocation", this.secretsLocation); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of SecretsLocationDetails from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of SecretsLocationDetails 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 SecretsLocationDetails. + */ + public static SecretsLocationDetails fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + SecretsLocationDetails deserializedSecretsLocationDetails = new SecretsLocationDetails(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("secretsType".equals(fieldName)) { + deserializedSecretsLocationDetails.secretsType = SecretsType.fromString(reader.getString()); + } else if ("secretsLocation".equals(fieldName)) { + deserializedSecretsLocationDetails.secretsLocation = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedSecretsLocationDetails; + }); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/SecretsLocationsChangeRequest.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/SecretsLocationsChangeRequest.java new file mode 100644 index 000000000000..3ab9a34dce9e --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/SecretsLocationsChangeRequest.java @@ -0,0 +1,89 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.azurestackhci.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.List; + +/** + * Update secrets locations change Request. + */ +@Fluent +public final class SecretsLocationsChangeRequest implements JsonSerializable { + /* + * List of secret locations + */ + private List properties; + + /** + * Creates an instance of SecretsLocationsChangeRequest class. + */ + public SecretsLocationsChangeRequest() { + } + + /** + * Get the properties property: List of secret locations. + * + * @return the properties value. + */ + public List properties() { + return this.properties; + } + + /** + * Set the properties property: List of secret locations. + * + * @param properties the properties value to set. + * @return the SecretsLocationsChangeRequest object itself. + */ + public SecretsLocationsChangeRequest withProperties(List properties) { + this.properties = properties; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("properties", this.properties, (writer, element) -> writer.writeJson(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of SecretsLocationsChangeRequest from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of SecretsLocationsChangeRequest 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 SecretsLocationsChangeRequest. + */ + public static SecretsLocationsChangeRequest fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + SecretsLocationsChangeRequest deserializedSecretsLocationsChangeRequest + = new SecretsLocationsChangeRequest(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("properties".equals(fieldName)) { + List properties + = reader.readArray(reader1 -> SecretsLocationDetails.fromJson(reader1)); + deserializedSecretsLocationsChangeRequest.properties = properties; + } else { + reader.skipChildren(); + } + } + + return deserializedSecretsLocationsChangeRequest; + }); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/SecretsType.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/SecretsType.java new file mode 100644 index 000000000000..92403379489e --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/SecretsType.java @@ -0,0 +1,46 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.azurestackhci.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Type of secrets to store. + */ +public final class SecretsType extends ExpandableStringEnum { + /** + * Backup secrets type. + */ + public static final SecretsType BACKUP_SECRETS = fromString("BackupSecrets"); + + /** + * Creates a new instance of SecretsType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public SecretsType() { + } + + /** + * Creates or finds a SecretsType from its string representation. + * + * @param name a name to look for. + * @return the corresponding SecretsType. + */ + public static SecretsType fromString(String name) { + return fromString(name, SecretsType.class); + } + + /** + * Gets known SecretsType values. + * + * @return known SecretsType values. + */ + public static Collection values() { + return values(SecretsType.class); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/SecurityComplianceStatus.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/SecurityComplianceStatus.java index 19ace3f65e30..72dc05e5d371 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/SecurityComplianceStatus.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/SecurityComplianceStatus.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.models; @@ -46,7 +46,7 @@ public final class SecurityComplianceStatus implements JsonSerializable listByClusters(String resourceGroupName, String clusterName); + Response getWithResponse(String resourceGroupName, String clusterName, String securitySettingsName, + Context context); /** - * List SecuritySetting resources by Clusters. + * Get a SecuritySetting. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. - * @param context The context to associate with this operation. + * @param securitySettingsName Name of security setting. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a SecuritySetting list operation as paginated response with {@link PagedIterable}. + * @return a SecuritySetting. */ - PagedIterable listByClusters(String resourceGroupName, String clusterName, Context context); + SecuritySetting get(String resourceGroupName, String clusterName, String securitySettingsName); /** - * Get a SecuritySetting. + * Delete a SecuritySetting. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param securitySettingsName Name of security setting. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a SecuritySetting along with {@link Response}. */ - Response getWithResponse(String resourceGroupName, String clusterName, String securitySettingsName, - Context context); + void delete(String resourceGroupName, String clusterName, String securitySettingsName); /** - * Get a SecuritySetting. + * Delete a SecuritySetting. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param securitySettingsName Name of security setting. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a SecuritySetting. */ - SecuritySetting get(String resourceGroupName, String clusterName, String securitySettingsName); + void delete(String resourceGroupName, String clusterName, String securitySettingsName, Context context); /** - * Delete a SecuritySetting. + * List SecuritySetting resources by Clusters. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. - * @param securitySettingsName Name of security setting. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a SecuritySetting list operation as paginated response with {@link PagedIterable}. */ - void delete(String resourceGroupName, String clusterName, String securitySettingsName); + PagedIterable listByClusters(String resourceGroupName, String clusterName); /** - * Delete a SecuritySetting. + * List SecuritySetting resources by Clusters. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. - * @param securitySettingsName Name of security setting. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a SecuritySetting list operation as paginated response with {@link PagedIterable}. */ - void delete(String resourceGroupName, String clusterName, String securitySettingsName, Context context); + PagedIterable listByClusters(String resourceGroupName, String clusterName, Context context); /** * Get a SecuritySetting. diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/ServiceConfiguration.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/ServiceConfiguration.java new file mode 100644 index 000000000000..dd8c3a668098 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/ServiceConfiguration.java @@ -0,0 +1,117 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.azurestackhci.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; + +/** + * Service configuration details. + */ +@Fluent +public final class ServiceConfiguration implements JsonSerializable { + /* + * Specifies the name of the service associated with the update or operation. This helps identify which system + * component or tool is involved. + */ + private ServiceName serviceName; + + /* + * The port on which service is enabled. + */ + private long port; + + /** + * Creates an instance of ServiceConfiguration class. + */ + public ServiceConfiguration() { + } + + /** + * Get the serviceName property: Specifies the name of the service associated with the update or operation. This + * helps identify which system component or tool is involved. + * + * @return the serviceName value. + */ + public ServiceName serviceName() { + return this.serviceName; + } + + /** + * Set the serviceName property: Specifies the name of the service associated with the update or operation. This + * helps identify which system component or tool is involved. + * + * @param serviceName the serviceName value to set. + * @return the ServiceConfiguration object itself. + */ + public ServiceConfiguration withServiceName(ServiceName serviceName) { + this.serviceName = serviceName; + return this; + } + + /** + * Get the port property: The port on which service is enabled. + * + * @return the port value. + */ + public long port() { + return this.port; + } + + /** + * Set the port property: The port on which service is enabled. + * + * @param port the port value to set. + * @return the ServiceConfiguration object itself. + */ + public ServiceConfiguration withPort(long port) { + this.port = port; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("serviceName", this.serviceName == null ? null : this.serviceName.toString()); + jsonWriter.writeLongField("port", this.port); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ServiceConfiguration from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ServiceConfiguration 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 ServiceConfiguration. + */ + public static ServiceConfiguration fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ServiceConfiguration deserializedServiceConfiguration = new ServiceConfiguration(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("serviceName".equals(fieldName)) { + deserializedServiceConfiguration.serviceName = ServiceName.fromString(reader.getString()); + } else if ("port".equals(fieldName)) { + deserializedServiceConfiguration.port = reader.getLong(); + } else { + reader.skipChildren(); + } + } + + return deserializedServiceConfiguration; + }); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/ServiceName.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/ServiceName.java new file mode 100644 index 000000000000..d04de1c53c29 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/ServiceName.java @@ -0,0 +1,47 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.azurestackhci.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Specifies the name of the service associated with the update or operation. This helps identify which system component + * or tool is involved. + */ +public final class ServiceName extends ExpandableStringEnum { + /** + * Windows Admin Center (WAC) is the service associated with this operation. + */ + public static final ServiceName WAC = fromString("WAC"); + + /** + * Creates a new instance of ServiceName value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public ServiceName() { + } + + /** + * Creates or finds a ServiceName from its string representation. + * + * @param name a name to look for. + * @return the corresponding ServiceName. + */ + public static ServiceName fromString(String name) { + return fromString(name, ServiceName.class); + } + + /** + * Gets known ServiceName values. + * + * @return known ServiceName values. + */ + public static Collection values() { + return values(ServiceName.class); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/Severity.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/Severity.java index 64f07a90f804..5b2db8248ba1 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/Severity.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/Severity.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.models; @@ -8,27 +8,27 @@ import java.util.Collection; /** - * Severity of the result (Critical, Warning, Informational, Hidden). This answers how important the result is. Critical - * is the only update-blocking severity. + * Indicates the importance or impact level of the result. Determines whether the result is informational, a warning, or + * a critical issue that may block updates. */ public final class Severity extends ExpandableStringEnum { /** - * Static value Critical for Severity. + * A critical issue that blocks updates and requires immediate attention. */ public static final Severity CRITICAL = fromString("Critical"); /** - * Static value Warning for Severity. + * A warning that may indicate a potential issue but does not block updates. */ public static final Severity WARNING = fromString("Warning"); /** - * Static value Informational for Severity. + * General information that does not indicate any issue. */ public static final Severity INFORMATIONAL = fromString("Informational"); /** - * Static value Hidden for Severity. + * The result is hidden and not shown in the output. */ public static final Severity HIDDEN = fromString("Hidden"); diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/Sku.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/Sku.java index 0afd618342ca..42dcebb51d28 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/Sku.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/Sku.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.models; diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/SkuMappings.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/SkuMappings.java index ecbd79dfe8b5..c89616f5a08a 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/SkuMappings.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/SkuMappings.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -15,7 +15,7 @@ /** * SKU Mapping details. */ -@Fluent +@Immutable public final class SkuMappings implements JsonSerializable { /* * Identifier of the CatalogPlan for the sku @@ -35,7 +35,7 @@ public final class SkuMappings implements JsonSerializable { /** * Creates an instance of SkuMappings class. */ - public SkuMappings() { + private SkuMappings() { } /** @@ -47,17 +47,6 @@ public String catalogPlanId() { return this.catalogPlanId; } - /** - * Set the catalogPlanId property: Identifier of the CatalogPlan for the sku. - * - * @param catalogPlanId the catalogPlanId value to set. - * @return the SkuMappings object itself. - */ - public SkuMappings withCatalogPlanId(String catalogPlanId) { - this.catalogPlanId = catalogPlanId; - return this; - } - /** * Get the marketplaceSkuId property: Identifier for the sku. * @@ -67,17 +56,6 @@ public String marketplaceSkuId() { return this.marketplaceSkuId; } - /** - * Set the marketplaceSkuId property: Identifier for the sku. - * - * @param marketplaceSkuId the marketplaceSkuId value to set. - * @return the SkuMappings object itself. - */ - public SkuMappings withMarketplaceSkuId(String marketplaceSkuId) { - this.marketplaceSkuId = marketplaceSkuId; - return this; - } - /** * Get the marketplaceSkuVersions property: Array of SKU versions available. * @@ -87,25 +65,6 @@ public List marketplaceSkuVersions() { return this.marketplaceSkuVersions; } - /** - * Set the marketplaceSkuVersions property: Array of SKU versions available. - * - * @param marketplaceSkuVersions the marketplaceSkuVersions value to set. - * @return the SkuMappings object itself. - */ - public SkuMappings withMarketplaceSkuVersions(List marketplaceSkuVersions) { - this.marketplaceSkuVersions = marketplaceSkuVersions; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/Skus.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/Skus.java index 8bbe0d59885a..1a11ed33f55e 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/Skus.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/Skus.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.models; @@ -13,69 +13,69 @@ */ public interface Skus { /** - * List Skus available for a offer within the HCI Cluster. + * Get SKU resource details within a offer of HCI Cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param publisherName The name of the publisher available within HCI cluster. * @param offerName The name of the offer available within HCI cluster. + * @param skuName The name of the SKU available within HCI cluster. + * @param expand Specify $expand=content,contentVersion to populate additional fields related to the marketplace + * offer. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of SKU proxy resources for the HCI cluster as paginated response with {@link PagedIterable}. + * @return sKU resource details within a offer of HCI Cluster along with {@link Response}. */ - PagedIterable listByOffer(String resourceGroupName, String clusterName, String publisherName, - String offerName); + Response getWithResponse(String resourceGroupName, String clusterName, String publisherName, String offerName, + String skuName, String expand, Context context); /** - * List Skus available for a offer within the HCI Cluster. + * Get SKU resource details within a offer of HCI Cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param publisherName The name of the publisher available within HCI cluster. * @param offerName The name of the offer available within HCI cluster. - * @param expand Specify $expand=content,contentVersion to populate additional fields related to the marketplace - * offer. - * @param context The context to associate with this operation. + * @param skuName The name of the SKU available within HCI cluster. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of SKU proxy resources for the HCI cluster as paginated response with {@link PagedIterable}. + * @return sKU resource details within a offer of HCI Cluster. */ - PagedIterable listByOffer(String resourceGroupName, String clusterName, String publisherName, String offerName, - String expand, Context context); + Sku get(String resourceGroupName, String clusterName, String publisherName, String offerName, String skuName); /** - * Get SKU resource details within a offer of HCI Cluster. + * List Skus available for a offer within the HCI Cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param publisherName The name of the publisher available within HCI cluster. * @param offerName The name of the offer available within HCI cluster. - * @param skuName The name of the SKU available within HCI cluster. - * @param expand Specify $expand=content,contentVersion to populate additional fields related to the marketplace - * offer. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return sKU resource details within a offer of HCI Cluster along with {@link Response}. + * @return list of SKU proxy resources for the HCI cluster as paginated response with {@link PagedIterable}. */ - Response getWithResponse(String resourceGroupName, String clusterName, String publisherName, String offerName, - String skuName, String expand, Context context); + PagedIterable listByOffer(String resourceGroupName, String clusterName, String publisherName, + String offerName); /** - * Get SKU resource details within a offer of HCI Cluster. + * List Skus available for a offer within the HCI Cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param publisherName The name of the publisher available within HCI cluster. * @param offerName The name of the offer available within HCI cluster. - * @param skuName The name of the SKU available within HCI cluster. + * @param expand Specify $expand=content,contentVersion to populate additional fields related to the marketplace + * offer. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return sKU resource details within a offer of HCI Cluster. + * @return list of SKU proxy resources for the HCI cluster as paginated response with {@link PagedIterable}. */ - Sku get(String resourceGroupName, String clusterName, String publisherName, String offerName, String skuName); + PagedIterable listByOffer(String resourceGroupName, String clusterName, String publisherName, String offerName, + String expand, Context context); } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/SoftwareAssuranceChangeRequest.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/SoftwareAssuranceChangeRequest.java index 5f1f37da29fc..6732987551a8 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/SoftwareAssuranceChangeRequest.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/SoftwareAssuranceChangeRequest.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.models; @@ -47,17 +47,6 @@ public SoftwareAssuranceChangeRequest withProperties(SoftwareAssuranceChangeRequ return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (properties() != null) { - properties().validate(); - } - } - /** * {@inheritDoc} */ diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/SoftwareAssuranceChangeRequestProperties.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/SoftwareAssuranceChangeRequestProperties.java index b5a135f31499..ff0c284c68fb 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/SoftwareAssuranceChangeRequestProperties.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/SoftwareAssuranceChangeRequestProperties.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.models; @@ -18,7 +18,8 @@ public final class SoftwareAssuranceChangeRequestProperties implements JsonSerializable { /* - * Customer Intent for Software Assurance Benefit. + * Customer Intent for Software Assurance Benefit. This indicates whether the customer wishes to opt in or out of + * the Software Assurance program, which provides licensing and support benefits. */ private SoftwareAssuranceIntent softwareAssuranceIntent; @@ -29,7 +30,9 @@ public SoftwareAssuranceChangeRequestProperties() { } /** - * Get the softwareAssuranceIntent property: Customer Intent for Software Assurance Benefit. + * Get the softwareAssuranceIntent property: Customer Intent for Software Assurance Benefit. This indicates whether + * the customer wishes to opt in or out of the Software Assurance program, which provides licensing and support + * benefits. * * @return the softwareAssuranceIntent value. */ @@ -38,7 +41,9 @@ public SoftwareAssuranceIntent softwareAssuranceIntent() { } /** - * Set the softwareAssuranceIntent property: Customer Intent for Software Assurance Benefit. + * Set the softwareAssuranceIntent property: Customer Intent for Software Assurance Benefit. This indicates whether + * the customer wishes to opt in or out of the Software Assurance program, which provides licensing and support + * benefits. * * @param softwareAssuranceIntent the softwareAssuranceIntent value to set. * @return the SoftwareAssuranceChangeRequestProperties object itself. @@ -49,14 +54,6 @@ public SoftwareAssuranceIntent softwareAssuranceIntent() { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/SoftwareAssuranceIntent.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/SoftwareAssuranceIntent.java index 790a4da3e90f..009e098524e6 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/SoftwareAssuranceIntent.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/SoftwareAssuranceIntent.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.models; @@ -12,12 +12,12 @@ */ public final class SoftwareAssuranceIntent extends ExpandableStringEnum { /** - * Static value Enable for SoftwareAssuranceIntent. + * Customer intends to enable the Software Assurance benefit. */ public static final SoftwareAssuranceIntent ENABLE = fromString("Enable"); /** - * Static value Disable for SoftwareAssuranceIntent. + * Customer intends to disable the Software Assurance benefit. */ public static final SoftwareAssuranceIntent DISABLE = fromString("Disable"); diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/SoftwareAssuranceProperties.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/SoftwareAssuranceProperties.java index baa9e71d5ca7..bb512c253a1f 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/SoftwareAssuranceProperties.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/SoftwareAssuranceProperties.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.models; @@ -77,14 +77,6 @@ public OffsetDateTime lastUpdated() { return this.lastUpdated; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/SoftwareAssuranceStatus.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/SoftwareAssuranceStatus.java index a8ec2c9653bb..a9f703f0fd15 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/SoftwareAssuranceStatus.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/SoftwareAssuranceStatus.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.models; @@ -12,12 +12,12 @@ */ public final class SoftwareAssuranceStatus extends ExpandableStringEnum { /** - * Static value Enabled for SoftwareAssuranceStatus. + * Software Assurance is enabled for the cluster. */ public static final SoftwareAssuranceStatus ENABLED = fromString("Enabled"); /** - * Static value Disabled for SoftwareAssuranceStatus. + * Software Assurance is disabled for the cluster. */ public static final SoftwareAssuranceStatus DISABLED = fromString("Disabled"); diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/State.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/State.java index 20a497083023..1a6518cda1fc 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/State.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/State.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.models; @@ -8,102 +8,103 @@ import java.util.Collection; /** - * State of the update as it relates to this stamp. + * Represents the current state of the update as it relates to this stamp. This includes phases such as preparation, + * installation, scanning, and error handling, providing insight into the update's progress and any issues encountered. */ public final class State extends ExpandableStringEnum { /** - * Static value HasPrerequisite for State. + * The update has prerequisites that must be fulfilled before it can proceed. */ public static final State HAS_PREREQUISITE = fromString("HasPrerequisite"); /** - * Static value Obsolete for State. + * The update is obsolete and no longer applicable. */ public static final State OBSOLETE = fromString("Obsolete"); /** - * Static value Ready for State. + * The update is ready to be installed. */ public static final State READY = fromString("Ready"); /** - * Static value NotApplicableBecauseAnotherUpdateIsInProgress for State. + * The update cannot be applied because another update is currently in progress. */ public static final State NOT_APPLICABLE_BECAUSE_ANOTHER_UPDATE_IS_IN_PROGRESS = fromString("NotApplicableBecauseAnotherUpdateIsInProgress"); /** - * Static value Preparing for State. + * The update is currently in the preparation phase. */ public static final State PREPARING = fromString("Preparing"); /** - * Static value Installing for State. + * The update is currently being installed. */ public static final State INSTALLING = fromString("Installing"); /** - * Static value Installed for State. + * The update has been successfully installed. */ public static final State INSTALLED = fromString("Installed"); /** - * Static value PreparationFailed for State. + * The update preparation phase failed. */ public static final State PREPARATION_FAILED = fromString("PreparationFailed"); /** - * Static value InstallationFailed for State. + * The update installation failed. */ public static final State INSTALLATION_FAILED = fromString("InstallationFailed"); /** - * Static value Invalid for State. + * The update is invalid and cannot be applied. */ public static final State INVALID = fromString("Invalid"); /** - * Static value Recalled for State. + * The update has been recalled and should not be applied. */ public static final State RECALLED = fromString("Recalled"); /** - * Static value Downloading for State. + * The update is currently being downloaded. */ public static final State DOWNLOADING = fromString("Downloading"); /** - * Static value DownloadFailed for State. + * The update download failed. */ public static final State DOWNLOAD_FAILED = fromString("DownloadFailed"); /** - * Static value HealthChecking for State. + * A health check is being performed before applying the update. */ public static final State HEALTH_CHECKING = fromString("HealthChecking"); /** - * Static value HealthCheckFailed for State. + * The health check failed, preventing the update from proceeding. */ public static final State HEALTH_CHECK_FAILED = fromString("HealthCheckFailed"); /** - * Static value ReadyToInstall for State. + * The update is ready to be installed after successful preparation and checks. */ public static final State READY_TO_INSTALL = fromString("ReadyToInstall"); /** - * Static value ScanInProgress for State. + * The system is scanning for updates. */ public static final State SCAN_IN_PROGRESS = fromString("ScanInProgress"); /** - * Static value ScanFailed for State. + * The scan for updates failed. */ public static final State SCAN_FAILED = fromString("ScanFailed"); /** - * Static value AdditionalContentRequired for State. + * Additional content is required to proceed with the update. */ public static final State ADDITIONAL_CONTENT_REQUIRED = fromString("AdditionalContentRequired"); diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/Status.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/Status.java index 40abf5309c8d..8441d10ed85a 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/Status.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/Status.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.models; @@ -8,84 +8,70 @@ import java.util.Collection; /** - * Status of the cluster agent. + * Status of the cluster agent. Indicates the current connectivity, validation, and deployment state of the agent within + * the cluster. */ public final class Status extends ExpandableStringEnum { /** - * Static value NotYetRegistered for Status. + * The cluster agent has not yet registered with Azure. */ public static final Status NOT_YET_REGISTERED = fromString("NotYetRegistered"); /** - * Static value ConnectedRecently for Status. + * The cluster agent has connected to Azure recently. */ public static final Status CONNECTED_RECENTLY = fromString("ConnectedRecently"); /** - * Static value NotConnectedRecently for Status. + * The cluster agent has not connected to Azure recently. */ public static final Status NOT_CONNECTED_RECENTLY = fromString("NotConnectedRecently"); /** - * Static value Disconnected for Status. + * The cluster agent is currently disconnected from Azure. */ public static final Status DISCONNECTED = fromString("Disconnected"); /** - * Static value Error for Status. + * An error occurred in the cluster agent's operation. */ public static final Status ERROR = fromString("Error"); /** - * Static value NotSpecified for Status. + * The status of the cluster agent is not specified. */ public static final Status NOT_SPECIFIED = fromString("NotSpecified"); /** - * Static value ValidationInProgress for Status. + * Validation of the cluster agent is currently in progress. */ public static final Status VALIDATION_IN_PROGRESS = fromString("ValidationInProgress"); /** - * Static value ValidationSuccess for Status. + * Validation of the cluster agent completed successfully. */ public static final Status VALIDATION_SUCCESS = fromString("ValidationSuccess"); /** - * Static value ValidationFailed for Status. + * Validation of the cluster agent failed. */ public static final Status VALIDATION_FAILED = fromString("ValidationFailed"); /** - * Static value DeploymentInProgress for Status. + * Deployment of the cluster agent is currently in progress. */ public static final Status DEPLOYMENT_IN_PROGRESS = fromString("DeploymentInProgress"); /** - * Static value DeploymentFailed for Status. + * Deployment of the cluster agent failed. */ public static final Status DEPLOYMENT_FAILED = fromString("DeploymentFailed"); /** - * Static value DeploymentSuccess for Status. + * Deployment of the cluster agent completed successfully. */ public static final Status DEPLOYMENT_SUCCESS = fromString("DeploymentSuccess"); - /** - * Static value Succeeded for Status. - */ - public static final Status SUCCEEDED = fromString("Succeeded"); - - /** - * Static value Failed for Status. - */ - public static final Status FAILED = fromString("Failed"); - - /** - * Static value InProgress for Status. - */ - public static final Status IN_PROGRESS = fromString("InProgress"); - /** * Creates a new instance of Status value. * diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/StatusLevelTypes.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/StatusLevelTypes.java index f69157a93669..540d8c213d88 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/StatusLevelTypes.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/StatusLevelTypes.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.models; @@ -8,21 +8,21 @@ import java.util.Collection; /** - * The level code. + * The level code. Indicates the severity or importance of the status message. */ public final class StatusLevelTypes extends ExpandableStringEnum { /** - * Static value Info for StatusLevelTypes. + * Informational message indicating normal operation. */ public static final StatusLevelTypes INFO = fromString("Info"); /** - * Static value Warning for StatusLevelTypes. + * Warning message indicating a potential issue or non-critical problem. */ public static final StatusLevelTypes WARNING = fromString("Warning"); /** - * Static value Error for StatusLevelTypes. + * Error message indicating a failure or critical issue. */ public static final StatusLevelTypes ERROR = fromString("Error"); diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/Storage.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/Storage.java index 1c2a28e0e6b2..66f7ba2f332c 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/Storage.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/Storage.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.models; @@ -52,14 +52,6 @@ public Storage withConfigurationMode(String configurationMode) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/SwitchDetail.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/SwitchDetail.java index efbfd8de8bbe..5fdac0971095 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/SwitchDetail.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/SwitchDetail.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.models; @@ -35,7 +35,7 @@ public final class SwitchDetail implements JsonSerializable { /** * Creates an instance of SwitchDetail class. */ - public SwitchDetail() { + private SwitchDetail() { } /** @@ -65,17 +65,6 @@ public List extensions() { return this.extensions; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (extensions() != null) { - extensions().forEach(e -> e.validate()); - } - } - /** * {@inheritDoc} */ diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/SwitchExtension.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/SwitchExtension.java index e07874272312..3dcbadbf6478 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/SwitchExtension.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/SwitchExtension.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.models; @@ -34,7 +34,7 @@ public final class SwitchExtension implements JsonSerializable /** * Creates an instance of SwitchExtension class. */ - public SwitchExtension() { + private SwitchExtension() { } /** @@ -64,14 +64,6 @@ public Boolean extensionEnabled() { return this.extensionEnabled; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/UpdatePrerequisite.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/UpdatePrerequisite.java index 06aad1ef6391..102157eb122e 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/UpdatePrerequisite.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/UpdatePrerequisite.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.models; @@ -98,14 +98,6 @@ public UpdatePrerequisite withPackageName(String packageName) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/UpdateRun.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/UpdateRun.java index 9506a95cf33e..f4df9358bf69 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/UpdateRun.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/UpdateRun.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.models; @@ -52,7 +52,8 @@ public interface UpdateRun { SystemData systemData(); /** - * Gets the provisioningState property: Provisioning state of the UpdateRuns proxy resource. + * Gets the provisioningState property: Provisioning state of the UpdateRuns proxy resource. Indicates the current + * lifecycle status of the update operation, such as whether it has been accepted, is in progress, or has completed. * * @return the provisioningState value. */ @@ -80,7 +81,8 @@ public interface UpdateRun { String duration(); /** - * Gets the state property: State of the update run. + * Gets the state property: Represents the current state of the update run. Indicates whether the update is in + * progress, has completed successfully, failed, or is in an unknown state. * * @return the state value. */ @@ -302,9 +304,11 @@ interface WithDuration { */ interface WithState { /** - * Specifies the state property: State of the update run.. + * Specifies the state property: Represents the current state of the update run. Indicates whether the + * update is in progress, has completed successfully, failed, or is in an unknown state.. * - * @param state State of the update run. + * @param state Represents the current state of the update run. Indicates whether the update is in progress, + * has completed successfully, failed, or is in an unknown state. * @return the next definition stage. */ WithCreate withState(UpdateRunPropertiesState state); @@ -511,9 +515,11 @@ interface WithDuration { */ interface WithState { /** - * Specifies the state property: State of the update run.. + * Specifies the state property: Represents the current state of the update run. Indicates whether the + * update is in progress, has completed successfully, failed, or is in an unknown state.. * - * @param state State of the update run. + * @param state Represents the current state of the update run. Indicates whether the update is in progress, + * has completed successfully, failed, or is in an unknown state. * @return the next definition stage. */ Update withState(UpdateRunPropertiesState state); diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/UpdateRunPropertiesState.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/UpdateRunPropertiesState.java index 7bc017152f71..a48d746cbc21 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/UpdateRunPropertiesState.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/UpdateRunPropertiesState.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.models; @@ -8,26 +8,27 @@ import java.util.Collection; /** - * State of the update run. + * Represents the current state of the update run. Indicates whether the update is in progress, has completed + * successfully, failed, or is in an unknown state. */ public final class UpdateRunPropertiesState extends ExpandableStringEnum { /** - * Static value Unknown for UpdateRunPropertiesState. + * The state of the update run is not known. */ public static final UpdateRunPropertiesState UNKNOWN = fromString("Unknown"); /** - * Static value Succeeded for UpdateRunPropertiesState. + * The update run completed successfully. */ public static final UpdateRunPropertiesState SUCCEEDED = fromString("Succeeded"); /** - * Static value InProgress for UpdateRunPropertiesState. + * The update run is currently in progress. */ public static final UpdateRunPropertiesState IN_PROGRESS = fromString("InProgress"); /** - * Static value Failed for UpdateRunPropertiesState. + * The update run failed to complete successfully. */ public static final UpdateRunPropertiesState FAILED = fromString("Failed"); diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/UpdateRuns.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/UpdateRuns.java index d64b5d6cb32d..4fdfaf11def4 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/UpdateRuns.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/UpdateRuns.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.models; @@ -13,31 +13,34 @@ */ public interface UpdateRuns { /** - * List all Update runs for a specified update. + * Get the Update run for a specified update. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param updateName The name of the Update. + * @param updateRunName The name of the Update Run. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of Update runs as paginated response with {@link PagedIterable}. + * @return the Update run for a specified update along with {@link Response}. */ - PagedIterable list(String resourceGroupName, String clusterName, String updateName); + Response getWithResponse(String resourceGroupName, String clusterName, String updateName, + String updateRunName, Context context); /** - * List all Update runs for a specified update. + * Get the Update run for a specified update. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param updateName The name of the Update. - * @param context The context to associate with this operation. + * @param updateRunName The name of the Update Run. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of Update runs as paginated response with {@link PagedIterable}. + * @return the Update run for a specified update. */ - PagedIterable list(String resourceGroupName, String clusterName, String updateName, Context context); + UpdateRun get(String resourceGroupName, String clusterName, String updateName, String updateRunName); /** * Delete specified Update Run. @@ -67,34 +70,31 @@ public interface UpdateRuns { void delete(String resourceGroupName, String clusterName, String updateName, String updateRunName, Context context); /** - * Get the Update run for a specified update. + * List all Update runs for a specified update. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param updateName The name of the Update. - * @param updateRunName The name of the Update Run. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Update run for a specified update along with {@link Response}. + * @return list of Update runs as paginated response with {@link PagedIterable}. */ - Response getWithResponse(String resourceGroupName, String clusterName, String updateName, - String updateRunName, Context context); + PagedIterable list(String resourceGroupName, String clusterName, String updateName); /** - * Get the Update run for a specified update. + * List all Update runs for a specified update. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param updateName The name of the Update. - * @param updateRunName The name of the Update Run. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Update run for a specified update. + * @return list of Update runs as paginated response with {@link PagedIterable}. */ - UpdateRun get(String resourceGroupName, String clusterName, String updateName, String updateRunName); + PagedIterable list(String resourceGroupName, String clusterName, String updateName, Context context); /** * Get the Update run for a specified update. diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/UpdateSummaries.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/UpdateSummaries.java index 1027ab9b6aca..9d94e38e16da 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/UpdateSummaries.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/UpdateSummaries.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.models; @@ -49,7 +49,9 @@ public interface UpdateSummaries { SystemData systemData(); /** - * Gets the provisioningState property: Provisioning state of the UpdateSummaries proxy resource. + * Gets the provisioningState property: Provisioning state of the UpdateSummaries proxy resource. Indicates the + * current lifecycle status of the update summary operation, such as whether it has been accepted, is in progress, + * or has completed. * * @return the provisioningState value. */ @@ -133,7 +135,8 @@ public interface UpdateSummaries { OffsetDateTime healthCheckDate(); /** - * Gets the state property: Overall update state of the stamp. + * Gets the state property: Overall update state of the stamp. Indicates the current status of update deployment + * across the stamp, including preparation, application, and any issues encountered. * * @return the state value. */ diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/UpdateSummariesOperations.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/UpdateSummariesOperations.java index fe6b024f9799..fb3b6e962d11 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/UpdateSummariesOperations.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/UpdateSummariesOperations.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.models; @@ -14,103 +14,103 @@ */ public interface UpdateSummariesOperations { /** - * List all Update summaries under the HCI cluster. + * Get all Update summaries under the HCI cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of Update Summaries as paginated response with {@link PagedIterable}. + * @return all Update summaries under the HCI cluster along with {@link Response}. */ - PagedIterable list(String resourceGroupName, String clusterName); + Response getWithResponse(String resourceGroupName, String clusterName, Context context); /** - * List all Update summaries under the HCI cluster. + * Get all Update summaries under the HCI cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of Update Summaries as paginated response with {@link PagedIterable}. + * @return all Update summaries under the HCI cluster. */ - PagedIterable list(String resourceGroupName, String clusterName, Context context); + UpdateSummaries get(String resourceGroupName, String clusterName); /** - * Delete Update Summaries. + * Put Update summaries under the HCI cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. + * @param updateLocationProperties Properties of the UpdateSummaries resource. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return get the update summaries for the cluster along with {@link Response}. */ - void deleteByResourceGroup(String resourceGroupName, String clusterName); + Response putWithResponse(String resourceGroupName, String clusterName, + UpdateSummariesInner updateLocationProperties, Context context); /** - * Delete Update Summaries. + * Put Update summaries under the HCI cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. - * @param context The context to associate with this operation. + * @param updateLocationProperties Properties of the UpdateSummaries resource. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return get the update summaries for the cluster. */ - void delete(String resourceGroupName, String clusterName, Context context); + UpdateSummaries put(String resourceGroupName, String clusterName, UpdateSummariesInner updateLocationProperties); /** - * Put Update summaries under the HCI cluster. + * Delete Update Summaries. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. - * @param updateLocationProperties Properties of the UpdateSummaries resource. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return get the update summaries for the cluster along with {@link Response}. */ - Response putWithResponse(String resourceGroupName, String clusterName, - UpdateSummariesInner updateLocationProperties, Context context); + void deleteByResourceGroup(String resourceGroupName, String clusterName); /** - * Put Update summaries under the HCI cluster. + * Delete Update Summaries. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. - * @param updateLocationProperties Properties of the UpdateSummaries resource. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return get the update summaries for the cluster. */ - UpdateSummaries put(String resourceGroupName, String clusterName, UpdateSummariesInner updateLocationProperties); + void delete(String resourceGroupName, String clusterName, Context context); /** - * Get all Update summaries under the HCI cluster. + * List all Update summaries under the HCI cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all Update summaries under the HCI cluster along with {@link Response}. + * @return list of Update Summaries as paginated response with {@link PagedIterable}. */ - Response getWithResponse(String resourceGroupName, String clusterName, Context context); + PagedIterable list(String resourceGroupName, String clusterName); /** - * Get all Update summaries under the HCI cluster. + * List all Update summaries under the HCI cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all Update summaries under the HCI cluster. + * @return list of Update Summaries as paginated response with {@link PagedIterable}. */ - UpdateSummaries get(String resourceGroupName, String clusterName); + PagedIterable list(String resourceGroupName, String clusterName, Context context); } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/UpdateSummariesPropertiesState.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/UpdateSummariesPropertiesState.java index 74505e838bcf..c77a80cda9e4 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/UpdateSummariesPropertiesState.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/UpdateSummariesPropertiesState.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.models; @@ -8,46 +8,47 @@ import java.util.Collection; /** - * Overall update state of the stamp. + * Overall update state of the stamp. Indicates the current status of update deployment across the stamp, including + * preparation, application, and any issues encountered. */ public final class UpdateSummariesPropertiesState extends ExpandableStringEnum { /** - * Static value Unknown for UpdateSummariesPropertiesState. + * The update state is not known. */ public static final UpdateSummariesPropertiesState UNKNOWN = fromString("Unknown"); /** - * Static value AppliedSuccessfully for UpdateSummariesPropertiesState. + * Updates have been successfully applied to the stamp. */ public static final UpdateSummariesPropertiesState APPLIED_SUCCESSFULLY = fromString("AppliedSuccessfully"); /** - * Static value UpdateAvailable for UpdateSummariesPropertiesState. + * Updates are available but have not yet been applied. */ public static final UpdateSummariesPropertiesState UPDATE_AVAILABLE = fromString("UpdateAvailable"); /** - * Static value UpdateInProgress for UpdateSummariesPropertiesState. + * Updates are currently being applied to the stamp. */ public static final UpdateSummariesPropertiesState UPDATE_IN_PROGRESS = fromString("UpdateInProgress"); /** - * Static value UpdateFailed for UpdateSummariesPropertiesState. + * The update process failed. */ public static final UpdateSummariesPropertiesState UPDATE_FAILED = fromString("UpdateFailed"); /** - * Static value NeedsAttention for UpdateSummariesPropertiesState. + * The update process requires user intervention or has encountered issues needing attention. */ public static final UpdateSummariesPropertiesState NEEDS_ATTENTION = fromString("NeedsAttention"); /** - * Static value PreparationInProgress for UpdateSummariesPropertiesState. + * Preparation for the update is currently in progress. */ public static final UpdateSummariesPropertiesState PREPARATION_IN_PROGRESS = fromString("PreparationInProgress"); /** - * Static value PreparationFailed for UpdateSummariesPropertiesState. + * Preparation for the update failed. */ public static final UpdateSummariesPropertiesState PREPARATION_FAILED = fromString("PreparationFailed"); diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/Updates.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/Updates.java index 39a3f88aa24a..c5c3c15b9c50 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/Updates.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/Updates.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.models; @@ -13,107 +13,107 @@ */ public interface Updates { /** - * Apply Update. + * Get specified Update. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param updateName The name of the Update. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return specified Update along with {@link Response}. */ - void post(String resourceGroupName, String clusterName, String updateName); + Response getWithResponse(String resourceGroupName, String clusterName, String updateName, + Context context); /** - * Apply Update. + * Get specified Update. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param updateName The name of the Update. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return specified Update. */ - void post(String resourceGroupName, String clusterName, String updateName, Context context); + HciUpdate get(String resourceGroupName, String clusterName, String updateName); /** - * List all Updates. + * Delete specified Update. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. + * @param updateName The name of the Update. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of Updates as paginated response with {@link PagedIterable}. */ - PagedIterable list(String resourceGroupName, String clusterName); + void delete(String resourceGroupName, String clusterName, String updateName); /** - * List all Updates. + * Delete specified Update. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. + * @param updateName The name of the Update. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of Updates as paginated response with {@link PagedIterable}. */ - PagedIterable list(String resourceGroupName, String clusterName, Context context); + void delete(String resourceGroupName, String clusterName, String updateName, Context context); /** - * Delete specified Update. + * List all Updates. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. - * @param updateName The name of the Update. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of Updates as paginated response with {@link PagedIterable}. */ - void delete(String resourceGroupName, String clusterName, String updateName); + PagedIterable list(String resourceGroupName, String clusterName); /** - * Delete specified Update. + * List all Updates. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. - * @param updateName The name of the Update. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of Updates as paginated response with {@link PagedIterable}. */ - void delete(String resourceGroupName, String clusterName, String updateName, Context context); + PagedIterable list(String resourceGroupName, String clusterName, Context context); /** - * Get specified Update. + * Apply Update. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param updateName The name of the Update. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return specified Update along with {@link Response}. */ - Response getWithResponse(String resourceGroupName, String clusterName, String updateName, - Context context); + void post(String resourceGroupName, String clusterName, String updateName); /** - * Get specified Update. + * Apply Update. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param updateName The name of the Update. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return specified Update. */ - HciUpdate get(String resourceGroupName, String clusterName, String updateName); + void post(String resourceGroupName, String clusterName, String updateName, Context context); /** * Get specified Update. diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/UploadCertificateRequest.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/UploadCertificateRequest.java index 8587a4fd21cf..746cb3f504d8 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/UploadCertificateRequest.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/UploadCertificateRequest.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.models; @@ -47,17 +47,6 @@ public UploadCertificateRequest withProperties(RawCertificateData properties) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (properties() != null) { - properties().validate(); - } - } - /** * {@inheritDoc} */ diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/UserAssignedIdentity.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/UserAssignedIdentity.java index 7ab10d14760a..e7bf4d0d704a 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/UserAssignedIdentity.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/UserAssignedIdentity.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.models; @@ -10,7 +10,6 @@ import com.azure.json.JsonToken; import com.azure.json.JsonWriter; import java.io.IOException; -import java.util.UUID; /** * User assigned identity properties. @@ -20,12 +19,12 @@ public final class UserAssignedIdentity implements JsonSerializable UUID.fromString(nonNullReader.getString())); + deserializedUserAssignedIdentity.principalId = reader.getString(); } else if ("clientId".equals(fieldName)) { - deserializedUserAssignedIdentity.clientId - = reader.getNullable(nonNullReader -> UUID.fromString(nonNullReader.getString())); + deserializedUserAssignedIdentity.clientId = reader.getString(); } else { reader.skipChildren(); } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/ValidateRequest.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/ValidateRequest.java index c960092f2b69..58a62ae02fa7 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/ValidateRequest.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/ValidateRequest.java @@ -1,11 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -74,20 +73,6 @@ public ValidateRequest withAdditionalInfo(String additionalInfo) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (edgeDeviceIds() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property edgeDeviceIds in model ValidateRequest")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(ValidateRequest.class); - /** * {@inheritDoc} */ diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/ValidateResponse.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/ValidateResponse.java index 87ae7b302847..f945e76f570d 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/ValidateResponse.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/ValidateResponse.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.models; diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/Publisher.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/ValidatedSolutionRecipe.java similarity index 64% rename from sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/Publisher.java rename to sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/ValidatedSolutionRecipe.java index 89707328f490..6399904d3327 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/Publisher.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/ValidatedSolutionRecipe.java @@ -1,16 +1,16 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.models; import com.azure.core.management.SystemData; -import com.azure.resourcemanager.azurestackhci.fluent.models.PublisherInner; +import com.azure.resourcemanager.azurestackhci.fluent.models.ValidatedSolutionRecipeInner; /** - * An immutable client-side representation of Publisher. + * An immutable client-side representation of ValidatedSolutionRecipe. */ -public interface Publisher { +public interface ValidatedSolutionRecipe { /** * Gets the id property: Fully qualified resource Id for the resource. * @@ -33,23 +33,23 @@ public interface Publisher { String type(); /** - * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * Gets the properties property: The resource-specific properties for this resource. * - * @return the systemData value. + * @return the properties value. */ - SystemData systemData(); + ValidatedSolutionRecipeProperties properties(); /** - * Gets the provisioningState property: Provisioning State. + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. * - * @return the provisioningState value. + * @return the systemData value. */ - String provisioningState(); + SystemData systemData(); /** - * Gets the inner com.azure.resourcemanager.azurestackhci.fluent.models.PublisherInner object. + * Gets the inner com.azure.resourcemanager.azurestackhci.fluent.models.ValidatedSolutionRecipeInner object. * * @return the inner object. */ - PublisherInner innerModel(); + ValidatedSolutionRecipeInner innerModel(); } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/ValidatedSolutionRecipeCapabilities.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/ValidatedSolutionRecipeCapabilities.java new file mode 100644 index 000000000000..d7874a4275be --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/ValidatedSolutionRecipeCapabilities.java @@ -0,0 +1,101 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.azurestackhci.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; + +/** + * Represents capabilities available in a validated solution recipe. + */ +@Immutable +public final class ValidatedSolutionRecipeCapabilities + implements JsonSerializable { + /* + * Represents the cluster capabilities. + */ + private List clusterCapabilities; + + /* + * Represents the node capabilities. + */ + private List nodeCapabilities; + + /** + * Creates an instance of ValidatedSolutionRecipeCapabilities class. + */ + private ValidatedSolutionRecipeCapabilities() { + } + + /** + * Get the clusterCapabilities property: Represents the cluster capabilities. + * + * @return the clusterCapabilities value. + */ + public List clusterCapabilities() { + return this.clusterCapabilities; + } + + /** + * Get the nodeCapabilities property: Represents the node capabilities. + * + * @return the nodeCapabilities value. + */ + public List nodeCapabilities() { + return this.nodeCapabilities; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("clusterCapabilities", this.clusterCapabilities, + (writer, element) -> writer.writeJson(element)); + jsonWriter.writeArrayField("nodeCapabilities", this.nodeCapabilities, + (writer, element) -> writer.writeJson(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ValidatedSolutionRecipeCapabilities from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ValidatedSolutionRecipeCapabilities 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 ValidatedSolutionRecipeCapabilities. + */ + public static ValidatedSolutionRecipeCapabilities fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ValidatedSolutionRecipeCapabilities deserializedValidatedSolutionRecipeCapabilities + = new ValidatedSolutionRecipeCapabilities(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("clusterCapabilities".equals(fieldName)) { + List clusterCapabilities + = reader.readArray(reader1 -> ValidatedSolutionRecipeCapability.fromJson(reader1)); + deserializedValidatedSolutionRecipeCapabilities.clusterCapabilities = clusterCapabilities; + } else if ("nodeCapabilities".equals(fieldName)) { + List nodeCapabilities + = reader.readArray(reader1 -> ValidatedSolutionRecipeCapability.fromJson(reader1)); + deserializedValidatedSolutionRecipeCapabilities.nodeCapabilities = nodeCapabilities; + } else { + reader.skipChildren(); + } + } + + return deserializedValidatedSolutionRecipeCapabilities; + }); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/ValidatedSolutionRecipeCapability.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/ValidatedSolutionRecipeCapability.java new file mode 100644 index 000000000000..1b527a22d20a --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/ValidatedSolutionRecipeCapability.java @@ -0,0 +1,76 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.azurestackhci.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; + +/** + * Represents capability available in a validated solution recipe. + */ +@Immutable +public final class ValidatedSolutionRecipeCapability implements JsonSerializable { + /* + * Represents the capability name. + */ + private String capabilityName; + + /** + * Creates an instance of ValidatedSolutionRecipeCapability class. + */ + private ValidatedSolutionRecipeCapability() { + } + + /** + * Get the capabilityName property: Represents the capability name. + * + * @return the capabilityName value. + */ + public String capabilityName() { + return this.capabilityName; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("capabilityName", this.capabilityName); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ValidatedSolutionRecipeCapability from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ValidatedSolutionRecipeCapability 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 ValidatedSolutionRecipeCapability. + */ + public static ValidatedSolutionRecipeCapability fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ValidatedSolutionRecipeCapability deserializedValidatedSolutionRecipeCapability + = new ValidatedSolutionRecipeCapability(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("capabilityName".equals(fieldName)) { + deserializedValidatedSolutionRecipeCapability.capabilityName = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedValidatedSolutionRecipeCapability; + }); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/ValidatedSolutionRecipeComponent.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/ValidatedSolutionRecipeComponent.java new file mode 100644 index 000000000000..d880f7454d98 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/ValidatedSolutionRecipeComponent.java @@ -0,0 +1,183 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.azurestackhci.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; + +/** + * Represents component available in a validated solution recipe. + */ +@Immutable +public final class ValidatedSolutionRecipeComponent implements JsonSerializable { + /* + * Represents the component's name. + */ + private String name; + + /* + * Represents the component's type. + */ + private String type; + + /* + * Represents the component's required version. + */ + private String requiredVersion; + + /* + * Represents the component's install order. + */ + private Long installOrder; + + /* + * Represents the component's tags. + */ + private List tags; + + /* + * Represents the component's payloads. + */ + private List payloads; + + /* + * Represents the component's metadata. + */ + private ValidatedSolutionRecipeComponentMetadata metadata; + + /** + * Creates an instance of ValidatedSolutionRecipeComponent class. + */ + private ValidatedSolutionRecipeComponent() { + } + + /** + * Get the name property: Represents the component's name. + * + * @return the name value. + */ + public String name() { + return this.name; + } + + /** + * Get the type property: Represents the component's type. + * + * @return the type value. + */ + public String type() { + return this.type; + } + + /** + * Get the requiredVersion property: Represents the component's required version. + * + * @return the requiredVersion value. + */ + public String requiredVersion() { + return this.requiredVersion; + } + + /** + * Get the installOrder property: Represents the component's install order. + * + * @return the installOrder value. + */ + public Long installOrder() { + return this.installOrder; + } + + /** + * Get the tags property: Represents the component's tags. + * + * @return the tags value. + */ + public List tags() { + return this.tags; + } + + /** + * Get the payloads property: Represents the component's payloads. + * + * @return the payloads value. + */ + public List payloads() { + return this.payloads; + } + + /** + * Get the metadata property: Represents the component's metadata. + * + * @return the metadata value. + */ + public ValidatedSolutionRecipeComponentMetadata metadata() { + return this.metadata; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("name", this.name); + jsonWriter.writeStringField("type", this.type); + jsonWriter.writeArrayField("tags", this.tags, (writer, element) -> writer.writeString(element)); + jsonWriter.writeStringField("requiredVersion", this.requiredVersion); + jsonWriter.writeNumberField("installOrder", this.installOrder); + jsonWriter.writeArrayField("payloads", this.payloads, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeJsonField("metadata", this.metadata); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ValidatedSolutionRecipeComponent from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ValidatedSolutionRecipeComponent 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 ValidatedSolutionRecipeComponent. + */ + public static ValidatedSolutionRecipeComponent fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ValidatedSolutionRecipeComponent deserializedValidatedSolutionRecipeComponent + = new ValidatedSolutionRecipeComponent(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("name".equals(fieldName)) { + deserializedValidatedSolutionRecipeComponent.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedValidatedSolutionRecipeComponent.type = reader.getString(); + } else if ("tags".equals(fieldName)) { + List tags = reader.readArray(reader1 -> reader1.getString()); + deserializedValidatedSolutionRecipeComponent.tags = tags; + } else if ("requiredVersion".equals(fieldName)) { + deserializedValidatedSolutionRecipeComponent.requiredVersion = reader.getString(); + } else if ("installOrder".equals(fieldName)) { + deserializedValidatedSolutionRecipeComponent.installOrder = reader.getNullable(JsonReader::getLong); + } else if ("payloads".equals(fieldName)) { + List payloads + = reader.readArray(reader1 -> ValidatedSolutionRecipeComponentPayload.fromJson(reader1)); + deserializedValidatedSolutionRecipeComponent.payloads = payloads; + } else if ("metadata".equals(fieldName)) { + deserializedValidatedSolutionRecipeComponent.metadata + = ValidatedSolutionRecipeComponentMetadata.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedValidatedSolutionRecipeComponent; + }); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/ValidatedSolutionRecipeComponentMetadata.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/ValidatedSolutionRecipeComponentMetadata.java new file mode 100644 index 000000000000..97a58bd0fdb8 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/ValidatedSolutionRecipeComponentMetadata.java @@ -0,0 +1,248 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.azurestackhci.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; + +/** + * Represents metadata associated with a component available in a validated solution recipe. + */ +@Immutable +public final class ValidatedSolutionRecipeComponentMetadata + implements JsonSerializable { + /* + * Represents the type of extension. + */ + private String extensionType; + + /* + * Represents the publisher of the extension. + */ + private String publisher; + + /* + * Indicates whether automatic upgrades of the extension are enabled. + */ + private Boolean enableAutomaticUpgrade; + + /* + * Indicates whether the LCM (Lifecycle Management) update of the extension is enabled. + */ + private Boolean lcmUpdate; + + /* + * Specifies the catalog to which the extension belongs. + */ + private String catalog; + + /* + * Specifies the ring to which the extension belongs, internally used by component. + */ + private String ring; + + /* + * Specifies the release train to which given component belongs. + */ + private String releaseTrain; + + /* + * Specifies the link associated with the extension. + */ + private String link; + + /* + * Specifies the name of the extension. + */ + private String name; + + /* + * Specifies the expected hash of the extension. + */ + private String expectedHash; + + /* + * Specifies the preview source of the extension. + */ + private String previewSource; + + /** + * Creates an instance of ValidatedSolutionRecipeComponentMetadata class. + */ + private ValidatedSolutionRecipeComponentMetadata() { + } + + /** + * Get the extensionType property: Represents the type of extension. + * + * @return the extensionType value. + */ + public String extensionType() { + return this.extensionType; + } + + /** + * Get the publisher property: Represents the publisher of the extension. + * + * @return the publisher value. + */ + public String publisher() { + return this.publisher; + } + + /** + * Get the enableAutomaticUpgrade property: Indicates whether automatic upgrades of the extension are enabled. + * + * @return the enableAutomaticUpgrade value. + */ + public Boolean enableAutomaticUpgrade() { + return this.enableAutomaticUpgrade; + } + + /** + * Get the lcmUpdate property: Indicates whether the LCM (Lifecycle Management) update of the extension is enabled. + * + * @return the lcmUpdate value. + */ + public Boolean lcmUpdate() { + return this.lcmUpdate; + } + + /** + * Get the catalog property: Specifies the catalog to which the extension belongs. + * + * @return the catalog value. + */ + public String catalog() { + return this.catalog; + } + + /** + * Get the ring property: Specifies the ring to which the extension belongs, internally used by component. + * + * @return the ring value. + */ + public String ring() { + return this.ring; + } + + /** + * Get the releaseTrain property: Specifies the release train to which given component belongs. + * + * @return the releaseTrain value. + */ + public String releaseTrain() { + return this.releaseTrain; + } + + /** + * Get the link property: Specifies the link associated with the extension. + * + * @return the link value. + */ + public String link() { + return this.link; + } + + /** + * Get the name property: Specifies the name of the extension. + * + * @return the name value. + */ + public String name() { + return this.name; + } + + /** + * Get the expectedHash property: Specifies the expected hash of the extension. + * + * @return the expectedHash value. + */ + public String expectedHash() { + return this.expectedHash; + } + + /** + * Get the previewSource property: Specifies the preview source of the extension. + * + * @return the previewSource value. + */ + public String previewSource() { + return this.previewSource; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("extensionType", this.extensionType); + jsonWriter.writeStringField("publisher", this.publisher); + jsonWriter.writeBooleanField("enableAutomaticUpgrade", this.enableAutomaticUpgrade); + jsonWriter.writeBooleanField("lcmUpdate", this.lcmUpdate); + jsonWriter.writeStringField("catalog", this.catalog); + jsonWriter.writeStringField("ring", this.ring); + jsonWriter.writeStringField("releaseTrain", this.releaseTrain); + jsonWriter.writeStringField("link", this.link); + jsonWriter.writeStringField("name", this.name); + jsonWriter.writeStringField("expectedHash", this.expectedHash); + jsonWriter.writeStringField("previewSource", this.previewSource); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ValidatedSolutionRecipeComponentMetadata from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ValidatedSolutionRecipeComponentMetadata 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 ValidatedSolutionRecipeComponentMetadata. + */ + public static ValidatedSolutionRecipeComponentMetadata fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ValidatedSolutionRecipeComponentMetadata deserializedValidatedSolutionRecipeComponentMetadata + = new ValidatedSolutionRecipeComponentMetadata(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("extensionType".equals(fieldName)) { + deserializedValidatedSolutionRecipeComponentMetadata.extensionType = reader.getString(); + } else if ("publisher".equals(fieldName)) { + deserializedValidatedSolutionRecipeComponentMetadata.publisher = reader.getString(); + } else if ("enableAutomaticUpgrade".equals(fieldName)) { + deserializedValidatedSolutionRecipeComponentMetadata.enableAutomaticUpgrade + = reader.getNullable(JsonReader::getBoolean); + } else if ("lcmUpdate".equals(fieldName)) { + deserializedValidatedSolutionRecipeComponentMetadata.lcmUpdate + = reader.getNullable(JsonReader::getBoolean); + } else if ("catalog".equals(fieldName)) { + deserializedValidatedSolutionRecipeComponentMetadata.catalog = reader.getString(); + } else if ("ring".equals(fieldName)) { + deserializedValidatedSolutionRecipeComponentMetadata.ring = reader.getString(); + } else if ("releaseTrain".equals(fieldName)) { + deserializedValidatedSolutionRecipeComponentMetadata.releaseTrain = reader.getString(); + } else if ("link".equals(fieldName)) { + deserializedValidatedSolutionRecipeComponentMetadata.link = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedValidatedSolutionRecipeComponentMetadata.name = reader.getString(); + } else if ("expectedHash".equals(fieldName)) { + deserializedValidatedSolutionRecipeComponentMetadata.expectedHash = reader.getString(); + } else if ("previewSource".equals(fieldName)) { + deserializedValidatedSolutionRecipeComponentMetadata.previewSource = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedValidatedSolutionRecipeComponentMetadata; + }); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/ValidatedSolutionRecipeComponentPayload.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/ValidatedSolutionRecipeComponentPayload.java new file mode 100644 index 000000000000..8756baf0389f --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/ValidatedSolutionRecipeComponentPayload.java @@ -0,0 +1,128 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.azurestackhci.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; + +/** + * Represents payloads associated with a component available in a validated solution recipe. + */ +@Immutable +public final class ValidatedSolutionRecipeComponentPayload + implements JsonSerializable { + /* + * Represents the unique identifier of the payload used to query the URL. + */ + private String identifier; + + /* + * Represents the cryptographic hash of the payload, ensuring data integrity. + */ + private String hash; + + /* + * Represents the name of the file associated with the payload. + */ + private String fileName; + + /* + * Represents the URL from which the payload can be downloaded. + */ + private String url; + + /** + * Creates an instance of ValidatedSolutionRecipeComponentPayload class. + */ + private ValidatedSolutionRecipeComponentPayload() { + } + + /** + * Get the identifier property: Represents the unique identifier of the payload used to query the URL. + * + * @return the identifier value. + */ + public String identifier() { + return this.identifier; + } + + /** + * Get the hash property: Represents the cryptographic hash of the payload, ensuring data integrity. + * + * @return the hash value. + */ + public String hash() { + return this.hash; + } + + /** + * Get the fileName property: Represents the name of the file associated with the payload. + * + * @return the fileName value. + */ + public String fileName() { + return this.fileName; + } + + /** + * Get the url property: Represents the URL from which the payload can be downloaded. + * + * @return the url value. + */ + public String url() { + return this.url; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("identifier", this.identifier); + jsonWriter.writeStringField("hash", this.hash); + jsonWriter.writeStringField("fileName", this.fileName); + jsonWriter.writeStringField("url", this.url); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ValidatedSolutionRecipeComponentPayload from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ValidatedSolutionRecipeComponentPayload 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 ValidatedSolutionRecipeComponentPayload. + */ + public static ValidatedSolutionRecipeComponentPayload fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ValidatedSolutionRecipeComponentPayload deserializedValidatedSolutionRecipeComponentPayload + = new ValidatedSolutionRecipeComponentPayload(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("identifier".equals(fieldName)) { + deserializedValidatedSolutionRecipeComponentPayload.identifier = reader.getString(); + } else if ("hash".equals(fieldName)) { + deserializedValidatedSolutionRecipeComponentPayload.hash = reader.getString(); + } else if ("fileName".equals(fieldName)) { + deserializedValidatedSolutionRecipeComponentPayload.fileName = reader.getString(); + } else if ("url".equals(fieldName)) { + deserializedValidatedSolutionRecipeComponentPayload.url = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedValidatedSolutionRecipeComponentPayload; + }); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/ValidatedSolutionRecipeContent.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/ValidatedSolutionRecipeContent.java new file mode 100644 index 000000000000..662ad9d0dd1c --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/ValidatedSolutionRecipeContent.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.azurestackhci.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; + +/** + * Represents contents of a validated solution recipe resource. + */ +@Immutable +public final class ValidatedSolutionRecipeContent implements JsonSerializable { + /* + * Represents information about a validated solution recipe. + */ + private ValidatedSolutionRecipeInfo info; + + /* + * Represents capabilities available in a validated solution recipe. + */ + private ValidatedSolutionRecipeCapabilities capabilities; + + /* + * Represents components available in a validated solution recipe. + */ + private List components; + + /** + * Creates an instance of ValidatedSolutionRecipeContent class. + */ + private ValidatedSolutionRecipeContent() { + } + + /** + * Get the info property: Represents information about a validated solution recipe. + * + * @return the info value. + */ + public ValidatedSolutionRecipeInfo info() { + return this.info; + } + + /** + * Get the capabilities property: Represents capabilities available in a validated solution recipe. + * + * @return the capabilities value. + */ + public ValidatedSolutionRecipeCapabilities capabilities() { + return this.capabilities; + } + + /** + * Get the components property: Represents components available in a validated solution recipe. + * + * @return the components value. + */ + public List components() { + return this.components; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("info", this.info); + jsonWriter.writeArrayField("components", this.components, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeJsonField("capabilities", this.capabilities); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ValidatedSolutionRecipeContent from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ValidatedSolutionRecipeContent 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 ValidatedSolutionRecipeContent. + */ + public static ValidatedSolutionRecipeContent fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ValidatedSolutionRecipeContent deserializedValidatedSolutionRecipeContent + = new ValidatedSolutionRecipeContent(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("info".equals(fieldName)) { + deserializedValidatedSolutionRecipeContent.info = ValidatedSolutionRecipeInfo.fromJson(reader); + } else if ("components".equals(fieldName)) { + List components + = reader.readArray(reader1 -> ValidatedSolutionRecipeComponent.fromJson(reader1)); + deserializedValidatedSolutionRecipeContent.components = components; + } else if ("capabilities".equals(fieldName)) { + deserializedValidatedSolutionRecipeContent.capabilities + = ValidatedSolutionRecipeCapabilities.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedValidatedSolutionRecipeContent; + }); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/ValidatedSolutionRecipeInfo.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/ValidatedSolutionRecipeInfo.java new file mode 100644 index 000000000000..8ba45d55ed24 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/ValidatedSolutionRecipeInfo.java @@ -0,0 +1,93 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.azurestackhci.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; + +/** + * Represents information about a validated solution recipe. + */ +@Immutable +public final class ValidatedSolutionRecipeInfo implements JsonSerializable { + /* + * Represents the solution type for which this validated solution recipe is applicable. + */ + private String solutionType; + + /* + * Represents the version for which this validated solution recipe is applicable. + */ + private String version; + + /** + * Creates an instance of ValidatedSolutionRecipeInfo class. + */ + private ValidatedSolutionRecipeInfo() { + } + + /** + * Get the solutionType property: Represents the solution type for which this validated solution recipe is + * applicable. + * + * @return the solutionType value. + */ + public String solutionType() { + return this.solutionType; + } + + /** + * Get the version property: Represents the version for which this validated solution recipe is applicable. + * + * @return the version value. + */ + public String version() { + return this.version; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("solutionType", this.solutionType); + jsonWriter.writeStringField("version", this.version); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ValidatedSolutionRecipeInfo from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ValidatedSolutionRecipeInfo 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 ValidatedSolutionRecipeInfo. + */ + public static ValidatedSolutionRecipeInfo fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ValidatedSolutionRecipeInfo deserializedValidatedSolutionRecipeInfo = new ValidatedSolutionRecipeInfo(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("solutionType".equals(fieldName)) { + deserializedValidatedSolutionRecipeInfo.solutionType = reader.getString(); + } else if ("version".equals(fieldName)) { + deserializedValidatedSolutionRecipeInfo.version = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedValidatedSolutionRecipeInfo; + }); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/ValidatedSolutionRecipeProperties.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/ValidatedSolutionRecipeProperties.java new file mode 100644 index 000000000000..e6249282ab22 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/ValidatedSolutionRecipeProperties.java @@ -0,0 +1,94 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.azurestackhci.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; + +/** + * Represents properties of a validated solution recipe resource. + */ +@Immutable +public final class ValidatedSolutionRecipeProperties implements JsonSerializable { + /* + * Represents contents of a validated solution recipe. + */ + private ValidatedSolutionRecipeContent recipeContent; + + /* + * Represents the signature of the recipe, to be used for ensuring its integrity. + */ + private String signature; + + /** + * Creates an instance of ValidatedSolutionRecipeProperties class. + */ + private ValidatedSolutionRecipeProperties() { + } + + /** + * Get the recipeContent property: Represents contents of a validated solution recipe. + * + * @return the recipeContent value. + */ + public ValidatedSolutionRecipeContent recipeContent() { + return this.recipeContent; + } + + /** + * Get the signature property: Represents the signature of the recipe, to be used for ensuring its integrity. + * + * @return the signature value. + */ + public String signature() { + return this.signature; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("recipeContent", this.recipeContent); + jsonWriter.writeStringField("signature", this.signature); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ValidatedSolutionRecipeProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ValidatedSolutionRecipeProperties 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 ValidatedSolutionRecipeProperties. + */ + public static ValidatedSolutionRecipeProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ValidatedSolutionRecipeProperties deserializedValidatedSolutionRecipeProperties + = new ValidatedSolutionRecipeProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("recipeContent".equals(fieldName)) { + deserializedValidatedSolutionRecipeProperties.recipeContent + = ValidatedSolutionRecipeContent.fromJson(reader); + } else if ("signature".equals(fieldName)) { + deserializedValidatedSolutionRecipeProperties.signature = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedValidatedSolutionRecipeProperties; + }); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/ValidatedSolutionRecipes.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/ValidatedSolutionRecipes.java new file mode 100644 index 000000000000..23b161506a90 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/ValidatedSolutionRecipes.java @@ -0,0 +1,65 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.azurestackhci.models; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; + +/** + * Resource collection API of ValidatedSolutionRecipes. + */ +public interface ValidatedSolutionRecipes { + /** + * Get a validated solution recipe. + * + * @param location The name of the Azure region. + * @param validatedSolutionRecipeName The name of the ValidatedSolutionRecipe. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a validated solution recipe along with {@link Response}. + */ + Response getWithResponse(String location, String validatedSolutionRecipeName, + Context context); + + /** + * Get a validated solution recipe. + * + * @param location The name of the Azure region. + * @param validatedSolutionRecipeName The name of the ValidatedSolutionRecipe. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a validated solution recipe. + */ + ValidatedSolutionRecipe get(String location, String validatedSolutionRecipeName); + + /** + * List all validated solution recipes. + * + * @param location The name of the Azure region. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ValidatedSolutionRecipe list operation as paginated response with + * {@link PagedIterable}. + */ + PagedIterable listBySubscriptionLocationResource(String location); + + /** + * List all validated solution recipes. + * + * @param location The name of the Azure region. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ValidatedSolutionRecipe list operation as paginated response with + * {@link PagedIterable}. + */ + PagedIterable listBySubscriptionLocationResource(String location, Context context); +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/WindowsServerSubscription.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/WindowsServerSubscription.java index 02026252647c..c22ba0b562c1 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/WindowsServerSubscription.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/WindowsServerSubscription.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.models; @@ -12,12 +12,12 @@ */ public final class WindowsServerSubscription extends ExpandableStringEnum { /** - * Static value Disabled for WindowsServerSubscription. + * Windows Server Subscription is disabled. */ public static final WindowsServerSubscription DISABLED = fromString("Disabled"); /** - * Static value Enabled for WindowsServerSubscription. + * Windows Server Subscription is enabled. */ public static final WindowsServerSubscription ENABLED = fromString("Enabled"); diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/package-info.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/package-info.java index 22d0ea7950cf..670150c44ca8 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/package-info.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/package-info.java @@ -1,9 +1,9 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. /** - * Package containing the data models for AzureStackHciClient. - * Azure Stack HCI management service. + * Package containing the data models for AzureStackHci. + * Azure Stack HCI service. */ package com.azure.resourcemanager.azurestackhci.models; diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/package-info.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/package-info.java index 505b7ec7c29a..9566eaa66bcd 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/package-info.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/package-info.java @@ -1,9 +1,9 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. /** - * Package containing the classes for AzureStackHciClient. - * Azure Stack HCI management service. + * Package containing the classes for AzureStackHci. + * Azure Stack HCI service. */ package com.azure.resourcemanager.azurestackhci; diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/module-info.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/module-info.java index 3a93c671b5bd..8f61efbba297 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/module-info.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/module-info.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. module com.azure.resourcemanager.azurestackhci { requires transitive com.azure.core.management; @@ -12,4 +12,5 @@ opens com.azure.resourcemanager.azurestackhci.fluent.models to com.azure.core; opens com.azure.resourcemanager.azurestackhci.models to com.azure.core; + opens com.azure.resourcemanager.azurestackhci.implementation.models to com.azure.core; } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/resources/META-INF/azure-resourcemanager-azurestackhci_apiview_properties.json b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/resources/META-INF/azure-resourcemanager-azurestackhci_apiview_properties.json new file mode 100644 index 000000000000..2061f91ff6fa --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/resources/META-INF/azure-resourcemanager-azurestackhci_apiview_properties.json @@ -0,0 +1,355 @@ +{ + "flavor": "azure", + "CrossLanguageDefinitionId": { + "com.azure.resourcemanager.azurestackhci.fluent.ArcSettingsClient": "Microsoft.AzureStackHCI.ArcSettings", + "com.azure.resourcemanager.azurestackhci.fluent.ArcSettingsClient.beginCreateIdentity": "Microsoft.AzureStackHCI.ArcSettings.createIdentity", + "com.azure.resourcemanager.azurestackhci.fluent.ArcSettingsClient.beginDelete": "Microsoft.AzureStackHCI.ArcSettings.delete", + "com.azure.resourcemanager.azurestackhci.fluent.ArcSettingsClient.beginInitializeDisableProcess": "Microsoft.AzureStackHCI.ArcSettings.initializeDisableProcess", + "com.azure.resourcemanager.azurestackhci.fluent.ArcSettingsClient.beginReconcile": "Microsoft.AzureStackHCI.ArcSettings.reconcile", + "com.azure.resourcemanager.azurestackhci.fluent.ArcSettingsClient.consentAndInstallDefaultExtensions": "Microsoft.AzureStackHCI.ArcSettings.consentAndInstallDefaultExtensions", + "com.azure.resourcemanager.azurestackhci.fluent.ArcSettingsClient.consentAndInstallDefaultExtensionsWithResponse": "Microsoft.AzureStackHCI.ArcSettings.consentAndInstallDefaultExtensions", + "com.azure.resourcemanager.azurestackhci.fluent.ArcSettingsClient.create": "Microsoft.AzureStackHCI.ArcSettings.create", + "com.azure.resourcemanager.azurestackhci.fluent.ArcSettingsClient.createIdentity": "Microsoft.AzureStackHCI.ArcSettings.createIdentity", + "com.azure.resourcemanager.azurestackhci.fluent.ArcSettingsClient.createWithResponse": "Microsoft.AzureStackHCI.ArcSettings.create", + "com.azure.resourcemanager.azurestackhci.fluent.ArcSettingsClient.delete": "Microsoft.AzureStackHCI.ArcSettings.delete", + "com.azure.resourcemanager.azurestackhci.fluent.ArcSettingsClient.generatePassword": "Microsoft.AzureStackHCI.ArcSettings.generatePassword", + "com.azure.resourcemanager.azurestackhci.fluent.ArcSettingsClient.generatePasswordWithResponse": "Microsoft.AzureStackHCI.ArcSettings.generatePassword", + "com.azure.resourcemanager.azurestackhci.fluent.ArcSettingsClient.get": "Microsoft.AzureStackHCI.ArcSettings.get", + "com.azure.resourcemanager.azurestackhci.fluent.ArcSettingsClient.getWithResponse": "Microsoft.AzureStackHCI.ArcSettings.get", + "com.azure.resourcemanager.azurestackhci.fluent.ArcSettingsClient.initializeDisableProcess": "Microsoft.AzureStackHCI.ArcSettings.initializeDisableProcess", + "com.azure.resourcemanager.azurestackhci.fluent.ArcSettingsClient.listByCluster": "Microsoft.AzureStackHCI.ArcSettings.listByCluster", + "com.azure.resourcemanager.azurestackhci.fluent.ArcSettingsClient.reconcile": "Microsoft.AzureStackHCI.ArcSettings.reconcile", + "com.azure.resourcemanager.azurestackhci.fluent.ArcSettingsClient.update": "Microsoft.AzureStackHCI.ArcSettings.update", + "com.azure.resourcemanager.azurestackhci.fluent.ArcSettingsClient.updateWithResponse": "Microsoft.AzureStackHCI.ArcSettings.update", + "com.azure.resourcemanager.azurestackhci.fluent.AzureStackHciManagementClient": "Microsoft.AzureStackHCI", + "com.azure.resourcemanager.azurestackhci.fluent.ClustersClient": "Microsoft.AzureStackHCI.Clusters", + "com.azure.resourcemanager.azurestackhci.fluent.ClustersClient.beginConfigureRemoteSupport": "Microsoft.AzureStackHCI.Clusters.configureRemoteSupport", + "com.azure.resourcemanager.azurestackhci.fluent.ClustersClient.beginCreateIdentity": "Microsoft.AzureStackHCI.Clusters.createIdentity", + "com.azure.resourcemanager.azurestackhci.fluent.ClustersClient.beginDelete": "Microsoft.AzureStackHCI.Clusters.delete", + "com.azure.resourcemanager.azurestackhci.fluent.ClustersClient.beginExtendSoftwareAssuranceBenefit": "Microsoft.AzureStackHCI.Clusters.extendSoftwareAssuranceBenefit", + "com.azure.resourcemanager.azurestackhci.fluent.ClustersClient.beginTriggerLogCollection": "Microsoft.AzureStackHCI.Clusters.triggerLogCollection", + "com.azure.resourcemanager.azurestackhci.fluent.ClustersClient.beginUpdateSecretsLocations": "Microsoft.AzureStackHCI.Clusters.updateSecretsLocations", + "com.azure.resourcemanager.azurestackhci.fluent.ClustersClient.beginUploadCertificate": "Microsoft.AzureStackHCI.Clusters.uploadCertificate", + "com.azure.resourcemanager.azurestackhci.fluent.ClustersClient.configureRemoteSupport": "Microsoft.AzureStackHCI.Clusters.configureRemoteSupport", + "com.azure.resourcemanager.azurestackhci.fluent.ClustersClient.create": "Microsoft.AzureStackHCI.Clusters.create", + "com.azure.resourcemanager.azurestackhci.fluent.ClustersClient.createIdentity": "Microsoft.AzureStackHCI.Clusters.createIdentity", + "com.azure.resourcemanager.azurestackhci.fluent.ClustersClient.createWithResponse": "Microsoft.AzureStackHCI.Clusters.create", + "com.azure.resourcemanager.azurestackhci.fluent.ClustersClient.delete": "Microsoft.AzureStackHCI.Clusters.delete", + "com.azure.resourcemanager.azurestackhci.fluent.ClustersClient.extendSoftwareAssuranceBenefit": "Microsoft.AzureStackHCI.Clusters.extendSoftwareAssuranceBenefit", + "com.azure.resourcemanager.azurestackhci.fluent.ClustersClient.getByResourceGroup": "Microsoft.AzureStackHCI.Clusters.get", + "com.azure.resourcemanager.azurestackhci.fluent.ClustersClient.getByResourceGroupWithResponse": "Microsoft.AzureStackHCI.Clusters.get", + "com.azure.resourcemanager.azurestackhci.fluent.ClustersClient.list": "Microsoft.AzureStackHCI.Clusters.listBySubscription", + "com.azure.resourcemanager.azurestackhci.fluent.ClustersClient.listByResourceGroup": "Microsoft.AzureStackHCI.Clusters.listByResourceGroup", + "com.azure.resourcemanager.azurestackhci.fluent.ClustersClient.triggerLogCollection": "Microsoft.AzureStackHCI.Clusters.triggerLogCollection", + "com.azure.resourcemanager.azurestackhci.fluent.ClustersClient.update": "Microsoft.AzureStackHCI.Clusters.update", + "com.azure.resourcemanager.azurestackhci.fluent.ClustersClient.updateSecretsLocations": "Microsoft.AzureStackHCI.Clusters.updateSecretsLocations", + "com.azure.resourcemanager.azurestackhci.fluent.ClustersClient.updateWithResponse": "Microsoft.AzureStackHCI.Clusters.update", + "com.azure.resourcemanager.azurestackhci.fluent.ClustersClient.uploadCertificate": "Microsoft.AzureStackHCI.Clusters.uploadCertificate", + "com.azure.resourcemanager.azurestackhci.fluent.DeploymentSettingsClient": "Microsoft.AzureStackHCI.DeploymentSettings", + "com.azure.resourcemanager.azurestackhci.fluent.DeploymentSettingsClient.beginCreateOrUpdate": "Microsoft.AzureStackHCI.DeploymentSettings.createOrUpdate", + "com.azure.resourcemanager.azurestackhci.fluent.DeploymentSettingsClient.beginDelete": "Microsoft.AzureStackHCI.DeploymentSettings.delete", + "com.azure.resourcemanager.azurestackhci.fluent.DeploymentSettingsClient.createOrUpdate": "Microsoft.AzureStackHCI.DeploymentSettings.createOrUpdate", + "com.azure.resourcemanager.azurestackhci.fluent.DeploymentSettingsClient.delete": "Microsoft.AzureStackHCI.DeploymentSettings.delete", + "com.azure.resourcemanager.azurestackhci.fluent.DeploymentSettingsClient.get": "Microsoft.AzureStackHCI.DeploymentSettings.get", + "com.azure.resourcemanager.azurestackhci.fluent.DeploymentSettingsClient.getWithResponse": "Microsoft.AzureStackHCI.DeploymentSettings.get", + "com.azure.resourcemanager.azurestackhci.fluent.DeploymentSettingsClient.listByClusters": "Microsoft.AzureStackHCI.DeploymentSettings.listByClusters", + "com.azure.resourcemanager.azurestackhci.fluent.EdgeDeviceJobsClient": "Microsoft.AzureStackHCI.EdgeDeviceJobs", + "com.azure.resourcemanager.azurestackhci.fluent.EdgeDeviceJobsClient.beginCreateOrUpdate": "Microsoft.AzureStackHCI.EdgeDeviceJobs.createOrUpdate", + "com.azure.resourcemanager.azurestackhci.fluent.EdgeDeviceJobsClient.beginDelete": "Microsoft.AzureStackHCI.EdgeDeviceJobs.delete", + "com.azure.resourcemanager.azurestackhci.fluent.EdgeDeviceJobsClient.createOrUpdate": "Microsoft.AzureStackHCI.EdgeDeviceJobs.createOrUpdate", + "com.azure.resourcemanager.azurestackhci.fluent.EdgeDeviceJobsClient.delete": "Microsoft.AzureStackHCI.EdgeDeviceJobs.delete", + "com.azure.resourcemanager.azurestackhci.fluent.EdgeDeviceJobsClient.get": "Microsoft.AzureStackHCI.EdgeDeviceJobs.get", + "com.azure.resourcemanager.azurestackhci.fluent.EdgeDeviceJobsClient.getWithResponse": "Microsoft.AzureStackHCI.EdgeDeviceJobs.get", + "com.azure.resourcemanager.azurestackhci.fluent.EdgeDeviceJobsClient.listByEdgeDevice": "Microsoft.AzureStackHCI.EdgeDeviceJobs.listByEdgeDevice", + "com.azure.resourcemanager.azurestackhci.fluent.EdgeDevicesClient": "Microsoft.AzureStackHCI.EdgeDevices", + "com.azure.resourcemanager.azurestackhci.fluent.EdgeDevicesClient.beginCreateOrUpdate": "Microsoft.AzureStackHCI.EdgeDevices.createOrUpdate", + "com.azure.resourcemanager.azurestackhci.fluent.EdgeDevicesClient.beginDelete": "Microsoft.AzureStackHCI.EdgeDevices.delete", + "com.azure.resourcemanager.azurestackhci.fluent.EdgeDevicesClient.beginValidate": "Microsoft.AzureStackHCI.EdgeDevices.validate", + "com.azure.resourcemanager.azurestackhci.fluent.EdgeDevicesClient.createOrUpdate": "Microsoft.AzureStackHCI.EdgeDevices.createOrUpdate", + "com.azure.resourcemanager.azurestackhci.fluent.EdgeDevicesClient.delete": "Microsoft.AzureStackHCI.EdgeDevices.delete", + "com.azure.resourcemanager.azurestackhci.fluent.EdgeDevicesClient.get": "Microsoft.AzureStackHCI.EdgeDevices.get", + "com.azure.resourcemanager.azurestackhci.fluent.EdgeDevicesClient.getWithResponse": "Microsoft.AzureStackHCI.EdgeDevices.get", + "com.azure.resourcemanager.azurestackhci.fluent.EdgeDevicesClient.list": "Microsoft.AzureStackHCI.EdgeDevices.list", + "com.azure.resourcemanager.azurestackhci.fluent.EdgeDevicesClient.validate": "Microsoft.AzureStackHCI.EdgeDevices.validate", + "com.azure.resourcemanager.azurestackhci.fluent.ExtensionsClient": "Microsoft.AzureStackHCI.Extensions", + "com.azure.resourcemanager.azurestackhci.fluent.ExtensionsClient.beginCreate": "Microsoft.AzureStackHCI.Extensions.create", + "com.azure.resourcemanager.azurestackhci.fluent.ExtensionsClient.beginDelete": "Microsoft.AzureStackHCI.Extensions.delete", + "com.azure.resourcemanager.azurestackhci.fluent.ExtensionsClient.beginUpdate": "Microsoft.AzureStackHCI.Extensions.update", + "com.azure.resourcemanager.azurestackhci.fluent.ExtensionsClient.beginUpgrade": "Microsoft.AzureStackHCI.Extensions.upgrade", + "com.azure.resourcemanager.azurestackhci.fluent.ExtensionsClient.create": "Microsoft.AzureStackHCI.Extensions.create", + "com.azure.resourcemanager.azurestackhci.fluent.ExtensionsClient.delete": "Microsoft.AzureStackHCI.Extensions.delete", + "com.azure.resourcemanager.azurestackhci.fluent.ExtensionsClient.get": "Microsoft.AzureStackHCI.Extensions.get", + "com.azure.resourcemanager.azurestackhci.fluent.ExtensionsClient.getWithResponse": "Microsoft.AzureStackHCI.Extensions.get", + "com.azure.resourcemanager.azurestackhci.fluent.ExtensionsClient.listByArcSetting": "Microsoft.AzureStackHCI.Extensions.listByArcSetting", + "com.azure.resourcemanager.azurestackhci.fluent.ExtensionsClient.update": "Microsoft.AzureStackHCI.Extensions.update", + "com.azure.resourcemanager.azurestackhci.fluent.ExtensionsClient.upgrade": "Microsoft.AzureStackHCI.Extensions.upgrade", + "com.azure.resourcemanager.azurestackhci.fluent.OffersClient": "Microsoft.AzureStackHCI.Offers", + "com.azure.resourcemanager.azurestackhci.fluent.OffersClient.get": "Microsoft.AzureStackHCI.Offers.get", + "com.azure.resourcemanager.azurestackhci.fluent.OffersClient.getWithResponse": "Microsoft.AzureStackHCI.Offers.get", + "com.azure.resourcemanager.azurestackhci.fluent.OffersClient.listByCluster": "Microsoft.AzureStackHCI.Clusters.listByCluster", + "com.azure.resourcemanager.azurestackhci.fluent.OffersClient.listByPublisher": "Microsoft.AzureStackHCI.Offers.listByPublisher", + "com.azure.resourcemanager.azurestackhci.fluent.OperationsClient": "Microsoft.AzureStackHCI.Operations", + "com.azure.resourcemanager.azurestackhci.fluent.OperationsClient.list": "Azure.ResourceManager.Operations.list", + "com.azure.resourcemanager.azurestackhci.fluent.SecuritySettingsClient": "Microsoft.AzureStackHCI.SecuritySettings", + "com.azure.resourcemanager.azurestackhci.fluent.SecuritySettingsClient.beginCreateOrUpdate": "Microsoft.AzureStackHCI.SecuritySettings.createOrUpdate", + "com.azure.resourcemanager.azurestackhci.fluent.SecuritySettingsClient.beginDelete": "Microsoft.AzureStackHCI.SecuritySettings.delete", + "com.azure.resourcemanager.azurestackhci.fluent.SecuritySettingsClient.createOrUpdate": "Microsoft.AzureStackHCI.SecuritySettings.createOrUpdate", + "com.azure.resourcemanager.azurestackhci.fluent.SecuritySettingsClient.delete": "Microsoft.AzureStackHCI.SecuritySettings.delete", + "com.azure.resourcemanager.azurestackhci.fluent.SecuritySettingsClient.get": "Microsoft.AzureStackHCI.SecuritySettings.get", + "com.azure.resourcemanager.azurestackhci.fluent.SecuritySettingsClient.getWithResponse": "Microsoft.AzureStackHCI.SecuritySettings.get", + "com.azure.resourcemanager.azurestackhci.fluent.SecuritySettingsClient.listByClusters": "Microsoft.AzureStackHCI.SecuritySettings.listByClusters", + "com.azure.resourcemanager.azurestackhci.fluent.SkusClient": "Microsoft.AzureStackHCI.Skus", + "com.azure.resourcemanager.azurestackhci.fluent.SkusClient.get": "Microsoft.AzureStackHCI.Skus.get", + "com.azure.resourcemanager.azurestackhci.fluent.SkusClient.getWithResponse": "Microsoft.AzureStackHCI.Skus.get", + "com.azure.resourcemanager.azurestackhci.fluent.SkusClient.listByOffer": "Microsoft.AzureStackHCI.Skus.listByOffer", + "com.azure.resourcemanager.azurestackhci.fluent.UpdateRunsClient": "Microsoft.AzureStackHCI.UpdateRuns", + "com.azure.resourcemanager.azurestackhci.fluent.UpdateRunsClient.beginDelete": "Microsoft.AzureStackHCI.UpdateRuns.delete", + "com.azure.resourcemanager.azurestackhci.fluent.UpdateRunsClient.delete": "Microsoft.AzureStackHCI.UpdateRuns.delete", + "com.azure.resourcemanager.azurestackhci.fluent.UpdateRunsClient.get": "Microsoft.AzureStackHCI.UpdateRuns.get", + "com.azure.resourcemanager.azurestackhci.fluent.UpdateRunsClient.getWithResponse": "Microsoft.AzureStackHCI.UpdateRuns.get", + "com.azure.resourcemanager.azurestackhci.fluent.UpdateRunsClient.list": "Microsoft.AzureStackHCI.UpdateRuns.list", + "com.azure.resourcemanager.azurestackhci.fluent.UpdateRunsClient.put": "Microsoft.AzureStackHCI.UpdateRuns.put", + "com.azure.resourcemanager.azurestackhci.fluent.UpdateRunsClient.putWithResponse": "Microsoft.AzureStackHCI.UpdateRuns.put", + "com.azure.resourcemanager.azurestackhci.fluent.UpdateSummariesOperationsClient": "Microsoft.AzureStackHCI", + "com.azure.resourcemanager.azurestackhci.fluent.UpdateSummariesOperationsClient.beginDelete": "Microsoft.AzureStackHCI.UpdateSummariesOperationGroup.delete", + "com.azure.resourcemanager.azurestackhci.fluent.UpdateSummariesOperationsClient.delete": "Microsoft.AzureStackHCI.UpdateSummariesOperationGroup.delete", + "com.azure.resourcemanager.azurestackhci.fluent.UpdateSummariesOperationsClient.get": "Microsoft.AzureStackHCI.UpdateSummariesOperationGroup.get", + "com.azure.resourcemanager.azurestackhci.fluent.UpdateSummariesOperationsClient.getWithResponse": "Microsoft.AzureStackHCI.UpdateSummariesOperationGroup.get", + "com.azure.resourcemanager.azurestackhci.fluent.UpdateSummariesOperationsClient.list": "Microsoft.AzureStackHCI.UpdateSummariesOperationGroup.list", + "com.azure.resourcemanager.azurestackhci.fluent.UpdateSummariesOperationsClient.put": "Microsoft.AzureStackHCI.UpdateSummariesOperationGroup.put", + "com.azure.resourcemanager.azurestackhci.fluent.UpdateSummariesOperationsClient.putWithResponse": "Microsoft.AzureStackHCI.UpdateSummariesOperationGroup.put", + "com.azure.resourcemanager.azurestackhci.fluent.UpdatesClient": "Microsoft.AzureStackHCI.Updates", + "com.azure.resourcemanager.azurestackhci.fluent.UpdatesClient.beginDelete": "Microsoft.AzureStackHCI.Updates.delete", + "com.azure.resourcemanager.azurestackhci.fluent.UpdatesClient.beginPost": "Microsoft.AzureStackHCI.Updates.post", + "com.azure.resourcemanager.azurestackhci.fluent.UpdatesClient.delete": "Microsoft.AzureStackHCI.Updates.delete", + "com.azure.resourcemanager.azurestackhci.fluent.UpdatesClient.get": "Microsoft.AzureStackHCI.Updates.get", + "com.azure.resourcemanager.azurestackhci.fluent.UpdatesClient.getWithResponse": "Microsoft.AzureStackHCI.Updates.get", + "com.azure.resourcemanager.azurestackhci.fluent.UpdatesClient.list": "Microsoft.AzureStackHCI.Updates.list", + "com.azure.resourcemanager.azurestackhci.fluent.UpdatesClient.post": "Microsoft.AzureStackHCI.Updates.post", + "com.azure.resourcemanager.azurestackhci.fluent.UpdatesClient.put": "Microsoft.AzureStackHCI.Updates.put", + "com.azure.resourcemanager.azurestackhci.fluent.UpdatesClient.putWithResponse": "Microsoft.AzureStackHCI.Updates.put", + "com.azure.resourcemanager.azurestackhci.fluent.ValidatedSolutionRecipesClient": "Microsoft.AzureStackHCI.ValidatedSolutionRecipes", + "com.azure.resourcemanager.azurestackhci.fluent.ValidatedSolutionRecipesClient.get": "Microsoft.AzureStackHCI.ValidatedSolutionRecipes.get", + "com.azure.resourcemanager.azurestackhci.fluent.ValidatedSolutionRecipesClient.getWithResponse": "Microsoft.AzureStackHCI.ValidatedSolutionRecipes.get", + "com.azure.resourcemanager.azurestackhci.fluent.ValidatedSolutionRecipesClient.listBySubscriptionLocationResource": "Microsoft.AzureStackHCI.ValidatedSolutionRecipes.listBySubscriptionLocationResource", + "com.azure.resourcemanager.azurestackhci.fluent.models.ArcIdentityResponseInner": "Microsoft.AzureStackHCI.ArcIdentityResponse", + "com.azure.resourcemanager.azurestackhci.fluent.models.ArcIdentityResponseProperties": "Microsoft.AzureStackHCI.ArcIdentityResponseProperties", + "com.azure.resourcemanager.azurestackhci.fluent.models.ArcSettingInner": "Microsoft.AzureStackHCI.ArcSetting", + "com.azure.resourcemanager.azurestackhci.fluent.models.ArcSettingProperties": "Microsoft.AzureStackHCI.ArcSettingProperties", + "com.azure.resourcemanager.azurestackhci.fluent.models.ArcSettingsPatchProperties": "Microsoft.AzureStackHCI.ArcSettingsPatchProperties", + "com.azure.resourcemanager.azurestackhci.fluent.models.ClusterIdentityResponseInner": "Microsoft.AzureStackHCI.ClusterIdentityResponse", + "com.azure.resourcemanager.azurestackhci.fluent.models.ClusterIdentityResponseProperties": "Microsoft.AzureStackHCI.ClusterIdentityResponseProperties", + "com.azure.resourcemanager.azurestackhci.fluent.models.ClusterInner": "Microsoft.AzureStackHCI.Cluster", + "com.azure.resourcemanager.azurestackhci.fluent.models.ClusterPatchProperties": "Microsoft.AzureStackHCI.ClusterPatchProperties", + "com.azure.resourcemanager.azurestackhci.fluent.models.ClusterProperties": "Microsoft.AzureStackHCI.ClusterProperties", + "com.azure.resourcemanager.azurestackhci.fluent.models.DeploymentSettingInner": "Microsoft.AzureStackHCI.DeploymentSetting", + "com.azure.resourcemanager.azurestackhci.fluent.models.DeploymentSettingsProperties": "Microsoft.AzureStackHCI.DeploymentSettingsProperties", + "com.azure.resourcemanager.azurestackhci.fluent.models.EdgeDeviceInner": "Microsoft.AzureStackHCI.EdgeDevice", + "com.azure.resourcemanager.azurestackhci.fluent.models.EdgeDeviceJobInner": "Microsoft.AzureStackHCI.EdgeDeviceJob", + "com.azure.resourcemanager.azurestackhci.fluent.models.ExtensionInner": "Microsoft.AzureStackHCI.Extension", + "com.azure.resourcemanager.azurestackhci.fluent.models.ExtensionParameters": "Microsoft.AzureStackHCI.ExtensionParameters", + "com.azure.resourcemanager.azurestackhci.fluent.models.ExtensionPatchProperties": "Microsoft.AzureStackHCI.ExtensionPatchProperties", + "com.azure.resourcemanager.azurestackhci.fluent.models.ExtensionProperties": "Microsoft.AzureStackHCI.ExtensionProperties", + "com.azure.resourcemanager.azurestackhci.fluent.models.HciUpdateInner": "Microsoft.AzureStackHCI.Update", + "com.azure.resourcemanager.azurestackhci.fluent.models.ManagedServiceIdentity": "Azure.ResourceManager.CommonTypes.ManagedServiceIdentity", + "com.azure.resourcemanager.azurestackhci.fluent.models.OfferInner": "Microsoft.AzureStackHCI.Offer", + "com.azure.resourcemanager.azurestackhci.fluent.models.OfferProperties": "Microsoft.AzureStackHCI.OfferProperties", + "com.azure.resourcemanager.azurestackhci.fluent.models.OperationInner": "Azure.ResourceManager.CommonTypes.Operation", + "com.azure.resourcemanager.azurestackhci.fluent.models.PasswordCredentialInner": "Microsoft.AzureStackHCI.PasswordCredential", + "com.azure.resourcemanager.azurestackhci.fluent.models.SecurityProperties": "Microsoft.AzureStackHCI.SecurityProperties", + "com.azure.resourcemanager.azurestackhci.fluent.models.SecuritySettingInner": "Microsoft.AzureStackHCI.SecuritySetting", + "com.azure.resourcemanager.azurestackhci.fluent.models.SkuInner": "Microsoft.AzureStackHCI.Sku", + "com.azure.resourcemanager.azurestackhci.fluent.models.SkuProperties": "Microsoft.AzureStackHCI.SkuProperties", + "com.azure.resourcemanager.azurestackhci.fluent.models.Step": "Microsoft.AzureStackHCI.Step", + "com.azure.resourcemanager.azurestackhci.fluent.models.UpdateProperties": "Microsoft.AzureStackHCI.UpdateProperties", + "com.azure.resourcemanager.azurestackhci.fluent.models.UpdateRunInner": "Microsoft.AzureStackHCI.UpdateRun", + "com.azure.resourcemanager.azurestackhci.fluent.models.UpdateRunProperties": "Microsoft.AzureStackHCI.UpdateRunProperties", + "com.azure.resourcemanager.azurestackhci.fluent.models.UpdateStateProperties": "Microsoft.AzureStackHCI.UpdateStateProperties", + "com.azure.resourcemanager.azurestackhci.fluent.models.UpdateSummariesInner": "Microsoft.AzureStackHCI.UpdateSummaries", + "com.azure.resourcemanager.azurestackhci.fluent.models.UpdateSummariesProperties": "Microsoft.AzureStackHCI.UpdateSummariesProperties", + "com.azure.resourcemanager.azurestackhci.fluent.models.ValidateResponseInner": "Microsoft.AzureStackHCI.ValidateResponse", + "com.azure.resourcemanager.azurestackhci.fluent.models.ValidatedSolutionRecipeInner": "Microsoft.AzureStackHCI.ValidatedSolutionRecipe", + "com.azure.resourcemanager.azurestackhci.implementation.AzureStackHciManagementClientBuilder": "Microsoft.AzureStackHCI", + "com.azure.resourcemanager.azurestackhci.implementation.models.ArcSettingList": "Microsoft.AzureStackHCI.ArcSettingList", + "com.azure.resourcemanager.azurestackhci.implementation.models.ClusterList": "Microsoft.AzureStackHCI.ClusterList", + "com.azure.resourcemanager.azurestackhci.implementation.models.DeploymentSettingListResult": "Azure.ResourceManager.ResourceListResult", + "com.azure.resourcemanager.azurestackhci.implementation.models.EdgeDeviceJobListResult": "Azure.ResourceManager.ResourceListResult", + "com.azure.resourcemanager.azurestackhci.implementation.models.EdgeDeviceListResult": "Azure.ResourceManager.ResourceListResult", + "com.azure.resourcemanager.azurestackhci.implementation.models.ExtensionList": "Microsoft.AzureStackHCI.ExtensionList", + "com.azure.resourcemanager.azurestackhci.implementation.models.OfferList": "Microsoft.AzureStackHCI.OfferList", + "com.azure.resourcemanager.azurestackhci.implementation.models.OperationListResult": "Azure.ResourceManager.CommonTypes.OperationListResult", + "com.azure.resourcemanager.azurestackhci.implementation.models.SecuritySettingListResult": "Azure.ResourceManager.ResourceListResult", + "com.azure.resourcemanager.azurestackhci.implementation.models.SkuList": "Microsoft.AzureStackHCI.SkuList", + "com.azure.resourcemanager.azurestackhci.implementation.models.UpdateList": "Microsoft.AzureStackHCI.UpdateList", + "com.azure.resourcemanager.azurestackhci.implementation.models.UpdateRunList": "Microsoft.AzureStackHCI.UpdateRunList", + "com.azure.resourcemanager.azurestackhci.implementation.models.UpdateSummariesList": "Microsoft.AzureStackHCI.UpdateSummariesList", + "com.azure.resourcemanager.azurestackhci.implementation.models.ValidatedSolutionRecipeListResult": "Azure.ResourceManager.ResourceListResult", + "com.azure.resourcemanager.azurestackhci.models.AccessLevel": "Microsoft.AzureStackHCI.AccessLevel", + "com.azure.resourcemanager.azurestackhci.models.ActionType": "Azure.ResourceManager.CommonTypes.ActionType", + "com.azure.resourcemanager.azurestackhci.models.ArcConnectivityProperties": "Microsoft.AzureStackHCI.ArcConnectivityProperties", + "com.azure.resourcemanager.azurestackhci.models.ArcExtensionState": "Microsoft.AzureStackHCI.ArcExtensionState", + "com.azure.resourcemanager.azurestackhci.models.ArcSettingAggregateState": "Microsoft.AzureStackHCI.ArcSettingAggregateState", + "com.azure.resourcemanager.azurestackhci.models.ArcSettingsPatch": "Microsoft.AzureStackHCI.ArcSettingsPatch", + "com.azure.resourcemanager.azurestackhci.models.AssemblyInfo": "Microsoft.AzureStackHCI.AssemblyInfo", + "com.azure.resourcemanager.azurestackhci.models.AssemblyInfoPayload": "Microsoft.AzureStackHCI.AssemblyInfoPayload", + "com.azure.resourcemanager.azurestackhci.models.AvailabilityType": "Microsoft.AzureStackHCI.AvailabilityType", + "com.azure.resourcemanager.azurestackhci.models.ClusterDesiredProperties": "Microsoft.AzureStackHCI.ClusterDesiredProperties", + "com.azure.resourcemanager.azurestackhci.models.ClusterNode": "Microsoft.AzureStackHCI.ClusterNode", + "com.azure.resourcemanager.azurestackhci.models.ClusterNodeType": "Microsoft.AzureStackHCI.ClusterNodeType", + "com.azure.resourcemanager.azurestackhci.models.ClusterPatch": "Microsoft.AzureStackHCI.ClusterPatch", + "com.azure.resourcemanager.azurestackhci.models.ClusterPattern": "Microsoft.AzureStackHCI.ClusterPattern", + "com.azure.resourcemanager.azurestackhci.models.ClusterReportedProperties": "Microsoft.AzureStackHCI.ClusterReportedProperties", + "com.azure.resourcemanager.azurestackhci.models.ComplianceAssignmentType": "Microsoft.AzureStackHCI.ComplianceAssignmentType", + "com.azure.resourcemanager.azurestackhci.models.ComplianceStatus": "Microsoft.AzureStackHCI.ComplianceStatus", + "com.azure.resourcemanager.azurestackhci.models.ConnectivityStatus": "Microsoft.AzureStackHCI.ConnectivityStatus", + "com.azure.resourcemanager.azurestackhci.models.DefaultExtensionDetails": "Microsoft.AzureStackHCI.DefaultExtensionDetails", + "com.azure.resourcemanager.azurestackhci.models.DeploymentCluster": "Microsoft.AzureStackHCI.DeploymentCluster", + "com.azure.resourcemanager.azurestackhci.models.DeploymentConfiguration": "Microsoft.AzureStackHCI.DeploymentConfiguration", + "com.azure.resourcemanager.azurestackhci.models.DeploymentData": "Microsoft.AzureStackHCI.DeploymentData", + "com.azure.resourcemanager.azurestackhci.models.DeploymentMode": "Microsoft.AzureStackHCI.DeploymentMode", + "com.azure.resourcemanager.azurestackhci.models.DeploymentSecuritySettings": "Microsoft.AzureStackHCI.DeploymentSecuritySettings", + "com.azure.resourcemanager.azurestackhci.models.DeploymentSettingAdapterPropertyOverrides": "Microsoft.AzureStackHCI.DeploymentSettingAdapterPropertyOverrides", + "com.azure.resourcemanager.azurestackhci.models.DeploymentSettingHostNetwork": "Microsoft.AzureStackHCI.DeploymentSettingHostNetwork", + "com.azure.resourcemanager.azurestackhci.models.DeploymentSettingIntents": "Microsoft.AzureStackHCI.DeploymentSettingIntents", + "com.azure.resourcemanager.azurestackhci.models.DeploymentSettingStorageAdapterIpInfo": "Microsoft.AzureStackHCI.DeploymentSettingStorageAdapterIPInfo", + "com.azure.resourcemanager.azurestackhci.models.DeploymentSettingStorageNetworks": "Microsoft.AzureStackHCI.DeploymentSettingStorageNetworks", + "com.azure.resourcemanager.azurestackhci.models.DeploymentSettingVirtualSwitchConfigurationOverrides": "Microsoft.AzureStackHCI.DeploymentSettingVirtualSwitchConfigurationOverrides", + "com.azure.resourcemanager.azurestackhci.models.DeploymentStep": "Microsoft.AzureStackHCI.DeploymentStep", + "com.azure.resourcemanager.azurestackhci.models.DeviceConfiguration": "Microsoft.AzureStackHCI.DeviceConfiguration", + "com.azure.resourcemanager.azurestackhci.models.DeviceKind": "Microsoft.AzureStackHCI.DeviceKind", + "com.azure.resourcemanager.azurestackhci.models.DeviceLogCollectionStatus": "Microsoft.AzureStackHCI.DeviceLogCollectionStatus", + "com.azure.resourcemanager.azurestackhci.models.DeviceState": "Microsoft.AzureStackHCI.DeviceState", + "com.azure.resourcemanager.azurestackhci.models.DiagnosticLevel": "Microsoft.AzureStackHCI.DiagnosticLevel", + "com.azure.resourcemanager.azurestackhci.models.DnsServerConfig": "Microsoft.AzureStackHCI.DnsServerConfig", + "com.azure.resourcemanager.azurestackhci.models.DnsZones": "Microsoft.AzureStackHCI.DnsZones", + "com.azure.resourcemanager.azurestackhci.models.EceActionStatus": "Microsoft.AzureStackHCI.EceActionStatus", + "com.azure.resourcemanager.azurestackhci.models.EceDeploymentSecrets": "Microsoft.AzureStackHCI.EceDeploymentSecrets", + "com.azure.resourcemanager.azurestackhci.models.EceReportedProperties": "Microsoft.AzureStackHCI.EceReportedProperties", + "com.azure.resourcemanager.azurestackhci.models.EceSecrets": "Microsoft.AzureStackHCI.EceSecrets", + "com.azure.resourcemanager.azurestackhci.models.EdgeDeviceKind": "Microsoft.AzureStackHCI.EdgeDeviceKind", + "com.azure.resourcemanager.azurestackhci.models.EdgeDeviceProperties": "Microsoft.AzureStackHCI.EdgeDeviceProperties", + "com.azure.resourcemanager.azurestackhci.models.ExtensionAggregateState": "Microsoft.AzureStackHCI.ExtensionAggregateState", + "com.azure.resourcemanager.azurestackhci.models.ExtensionInstanceView": "Microsoft.AzureStackHCI.ExtensionInstanceView", + "com.azure.resourcemanager.azurestackhci.models.ExtensionInstanceViewStatus": "Microsoft.AzureStackHCI.ExtensionInstanceViewStatus", + "com.azure.resourcemanager.azurestackhci.models.ExtensionManagedBy": "Microsoft.AzureStackHCI.ExtensionManagedBy", + "com.azure.resourcemanager.azurestackhci.models.ExtensionPatch": "Microsoft.AzureStackHCI.ExtensionPatch", + "com.azure.resourcemanager.azurestackhci.models.ExtensionPatchParameters": "Microsoft.AzureStackHCI.ExtensionPatchParameters", + "com.azure.resourcemanager.azurestackhci.models.ExtensionProfile": "Microsoft.AzureStackHCI.ExtensionProfile", + "com.azure.resourcemanager.azurestackhci.models.ExtensionUpgradeParameters": "Microsoft.AzureStackHCI.ExtensionUpgradeParameters", + "com.azure.resourcemanager.azurestackhci.models.HardwareClass": "Microsoft.AzureStackHCI.HardwareClass", + "com.azure.resourcemanager.azurestackhci.models.HciCollectLogJobProperties": "Microsoft.AzureStackHCI.HciCollectLogJobProperties", + "com.azure.resourcemanager.azurestackhci.models.HciEdgeDevice": "Microsoft.AzureStackHCI.HciEdgeDevice", + "com.azure.resourcemanager.azurestackhci.models.HciEdgeDeviceAdapterPropertyOverrides": "Microsoft.AzureStackHCI.HciEdgeDeviceAdapterPropertyOverrides", + "com.azure.resourcemanager.azurestackhci.models.HciEdgeDeviceArcExtension": "Microsoft.AzureStackHCI.HciEdgeDeviceArcExtension", + "com.azure.resourcemanager.azurestackhci.models.HciEdgeDeviceHostNetwork": "Microsoft.AzureStackHCI.HciEdgeDeviceHostNetwork", + "com.azure.resourcemanager.azurestackhci.models.HciEdgeDeviceIntents": "Microsoft.AzureStackHCI.HciEdgeDeviceIntents", + "com.azure.resourcemanager.azurestackhci.models.HciEdgeDeviceJob": "Microsoft.AzureStackHCI.HciEdgeDeviceJob", + "com.azure.resourcemanager.azurestackhci.models.HciEdgeDeviceJobProperties": "Microsoft.AzureStackHCI.HciEdgeDeviceJobProperties", + "com.azure.resourcemanager.azurestackhci.models.HciEdgeDeviceJobType": "Microsoft.AzureStackHCI.HciEdgeDeviceJobType", + "com.azure.resourcemanager.azurestackhci.models.HciEdgeDeviceProperties": "Microsoft.AzureStackHCI.HciEdgeDeviceProperties", + "com.azure.resourcemanager.azurestackhci.models.HciEdgeDeviceStorageAdapterIpInfo": "Microsoft.AzureStackHCI.HciEdgeDeviceStorageAdapterIPInfo", + "com.azure.resourcemanager.azurestackhci.models.HciEdgeDeviceStorageNetworks": "Microsoft.AzureStackHCI.HciEdgeDeviceStorageNetworks", + "com.azure.resourcemanager.azurestackhci.models.HciEdgeDeviceVirtualSwitchConfigurationOverrides": "Microsoft.AzureStackHCI.HciEdgeDeviceVirtualSwitchConfigurationOverrides", + "com.azure.resourcemanager.azurestackhci.models.HciHardwareProfile": "Microsoft.AzureStackHCI.HciHardwareProfile", + "com.azure.resourcemanager.azurestackhci.models.HciNetworkProfile": "Microsoft.AzureStackHCI.HciNetworkProfile", + "com.azure.resourcemanager.azurestackhci.models.HciNicDetail": "Microsoft.AzureStackHCI.HciNicDetail", + "com.azure.resourcemanager.azurestackhci.models.HciOsProfile": "Microsoft.AzureStackHCI.HciOsProfile", + "com.azure.resourcemanager.azurestackhci.models.HciRemoteSupportJobProperties": "Microsoft.AzureStackHCI.HciRemoteSupportJobProperties", + "com.azure.resourcemanager.azurestackhci.models.HciReportedProperties": "Microsoft.AzureStackHCI.HciReportedProperties", + "com.azure.resourcemanager.azurestackhci.models.HciStorageProfile": "Microsoft.AzureStackHCI.HciStorageProfile", + "com.azure.resourcemanager.azurestackhci.models.HciValidationFailureDetail": "Microsoft.AzureStackHCI.HciValidationFailureDetail", + "com.azure.resourcemanager.azurestackhci.models.HealthState": "Microsoft.AzureStackHCI.HealthState", + "com.azure.resourcemanager.azurestackhci.models.IdentityProvider": "Microsoft.AzureStackHCI.IdentityProvider", + "com.azure.resourcemanager.azurestackhci.models.ImdsAttestation": "Microsoft.AzureStackHCI.ImdsAttestation", + "com.azure.resourcemanager.azurestackhci.models.InfrastructureNetwork": "Microsoft.AzureStackHCI.InfrastructureNetwork", + "com.azure.resourcemanager.azurestackhci.models.IpPools": "Microsoft.AzureStackHCI.IpPools", + "com.azure.resourcemanager.azurestackhci.models.IsolatedVmAttestationConfiguration": "Microsoft.AzureStackHCI.IsolatedVmAttestationConfiguration", + "com.azure.resourcemanager.azurestackhci.models.JobStatus": "Microsoft.AzureStackHCI.JobStatus", + "com.azure.resourcemanager.azurestackhci.models.LocalAvailabilityZones": "Microsoft.AzureStackHCI.LocalAvailabilityZones", + "com.azure.resourcemanager.azurestackhci.models.LogCollectionError": "Microsoft.AzureStackHCI.LogCollectionError", + "com.azure.resourcemanager.azurestackhci.models.LogCollectionJobSession": "Microsoft.AzureStackHCI.LogCollectionJobSession", + "com.azure.resourcemanager.azurestackhci.models.LogCollectionJobType": "Microsoft.AzureStackHCI.LogCollectionJobType", + "com.azure.resourcemanager.azurestackhci.models.LogCollectionProperties": "Microsoft.AzureStackHCI.LogCollectionProperties", + "com.azure.resourcemanager.azurestackhci.models.LogCollectionReportedProperties": "Microsoft.AzureStackHCI.LogCollectionReportedProperties", + "com.azure.resourcemanager.azurestackhci.models.LogCollectionRequest": "Microsoft.AzureStackHCI.LogCollectionRequest", + "com.azure.resourcemanager.azurestackhci.models.LogCollectionRequestProperties": "Microsoft.AzureStackHCI.LogCollectionRequestProperties", + "com.azure.resourcemanager.azurestackhci.models.LogCollectionSession": "Microsoft.AzureStackHCI.LogCollectionSession", + "com.azure.resourcemanager.azurestackhci.models.LogCollectionStatus": "Microsoft.AzureStackHCI.LogCollectionStatus", + "com.azure.resourcemanager.azurestackhci.models.ManagedServiceIdentityType": "Azure.ResourceManager.CommonTypes.ManagedServiceIdentityType", + "com.azure.resourcemanager.azurestackhci.models.NetworkController": "Microsoft.AzureStackHCI.NetworkController", + "com.azure.resourcemanager.azurestackhci.models.NicDetail": "Microsoft.AzureStackHCI.NicDetail", + "com.azure.resourcemanager.azurestackhci.models.NodeArcState": "Microsoft.AzureStackHCI.NodeArcState", + "com.azure.resourcemanager.azurestackhci.models.NodeExtensionState": "Microsoft.AzureStackHCI.NodeExtensionState", + "com.azure.resourcemanager.azurestackhci.models.Observability": "Microsoft.AzureStackHCI.Observability", + "com.azure.resourcemanager.azurestackhci.models.OemActivation": "Microsoft.AzureStackHCI.OemActivation", + "com.azure.resourcemanager.azurestackhci.models.OperationDisplay": "Azure.ResourceManager.CommonTypes.OperationDisplay", + "com.azure.resourcemanager.azurestackhci.models.OperationType": "Microsoft.AzureStackHCI.OperationType", + "com.azure.resourcemanager.azurestackhci.models.OptionalServices": "Microsoft.AzureStackHCI.OptionalServices", + "com.azure.resourcemanager.azurestackhci.models.Origin": "Azure.ResourceManager.CommonTypes.Origin", + "com.azure.resourcemanager.azurestackhci.models.PackageVersionInfo": "Microsoft.AzureStackHCI.PackageVersionInfo", + "com.azure.resourcemanager.azurestackhci.models.PerNodeExtensionState": "Microsoft.AzureStackHCI.PerNodeExtensionState", + "com.azure.resourcemanager.azurestackhci.models.PerNodeRemoteSupportSession": "Microsoft.AzureStackHCI.PerNodeRemoteSupportSession", + "com.azure.resourcemanager.azurestackhci.models.PerNodeState": "Microsoft.AzureStackHCI.PerNodeState", + "com.azure.resourcemanager.azurestackhci.models.PhysicalNodes": "Microsoft.AzureStackHCI.PhysicalNodes", + "com.azure.resourcemanager.azurestackhci.models.PrecheckResult": "Microsoft.AzureStackHCI.PrecheckResult", + "com.azure.resourcemanager.azurestackhci.models.PrecheckResultTags": "Microsoft.AzureStackHCI.PrecheckResultTags", + "com.azure.resourcemanager.azurestackhci.models.ProvisioningState": "Microsoft.AzureStackHCI.ProvisioningState", + "com.azure.resourcemanager.azurestackhci.models.QosPolicyOverrides": "Microsoft.AzureStackHCI.QosPolicyOverrides", + "com.azure.resourcemanager.azurestackhci.models.RawCertificateData": "Microsoft.AzureStackHCI.RawCertificateData", + "com.azure.resourcemanager.azurestackhci.models.RdmaCapability": "Microsoft.AzureStackHCI.RdmaCapability", + "com.azure.resourcemanager.azurestackhci.models.RebootRequirement": "Microsoft.AzureStackHCI.RebootRequirement", + "com.azure.resourcemanager.azurestackhci.models.ReconcileArcSettingsRequest": "Microsoft.AzureStackHCI.ReconcileArcSettingsRequest", + "com.azure.resourcemanager.azurestackhci.models.ReconcileArcSettingsRequestProperties": "Microsoft.AzureStackHCI.ReconcileArcSettingsRequestProperties", + "com.azure.resourcemanager.azurestackhci.models.RemoteSupportAccessLevel": "Microsoft.AzureStackHCI.RemoteSupportAccessLevel", + "com.azure.resourcemanager.azurestackhci.models.RemoteSupportJobNodeSettings": "Microsoft.AzureStackHCI.RemoteSupportJobNodeSettings", + "com.azure.resourcemanager.azurestackhci.models.RemoteSupportJobReportedProperties": "Microsoft.AzureStackHCI.RemoteSupportJobReportedProperties", + "com.azure.resourcemanager.azurestackhci.models.RemoteSupportNodeSettings": "Microsoft.AzureStackHCI.RemoteSupportNodeSettings", + "com.azure.resourcemanager.azurestackhci.models.RemoteSupportProperties": "Microsoft.AzureStackHCI.RemoteSupportProperties", + "com.azure.resourcemanager.azurestackhci.models.RemoteSupportRequest": "Microsoft.AzureStackHCI.RemoteSupportRequest", + "com.azure.resourcemanager.azurestackhci.models.RemoteSupportRequestProperties": "Microsoft.AzureStackHCI.RemoteSupportRequestProperties", + "com.azure.resourcemanager.azurestackhci.models.RemoteSupportSession": "Microsoft.AzureStackHCI.RemoteSupportSession", + "com.azure.resourcemanager.azurestackhci.models.RemoteSupportType": "Microsoft.AzureStackHCI.RemoteSupportType", + "com.azure.resourcemanager.azurestackhci.models.ReportedProperties": "Microsoft.AzureStackHCI.ReportedProperties", + "com.azure.resourcemanager.azurestackhci.models.SbeCredentials": "Microsoft.AzureStackHCI.SbeCredentials", + "com.azure.resourcemanager.azurestackhci.models.SbeDeploymentInfo": "Microsoft.AzureStackHCI.SbeDeploymentInfo", + "com.azure.resourcemanager.azurestackhci.models.SbeDeploymentPackageInfo": "Microsoft.AzureStackHCI.SbeDeploymentPackageInfo", + "com.azure.resourcemanager.azurestackhci.models.SbePartnerInfo": "Microsoft.AzureStackHCI.SbePartnerInfo", + "com.azure.resourcemanager.azurestackhci.models.SbePartnerProperties": "Microsoft.AzureStackHCI.SbePartnerProperties", + "com.azure.resourcemanager.azurestackhci.models.ScaleUnits": "Microsoft.AzureStackHCI.ScaleUnits", + "com.azure.resourcemanager.azurestackhci.models.SdnIntegration": "Microsoft.AzureStackHCI.SdnIntegration", + "com.azure.resourcemanager.azurestackhci.models.SecretsLocationDetails": "Microsoft.AzureStackHCI.SecretsLocationDetails", + "com.azure.resourcemanager.azurestackhci.models.SecretsLocationsChangeRequest": "Microsoft.AzureStackHCI.SecretsLocationsChangeRequest", + "com.azure.resourcemanager.azurestackhci.models.SecretsType": "Microsoft.AzureStackHCI.SecretsType", + "com.azure.resourcemanager.azurestackhci.models.SecurityComplianceStatus": "Microsoft.AzureStackHCI.SecurityComplianceStatus", + "com.azure.resourcemanager.azurestackhci.models.ServiceConfiguration": "Microsoft.AzureStackHCI.ServiceConfiguration", + "com.azure.resourcemanager.azurestackhci.models.ServiceName": "Microsoft.AzureStackHCI.ServiceName", + "com.azure.resourcemanager.azurestackhci.models.Severity": "Microsoft.AzureStackHCI.Severity", + "com.azure.resourcemanager.azurestackhci.models.SkuMappings": "Microsoft.AzureStackHCI.SkuMappings", + "com.azure.resourcemanager.azurestackhci.models.SoftwareAssuranceChangeRequest": "Microsoft.AzureStackHCI.SoftwareAssuranceChangeRequest", + "com.azure.resourcemanager.azurestackhci.models.SoftwareAssuranceChangeRequestProperties": "Microsoft.AzureStackHCI.SoftwareAssuranceChangeRequestProperties", + "com.azure.resourcemanager.azurestackhci.models.SoftwareAssuranceIntent": "Microsoft.AzureStackHCI.SoftwareAssuranceIntent", + "com.azure.resourcemanager.azurestackhci.models.SoftwareAssuranceProperties": "Microsoft.AzureStackHCI.SoftwareAssuranceProperties", + "com.azure.resourcemanager.azurestackhci.models.SoftwareAssuranceStatus": "Microsoft.AzureStackHCI.SoftwareAssuranceStatus", + "com.azure.resourcemanager.azurestackhci.models.State": "Microsoft.AzureStackHCI.State", + "com.azure.resourcemanager.azurestackhci.models.Status": "Microsoft.AzureStackHCI.Status", + "com.azure.resourcemanager.azurestackhci.models.StatusLevelTypes": "Microsoft.AzureStackHCI.StatusLevelTypes", + "com.azure.resourcemanager.azurestackhci.models.Storage": "Microsoft.AzureStackHCI.Storage", + "com.azure.resourcemanager.azurestackhci.models.SwitchDetail": "Microsoft.AzureStackHCI.SwitchDetail", + "com.azure.resourcemanager.azurestackhci.models.SwitchExtension": "Microsoft.AzureStackHCI.SwitchExtension", + "com.azure.resourcemanager.azurestackhci.models.UpdatePrerequisite": "Microsoft.AzureStackHCI.UpdatePrerequisite", + "com.azure.resourcemanager.azurestackhci.models.UpdateRunPropertiesState": "Microsoft.AzureStackHCI.UpdateRunPropertiesState", + "com.azure.resourcemanager.azurestackhci.models.UpdateSummariesPropertiesState": "Microsoft.AzureStackHCI.UpdateSummariesPropertiesState", + "com.azure.resourcemanager.azurestackhci.models.UploadCertificateRequest": "Microsoft.AzureStackHCI.UploadCertificateRequest", + "com.azure.resourcemanager.azurestackhci.models.UserAssignedIdentity": "Azure.ResourceManager.CommonTypes.UserAssignedIdentity", + "com.azure.resourcemanager.azurestackhci.models.ValidateRequest": "Microsoft.AzureStackHCI.ValidateRequest", + "com.azure.resourcemanager.azurestackhci.models.ValidatedSolutionRecipeCapabilities": "Microsoft.AzureStackHCI.ValidatedSolutionRecipeCapabilities", + "com.azure.resourcemanager.azurestackhci.models.ValidatedSolutionRecipeCapability": "Microsoft.AzureStackHCI.ValidatedSolutionRecipeCapability", + "com.azure.resourcemanager.azurestackhci.models.ValidatedSolutionRecipeComponent": "Microsoft.AzureStackHCI.ValidatedSolutionRecipeComponent", + "com.azure.resourcemanager.azurestackhci.models.ValidatedSolutionRecipeComponentMetadata": "Microsoft.AzureStackHCI.ValidatedSolutionRecipeComponentMetadata", + "com.azure.resourcemanager.azurestackhci.models.ValidatedSolutionRecipeComponentPayload": "Microsoft.AzureStackHCI.ValidatedSolutionRecipeComponentPayload", + "com.azure.resourcemanager.azurestackhci.models.ValidatedSolutionRecipeContent": "Microsoft.AzureStackHCI.ValidatedSolutionRecipeContent", + "com.azure.resourcemanager.azurestackhci.models.ValidatedSolutionRecipeInfo": "Microsoft.AzureStackHCI.ValidatedSolutionRecipeInfo", + "com.azure.resourcemanager.azurestackhci.models.ValidatedSolutionRecipeProperties": "Microsoft.AzureStackHCI.ValidatedSolutionRecipeProperties", + "com.azure.resourcemanager.azurestackhci.models.WindowsServerSubscription": "Microsoft.AzureStackHCI.WindowsServerSubscription" + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/resources/META-INF/azure-resourcemanager-azurestackhci_metadata.json b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/resources/META-INF/azure-resourcemanager-azurestackhci_metadata.json new file mode 100644 index 000000000000..3dec31ee0f30 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/resources/META-INF/azure-resourcemanager-azurestackhci_metadata.json @@ -0,0 +1 @@ +{"flavor":"azure","apiVersion":"2026-02-01","crossLanguageDefinitions":{"com.azure.resourcemanager.azurestackhci.fluent.ArcSettingsClient":"Microsoft.AzureStackHCI.ArcSettings","com.azure.resourcemanager.azurestackhci.fluent.ArcSettingsClient.beginCreateIdentity":"Microsoft.AzureStackHCI.ArcSettings.createIdentity","com.azure.resourcemanager.azurestackhci.fluent.ArcSettingsClient.beginDelete":"Microsoft.AzureStackHCI.ArcSettings.delete","com.azure.resourcemanager.azurestackhci.fluent.ArcSettingsClient.beginInitializeDisableProcess":"Microsoft.AzureStackHCI.ArcSettings.initializeDisableProcess","com.azure.resourcemanager.azurestackhci.fluent.ArcSettingsClient.beginReconcile":"Microsoft.AzureStackHCI.ArcSettings.reconcile","com.azure.resourcemanager.azurestackhci.fluent.ArcSettingsClient.consentAndInstallDefaultExtensions":"Microsoft.AzureStackHCI.ArcSettings.consentAndInstallDefaultExtensions","com.azure.resourcemanager.azurestackhci.fluent.ArcSettingsClient.consentAndInstallDefaultExtensionsWithResponse":"Microsoft.AzureStackHCI.ArcSettings.consentAndInstallDefaultExtensions","com.azure.resourcemanager.azurestackhci.fluent.ArcSettingsClient.create":"Microsoft.AzureStackHCI.ArcSettings.create","com.azure.resourcemanager.azurestackhci.fluent.ArcSettingsClient.createIdentity":"Microsoft.AzureStackHCI.ArcSettings.createIdentity","com.azure.resourcemanager.azurestackhci.fluent.ArcSettingsClient.createWithResponse":"Microsoft.AzureStackHCI.ArcSettings.create","com.azure.resourcemanager.azurestackhci.fluent.ArcSettingsClient.delete":"Microsoft.AzureStackHCI.ArcSettings.delete","com.azure.resourcemanager.azurestackhci.fluent.ArcSettingsClient.generatePassword":"Microsoft.AzureStackHCI.ArcSettings.generatePassword","com.azure.resourcemanager.azurestackhci.fluent.ArcSettingsClient.generatePasswordWithResponse":"Microsoft.AzureStackHCI.ArcSettings.generatePassword","com.azure.resourcemanager.azurestackhci.fluent.ArcSettingsClient.get":"Microsoft.AzureStackHCI.ArcSettings.get","com.azure.resourcemanager.azurestackhci.fluent.ArcSettingsClient.getWithResponse":"Microsoft.AzureStackHCI.ArcSettings.get","com.azure.resourcemanager.azurestackhci.fluent.ArcSettingsClient.initializeDisableProcess":"Microsoft.AzureStackHCI.ArcSettings.initializeDisableProcess","com.azure.resourcemanager.azurestackhci.fluent.ArcSettingsClient.listByCluster":"Microsoft.AzureStackHCI.ArcSettings.listByCluster","com.azure.resourcemanager.azurestackhci.fluent.ArcSettingsClient.reconcile":"Microsoft.AzureStackHCI.ArcSettings.reconcile","com.azure.resourcemanager.azurestackhci.fluent.ArcSettingsClient.update":"Microsoft.AzureStackHCI.ArcSettings.update","com.azure.resourcemanager.azurestackhci.fluent.ArcSettingsClient.updateWithResponse":"Microsoft.AzureStackHCI.ArcSettings.update","com.azure.resourcemanager.azurestackhci.fluent.AzureStackHciManagementClient":"Microsoft.AzureStackHCI","com.azure.resourcemanager.azurestackhci.fluent.ClustersClient":"Microsoft.AzureStackHCI.Clusters","com.azure.resourcemanager.azurestackhci.fluent.ClustersClient.beginConfigureRemoteSupport":"Microsoft.AzureStackHCI.Clusters.configureRemoteSupport","com.azure.resourcemanager.azurestackhci.fluent.ClustersClient.beginCreateIdentity":"Microsoft.AzureStackHCI.Clusters.createIdentity","com.azure.resourcemanager.azurestackhci.fluent.ClustersClient.beginDelete":"Microsoft.AzureStackHCI.Clusters.delete","com.azure.resourcemanager.azurestackhci.fluent.ClustersClient.beginExtendSoftwareAssuranceBenefit":"Microsoft.AzureStackHCI.Clusters.extendSoftwareAssuranceBenefit","com.azure.resourcemanager.azurestackhci.fluent.ClustersClient.beginTriggerLogCollection":"Microsoft.AzureStackHCI.Clusters.triggerLogCollection","com.azure.resourcemanager.azurestackhci.fluent.ClustersClient.beginUpdateSecretsLocations":"Microsoft.AzureStackHCI.Clusters.updateSecretsLocations","com.azure.resourcemanager.azurestackhci.fluent.ClustersClient.beginUploadCertificate":"Microsoft.AzureStackHCI.Clusters.uploadCertificate","com.azure.resourcemanager.azurestackhci.fluent.ClustersClient.configureRemoteSupport":"Microsoft.AzureStackHCI.Clusters.configureRemoteSupport","com.azure.resourcemanager.azurestackhci.fluent.ClustersClient.create":"Microsoft.AzureStackHCI.Clusters.create","com.azure.resourcemanager.azurestackhci.fluent.ClustersClient.createIdentity":"Microsoft.AzureStackHCI.Clusters.createIdentity","com.azure.resourcemanager.azurestackhci.fluent.ClustersClient.createWithResponse":"Microsoft.AzureStackHCI.Clusters.create","com.azure.resourcemanager.azurestackhci.fluent.ClustersClient.delete":"Microsoft.AzureStackHCI.Clusters.delete","com.azure.resourcemanager.azurestackhci.fluent.ClustersClient.extendSoftwareAssuranceBenefit":"Microsoft.AzureStackHCI.Clusters.extendSoftwareAssuranceBenefit","com.azure.resourcemanager.azurestackhci.fluent.ClustersClient.getByResourceGroup":"Microsoft.AzureStackHCI.Clusters.get","com.azure.resourcemanager.azurestackhci.fluent.ClustersClient.getByResourceGroupWithResponse":"Microsoft.AzureStackHCI.Clusters.get","com.azure.resourcemanager.azurestackhci.fluent.ClustersClient.list":"Microsoft.AzureStackHCI.Clusters.listBySubscription","com.azure.resourcemanager.azurestackhci.fluent.ClustersClient.listByResourceGroup":"Microsoft.AzureStackHCI.Clusters.listByResourceGroup","com.azure.resourcemanager.azurestackhci.fluent.ClustersClient.triggerLogCollection":"Microsoft.AzureStackHCI.Clusters.triggerLogCollection","com.azure.resourcemanager.azurestackhci.fluent.ClustersClient.update":"Microsoft.AzureStackHCI.Clusters.update","com.azure.resourcemanager.azurestackhci.fluent.ClustersClient.updateSecretsLocations":"Microsoft.AzureStackHCI.Clusters.updateSecretsLocations","com.azure.resourcemanager.azurestackhci.fluent.ClustersClient.updateWithResponse":"Microsoft.AzureStackHCI.Clusters.update","com.azure.resourcemanager.azurestackhci.fluent.ClustersClient.uploadCertificate":"Microsoft.AzureStackHCI.Clusters.uploadCertificate","com.azure.resourcemanager.azurestackhci.fluent.DeploymentSettingsClient":"Microsoft.AzureStackHCI.DeploymentSettings","com.azure.resourcemanager.azurestackhci.fluent.DeploymentSettingsClient.beginCreateOrUpdate":"Microsoft.AzureStackHCI.DeploymentSettings.createOrUpdate","com.azure.resourcemanager.azurestackhci.fluent.DeploymentSettingsClient.beginDelete":"Microsoft.AzureStackHCI.DeploymentSettings.delete","com.azure.resourcemanager.azurestackhci.fluent.DeploymentSettingsClient.createOrUpdate":"Microsoft.AzureStackHCI.DeploymentSettings.createOrUpdate","com.azure.resourcemanager.azurestackhci.fluent.DeploymentSettingsClient.delete":"Microsoft.AzureStackHCI.DeploymentSettings.delete","com.azure.resourcemanager.azurestackhci.fluent.DeploymentSettingsClient.get":"Microsoft.AzureStackHCI.DeploymentSettings.get","com.azure.resourcemanager.azurestackhci.fluent.DeploymentSettingsClient.getWithResponse":"Microsoft.AzureStackHCI.DeploymentSettings.get","com.azure.resourcemanager.azurestackhci.fluent.DeploymentSettingsClient.listByClusters":"Microsoft.AzureStackHCI.DeploymentSettings.listByClusters","com.azure.resourcemanager.azurestackhci.fluent.EdgeDeviceJobsClient":"Microsoft.AzureStackHCI.EdgeDeviceJobs","com.azure.resourcemanager.azurestackhci.fluent.EdgeDeviceJobsClient.beginCreateOrUpdate":"Microsoft.AzureStackHCI.EdgeDeviceJobs.createOrUpdate","com.azure.resourcemanager.azurestackhci.fluent.EdgeDeviceJobsClient.beginDelete":"Microsoft.AzureStackHCI.EdgeDeviceJobs.delete","com.azure.resourcemanager.azurestackhci.fluent.EdgeDeviceJobsClient.createOrUpdate":"Microsoft.AzureStackHCI.EdgeDeviceJobs.createOrUpdate","com.azure.resourcemanager.azurestackhci.fluent.EdgeDeviceJobsClient.delete":"Microsoft.AzureStackHCI.EdgeDeviceJobs.delete","com.azure.resourcemanager.azurestackhci.fluent.EdgeDeviceJobsClient.get":"Microsoft.AzureStackHCI.EdgeDeviceJobs.get","com.azure.resourcemanager.azurestackhci.fluent.EdgeDeviceJobsClient.getWithResponse":"Microsoft.AzureStackHCI.EdgeDeviceJobs.get","com.azure.resourcemanager.azurestackhci.fluent.EdgeDeviceJobsClient.listByEdgeDevice":"Microsoft.AzureStackHCI.EdgeDeviceJobs.listByEdgeDevice","com.azure.resourcemanager.azurestackhci.fluent.EdgeDevicesClient":"Microsoft.AzureStackHCI.EdgeDevices","com.azure.resourcemanager.azurestackhci.fluent.EdgeDevicesClient.beginCreateOrUpdate":"Microsoft.AzureStackHCI.EdgeDevices.createOrUpdate","com.azure.resourcemanager.azurestackhci.fluent.EdgeDevicesClient.beginDelete":"Microsoft.AzureStackHCI.EdgeDevices.delete","com.azure.resourcemanager.azurestackhci.fluent.EdgeDevicesClient.beginValidate":"Microsoft.AzureStackHCI.EdgeDevices.validate","com.azure.resourcemanager.azurestackhci.fluent.EdgeDevicesClient.createOrUpdate":"Microsoft.AzureStackHCI.EdgeDevices.createOrUpdate","com.azure.resourcemanager.azurestackhci.fluent.EdgeDevicesClient.delete":"Microsoft.AzureStackHCI.EdgeDevices.delete","com.azure.resourcemanager.azurestackhci.fluent.EdgeDevicesClient.get":"Microsoft.AzureStackHCI.EdgeDevices.get","com.azure.resourcemanager.azurestackhci.fluent.EdgeDevicesClient.getWithResponse":"Microsoft.AzureStackHCI.EdgeDevices.get","com.azure.resourcemanager.azurestackhci.fluent.EdgeDevicesClient.list":"Microsoft.AzureStackHCI.EdgeDevices.list","com.azure.resourcemanager.azurestackhci.fluent.EdgeDevicesClient.validate":"Microsoft.AzureStackHCI.EdgeDevices.validate","com.azure.resourcemanager.azurestackhci.fluent.ExtensionsClient":"Microsoft.AzureStackHCI.Extensions","com.azure.resourcemanager.azurestackhci.fluent.ExtensionsClient.beginCreate":"Microsoft.AzureStackHCI.Extensions.create","com.azure.resourcemanager.azurestackhci.fluent.ExtensionsClient.beginDelete":"Microsoft.AzureStackHCI.Extensions.delete","com.azure.resourcemanager.azurestackhci.fluent.ExtensionsClient.beginUpdate":"Microsoft.AzureStackHCI.Extensions.update","com.azure.resourcemanager.azurestackhci.fluent.ExtensionsClient.beginUpgrade":"Microsoft.AzureStackHCI.Extensions.upgrade","com.azure.resourcemanager.azurestackhci.fluent.ExtensionsClient.create":"Microsoft.AzureStackHCI.Extensions.create","com.azure.resourcemanager.azurestackhci.fluent.ExtensionsClient.delete":"Microsoft.AzureStackHCI.Extensions.delete","com.azure.resourcemanager.azurestackhci.fluent.ExtensionsClient.get":"Microsoft.AzureStackHCI.Extensions.get","com.azure.resourcemanager.azurestackhci.fluent.ExtensionsClient.getWithResponse":"Microsoft.AzureStackHCI.Extensions.get","com.azure.resourcemanager.azurestackhci.fluent.ExtensionsClient.listByArcSetting":"Microsoft.AzureStackHCI.Extensions.listByArcSetting","com.azure.resourcemanager.azurestackhci.fluent.ExtensionsClient.update":"Microsoft.AzureStackHCI.Extensions.update","com.azure.resourcemanager.azurestackhci.fluent.ExtensionsClient.upgrade":"Microsoft.AzureStackHCI.Extensions.upgrade","com.azure.resourcemanager.azurestackhci.fluent.OffersClient":"Microsoft.AzureStackHCI.Offers","com.azure.resourcemanager.azurestackhci.fluent.OffersClient.get":"Microsoft.AzureStackHCI.Offers.get","com.azure.resourcemanager.azurestackhci.fluent.OffersClient.getWithResponse":"Microsoft.AzureStackHCI.Offers.get","com.azure.resourcemanager.azurestackhci.fluent.OffersClient.listByCluster":"Microsoft.AzureStackHCI.Clusters.listByCluster","com.azure.resourcemanager.azurestackhci.fluent.OffersClient.listByPublisher":"Microsoft.AzureStackHCI.Offers.listByPublisher","com.azure.resourcemanager.azurestackhci.fluent.OperationsClient":"Microsoft.AzureStackHCI.Operations","com.azure.resourcemanager.azurestackhci.fluent.OperationsClient.list":"Azure.ResourceManager.Operations.list","com.azure.resourcemanager.azurestackhci.fluent.SecuritySettingsClient":"Microsoft.AzureStackHCI.SecuritySettings","com.azure.resourcemanager.azurestackhci.fluent.SecuritySettingsClient.beginCreateOrUpdate":"Microsoft.AzureStackHCI.SecuritySettings.createOrUpdate","com.azure.resourcemanager.azurestackhci.fluent.SecuritySettingsClient.beginDelete":"Microsoft.AzureStackHCI.SecuritySettings.delete","com.azure.resourcemanager.azurestackhci.fluent.SecuritySettingsClient.createOrUpdate":"Microsoft.AzureStackHCI.SecuritySettings.createOrUpdate","com.azure.resourcemanager.azurestackhci.fluent.SecuritySettingsClient.delete":"Microsoft.AzureStackHCI.SecuritySettings.delete","com.azure.resourcemanager.azurestackhci.fluent.SecuritySettingsClient.get":"Microsoft.AzureStackHCI.SecuritySettings.get","com.azure.resourcemanager.azurestackhci.fluent.SecuritySettingsClient.getWithResponse":"Microsoft.AzureStackHCI.SecuritySettings.get","com.azure.resourcemanager.azurestackhci.fluent.SecuritySettingsClient.listByClusters":"Microsoft.AzureStackHCI.SecuritySettings.listByClusters","com.azure.resourcemanager.azurestackhci.fluent.SkusClient":"Microsoft.AzureStackHCI.Skus","com.azure.resourcemanager.azurestackhci.fluent.SkusClient.get":"Microsoft.AzureStackHCI.Skus.get","com.azure.resourcemanager.azurestackhci.fluent.SkusClient.getWithResponse":"Microsoft.AzureStackHCI.Skus.get","com.azure.resourcemanager.azurestackhci.fluent.SkusClient.listByOffer":"Microsoft.AzureStackHCI.Skus.listByOffer","com.azure.resourcemanager.azurestackhci.fluent.UpdateRunsClient":"Microsoft.AzureStackHCI.UpdateRuns","com.azure.resourcemanager.azurestackhci.fluent.UpdateRunsClient.beginDelete":"Microsoft.AzureStackHCI.UpdateRuns.delete","com.azure.resourcemanager.azurestackhci.fluent.UpdateRunsClient.delete":"Microsoft.AzureStackHCI.UpdateRuns.delete","com.azure.resourcemanager.azurestackhci.fluent.UpdateRunsClient.get":"Microsoft.AzureStackHCI.UpdateRuns.get","com.azure.resourcemanager.azurestackhci.fluent.UpdateRunsClient.getWithResponse":"Microsoft.AzureStackHCI.UpdateRuns.get","com.azure.resourcemanager.azurestackhci.fluent.UpdateRunsClient.list":"Microsoft.AzureStackHCI.UpdateRuns.list","com.azure.resourcemanager.azurestackhci.fluent.UpdateRunsClient.put":"Microsoft.AzureStackHCI.UpdateRuns.put","com.azure.resourcemanager.azurestackhci.fluent.UpdateRunsClient.putWithResponse":"Microsoft.AzureStackHCI.UpdateRuns.put","com.azure.resourcemanager.azurestackhci.fluent.UpdateSummariesOperationsClient":"Microsoft.AzureStackHCI","com.azure.resourcemanager.azurestackhci.fluent.UpdateSummariesOperationsClient.beginDelete":"Microsoft.AzureStackHCI.UpdateSummariesOperationGroup.delete","com.azure.resourcemanager.azurestackhci.fluent.UpdateSummariesOperationsClient.delete":"Microsoft.AzureStackHCI.UpdateSummariesOperationGroup.delete","com.azure.resourcemanager.azurestackhci.fluent.UpdateSummariesOperationsClient.get":"Microsoft.AzureStackHCI.UpdateSummariesOperationGroup.get","com.azure.resourcemanager.azurestackhci.fluent.UpdateSummariesOperationsClient.getWithResponse":"Microsoft.AzureStackHCI.UpdateSummariesOperationGroup.get","com.azure.resourcemanager.azurestackhci.fluent.UpdateSummariesOperationsClient.list":"Microsoft.AzureStackHCI.UpdateSummariesOperationGroup.list","com.azure.resourcemanager.azurestackhci.fluent.UpdateSummariesOperationsClient.put":"Microsoft.AzureStackHCI.UpdateSummariesOperationGroup.put","com.azure.resourcemanager.azurestackhci.fluent.UpdateSummariesOperationsClient.putWithResponse":"Microsoft.AzureStackHCI.UpdateSummariesOperationGroup.put","com.azure.resourcemanager.azurestackhci.fluent.UpdatesClient":"Microsoft.AzureStackHCI.Updates","com.azure.resourcemanager.azurestackhci.fluent.UpdatesClient.beginDelete":"Microsoft.AzureStackHCI.Updates.delete","com.azure.resourcemanager.azurestackhci.fluent.UpdatesClient.beginPost":"Microsoft.AzureStackHCI.Updates.post","com.azure.resourcemanager.azurestackhci.fluent.UpdatesClient.delete":"Microsoft.AzureStackHCI.Updates.delete","com.azure.resourcemanager.azurestackhci.fluent.UpdatesClient.get":"Microsoft.AzureStackHCI.Updates.get","com.azure.resourcemanager.azurestackhci.fluent.UpdatesClient.getWithResponse":"Microsoft.AzureStackHCI.Updates.get","com.azure.resourcemanager.azurestackhci.fluent.UpdatesClient.list":"Microsoft.AzureStackHCI.Updates.list","com.azure.resourcemanager.azurestackhci.fluent.UpdatesClient.post":"Microsoft.AzureStackHCI.Updates.post","com.azure.resourcemanager.azurestackhci.fluent.UpdatesClient.put":"Microsoft.AzureStackHCI.Updates.put","com.azure.resourcemanager.azurestackhci.fluent.UpdatesClient.putWithResponse":"Microsoft.AzureStackHCI.Updates.put","com.azure.resourcemanager.azurestackhci.fluent.ValidatedSolutionRecipesClient":"Microsoft.AzureStackHCI.ValidatedSolutionRecipes","com.azure.resourcemanager.azurestackhci.fluent.ValidatedSolutionRecipesClient.get":"Microsoft.AzureStackHCI.ValidatedSolutionRecipes.get","com.azure.resourcemanager.azurestackhci.fluent.ValidatedSolutionRecipesClient.getWithResponse":"Microsoft.AzureStackHCI.ValidatedSolutionRecipes.get","com.azure.resourcemanager.azurestackhci.fluent.ValidatedSolutionRecipesClient.listBySubscriptionLocationResource":"Microsoft.AzureStackHCI.ValidatedSolutionRecipes.listBySubscriptionLocationResource","com.azure.resourcemanager.azurestackhci.fluent.models.ArcIdentityResponseInner":"Microsoft.AzureStackHCI.ArcIdentityResponse","com.azure.resourcemanager.azurestackhci.fluent.models.ArcIdentityResponseProperties":"Microsoft.AzureStackHCI.ArcIdentityResponseProperties","com.azure.resourcemanager.azurestackhci.fluent.models.ArcSettingInner":"Microsoft.AzureStackHCI.ArcSetting","com.azure.resourcemanager.azurestackhci.fluent.models.ArcSettingProperties":"Microsoft.AzureStackHCI.ArcSettingProperties","com.azure.resourcemanager.azurestackhci.fluent.models.ArcSettingsPatchProperties":"Microsoft.AzureStackHCI.ArcSettingsPatchProperties","com.azure.resourcemanager.azurestackhci.fluent.models.ClusterIdentityResponseInner":"Microsoft.AzureStackHCI.ClusterIdentityResponse","com.azure.resourcemanager.azurestackhci.fluent.models.ClusterIdentityResponseProperties":"Microsoft.AzureStackHCI.ClusterIdentityResponseProperties","com.azure.resourcemanager.azurestackhci.fluent.models.ClusterInner":"Microsoft.AzureStackHCI.Cluster","com.azure.resourcemanager.azurestackhci.fluent.models.ClusterPatchProperties":"Microsoft.AzureStackHCI.ClusterPatchProperties","com.azure.resourcemanager.azurestackhci.fluent.models.ClusterProperties":"Microsoft.AzureStackHCI.ClusterProperties","com.azure.resourcemanager.azurestackhci.fluent.models.DeploymentSettingInner":"Microsoft.AzureStackHCI.DeploymentSetting","com.azure.resourcemanager.azurestackhci.fluent.models.DeploymentSettingsProperties":"Microsoft.AzureStackHCI.DeploymentSettingsProperties","com.azure.resourcemanager.azurestackhci.fluent.models.EdgeDeviceInner":"Microsoft.AzureStackHCI.EdgeDevice","com.azure.resourcemanager.azurestackhci.fluent.models.EdgeDeviceJobInner":"Microsoft.AzureStackHCI.EdgeDeviceJob","com.azure.resourcemanager.azurestackhci.fluent.models.ExtensionInner":"Microsoft.AzureStackHCI.Extension","com.azure.resourcemanager.azurestackhci.fluent.models.ExtensionParameters":"Microsoft.AzureStackHCI.ExtensionParameters","com.azure.resourcemanager.azurestackhci.fluent.models.ExtensionPatchProperties":"Microsoft.AzureStackHCI.ExtensionPatchProperties","com.azure.resourcemanager.azurestackhci.fluent.models.ExtensionProperties":"Microsoft.AzureStackHCI.ExtensionProperties","com.azure.resourcemanager.azurestackhci.fluent.models.HciUpdateInner":"Microsoft.AzureStackHCI.Update","com.azure.resourcemanager.azurestackhci.fluent.models.ManagedServiceIdentity":"Azure.ResourceManager.CommonTypes.ManagedServiceIdentity","com.azure.resourcemanager.azurestackhci.fluent.models.OfferInner":"Microsoft.AzureStackHCI.Offer","com.azure.resourcemanager.azurestackhci.fluent.models.OfferProperties":"Microsoft.AzureStackHCI.OfferProperties","com.azure.resourcemanager.azurestackhci.fluent.models.OperationInner":"Azure.ResourceManager.CommonTypes.Operation","com.azure.resourcemanager.azurestackhci.fluent.models.PasswordCredentialInner":"Microsoft.AzureStackHCI.PasswordCredential","com.azure.resourcemanager.azurestackhci.fluent.models.SecurityProperties":"Microsoft.AzureStackHCI.SecurityProperties","com.azure.resourcemanager.azurestackhci.fluent.models.SecuritySettingInner":"Microsoft.AzureStackHCI.SecuritySetting","com.azure.resourcemanager.azurestackhci.fluent.models.SkuInner":"Microsoft.AzureStackHCI.Sku","com.azure.resourcemanager.azurestackhci.fluent.models.SkuProperties":"Microsoft.AzureStackHCI.SkuProperties","com.azure.resourcemanager.azurestackhci.fluent.models.Step":"Microsoft.AzureStackHCI.Step","com.azure.resourcemanager.azurestackhci.fluent.models.UpdateProperties":"Microsoft.AzureStackHCI.UpdateProperties","com.azure.resourcemanager.azurestackhci.fluent.models.UpdateRunInner":"Microsoft.AzureStackHCI.UpdateRun","com.azure.resourcemanager.azurestackhci.fluent.models.UpdateRunProperties":"Microsoft.AzureStackHCI.UpdateRunProperties","com.azure.resourcemanager.azurestackhci.fluent.models.UpdateStateProperties":"Microsoft.AzureStackHCI.UpdateStateProperties","com.azure.resourcemanager.azurestackhci.fluent.models.UpdateSummariesInner":"Microsoft.AzureStackHCI.UpdateSummaries","com.azure.resourcemanager.azurestackhci.fluent.models.UpdateSummariesProperties":"Microsoft.AzureStackHCI.UpdateSummariesProperties","com.azure.resourcemanager.azurestackhci.fluent.models.ValidateResponseInner":"Microsoft.AzureStackHCI.ValidateResponse","com.azure.resourcemanager.azurestackhci.fluent.models.ValidatedSolutionRecipeInner":"Microsoft.AzureStackHCI.ValidatedSolutionRecipe","com.azure.resourcemanager.azurestackhci.implementation.AzureStackHciManagementClientBuilder":"Microsoft.AzureStackHCI","com.azure.resourcemanager.azurestackhci.implementation.models.ArcSettingList":"Microsoft.AzureStackHCI.ArcSettingList","com.azure.resourcemanager.azurestackhci.implementation.models.ClusterList":"Microsoft.AzureStackHCI.ClusterList","com.azure.resourcemanager.azurestackhci.implementation.models.DeploymentSettingListResult":"Azure.ResourceManager.ResourceListResult","com.azure.resourcemanager.azurestackhci.implementation.models.EdgeDeviceJobListResult":"Azure.ResourceManager.ResourceListResult","com.azure.resourcemanager.azurestackhci.implementation.models.EdgeDeviceListResult":"Azure.ResourceManager.ResourceListResult","com.azure.resourcemanager.azurestackhci.implementation.models.ExtensionList":"Microsoft.AzureStackHCI.ExtensionList","com.azure.resourcemanager.azurestackhci.implementation.models.OfferList":"Microsoft.AzureStackHCI.OfferList","com.azure.resourcemanager.azurestackhci.implementation.models.OperationListResult":"Azure.ResourceManager.CommonTypes.OperationListResult","com.azure.resourcemanager.azurestackhci.implementation.models.SecuritySettingListResult":"Azure.ResourceManager.ResourceListResult","com.azure.resourcemanager.azurestackhci.implementation.models.SkuList":"Microsoft.AzureStackHCI.SkuList","com.azure.resourcemanager.azurestackhci.implementation.models.UpdateList":"Microsoft.AzureStackHCI.UpdateList","com.azure.resourcemanager.azurestackhci.implementation.models.UpdateRunList":"Microsoft.AzureStackHCI.UpdateRunList","com.azure.resourcemanager.azurestackhci.implementation.models.UpdateSummariesList":"Microsoft.AzureStackHCI.UpdateSummariesList","com.azure.resourcemanager.azurestackhci.implementation.models.ValidatedSolutionRecipeListResult":"Azure.ResourceManager.ResourceListResult","com.azure.resourcemanager.azurestackhci.models.AccessLevel":"Microsoft.AzureStackHCI.AccessLevel","com.azure.resourcemanager.azurestackhci.models.ActionType":"Azure.ResourceManager.CommonTypes.ActionType","com.azure.resourcemanager.azurestackhci.models.ArcConnectivityProperties":"Microsoft.AzureStackHCI.ArcConnectivityProperties","com.azure.resourcemanager.azurestackhci.models.ArcExtensionState":"Microsoft.AzureStackHCI.ArcExtensionState","com.azure.resourcemanager.azurestackhci.models.ArcSettingAggregateState":"Microsoft.AzureStackHCI.ArcSettingAggregateState","com.azure.resourcemanager.azurestackhci.models.ArcSettingsPatch":"Microsoft.AzureStackHCI.ArcSettingsPatch","com.azure.resourcemanager.azurestackhci.models.AssemblyInfo":"Microsoft.AzureStackHCI.AssemblyInfo","com.azure.resourcemanager.azurestackhci.models.AssemblyInfoPayload":"Microsoft.AzureStackHCI.AssemblyInfoPayload","com.azure.resourcemanager.azurestackhci.models.AvailabilityType":"Microsoft.AzureStackHCI.AvailabilityType","com.azure.resourcemanager.azurestackhci.models.ClusterDesiredProperties":"Microsoft.AzureStackHCI.ClusterDesiredProperties","com.azure.resourcemanager.azurestackhci.models.ClusterNode":"Microsoft.AzureStackHCI.ClusterNode","com.azure.resourcemanager.azurestackhci.models.ClusterNodeType":"Microsoft.AzureStackHCI.ClusterNodeType","com.azure.resourcemanager.azurestackhci.models.ClusterPatch":"Microsoft.AzureStackHCI.ClusterPatch","com.azure.resourcemanager.azurestackhci.models.ClusterPattern":"Microsoft.AzureStackHCI.ClusterPattern","com.azure.resourcemanager.azurestackhci.models.ClusterReportedProperties":"Microsoft.AzureStackHCI.ClusterReportedProperties","com.azure.resourcemanager.azurestackhci.models.ComplianceAssignmentType":"Microsoft.AzureStackHCI.ComplianceAssignmentType","com.azure.resourcemanager.azurestackhci.models.ComplianceStatus":"Microsoft.AzureStackHCI.ComplianceStatus","com.azure.resourcemanager.azurestackhci.models.ConnectivityStatus":"Microsoft.AzureStackHCI.ConnectivityStatus","com.azure.resourcemanager.azurestackhci.models.DefaultExtensionDetails":"Microsoft.AzureStackHCI.DefaultExtensionDetails","com.azure.resourcemanager.azurestackhci.models.DeploymentCluster":"Microsoft.AzureStackHCI.DeploymentCluster","com.azure.resourcemanager.azurestackhci.models.DeploymentConfiguration":"Microsoft.AzureStackHCI.DeploymentConfiguration","com.azure.resourcemanager.azurestackhci.models.DeploymentData":"Microsoft.AzureStackHCI.DeploymentData","com.azure.resourcemanager.azurestackhci.models.DeploymentMode":"Microsoft.AzureStackHCI.DeploymentMode","com.azure.resourcemanager.azurestackhci.models.DeploymentSecuritySettings":"Microsoft.AzureStackHCI.DeploymentSecuritySettings","com.azure.resourcemanager.azurestackhci.models.DeploymentSettingAdapterPropertyOverrides":"Microsoft.AzureStackHCI.DeploymentSettingAdapterPropertyOverrides","com.azure.resourcemanager.azurestackhci.models.DeploymentSettingHostNetwork":"Microsoft.AzureStackHCI.DeploymentSettingHostNetwork","com.azure.resourcemanager.azurestackhci.models.DeploymentSettingIntents":"Microsoft.AzureStackHCI.DeploymentSettingIntents","com.azure.resourcemanager.azurestackhci.models.DeploymentSettingStorageAdapterIpInfo":"Microsoft.AzureStackHCI.DeploymentSettingStorageAdapterIPInfo","com.azure.resourcemanager.azurestackhci.models.DeploymentSettingStorageNetworks":"Microsoft.AzureStackHCI.DeploymentSettingStorageNetworks","com.azure.resourcemanager.azurestackhci.models.DeploymentSettingVirtualSwitchConfigurationOverrides":"Microsoft.AzureStackHCI.DeploymentSettingVirtualSwitchConfigurationOverrides","com.azure.resourcemanager.azurestackhci.models.DeploymentStep":"Microsoft.AzureStackHCI.DeploymentStep","com.azure.resourcemanager.azurestackhci.models.DeviceConfiguration":"Microsoft.AzureStackHCI.DeviceConfiguration","com.azure.resourcemanager.azurestackhci.models.DeviceKind":"Microsoft.AzureStackHCI.DeviceKind","com.azure.resourcemanager.azurestackhci.models.DeviceLogCollectionStatus":"Microsoft.AzureStackHCI.DeviceLogCollectionStatus","com.azure.resourcemanager.azurestackhci.models.DeviceState":"Microsoft.AzureStackHCI.DeviceState","com.azure.resourcemanager.azurestackhci.models.DiagnosticLevel":"Microsoft.AzureStackHCI.DiagnosticLevel","com.azure.resourcemanager.azurestackhci.models.DnsServerConfig":"Microsoft.AzureStackHCI.DnsServerConfig","com.azure.resourcemanager.azurestackhci.models.DnsZones":"Microsoft.AzureStackHCI.DnsZones","com.azure.resourcemanager.azurestackhci.models.EceActionStatus":"Microsoft.AzureStackHCI.EceActionStatus","com.azure.resourcemanager.azurestackhci.models.EceDeploymentSecrets":"Microsoft.AzureStackHCI.EceDeploymentSecrets","com.azure.resourcemanager.azurestackhci.models.EceReportedProperties":"Microsoft.AzureStackHCI.EceReportedProperties","com.azure.resourcemanager.azurestackhci.models.EceSecrets":"Microsoft.AzureStackHCI.EceSecrets","com.azure.resourcemanager.azurestackhci.models.EdgeDeviceKind":"Microsoft.AzureStackHCI.EdgeDeviceKind","com.azure.resourcemanager.azurestackhci.models.EdgeDeviceProperties":"Microsoft.AzureStackHCI.EdgeDeviceProperties","com.azure.resourcemanager.azurestackhci.models.ExtensionAggregateState":"Microsoft.AzureStackHCI.ExtensionAggregateState","com.azure.resourcemanager.azurestackhci.models.ExtensionInstanceView":"Microsoft.AzureStackHCI.ExtensionInstanceView","com.azure.resourcemanager.azurestackhci.models.ExtensionInstanceViewStatus":"Microsoft.AzureStackHCI.ExtensionInstanceViewStatus","com.azure.resourcemanager.azurestackhci.models.ExtensionManagedBy":"Microsoft.AzureStackHCI.ExtensionManagedBy","com.azure.resourcemanager.azurestackhci.models.ExtensionPatch":"Microsoft.AzureStackHCI.ExtensionPatch","com.azure.resourcemanager.azurestackhci.models.ExtensionPatchParameters":"Microsoft.AzureStackHCI.ExtensionPatchParameters","com.azure.resourcemanager.azurestackhci.models.ExtensionProfile":"Microsoft.AzureStackHCI.ExtensionProfile","com.azure.resourcemanager.azurestackhci.models.ExtensionUpgradeParameters":"Microsoft.AzureStackHCI.ExtensionUpgradeParameters","com.azure.resourcemanager.azurestackhci.models.HardwareClass":"Microsoft.AzureStackHCI.HardwareClass","com.azure.resourcemanager.azurestackhci.models.HciCollectLogJobProperties":"Microsoft.AzureStackHCI.HciCollectLogJobProperties","com.azure.resourcemanager.azurestackhci.models.HciEdgeDevice":"Microsoft.AzureStackHCI.HciEdgeDevice","com.azure.resourcemanager.azurestackhci.models.HciEdgeDeviceAdapterPropertyOverrides":"Microsoft.AzureStackHCI.HciEdgeDeviceAdapterPropertyOverrides","com.azure.resourcemanager.azurestackhci.models.HciEdgeDeviceArcExtension":"Microsoft.AzureStackHCI.HciEdgeDeviceArcExtension","com.azure.resourcemanager.azurestackhci.models.HciEdgeDeviceHostNetwork":"Microsoft.AzureStackHCI.HciEdgeDeviceHostNetwork","com.azure.resourcemanager.azurestackhci.models.HciEdgeDeviceIntents":"Microsoft.AzureStackHCI.HciEdgeDeviceIntents","com.azure.resourcemanager.azurestackhci.models.HciEdgeDeviceJob":"Microsoft.AzureStackHCI.HciEdgeDeviceJob","com.azure.resourcemanager.azurestackhci.models.HciEdgeDeviceJobProperties":"Microsoft.AzureStackHCI.HciEdgeDeviceJobProperties","com.azure.resourcemanager.azurestackhci.models.HciEdgeDeviceJobType":"Microsoft.AzureStackHCI.HciEdgeDeviceJobType","com.azure.resourcemanager.azurestackhci.models.HciEdgeDeviceProperties":"Microsoft.AzureStackHCI.HciEdgeDeviceProperties","com.azure.resourcemanager.azurestackhci.models.HciEdgeDeviceStorageAdapterIpInfo":"Microsoft.AzureStackHCI.HciEdgeDeviceStorageAdapterIPInfo","com.azure.resourcemanager.azurestackhci.models.HciEdgeDeviceStorageNetworks":"Microsoft.AzureStackHCI.HciEdgeDeviceStorageNetworks","com.azure.resourcemanager.azurestackhci.models.HciEdgeDeviceVirtualSwitchConfigurationOverrides":"Microsoft.AzureStackHCI.HciEdgeDeviceVirtualSwitchConfigurationOverrides","com.azure.resourcemanager.azurestackhci.models.HciHardwareProfile":"Microsoft.AzureStackHCI.HciHardwareProfile","com.azure.resourcemanager.azurestackhci.models.HciNetworkProfile":"Microsoft.AzureStackHCI.HciNetworkProfile","com.azure.resourcemanager.azurestackhci.models.HciNicDetail":"Microsoft.AzureStackHCI.HciNicDetail","com.azure.resourcemanager.azurestackhci.models.HciOsProfile":"Microsoft.AzureStackHCI.HciOsProfile","com.azure.resourcemanager.azurestackhci.models.HciRemoteSupportJobProperties":"Microsoft.AzureStackHCI.HciRemoteSupportJobProperties","com.azure.resourcemanager.azurestackhci.models.HciReportedProperties":"Microsoft.AzureStackHCI.HciReportedProperties","com.azure.resourcemanager.azurestackhci.models.HciStorageProfile":"Microsoft.AzureStackHCI.HciStorageProfile","com.azure.resourcemanager.azurestackhci.models.HciValidationFailureDetail":"Microsoft.AzureStackHCI.HciValidationFailureDetail","com.azure.resourcemanager.azurestackhci.models.HealthState":"Microsoft.AzureStackHCI.HealthState","com.azure.resourcemanager.azurestackhci.models.IdentityProvider":"Microsoft.AzureStackHCI.IdentityProvider","com.azure.resourcemanager.azurestackhci.models.ImdsAttestation":"Microsoft.AzureStackHCI.ImdsAttestation","com.azure.resourcemanager.azurestackhci.models.InfrastructureNetwork":"Microsoft.AzureStackHCI.InfrastructureNetwork","com.azure.resourcemanager.azurestackhci.models.IpPools":"Microsoft.AzureStackHCI.IpPools","com.azure.resourcemanager.azurestackhci.models.IsolatedVmAttestationConfiguration":"Microsoft.AzureStackHCI.IsolatedVmAttestationConfiguration","com.azure.resourcemanager.azurestackhci.models.JobStatus":"Microsoft.AzureStackHCI.JobStatus","com.azure.resourcemanager.azurestackhci.models.LocalAvailabilityZones":"Microsoft.AzureStackHCI.LocalAvailabilityZones","com.azure.resourcemanager.azurestackhci.models.LogCollectionError":"Microsoft.AzureStackHCI.LogCollectionError","com.azure.resourcemanager.azurestackhci.models.LogCollectionJobSession":"Microsoft.AzureStackHCI.LogCollectionJobSession","com.azure.resourcemanager.azurestackhci.models.LogCollectionJobType":"Microsoft.AzureStackHCI.LogCollectionJobType","com.azure.resourcemanager.azurestackhci.models.LogCollectionProperties":"Microsoft.AzureStackHCI.LogCollectionProperties","com.azure.resourcemanager.azurestackhci.models.LogCollectionReportedProperties":"Microsoft.AzureStackHCI.LogCollectionReportedProperties","com.azure.resourcemanager.azurestackhci.models.LogCollectionRequest":"Microsoft.AzureStackHCI.LogCollectionRequest","com.azure.resourcemanager.azurestackhci.models.LogCollectionRequestProperties":"Microsoft.AzureStackHCI.LogCollectionRequestProperties","com.azure.resourcemanager.azurestackhci.models.LogCollectionSession":"Microsoft.AzureStackHCI.LogCollectionSession","com.azure.resourcemanager.azurestackhci.models.LogCollectionStatus":"Microsoft.AzureStackHCI.LogCollectionStatus","com.azure.resourcemanager.azurestackhci.models.ManagedServiceIdentityType":"Azure.ResourceManager.CommonTypes.ManagedServiceIdentityType","com.azure.resourcemanager.azurestackhci.models.NetworkController":"Microsoft.AzureStackHCI.NetworkController","com.azure.resourcemanager.azurestackhci.models.NicDetail":"Microsoft.AzureStackHCI.NicDetail","com.azure.resourcemanager.azurestackhci.models.NodeArcState":"Microsoft.AzureStackHCI.NodeArcState","com.azure.resourcemanager.azurestackhci.models.NodeExtensionState":"Microsoft.AzureStackHCI.NodeExtensionState","com.azure.resourcemanager.azurestackhci.models.Observability":"Microsoft.AzureStackHCI.Observability","com.azure.resourcemanager.azurestackhci.models.OemActivation":"Microsoft.AzureStackHCI.OemActivation","com.azure.resourcemanager.azurestackhci.models.OperationDisplay":"Azure.ResourceManager.CommonTypes.OperationDisplay","com.azure.resourcemanager.azurestackhci.models.OperationType":"Microsoft.AzureStackHCI.OperationType","com.azure.resourcemanager.azurestackhci.models.OptionalServices":"Microsoft.AzureStackHCI.OptionalServices","com.azure.resourcemanager.azurestackhci.models.Origin":"Azure.ResourceManager.CommonTypes.Origin","com.azure.resourcemanager.azurestackhci.models.PackageVersionInfo":"Microsoft.AzureStackHCI.PackageVersionInfo","com.azure.resourcemanager.azurestackhci.models.PerNodeExtensionState":"Microsoft.AzureStackHCI.PerNodeExtensionState","com.azure.resourcemanager.azurestackhci.models.PerNodeRemoteSupportSession":"Microsoft.AzureStackHCI.PerNodeRemoteSupportSession","com.azure.resourcemanager.azurestackhci.models.PerNodeState":"Microsoft.AzureStackHCI.PerNodeState","com.azure.resourcemanager.azurestackhci.models.PhysicalNodes":"Microsoft.AzureStackHCI.PhysicalNodes","com.azure.resourcemanager.azurestackhci.models.PrecheckResult":"Microsoft.AzureStackHCI.PrecheckResult","com.azure.resourcemanager.azurestackhci.models.PrecheckResultTags":"Microsoft.AzureStackHCI.PrecheckResultTags","com.azure.resourcemanager.azurestackhci.models.ProvisioningState":"Microsoft.AzureStackHCI.ProvisioningState","com.azure.resourcemanager.azurestackhci.models.QosPolicyOverrides":"Microsoft.AzureStackHCI.QosPolicyOverrides","com.azure.resourcemanager.azurestackhci.models.RawCertificateData":"Microsoft.AzureStackHCI.RawCertificateData","com.azure.resourcemanager.azurestackhci.models.RdmaCapability":"Microsoft.AzureStackHCI.RdmaCapability","com.azure.resourcemanager.azurestackhci.models.RebootRequirement":"Microsoft.AzureStackHCI.RebootRequirement","com.azure.resourcemanager.azurestackhci.models.ReconcileArcSettingsRequest":"Microsoft.AzureStackHCI.ReconcileArcSettingsRequest","com.azure.resourcemanager.azurestackhci.models.ReconcileArcSettingsRequestProperties":"Microsoft.AzureStackHCI.ReconcileArcSettingsRequestProperties","com.azure.resourcemanager.azurestackhci.models.RemoteSupportAccessLevel":"Microsoft.AzureStackHCI.RemoteSupportAccessLevel","com.azure.resourcemanager.azurestackhci.models.RemoteSupportJobNodeSettings":"Microsoft.AzureStackHCI.RemoteSupportJobNodeSettings","com.azure.resourcemanager.azurestackhci.models.RemoteSupportJobReportedProperties":"Microsoft.AzureStackHCI.RemoteSupportJobReportedProperties","com.azure.resourcemanager.azurestackhci.models.RemoteSupportNodeSettings":"Microsoft.AzureStackHCI.RemoteSupportNodeSettings","com.azure.resourcemanager.azurestackhci.models.RemoteSupportProperties":"Microsoft.AzureStackHCI.RemoteSupportProperties","com.azure.resourcemanager.azurestackhci.models.RemoteSupportRequest":"Microsoft.AzureStackHCI.RemoteSupportRequest","com.azure.resourcemanager.azurestackhci.models.RemoteSupportRequestProperties":"Microsoft.AzureStackHCI.RemoteSupportRequestProperties","com.azure.resourcemanager.azurestackhci.models.RemoteSupportSession":"Microsoft.AzureStackHCI.RemoteSupportSession","com.azure.resourcemanager.azurestackhci.models.RemoteSupportType":"Microsoft.AzureStackHCI.RemoteSupportType","com.azure.resourcemanager.azurestackhci.models.ReportedProperties":"Microsoft.AzureStackHCI.ReportedProperties","com.azure.resourcemanager.azurestackhci.models.SbeCredentials":"Microsoft.AzureStackHCI.SbeCredentials","com.azure.resourcemanager.azurestackhci.models.SbeDeploymentInfo":"Microsoft.AzureStackHCI.SbeDeploymentInfo","com.azure.resourcemanager.azurestackhci.models.SbeDeploymentPackageInfo":"Microsoft.AzureStackHCI.SbeDeploymentPackageInfo","com.azure.resourcemanager.azurestackhci.models.SbePartnerInfo":"Microsoft.AzureStackHCI.SbePartnerInfo","com.azure.resourcemanager.azurestackhci.models.SbePartnerProperties":"Microsoft.AzureStackHCI.SbePartnerProperties","com.azure.resourcemanager.azurestackhci.models.ScaleUnits":"Microsoft.AzureStackHCI.ScaleUnits","com.azure.resourcemanager.azurestackhci.models.SdnIntegration":"Microsoft.AzureStackHCI.SdnIntegration","com.azure.resourcemanager.azurestackhci.models.SecretsLocationDetails":"Microsoft.AzureStackHCI.SecretsLocationDetails","com.azure.resourcemanager.azurestackhci.models.SecretsLocationsChangeRequest":"Microsoft.AzureStackHCI.SecretsLocationsChangeRequest","com.azure.resourcemanager.azurestackhci.models.SecretsType":"Microsoft.AzureStackHCI.SecretsType","com.azure.resourcemanager.azurestackhci.models.SecurityComplianceStatus":"Microsoft.AzureStackHCI.SecurityComplianceStatus","com.azure.resourcemanager.azurestackhci.models.ServiceConfiguration":"Microsoft.AzureStackHCI.ServiceConfiguration","com.azure.resourcemanager.azurestackhci.models.ServiceName":"Microsoft.AzureStackHCI.ServiceName","com.azure.resourcemanager.azurestackhci.models.Severity":"Microsoft.AzureStackHCI.Severity","com.azure.resourcemanager.azurestackhci.models.SkuMappings":"Microsoft.AzureStackHCI.SkuMappings","com.azure.resourcemanager.azurestackhci.models.SoftwareAssuranceChangeRequest":"Microsoft.AzureStackHCI.SoftwareAssuranceChangeRequest","com.azure.resourcemanager.azurestackhci.models.SoftwareAssuranceChangeRequestProperties":"Microsoft.AzureStackHCI.SoftwareAssuranceChangeRequestProperties","com.azure.resourcemanager.azurestackhci.models.SoftwareAssuranceIntent":"Microsoft.AzureStackHCI.SoftwareAssuranceIntent","com.azure.resourcemanager.azurestackhci.models.SoftwareAssuranceProperties":"Microsoft.AzureStackHCI.SoftwareAssuranceProperties","com.azure.resourcemanager.azurestackhci.models.SoftwareAssuranceStatus":"Microsoft.AzureStackHCI.SoftwareAssuranceStatus","com.azure.resourcemanager.azurestackhci.models.State":"Microsoft.AzureStackHCI.State","com.azure.resourcemanager.azurestackhci.models.Status":"Microsoft.AzureStackHCI.Status","com.azure.resourcemanager.azurestackhci.models.StatusLevelTypes":"Microsoft.AzureStackHCI.StatusLevelTypes","com.azure.resourcemanager.azurestackhci.models.Storage":"Microsoft.AzureStackHCI.Storage","com.azure.resourcemanager.azurestackhci.models.SwitchDetail":"Microsoft.AzureStackHCI.SwitchDetail","com.azure.resourcemanager.azurestackhci.models.SwitchExtension":"Microsoft.AzureStackHCI.SwitchExtension","com.azure.resourcemanager.azurestackhci.models.UpdatePrerequisite":"Microsoft.AzureStackHCI.UpdatePrerequisite","com.azure.resourcemanager.azurestackhci.models.UpdateRunPropertiesState":"Microsoft.AzureStackHCI.UpdateRunPropertiesState","com.azure.resourcemanager.azurestackhci.models.UpdateSummariesPropertiesState":"Microsoft.AzureStackHCI.UpdateSummariesPropertiesState","com.azure.resourcemanager.azurestackhci.models.UploadCertificateRequest":"Microsoft.AzureStackHCI.UploadCertificateRequest","com.azure.resourcemanager.azurestackhci.models.UserAssignedIdentity":"Azure.ResourceManager.CommonTypes.UserAssignedIdentity","com.azure.resourcemanager.azurestackhci.models.ValidateRequest":"Microsoft.AzureStackHCI.ValidateRequest","com.azure.resourcemanager.azurestackhci.models.ValidatedSolutionRecipeCapabilities":"Microsoft.AzureStackHCI.ValidatedSolutionRecipeCapabilities","com.azure.resourcemanager.azurestackhci.models.ValidatedSolutionRecipeCapability":"Microsoft.AzureStackHCI.ValidatedSolutionRecipeCapability","com.azure.resourcemanager.azurestackhci.models.ValidatedSolutionRecipeComponent":"Microsoft.AzureStackHCI.ValidatedSolutionRecipeComponent","com.azure.resourcemanager.azurestackhci.models.ValidatedSolutionRecipeComponentMetadata":"Microsoft.AzureStackHCI.ValidatedSolutionRecipeComponentMetadata","com.azure.resourcemanager.azurestackhci.models.ValidatedSolutionRecipeComponentPayload":"Microsoft.AzureStackHCI.ValidatedSolutionRecipeComponentPayload","com.azure.resourcemanager.azurestackhci.models.ValidatedSolutionRecipeContent":"Microsoft.AzureStackHCI.ValidatedSolutionRecipeContent","com.azure.resourcemanager.azurestackhci.models.ValidatedSolutionRecipeInfo":"Microsoft.AzureStackHCI.ValidatedSolutionRecipeInfo","com.azure.resourcemanager.azurestackhci.models.ValidatedSolutionRecipeProperties":"Microsoft.AzureStackHCI.ValidatedSolutionRecipeProperties","com.azure.resourcemanager.azurestackhci.models.WindowsServerSubscription":"Microsoft.AzureStackHCI.WindowsServerSubscription"},"generatedFiles":["src/main/java/com/azure/resourcemanager/azurestackhci/AzureStackHciManager.java","src/main/java/com/azure/resourcemanager/azurestackhci/fluent/ArcSettingsClient.java","src/main/java/com/azure/resourcemanager/azurestackhci/fluent/AzureStackHciManagementClient.java","src/main/java/com/azure/resourcemanager/azurestackhci/fluent/ClustersClient.java","src/main/java/com/azure/resourcemanager/azurestackhci/fluent/DeploymentSettingsClient.java","src/main/java/com/azure/resourcemanager/azurestackhci/fluent/EdgeDeviceJobsClient.java","src/main/java/com/azure/resourcemanager/azurestackhci/fluent/EdgeDevicesClient.java","src/main/java/com/azure/resourcemanager/azurestackhci/fluent/ExtensionsClient.java","src/main/java/com/azure/resourcemanager/azurestackhci/fluent/OffersClient.java","src/main/java/com/azure/resourcemanager/azurestackhci/fluent/OperationsClient.java","src/main/java/com/azure/resourcemanager/azurestackhci/fluent/SecuritySettingsClient.java","src/main/java/com/azure/resourcemanager/azurestackhci/fluent/SkusClient.java","src/main/java/com/azure/resourcemanager/azurestackhci/fluent/UpdateRunsClient.java","src/main/java/com/azure/resourcemanager/azurestackhci/fluent/UpdateSummariesOperationsClient.java","src/main/java/com/azure/resourcemanager/azurestackhci/fluent/UpdatesClient.java","src/main/java/com/azure/resourcemanager/azurestackhci/fluent/ValidatedSolutionRecipesClient.java","src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/ArcIdentityResponseInner.java","src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/ArcIdentityResponseProperties.java","src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/ArcSettingInner.java","src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/ArcSettingProperties.java","src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/ArcSettingsPatchProperties.java","src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/ClusterIdentityResponseInner.java","src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/ClusterIdentityResponseProperties.java","src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/ClusterInner.java","src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/ClusterPatchProperties.java","src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/ClusterProperties.java","src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/DeploymentSettingInner.java","src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/DeploymentSettingsProperties.java","src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/EdgeDeviceInner.java","src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/EdgeDeviceJobInner.java","src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/ExtensionInner.java","src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/ExtensionParameters.java","src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/ExtensionPatchProperties.java","src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/ExtensionProperties.java","src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/HciUpdateInner.java","src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/ManagedServiceIdentity.java","src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/OfferInner.java","src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/OfferProperties.java","src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/OperationInner.java","src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/PasswordCredentialInner.java","src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/SecurityProperties.java","src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/SecuritySettingInner.java","src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/SkuInner.java","src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/SkuProperties.java","src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/Step.java","src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/UpdateProperties.java","src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/UpdateRunInner.java","src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/UpdateRunProperties.java","src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/UpdateStateProperties.java","src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/UpdateSummariesInner.java","src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/UpdateSummariesProperties.java","src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/ValidateResponseInner.java","src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/ValidatedSolutionRecipeInner.java","src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/package-info.java","src/main/java/com/azure/resourcemanager/azurestackhci/fluent/package-info.java","src/main/java/com/azure/resourcemanager/azurestackhci/implementation/ArcIdentityResponseImpl.java","src/main/java/com/azure/resourcemanager/azurestackhci/implementation/ArcSettingImpl.java","src/main/java/com/azure/resourcemanager/azurestackhci/implementation/ArcSettingsClientImpl.java","src/main/java/com/azure/resourcemanager/azurestackhci/implementation/ArcSettingsImpl.java","src/main/java/com/azure/resourcemanager/azurestackhci/implementation/AzureStackHciManagementClientBuilder.java","src/main/java/com/azure/resourcemanager/azurestackhci/implementation/AzureStackHciManagementClientImpl.java","src/main/java/com/azure/resourcemanager/azurestackhci/implementation/ClusterIdentityResponseImpl.java","src/main/java/com/azure/resourcemanager/azurestackhci/implementation/ClusterImpl.java","src/main/java/com/azure/resourcemanager/azurestackhci/implementation/ClustersClientImpl.java","src/main/java/com/azure/resourcemanager/azurestackhci/implementation/ClustersImpl.java","src/main/java/com/azure/resourcemanager/azurestackhci/implementation/DeploymentSettingImpl.java","src/main/java/com/azure/resourcemanager/azurestackhci/implementation/DeploymentSettingsClientImpl.java","src/main/java/com/azure/resourcemanager/azurestackhci/implementation/DeploymentSettingsImpl.java","src/main/java/com/azure/resourcemanager/azurestackhci/implementation/EdgeDeviceImpl.java","src/main/java/com/azure/resourcemanager/azurestackhci/implementation/EdgeDeviceJobImpl.java","src/main/java/com/azure/resourcemanager/azurestackhci/implementation/EdgeDeviceJobsClientImpl.java","src/main/java/com/azure/resourcemanager/azurestackhci/implementation/EdgeDeviceJobsImpl.java","src/main/java/com/azure/resourcemanager/azurestackhci/implementation/EdgeDevicesClientImpl.java","src/main/java/com/azure/resourcemanager/azurestackhci/implementation/EdgeDevicesImpl.java","src/main/java/com/azure/resourcemanager/azurestackhci/implementation/ExtensionImpl.java","src/main/java/com/azure/resourcemanager/azurestackhci/implementation/ExtensionsClientImpl.java","src/main/java/com/azure/resourcemanager/azurestackhci/implementation/ExtensionsImpl.java","src/main/java/com/azure/resourcemanager/azurestackhci/implementation/HciUpdateImpl.java","src/main/java/com/azure/resourcemanager/azurestackhci/implementation/OfferImpl.java","src/main/java/com/azure/resourcemanager/azurestackhci/implementation/OffersClientImpl.java","src/main/java/com/azure/resourcemanager/azurestackhci/implementation/OffersImpl.java","src/main/java/com/azure/resourcemanager/azurestackhci/implementation/OperationImpl.java","src/main/java/com/azure/resourcemanager/azurestackhci/implementation/OperationsClientImpl.java","src/main/java/com/azure/resourcemanager/azurestackhci/implementation/OperationsImpl.java","src/main/java/com/azure/resourcemanager/azurestackhci/implementation/PasswordCredentialImpl.java","src/main/java/com/azure/resourcemanager/azurestackhci/implementation/ResourceManagerUtils.java","src/main/java/com/azure/resourcemanager/azurestackhci/implementation/SecuritySettingImpl.java","src/main/java/com/azure/resourcemanager/azurestackhci/implementation/SecuritySettingsClientImpl.java","src/main/java/com/azure/resourcemanager/azurestackhci/implementation/SecuritySettingsImpl.java","src/main/java/com/azure/resourcemanager/azurestackhci/implementation/SkuImpl.java","src/main/java/com/azure/resourcemanager/azurestackhci/implementation/SkusClientImpl.java","src/main/java/com/azure/resourcemanager/azurestackhci/implementation/SkusImpl.java","src/main/java/com/azure/resourcemanager/azurestackhci/implementation/UpdateRunImpl.java","src/main/java/com/azure/resourcemanager/azurestackhci/implementation/UpdateRunsClientImpl.java","src/main/java/com/azure/resourcemanager/azurestackhci/implementation/UpdateRunsImpl.java","src/main/java/com/azure/resourcemanager/azurestackhci/implementation/UpdateSummariesImpl.java","src/main/java/com/azure/resourcemanager/azurestackhci/implementation/UpdateSummariesOperationsClientImpl.java","src/main/java/com/azure/resourcemanager/azurestackhci/implementation/UpdateSummariesOperationsImpl.java","src/main/java/com/azure/resourcemanager/azurestackhci/implementation/UpdatesClientImpl.java","src/main/java/com/azure/resourcemanager/azurestackhci/implementation/UpdatesImpl.java","src/main/java/com/azure/resourcemanager/azurestackhci/implementation/ValidateResponseImpl.java","src/main/java/com/azure/resourcemanager/azurestackhci/implementation/ValidatedSolutionRecipeImpl.java","src/main/java/com/azure/resourcemanager/azurestackhci/implementation/ValidatedSolutionRecipesClientImpl.java","src/main/java/com/azure/resourcemanager/azurestackhci/implementation/ValidatedSolutionRecipesImpl.java","src/main/java/com/azure/resourcemanager/azurestackhci/implementation/models/ArcSettingList.java","src/main/java/com/azure/resourcemanager/azurestackhci/implementation/models/ClusterList.java","src/main/java/com/azure/resourcemanager/azurestackhci/implementation/models/DeploymentSettingListResult.java","src/main/java/com/azure/resourcemanager/azurestackhci/implementation/models/EdgeDeviceJobListResult.java","src/main/java/com/azure/resourcemanager/azurestackhci/implementation/models/EdgeDeviceListResult.java","src/main/java/com/azure/resourcemanager/azurestackhci/implementation/models/ExtensionList.java","src/main/java/com/azure/resourcemanager/azurestackhci/implementation/models/OfferList.java","src/main/java/com/azure/resourcemanager/azurestackhci/implementation/models/OperationListResult.java","src/main/java/com/azure/resourcemanager/azurestackhci/implementation/models/SecuritySettingListResult.java","src/main/java/com/azure/resourcemanager/azurestackhci/implementation/models/SkuList.java","src/main/java/com/azure/resourcemanager/azurestackhci/implementation/models/UpdateList.java","src/main/java/com/azure/resourcemanager/azurestackhci/implementation/models/UpdateRunList.java","src/main/java/com/azure/resourcemanager/azurestackhci/implementation/models/UpdateSummariesList.java","src/main/java/com/azure/resourcemanager/azurestackhci/implementation/models/ValidatedSolutionRecipeListResult.java","src/main/java/com/azure/resourcemanager/azurestackhci/implementation/package-info.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/AccessLevel.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/ActionType.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/ArcConnectivityProperties.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/ArcExtensionState.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/ArcIdentityResponse.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/ArcSetting.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/ArcSettingAggregateState.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/ArcSettings.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/ArcSettingsPatch.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/AssemblyInfo.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/AssemblyInfoPayload.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/AvailabilityType.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/Cluster.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/ClusterDesiredProperties.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/ClusterIdentityResponse.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/ClusterNode.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/ClusterNodeType.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/ClusterPatch.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/ClusterPattern.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/ClusterReportedProperties.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/Clusters.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/ComplianceAssignmentType.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/ComplianceStatus.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/ConnectivityStatus.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/DefaultExtensionDetails.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/DeploymentCluster.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/DeploymentConfiguration.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/DeploymentData.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/DeploymentMode.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/DeploymentSecuritySettings.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/DeploymentSetting.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/DeploymentSettingAdapterPropertyOverrides.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/DeploymentSettingHostNetwork.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/DeploymentSettingIntents.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/DeploymentSettingStorageAdapterIpInfo.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/DeploymentSettingStorageNetworks.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/DeploymentSettingVirtualSwitchConfigurationOverrides.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/DeploymentSettings.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/DeploymentStep.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/DeviceConfiguration.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/DeviceKind.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/DeviceLogCollectionStatus.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/DeviceState.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/DiagnosticLevel.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/DnsServerConfig.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/DnsZones.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/EceActionStatus.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/EceDeploymentSecrets.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/EceReportedProperties.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/EceSecrets.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/EdgeDevice.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/EdgeDeviceJob.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/EdgeDeviceJobs.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/EdgeDeviceKind.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/EdgeDeviceProperties.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/EdgeDevices.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/Extension.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/ExtensionAggregateState.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/ExtensionInstanceView.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/ExtensionInstanceViewStatus.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/ExtensionManagedBy.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/ExtensionPatch.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/ExtensionPatchParameters.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/ExtensionProfile.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/ExtensionUpgradeParameters.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/Extensions.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/HardwareClass.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/HciCollectLogJobProperties.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/HciEdgeDevice.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/HciEdgeDeviceAdapterPropertyOverrides.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/HciEdgeDeviceArcExtension.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/HciEdgeDeviceHostNetwork.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/HciEdgeDeviceIntents.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/HciEdgeDeviceJob.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/HciEdgeDeviceJobProperties.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/HciEdgeDeviceJobType.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/HciEdgeDeviceProperties.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/HciEdgeDeviceStorageAdapterIpInfo.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/HciEdgeDeviceStorageNetworks.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/HciEdgeDeviceVirtualSwitchConfigurationOverrides.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/HciHardwareProfile.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/HciNetworkProfile.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/HciNicDetail.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/HciOsProfile.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/HciRemoteSupportJobProperties.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/HciReportedProperties.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/HciStorageProfile.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/HciUpdate.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/HciValidationFailureDetail.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/HealthState.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/IdentityProvider.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/ImdsAttestation.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/InfrastructureNetwork.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/IpPools.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/IsolatedVmAttestationConfiguration.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/JobStatus.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/LocalAvailabilityZones.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/LogCollectionError.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/LogCollectionJobSession.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/LogCollectionJobType.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/LogCollectionProperties.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/LogCollectionReportedProperties.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/LogCollectionRequest.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/LogCollectionRequestProperties.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/LogCollectionSession.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/LogCollectionStatus.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/ManagedServiceIdentityType.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/NetworkController.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/NicDetail.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/NodeArcState.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/NodeExtensionState.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/Observability.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/OemActivation.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/Offer.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/Offers.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/Operation.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/OperationDisplay.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/OperationType.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/Operations.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/OptionalServices.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/Origin.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/PackageVersionInfo.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/PasswordCredential.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/PerNodeExtensionState.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/PerNodeRemoteSupportSession.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/PerNodeState.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/PhysicalNodes.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/PrecheckResult.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/PrecheckResultTags.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/ProvisioningState.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/QosPolicyOverrides.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/RawCertificateData.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/RdmaCapability.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/RebootRequirement.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/ReconcileArcSettingsRequest.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/ReconcileArcSettingsRequestProperties.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/RemoteSupportAccessLevel.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/RemoteSupportJobNodeSettings.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/RemoteSupportJobReportedProperties.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/RemoteSupportNodeSettings.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/RemoteSupportProperties.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/RemoteSupportRequest.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/RemoteSupportRequestProperties.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/RemoteSupportSession.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/RemoteSupportType.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/ReportedProperties.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/SbeCredentials.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/SbeDeploymentInfo.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/SbeDeploymentPackageInfo.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/SbePartnerInfo.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/SbePartnerProperties.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/ScaleUnits.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/SdnIntegration.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/SecretsLocationDetails.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/SecretsLocationsChangeRequest.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/SecretsType.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/SecurityComplianceStatus.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/SecuritySetting.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/SecuritySettings.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/ServiceConfiguration.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/ServiceName.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/Severity.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/Sku.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/SkuMappings.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/Skus.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/SoftwareAssuranceChangeRequest.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/SoftwareAssuranceChangeRequestProperties.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/SoftwareAssuranceIntent.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/SoftwareAssuranceProperties.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/SoftwareAssuranceStatus.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/State.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/Status.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/StatusLevelTypes.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/Storage.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/SwitchDetail.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/SwitchExtension.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/UpdatePrerequisite.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/UpdateRun.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/UpdateRunPropertiesState.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/UpdateRuns.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/UpdateSummaries.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/UpdateSummariesOperations.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/UpdateSummariesPropertiesState.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/Updates.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/UploadCertificateRequest.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/UserAssignedIdentity.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/ValidateRequest.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/ValidateResponse.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/ValidatedSolutionRecipe.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/ValidatedSolutionRecipeCapabilities.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/ValidatedSolutionRecipeCapability.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/ValidatedSolutionRecipeComponent.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/ValidatedSolutionRecipeComponentMetadata.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/ValidatedSolutionRecipeComponentPayload.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/ValidatedSolutionRecipeContent.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/ValidatedSolutionRecipeInfo.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/ValidatedSolutionRecipeProperties.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/ValidatedSolutionRecipes.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/WindowsServerSubscription.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/package-info.java","src/main/java/com/azure/resourcemanager/azurestackhci/package-info.java","src/main/java/module-info.java"]} \ No newline at end of file diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-azurestackhci/proxy-config.json b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-azurestackhci/proxy-config.json index 2304b88c9c76..b2ca2924beec 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-azurestackhci/proxy-config.json +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-azurestackhci/proxy-config.json @@ -1 +1 @@ -[["com.azure.resourcemanager.azurestackhci.implementation.ArcSettingsClientImpl$ArcSettingsService"],["com.azure.resourcemanager.azurestackhci.implementation.ClustersClientImpl$ClustersService"],["com.azure.resourcemanager.azurestackhci.implementation.DeploymentSettingsClientImpl$DeploymentSettingsService"],["com.azure.resourcemanager.azurestackhci.implementation.EdgeDevicesClientImpl$EdgeDevicesService"],["com.azure.resourcemanager.azurestackhci.implementation.ExtensionsClientImpl$ExtensionsService"],["com.azure.resourcemanager.azurestackhci.implementation.OffersClientImpl$OffersService"],["com.azure.resourcemanager.azurestackhci.implementation.OperationsClientImpl$OperationsService"],["com.azure.resourcemanager.azurestackhci.implementation.PublishersClientImpl$PublishersService"],["com.azure.resourcemanager.azurestackhci.implementation.SecuritySettingsClientImpl$SecuritySettingsService"],["com.azure.resourcemanager.azurestackhci.implementation.SkusClientImpl$SkusService"],["com.azure.resourcemanager.azurestackhci.implementation.UpdateRunsClientImpl$UpdateRunsService"],["com.azure.resourcemanager.azurestackhci.implementation.UpdateSummariesOperationsClientImpl$UpdateSummariesOperationsService"],["com.azure.resourcemanager.azurestackhci.implementation.UpdatesClientImpl$UpdatesService"]] \ No newline at end of file +[["com.azure.resourcemanager.azurestackhci.implementation.ArcSettingsClientImpl$ArcSettingsService"],["com.azure.resourcemanager.azurestackhci.implementation.ClustersClientImpl$ClustersService"],["com.azure.resourcemanager.azurestackhci.implementation.DeploymentSettingsClientImpl$DeploymentSettingsService"],["com.azure.resourcemanager.azurestackhci.implementation.EdgeDeviceJobsClientImpl$EdgeDeviceJobsService"],["com.azure.resourcemanager.azurestackhci.implementation.EdgeDevicesClientImpl$EdgeDevicesService"],["com.azure.resourcemanager.azurestackhci.implementation.ExtensionsClientImpl$ExtensionsService"],["com.azure.resourcemanager.azurestackhci.implementation.OffersClientImpl$OffersService"],["com.azure.resourcemanager.azurestackhci.implementation.OperationsClientImpl$OperationsService"],["com.azure.resourcemanager.azurestackhci.implementation.SecuritySettingsClientImpl$SecuritySettingsService"],["com.azure.resourcemanager.azurestackhci.implementation.SkusClientImpl$SkusService"],["com.azure.resourcemanager.azurestackhci.implementation.UpdateRunsClientImpl$UpdateRunsService"],["com.azure.resourcemanager.azurestackhci.implementation.UpdateSummariesOperationsClientImpl$UpdateSummariesOperationsService"],["com.azure.resourcemanager.azurestackhci.implementation.UpdatesClientImpl$UpdatesService"],["com.azure.resourcemanager.azurestackhci.implementation.ValidatedSolutionRecipesClientImpl$ValidatedSolutionRecipesService"]] \ No newline at end of file diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/resources/azure-resourcemanager-azurestackhci.properties b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/resources/azure-resourcemanager-azurestackhci.properties new file mode 100644 index 000000000000..defbd48204e4 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/resources/azure-resourcemanager-azurestackhci.properties @@ -0,0 +1 @@ +version=${project.version} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/ArcSettingsConsentAndInstallDefaultExtensionsSamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/ArcSettingsConsentAndInstallDefaultExtensionsSamples.java index c87e2a027025..5ca7fa2d6ff3 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/ArcSettingsConsentAndInstallDefaultExtensionsSamples.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/ArcSettingsConsentAndInstallDefaultExtensionsSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.generated; @@ -9,9 +9,7 @@ */ public final class ArcSettingsConsentAndInstallDefaultExtensionsSamples { /* - * x-ms-original-file: - * specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/StackHCI/stable/2024-04-01/examples/ - * ConsentAndInstallDefaultExtensions.json + * x-ms-original-file: 2026-02-01/ConsentAndInstallDefaultExtensions.json */ /** * Sample code: Consent And Install Default Extensions. diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/ArcSettingsCreateIdentitySamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/ArcSettingsCreateIdentitySamples.java index 6686faa90d53..dfd2e4f36b09 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/ArcSettingsCreateIdentitySamples.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/ArcSettingsCreateIdentitySamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.generated; @@ -9,9 +9,7 @@ */ public final class ArcSettingsCreateIdentitySamples { /* - * x-ms-original-file: - * specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/StackHCI/stable/2024-04-01/examples/ - * CreateArcIdentity.json + * x-ms-original-file: 2026-02-01/CreateArcIdentity.json */ /** * Sample code: Create Arc Identity. diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/ArcSettingsCreateSamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/ArcSettingsCreateSamples.java index 2c6a0bd313da..2442d5c1afe8 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/ArcSettingsCreateSamples.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/ArcSettingsCreateSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.generated; @@ -9,9 +9,7 @@ */ public final class ArcSettingsCreateSamples { /* - * x-ms-original-file: - * specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/StackHCI/stable/2024-04-01/examples/ - * PutArcSetting.json + * x-ms-original-file: 2026-02-01/PutArcSetting.json */ /** * Sample code: Create ArcSetting. diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/ArcSettingsDeleteSamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/ArcSettingsDeleteSamples.java index 7772f1c1e774..298857c18b70 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/ArcSettingsDeleteSamples.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/ArcSettingsDeleteSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.generated; @@ -9,9 +9,7 @@ */ public final class ArcSettingsDeleteSamples { /* - * x-ms-original-file: - * specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/StackHCI/stable/2024-04-01/examples/ - * DeleteArcSetting.json + * x-ms-original-file: 2026-02-01/DeleteArcSetting.json */ /** * Sample code: Delete ArcSetting. diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/ArcSettingsGeneratePasswordSamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/ArcSettingsGeneratePasswordSamples.java index 36edb646d053..e8c397fb714f 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/ArcSettingsGeneratePasswordSamples.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/ArcSettingsGeneratePasswordSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.generated; @@ -9,9 +9,7 @@ */ public final class ArcSettingsGeneratePasswordSamples { /* - * x-ms-original-file: - * specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/StackHCI/stable/2024-04-01/examples/ - * GeneratePassword.json + * x-ms-original-file: 2026-02-01/GeneratePassword.json */ /** * Sample code: Generate Password. diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/ArcSettingsGetSamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/ArcSettingsGetSamples.java index 029f83340470..4191e5856d14 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/ArcSettingsGetSamples.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/ArcSettingsGetSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.generated; @@ -9,9 +9,7 @@ */ public final class ArcSettingsGetSamples { /* - * x-ms-original-file: - * specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/StackHCI/stable/2024-04-01/examples/ - * GetArcSetting.json + * x-ms-original-file: 2026-02-01/GetArcSetting.json */ /** * Sample code: Get ArcSetting. diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/ArcSettingsInitializeDisableProcessSamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/ArcSettingsInitializeDisableProcessSamples.java index 332f459b04fe..475f657a3f23 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/ArcSettingsInitializeDisableProcessSamples.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/ArcSettingsInitializeDisableProcessSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.generated; @@ -9,9 +9,7 @@ */ public final class ArcSettingsInitializeDisableProcessSamples { /* - * x-ms-original-file: - * specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/StackHCI/stable/2024-04-01/examples/ - * InitializeDisableProcess.json + * x-ms-original-file: 2026-02-01/InitializeDisableProcess.json */ /** * Sample code: Trigger ARC Disable. diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/ArcSettingsListByClusterSamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/ArcSettingsListByClusterSamples.java index f4ba17db6480..2819a9df2aaa 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/ArcSettingsListByClusterSamples.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/ArcSettingsListByClusterSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.generated; @@ -9,9 +9,7 @@ */ public final class ArcSettingsListByClusterSamples { /* - * x-ms-original-file: - * specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/StackHCI/stable/2024-04-01/examples/ - * ListArcSettingsByCluster.json + * x-ms-original-file: 2026-02-01/ListArcSettingsByCluster.json */ /** * Sample code: List ArcSetting resources by HCI Cluster. diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/ArcSettingsReconcileSamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/ArcSettingsReconcileSamples.java new file mode 100644 index 000000000000..20096424c1dd --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/ArcSettingsReconcileSamples.java @@ -0,0 +1,32 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.azurestackhci.generated; + +import com.azure.resourcemanager.azurestackhci.models.ReconcileArcSettingsRequest; +import com.azure.resourcemanager.azurestackhci.models.ReconcileArcSettingsRequestProperties; +import java.util.Arrays; + +/** + * Samples for ArcSettings Reconcile. + */ +public final class ArcSettingsReconcileSamples { + /* + * x-ms-original-file: 2026-02-01/reconcileArcSettings.json + */ + /** + * Sample code: Reconcile Arc Settings. + * + * @param manager Entry point to AzureStackHciManager. + */ + public static void reconcileArcSettings(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { + manager.arcSettings() + .reconcile("test-rg", "myCluster", "default", + new ReconcileArcSettingsRequest() + .withProperties(new ReconcileArcSettingsRequestProperties().withClusterNodes(Arrays.asList( + "/subscriptions/sub1/resourceGroup/res1/providers/Microsoft.HybridCompute/machines/m1", + "/subscriptions/sub1/resourceGroup/res1/providers/Microsoft.HybridCompute/machines/m2"))), + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/ArcSettingsUpdateSamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/ArcSettingsUpdateSamples.java index 380a93c2f1f1..3a5186025b8a 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/ArcSettingsUpdateSamples.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/ArcSettingsUpdateSamples.java @@ -1,37 +1,35 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.generated; -import com.azure.core.management.serializer.SerializerFactory; -import com.azure.core.util.serializer.SerializerEncoding; +import com.azure.resourcemanager.azurestackhci.models.ArcConnectivityProperties; import com.azure.resourcemanager.azurestackhci.models.ArcSetting; -import java.io.IOException; +import com.azure.resourcemanager.azurestackhci.models.ServiceConfiguration; +import com.azure.resourcemanager.azurestackhci.models.ServiceName; +import java.util.Arrays; /** * Samples for ArcSettings Update. */ public final class ArcSettingsUpdateSamples { /* - * x-ms-original-file: - * specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/StackHCI/stable/2024-04-01/examples/ - * PatchArcSetting.json + * x-ms-original-file: 2026-02-01/PatchArcSetting.json */ /** * Sample code: Patch ArcSetting. * * @param manager Entry point to AzureStackHciManager. */ - public static void patchArcSetting(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) - throws IOException { + public static void patchArcSetting(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { ArcSetting resource = manager.arcSettings() .getWithResponse("test-rg", "myCluster", "default", com.azure.core.util.Context.NONE) .getValue(); resource.update() - .withConnectivityProperties(SerializerFactory.createDefaultManagementSerializerAdapter() - .deserialize("{\"enabled\":true,\"serviceConfigurations\":[{\"port\":6516,\"serviceName\":\"WAC\"}]}", - Object.class, SerializerEncoding.JSON)) + .withConnectivityProperties(new ArcConnectivityProperties().withEnabled(true) + .withServiceConfigurations( + Arrays.asList(new ServiceConfiguration().withServiceName(ServiceName.WAC).withPort(6516L)))) .apply(); } } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/ClustersConfigureRemoteSupportSamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/ClustersConfigureRemoteSupportSamples.java index 0358899aee9b..19eeedde2123 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/ClustersConfigureRemoteSupportSamples.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/ClustersConfigureRemoteSupportSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.generated; @@ -14,9 +14,7 @@ */ public final class ClustersConfigureRemoteSupportSamples { /* - * x-ms-original-file: - * specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/StackHCI/stable/2024-04-01/examples/ - * ConfigureRemoteSupport.json + * x-ms-original-file: 2026-02-01/ConfigureRemoteSupport.json */ /** * Sample code: Configure Remote Support. diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/ClustersCreateIdentitySamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/ClustersCreateIdentitySamples.java index bcdeaa47aeda..8aabf3f66e37 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/ClustersCreateIdentitySamples.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/ClustersCreateIdentitySamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.generated; @@ -9,9 +9,7 @@ */ public final class ClustersCreateIdentitySamples { /* - * x-ms-original-file: - * specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/StackHCI/stable/2024-04-01/examples/ - * CreateClusterIdentity.json + * x-ms-original-file: 2026-02-01/CreateClusterIdentity.json */ /** * Sample code: Create cluster Identity. diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/ClustersCreateSamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/ClustersCreateSamples.java index 4c2104fefec8..402b551416d6 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/ClustersCreateSamples.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/ClustersCreateSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.generated; @@ -11,9 +11,7 @@ */ public final class ClustersCreateSamples { /* - * x-ms-original-file: - * specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/StackHCI/stable/2024-04-01/examples/ - * CreateCluster.json + * x-ms-original-file: 2026-02-01/CreateCluster.json */ /** * Sample code: Create cluster. @@ -25,10 +23,10 @@ public static void createCluster(com.azure.resourcemanager.azurestackhci.AzureSt .define("myCluster") .withRegion("East US") .withExistingResourceGroup("test-rg") - .withTypeIdentityType(ManagedServiceIdentityType.SYSTEM_ASSIGNED) .withCloudManagementEndpoint("https://98294836-31be-4668-aeae-698667faf99b.waconazure.com") .withAadClientId("24a6e53d-04e5-44d2-b7cc-1b732a847dfc") .withAadTenantId("7e589cc1-a8b6-4dff-91bd-5ec0fa18db94") + .withTypeIdentityType(ManagedServiceIdentityType.SYSTEM_ASSIGNED) .create(); } } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/ClustersDeleteSamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/ClustersDeleteSamples.java index f21c897c3d3d..1bec12932c60 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/ClustersDeleteSamples.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/ClustersDeleteSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.generated; @@ -9,9 +9,7 @@ */ public final class ClustersDeleteSamples { /* - * x-ms-original-file: - * specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/StackHCI/stable/2024-04-01/examples/ - * DeleteCluster.json + * x-ms-original-file: 2026-02-01/DeleteCluster.json */ /** * Sample code: Delete cluster. diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/ClustersExtendSoftwareAssuranceBenefitSamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/ClustersExtendSoftwareAssuranceBenefitSamples.java index b10f298dd248..6acc487a20ce 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/ClustersExtendSoftwareAssuranceBenefitSamples.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/ClustersExtendSoftwareAssuranceBenefitSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.generated; @@ -13,9 +13,7 @@ */ public final class ClustersExtendSoftwareAssuranceBenefitSamples { /* - * x-ms-original-file: - * specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/StackHCI/stable/2024-04-01/examples/ - * ExtendSoftwareAssuranceBenefit.json + * x-ms-original-file: 2026-02-01/ExtendSoftwareAssuranceBenefit.json */ /** * Sample code: Create cluster Identity. diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/ClustersGetByResourceGroupSamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/ClustersGetByResourceGroupSamples.java index c881309e4b06..cfa9c70d1e5e 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/ClustersGetByResourceGroupSamples.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/ClustersGetByResourceGroupSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.generated; @@ -9,9 +9,7 @@ */ public final class ClustersGetByResourceGroupSamples { /* - * x-ms-original-file: - * specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/StackHCI/stable/2024-04-01/examples/ - * GetCluster.json + * x-ms-original-file: 2026-02-01/GetCluster.json */ /** * Sample code: Get cluster. diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/ClustersListByResourceGroupSamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/ClustersListByResourceGroupSamples.java index d963e11228d4..58b20ed7d9e6 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/ClustersListByResourceGroupSamples.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/ClustersListByResourceGroupSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.generated; @@ -9,9 +9,7 @@ */ public final class ClustersListByResourceGroupSamples { /* - * x-ms-original-file: - * specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/StackHCI/stable/2024-04-01/examples/ - * ListClustersByResourceGroup.json + * x-ms-original-file: 2026-02-01/ListClustersByResourceGroup.json */ /** * Sample code: List clusters in a given resource group. diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/ClustersListSamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/ClustersListSamples.java index cc5873016893..161010284c52 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/ClustersListSamples.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/ClustersListSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.generated; @@ -9,9 +9,7 @@ */ public final class ClustersListSamples { /* - * x-ms-original-file: - * specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/StackHCI/stable/2024-04-01/examples/ - * ListClustersBySubscription.json + * x-ms-original-file: 2026-02-01/ListClustersBySubscription.json */ /** * Sample code: List clusters in a given subscription. diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/ClustersTriggerLogCollectionSamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/ClustersTriggerLogCollectionSamples.java index ec8047429825..78449985b2fe 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/ClustersTriggerLogCollectionSamples.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/ClustersTriggerLogCollectionSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.generated; @@ -13,9 +13,7 @@ */ public final class ClustersTriggerLogCollectionSamples { /* - * x-ms-original-file: - * specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/StackHCI/stable/2024-04-01/examples/ - * TriggerLogCollection.json + * x-ms-original-file: 2026-02-01/TriggerLogCollection.json */ /** * Sample code: Trigger Log Collection. diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/ClustersUpdateSamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/ClustersUpdateSamples.java index 80c9c6d1812c..05c109252fd9 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/ClustersUpdateSamples.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/ClustersUpdateSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.generated; @@ -17,9 +17,7 @@ */ public final class ClustersUpdateSamples { /* - * x-ms-original-file: - * specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/StackHCI/stable/2024-04-01/examples/ - * UpdateCluster.json + * x-ms-original-file: 2026-02-01/UpdateCluster.json */ /** * Sample code: Update cluster. diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/ClustersUpdateSecretsLocationsSamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/ClustersUpdateSecretsLocationsSamples.java new file mode 100644 index 000000000000..ba4ffdf2b4d1 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/ClustersUpdateSecretsLocationsSamples.java @@ -0,0 +1,33 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.azurestackhci.generated; + +import com.azure.resourcemanager.azurestackhci.models.SecretsLocationDetails; +import com.azure.resourcemanager.azurestackhci.models.SecretsLocationsChangeRequest; +import com.azure.resourcemanager.azurestackhci.models.SecretsType; +import java.util.Arrays; + +/** + * Samples for Clusters UpdateSecretsLocations. + */ +public final class ClustersUpdateSecretsLocationsSamples { + /* + * x-ms-original-file: 2026-02-01/Clusters_UpdateSecretsLocations.json + */ + /** + * Sample code: Update secrets locations for a Cluster. + * + * @param manager Entry point to AzureStackHciManager. + */ + public static void + updateSecretsLocationsForACluster(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { + manager.clusters() + .updateSecretsLocations("test-rg", "myCluster", + new SecretsLocationsChangeRequest().withProperties( + Arrays.asList(new SecretsLocationDetails().withSecretsType(SecretsType.BACKUP_SECRETS) + .withSecretsLocation("fakeTokenPlaceholder"))), + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/ClustersUploadCertificateSamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/ClustersUploadCertificateSamples.java index c2b5c71eed12..96728933764c 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/ClustersUploadCertificateSamples.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/ClustersUploadCertificateSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.generated; @@ -13,9 +13,7 @@ */ public final class ClustersUploadCertificateSamples { /* - * x-ms-original-file: - * specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/StackHCI/stable/2024-04-01/examples/ - * UploadCertificate.json + * x-ms-original-file: 2026-02-01/UploadCertificate.json */ /** * Sample code: Upload certificate. diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/DeploymentSettingsCreateOrUpdateSamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/DeploymentSettingsCreateOrUpdateSamples.java index 398fd1274543..e412c63e7fc9 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/DeploymentSettingsCreateOrUpdateSamples.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/DeploymentSettingsCreateOrUpdateSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.generated; @@ -15,8 +15,11 @@ import com.azure.resourcemanager.azurestackhci.models.DeploymentSettingStorageAdapterIpInfo; import com.azure.resourcemanager.azurestackhci.models.DeploymentSettingStorageNetworks; import com.azure.resourcemanager.azurestackhci.models.DeploymentSettingVirtualSwitchConfigurationOverrides; +import com.azure.resourcemanager.azurestackhci.models.DnsServerConfig; +import com.azure.resourcemanager.azurestackhci.models.DnsZones; import com.azure.resourcemanager.azurestackhci.models.EceDeploymentSecrets; import com.azure.resourcemanager.azurestackhci.models.EceSecrets; +import com.azure.resourcemanager.azurestackhci.models.IdentityProvider; import com.azure.resourcemanager.azurestackhci.models.InfrastructureNetwork; import com.azure.resourcemanager.azurestackhci.models.IpPools; import com.azure.resourcemanager.azurestackhci.models.NetworkController; @@ -40,9 +43,120 @@ */ public final class DeploymentSettingsCreateOrUpdateSamples { /* - * x-ms-original-file: - * specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/StackHCI/stable/2024-04-01/examples/ - * PutDeploymentSettings.json + * x-ms-original-file: 2026-02-01/PutDeploymentSettingsWithADLess.json + */ + /** + * Sample code: Create Deployment Settings Without Active Directory Integration. + * + * @param manager Entry point to AzureStackHciManager. + */ + public static void createDeploymentSettingsWithoutActiveDirectoryIntegration( + com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { + manager.deploymentSettings() + .define("default") + .withExistingCluster("test-rg", "myCluster") + .withArcNodeResourceIds(Arrays.asList( + "/subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/ArcInstance-rg/providers/Microsoft.HybridCompute/machines/Node-1", + "/subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/ArcInstance-rg/providers/Microsoft.HybridCompute/machines/Node-2")) + .withDeploymentMode(DeploymentMode.DEPLOY) + .withOperationType(OperationType.CLUSTER_PROVISIONING) + .withDeploymentConfiguration( + new DeploymentConfiguration().withVersion("string") + .withScaleUnits(Arrays.asList(new ScaleUnits() + .withDeploymentData(new DeploymentData() + .withSecuritySettings(new DeploymentSecuritySettings().withHvciProtection(true) + .withDrtmProtection(true) + .withDriftControlEnforced(true) + .withCredentialGuardEnforced(false) + .withSmbSigningEnforced(true) + .withSmbClusterEncryption(false) + .withSideChannelMitigationEnforced(true) + .withBitlockerBootVolume(true) + .withBitlockerDataVolumes(true) + .withWdacEnforced(true)) + .withObservability(new Observability().withStreamingDataClient(true) + .withEuLocation(false) + .withEpisodicDataUpload(true)) + .withCluster(new DeploymentCluster().withName("testHCICluster") + .withWitnessType("Cloud") + .withWitnessPath("Cloud") + .withCloudAccountName("myasestoragacct") + .withAzureServiceEndpoint("core.windows.net")) + .withIdentityProvider(IdentityProvider.LOCAL_IDENTITY) + .withStorage(new Storage().withConfigurationMode("Express")) + .withNamingPrefix("ms169") + .withDomainFqdn("ASZ1PLab8.nttest.microsoft.com") + .withInfrastructureNetwork(Arrays.asList(new InfrastructureNetwork() + .withSubnetMask("255.255.248.0") + .withGateway("255.255.248.0") + .withIpPools(Arrays.asList( + new IpPools().withStartingAddress("10.57.48.60").withEndingAddress("10.57.48.66"))) + .withDnsZones(Arrays.asList(new DnsZones().withDnsZoneName("contoso.com") + .withDnsForwarder(Arrays.asList("192.168.1.1")))))) + .withPhysicalNodes(Arrays.asList( + new PhysicalNodes().withName("ms169host").withIpv4Address("10.57.51.224"), + new PhysicalNodes().withName("ms154host").withIpv4Address("10.57.53.236"))) + .withHostNetwork(new DeploymentSettingHostNetwork() + .withIntents(Arrays.asList(new DeploymentSettingIntents().withName("Compute_Management") + .withTrafficType(Arrays.asList("Compute", "Management")) + .withAdapter(Arrays.asList("Port2")) + .withOverrideVirtualSwitchConfiguration(false) + .withVirtualSwitchConfigurationOverrides( + new DeploymentSettingVirtualSwitchConfigurationOverrides().withEnableIov("True") + .withLoadBalancingAlgorithm("HyperVPort")) + .withOverrideQosPolicy(false) + .withQosPolicyOverrides( + new QosPolicyOverrides().withPriorityValue8021ActionCluster("7") + .withPriorityValue8021ActionSmb("3") + .withBandwidthPercentageSmb("50")) + .withOverrideAdapterProperty(false) + .withAdapterPropertyOverrides( + new DeploymentSettingAdapterPropertyOverrides().withJumboPacket("1514") + .withNetworkDirect("Enabled") + .withNetworkDirectTechnology("iWARP")))) + .withStorageNetworks( + Arrays.asList(new DeploymentSettingStorageNetworks().withName("Storage1Network") + .withNetworkAdapterName("Port3") + .withVlanId("5") + .withStorageAdapterIpInfo(Arrays.asList( + new DeploymentSettingStorageAdapterIpInfo().withPhysicalNode("string") + .withIpv4Address("10.57.48.60") + .withSubnetMask("255.255.248.0"))))) + .withStorageConnectivitySwitchless(true) + .withEnableStorageAutoIp(false)) + .withSdnIntegration(new SdnIntegration().withNetworkController( + new NetworkController().withMacAddressPoolStart("00-0D-3A-1B-C7-21") + .withMacAddressPoolStop("00-0D-3A-1B-C7-29") + .withNetworkVirtualizationEnabled(true))) + .withAdouPath("OU=ms169,DC=ASZ1PLab8,DC=nttest,DC=microsoft,DC=com") + .withSecretsLocation("fakeTokenPlaceholder") + .withSecrets(Arrays.asList( + new EceDeploymentSecrets().withSecretName("fakeTokenPlaceholder") + .withEceSecretName(EceSecrets.fromString("BMCAdminUserCred")) + .withSecretLocation("fakeTokenPlaceholder"), + new EceDeploymentSecrets().withSecretName("fakeTokenPlaceholder") + .withEceSecretName(EceSecrets.AZURE_STACK_LCMUSER_CREDENTIAL) + .withSecretLocation("fakeTokenPlaceholder"))) + .withOptionalServices(new OptionalServices().withCustomLocation("customLocationName"))) + .withSbePartnerInfo(new SbePartnerInfo() + .withSbeDeploymentInfo(new SbeDeploymentInfo().withVersion("4.0.2309.13") + .withFamily("Gen5") + .withPublisher("Contoso") + .withSbeManifestSource("default") + .withSbeManifestCreationDate(OffsetDateTime.parse("2023-07-25T02:40:33Z"))) + .withPartnerProperties( + Arrays.asList(new SbePartnerProperties().withName("EnableBMCIpV6").withValue("false"), + new SbePartnerProperties().withName("PhoneHomePort").withValue("1653"), + new SbePartnerProperties().withName("BMCSecurityState").withValue("HighSecurity"))) + .withCredentialList( + Arrays.asList(new SbeCredentials().withSecretName("fakeTokenPlaceholder") + .withEceSecretName("fakeTokenPlaceholder") + .withSecretLocation("fakeTokenPlaceholder"))))))) + .create(); + } + + /* + * x-ms-original-file: 2026-02-01/PutDeploymentSettings.json */ /** * Sample code: Create Deployment Settings. @@ -88,6 +202,7 @@ public static void createDeploymentSettings(com.azure.resourcemanager.azurestack .withGateway("255.255.248.0") .withIpPools(Arrays.asList( new IpPools().withStartingAddress("10.57.48.60").withEndingAddress("10.57.48.66"))) + .withDnsServerConfig(DnsServerConfig.USE_DNS_SERVER) .withDnsServers(Arrays.asList("10.57.50.90")))) .withPhysicalNodes(Arrays.asList( new PhysicalNodes().withName("ms169host").withIpv4Address("10.57.51.224"), @@ -124,6 +239,7 @@ public static void createDeploymentSettings(com.azure.resourcemanager.azurestack new NetworkController().withMacAddressPoolStart("00-0D-3A-1B-C7-21") .withMacAddressPoolStop("00-0D-3A-1B-C7-29") .withNetworkVirtualizationEnabled(true))) + .withIsManagementCluster(true) .withAdouPath("OU=ms169,DC=ASZ1PLab8,DC=nttest,DC=microsoft,DC=com") .withSecretsLocation("fakeTokenPlaceholder") .withSecrets(Arrays.asList( diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/DeploymentSettingsDeleteSamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/DeploymentSettingsDeleteSamples.java index 7ef8924f3ff2..941ffa351ce4 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/DeploymentSettingsDeleteSamples.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/DeploymentSettingsDeleteSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.generated; @@ -9,9 +9,7 @@ */ public final class DeploymentSettingsDeleteSamples { /* - * x-ms-original-file: - * specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/StackHCI/stable/2024-04-01/examples/ - * DeleteDeploymentSettings.json + * x-ms-original-file: 2026-02-01/DeleteDeploymentSettings.json */ /** * Sample code: Delete Deployment Settings. diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/DeploymentSettingsGetSamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/DeploymentSettingsGetSamples.java index 3483f165bd45..9a33c7b25a7b 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/DeploymentSettingsGetSamples.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/DeploymentSettingsGetSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.generated; @@ -9,9 +9,7 @@ */ public final class DeploymentSettingsGetSamples { /* - * x-ms-original-file: - * specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/StackHCI/stable/2024-04-01/examples/ - * GetDeploymentSettings.json + * x-ms-original-file: 2026-02-01/GetDeploymentSettings.json */ /** * Sample code: Get Deployment Settings. diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/DeploymentSettingsListByClustersSamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/DeploymentSettingsListByClustersSamples.java index 9a89ace98805..2fd3fc47d3d5 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/DeploymentSettingsListByClustersSamples.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/DeploymentSettingsListByClustersSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.generated; @@ -9,9 +9,7 @@ */ public final class DeploymentSettingsListByClustersSamples { /* - * x-ms-original-file: - * specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/StackHCI/stable/2024-04-01/examples/ - * ListDeploymentSettingsByCluster.json + * x-ms-original-file: 2026-02-01/ListDeploymentSettingsByCluster.json */ /** * Sample code: List Deployment Settings. diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/EdgeDeviceJobsCreateOrUpdateSamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/EdgeDeviceJobsCreateOrUpdateSamples.java new file mode 100644 index 000000000000..6900a4c65405 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/EdgeDeviceJobsCreateOrUpdateSamples.java @@ -0,0 +1,58 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.azurestackhci.generated; + +import com.azure.resourcemanager.azurestackhci.models.HciCollectLogJobProperties; +import com.azure.resourcemanager.azurestackhci.models.HciEdgeDeviceJob; +import com.azure.resourcemanager.azurestackhci.models.HciRemoteSupportJobProperties; +import com.azure.resourcemanager.azurestackhci.models.RemoteSupportAccessLevel; +import com.azure.resourcemanager.azurestackhci.models.RemoteSupportType; +import java.time.OffsetDateTime; + +/** + * Samples for EdgeDeviceJobs CreateOrUpdate. + */ +public final class EdgeDeviceJobsCreateOrUpdateSamples { + /* + * x-ms-original-file: 2026-02-01/EdgeDeviceJobs_CreateOrUpdate_RemoteSupport.json + */ + /** + * Sample code: EdgeDeviceJobs_CreateOrUpdate_RemoteSupport. + * + * @param manager Entry point to AzureStackHciManager. + */ + public static void edgeDeviceJobsCreateOrUpdateRemoteSupport( + com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { + manager.edgeDeviceJobs() + .createOrUpdate( + "subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/ArcInstance-rg/providers/Microsoft.HybridCompute/machines/Node-1", + "default", "collectLog", + new HciEdgeDeviceJob().withProperties( + new HciRemoteSupportJobProperties().withAccessLevel(RemoteSupportAccessLevel.DIAGNOSTICS) + .withExpirationTimestamp(OffsetDateTime.parse("2024-01-29T10:43:27.9471574Z")) + .withType(RemoteSupportType.ENABLE)), + com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: 2026-02-01/EdgeDeviceJobs_CreateOrUpdate_CollectLog.json + */ + /** + * Sample code: EdgeDeviceJobs_CreateOrUpdate_CollectLog. + * + * @param manager Entry point to AzureStackHciManager. + */ + public static void + edgeDeviceJobsCreateOrUpdateCollectLog(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { + manager.edgeDeviceJobs() + .createOrUpdate( + "subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/ArcInstance-rg/providers/Microsoft.HybridCompute/machines/Node-1", + "default", "collectLog", + new HciEdgeDeviceJob().withProperties( + new HciCollectLogJobProperties().withFromDate(OffsetDateTime.parse("2024-01-29T10:43:27.9471574Z")) + .withToDate(OffsetDateTime.parse("2024-01-29T10:43:27.9471574Z"))), + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/EdgeDeviceJobsDeleteSamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/EdgeDeviceJobsDeleteSamples.java new file mode 100644 index 000000000000..e2a5f2660266 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/EdgeDeviceJobsDeleteSamples.java @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.azurestackhci.generated; + +/** + * Samples for EdgeDeviceJobs Delete. + */ +public final class EdgeDeviceJobsDeleteSamples { + /* + * x-ms-original-file: 2026-02-01/EdgeDeviceJobs_Delete.json + */ + /** + * Sample code: EdgeDeviceJobs_Delete. + * + * @param manager Entry point to AzureStackHciManager. + */ + public static void edgeDeviceJobsDelete(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { + manager.edgeDeviceJobs() + .delete( + "subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/ArcInstance-rg/providers/Microsoft.HybridCompute/machines/Node-1", + "lAq", "Ihlm3R-bZ4vTC4ABA456", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/EdgeDeviceJobsGetSamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/EdgeDeviceJobsGetSamples.java new file mode 100644 index 000000000000..3547150a31fd --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/EdgeDeviceJobsGetSamples.java @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.azurestackhci.generated; + +/** + * Samples for EdgeDeviceJobs Get. + */ +public final class EdgeDeviceJobsGetSamples { + /* + * x-ms-original-file: 2026-02-01/EdgeDeviceJobs_Get_RemoteSupport.json + */ + /** + * Sample code: EdgeDeviceJobs_Get_RemoteSupport. + * + * @param manager Entry point to AzureStackHciManager. + */ + public static void + edgeDeviceJobsGetRemoteSupport(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { + manager.edgeDeviceJobs() + .getWithResponse( + "subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/ArcInstance-rg/providers/Microsoft.HybridCompute/machines/Node-1", + "-5M1G7G10OZ-o5b-HS3-c72", "-oUxs", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/EdgeDeviceJobsListByEdgeDeviceSamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/EdgeDeviceJobsListByEdgeDeviceSamples.java new file mode 100644 index 000000000000..f8e0d1a74414 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/EdgeDeviceJobsListByEdgeDeviceSamples.java @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.azurestackhci.generated; + +/** + * Samples for EdgeDeviceJobs ListByEdgeDevice. + */ +public final class EdgeDeviceJobsListByEdgeDeviceSamples { + /* + * x-ms-original-file: 2026-02-01/EdgeDeviceJobs_ListByEdgeDevice.json + */ + /** + * Sample code: EdgeDeviceJobs_ListByEdgeDevice. + * + * @param manager Entry point to AzureStackHciManager. + */ + public static void + edgeDeviceJobsListByEdgeDevice(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { + manager.edgeDeviceJobs() + .listByEdgeDevice( + "subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/ArcInstance-rg/providers/Microsoft.HybridCompute/machines/Node-1", + "YE-855IEIN585-", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/EdgeDevicesCreateOrUpdateSamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/EdgeDevicesCreateOrUpdateSamples.java index 241fea74699b..2c38459ca8fb 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/EdgeDevicesCreateOrUpdateSamples.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/EdgeDevicesCreateOrUpdateSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.generated; @@ -15,9 +15,7 @@ */ public final class EdgeDevicesCreateOrUpdateSamples { /* - * x-ms-original-file: - * specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/StackHCI/stable/2024-04-01/examples/ - * CreateHciEdgeDevice.json + * x-ms-original-file: 2026-02-01/CreateHciEdgeDevice.json */ /** * Sample code: Create HCI Edge Device. diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/EdgeDevicesDeleteSamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/EdgeDevicesDeleteSamples.java index f1abc8460fc2..9f6d819f1494 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/EdgeDevicesDeleteSamples.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/EdgeDevicesDeleteSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.generated; @@ -9,9 +9,7 @@ */ public final class EdgeDevicesDeleteSamples { /* - * x-ms-original-file: - * specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/StackHCI/stable/2024-04-01/examples/ - * DeleteEdgeDevices.json + * x-ms-original-file: 2026-02-01/DeleteEdgeDevices.json */ /** * Sample code: Delete Edge Devices. diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/EdgeDevicesGetSamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/EdgeDevicesGetSamples.java index 5a65f638b641..9859112ea8de 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/EdgeDevicesGetSamples.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/EdgeDevicesGetSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.generated; @@ -9,9 +9,7 @@ */ public final class EdgeDevicesGetSamples { /* - * x-ms-original-file: - * specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/StackHCI/stable/2024-04-01/examples/ - * GetEdgeDevices.json + * x-ms-original-file: 2026-02-01/GetEdgeDevices.json */ /** * Sample code: Get Edge Device. diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/EdgeDevicesListSamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/EdgeDevicesListSamples.java index 15286729e118..56a8bd747d32 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/EdgeDevicesListSamples.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/EdgeDevicesListSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.generated; @@ -9,9 +9,7 @@ */ public final class EdgeDevicesListSamples { /* - * x-ms-original-file: - * specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/StackHCI/stable/2024-04-01/examples/ - * ListEdgeDevices.json + * x-ms-original-file: 2026-02-01/ListEdgeDevices.json */ /** * Sample code: List Edge Devices. diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/EdgeDevicesValidateSamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/EdgeDevicesValidateSamples.java index 11997ce1c5e8..16ee5b44b455 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/EdgeDevicesValidateSamples.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/EdgeDevicesValidateSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.generated; @@ -12,9 +12,7 @@ */ public final class EdgeDevicesValidateSamples { /* - * x-ms-original-file: - * specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/StackHCI/stable/2024-04-01/examples/ - * ValidateEdgeDevices.json + * x-ms-original-file: 2026-02-01/ValidateEdgeDevices.json */ /** * Sample code: Validate Edge Devices. diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/ExtensionsCreateSamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/ExtensionsCreateSamples.java index 6ab09cf4ceaf..a10249778a33 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/ExtensionsCreateSamples.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/ExtensionsCreateSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.generated; @@ -13,9 +13,7 @@ */ public final class ExtensionsCreateSamples { /* - * x-ms-original-file: - * specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/StackHCI/stable/2024-04-01/examples/ - * PutExtension.json + * x-ms-original-file: 2026-02-01/PutExtension.json */ /** * Sample code: Create Arc Extension. diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/ExtensionsDeleteSamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/ExtensionsDeleteSamples.java index e98ced62c35a..1e4541b913ce 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/ExtensionsDeleteSamples.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/ExtensionsDeleteSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.generated; @@ -9,9 +9,7 @@ */ public final class ExtensionsDeleteSamples { /* - * x-ms-original-file: - * specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/StackHCI/stable/2024-04-01/examples/ - * DeleteExtension.json + * x-ms-original-file: 2026-02-01/DeleteExtension.json */ /** * Sample code: Delete Arc Extension. diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/ExtensionsGetSamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/ExtensionsGetSamples.java index 7361a356a82c..1446002d4074 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/ExtensionsGetSamples.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/ExtensionsGetSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.generated; @@ -9,9 +9,7 @@ */ public final class ExtensionsGetSamples { /* - * x-ms-original-file: - * specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/StackHCI/stable/2024-04-01/examples/ - * GetExtension.json + * x-ms-original-file: 2026-02-01/GetExtension.json */ /** * Sample code: Get ArcSettings Extension. diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/ExtensionsListByArcSettingSamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/ExtensionsListByArcSettingSamples.java index b49dc1ec0cab..91efcf70b38d 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/ExtensionsListByArcSettingSamples.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/ExtensionsListByArcSettingSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.generated; @@ -9,9 +9,7 @@ */ public final class ExtensionsListByArcSettingSamples { /* - * x-ms-original-file: - * specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/StackHCI/stable/2024-04-01/examples/ - * ListExtensionsByArcSetting.json + * x-ms-original-file: 2026-02-01/ListExtensionsByArcSetting.json */ /** * Sample code: List Extensions under ArcSetting resource. diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/ExtensionsUpdateSamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/ExtensionsUpdateSamples.java index b08dd5961256..0693594ccc93 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/ExtensionsUpdateSamples.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/ExtensionsUpdateSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.generated; @@ -15,9 +15,7 @@ */ public final class ExtensionsUpdateSamples { /* - * x-ms-original-file: - * specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/StackHCI/stable/2024-04-01/examples/ - * PatchExtension.json + * x-ms-original-file: 2026-02-01/PatchExtension.json */ /** * Sample code: Update Arc Extension. diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/ExtensionsUpgradeSamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/ExtensionsUpgradeSamples.java index fcac1c97189d..cc7b130ca743 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/ExtensionsUpgradeSamples.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/ExtensionsUpgradeSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.generated; @@ -11,9 +11,7 @@ */ public final class ExtensionsUpgradeSamples { /* - * x-ms-original-file: - * specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/StackHCI/stable/2024-04-01/examples/ - * Extensions_Upgrade.json + * x-ms-original-file: 2026-02-01/Extensions_Upgrade.json */ /** * Sample code: Upgrade Machine Extensions. diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/OffersGetSamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/OffersGetSamples.java index 0fd9d6a2eab8..631c78228ffa 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/OffersGetSamples.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/OffersGetSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.generated; @@ -9,9 +9,7 @@ */ public final class OffersGetSamples { /* - * x-ms-original-file: - * specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/StackHCI/stable/2024-04-01/examples/GetOffer - * .json + * x-ms-original-file: 2026-02-01/GetOffer.json */ /** * Sample code: Get Offer. diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/OffersListByClusterSamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/OffersListByClusterSamples.java index dc4034c9588f..a6718e625c7b 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/OffersListByClusterSamples.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/OffersListByClusterSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.generated; @@ -9,9 +9,7 @@ */ public final class OffersListByClusterSamples { /* - * x-ms-original-file: - * specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/StackHCI/stable/2024-04-01/examples/ - * ListOffersByCluster.json + * x-ms-original-file: 2026-02-01/ListOffersByCluster.json */ /** * Sample code: List Offer resources by HCI Cluster. diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/OffersListByPublisherSamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/OffersListByPublisherSamples.java index b08c377e749f..a50fce409756 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/OffersListByPublisherSamples.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/OffersListByPublisherSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.generated; @@ -9,9 +9,7 @@ */ public final class OffersListByPublisherSamples { /* - * x-ms-original-file: - * specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/StackHCI/stable/2024-04-01/examples/ - * ListOffersByPublisher.json + * x-ms-original-file: 2026-02-01/ListOffersByPublisher.json */ /** * Sample code: List Offer resources by publisher for the HCI Cluster. diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/OperationsListSamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/OperationsListSamples.java index ba8fb1697876..a99beddb2138 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/OperationsListSamples.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/OperationsListSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.generated; @@ -9,16 +9,15 @@ */ public final class OperationsListSamples { /* - * x-ms-original-file: - * specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/operations/stable/2024-04-01/examples/ - * ListOperations.json + * x-ms-original-file: 2026-02-01/Operations_List.json */ /** - * Sample code: Create cluster. + * Sample code: List the operations for the provider. * * @param manager Entry point to AzureStackHciManager. */ - public static void createCluster(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { - manager.operations().listWithResponse(com.azure.core.util.Context.NONE); + public static void + listTheOperationsForTheProvider(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { + manager.operations().list(com.azure.core.util.Context.NONE); } } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/PublishersGetSamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/PublishersGetSamples.java deleted file mode 100644 index 306ec2b57114..000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/PublishersGetSamples.java +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.azurestackhci.generated; - -/** - * Samples for Publishers Get. - */ -public final class PublishersGetSamples { - /* - * x-ms-original-file: - * specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/StackHCI/stable/2024-04-01/examples/ - * GetPublisher.json - */ - /** - * Sample code: Get Publisher. - * - * @param manager Entry point to AzureStackHciManager. - */ - public static void getPublisher(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { - manager.publishers().getWithResponse("test-rg", "myCluster", "publisher1", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/PublishersListByClusterSamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/PublishersListByClusterSamples.java deleted file mode 100644 index 27fc038234a4..000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/PublishersListByClusterSamples.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.azurestackhci.generated; - -/** - * Samples for Publishers ListByCluster. - */ -public final class PublishersListByClusterSamples { - /* - * x-ms-original-file: - * specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/StackHCI/stable/2024-04-01/examples/ - * ListPublishersByCluster.json - */ - /** - * Sample code: List Publisher resources by HCI Cluster. - * - * @param manager Entry point to AzureStackHciManager. - */ - public static void - listPublisherResourcesByHCICluster(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { - manager.publishers().listByCluster("test-rg", "myCluster", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/SecuritySettingsCreateOrUpdateSamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/SecuritySettingsCreateOrUpdateSamples.java index 9870224aac9b..8836a50ea698 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/SecuritySettingsCreateOrUpdateSamples.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/SecuritySettingsCreateOrUpdateSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.generated; @@ -11,9 +11,7 @@ */ public final class SecuritySettingsCreateOrUpdateSamples { /* - * x-ms-original-file: - * specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/StackHCI/stable/2024-04-01/examples/ - * PutSecuritySettings.json + * x-ms-original-file: 2026-02-01/PutSecuritySettings.json */ /** * Sample code: Create Security Settings. diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/SecuritySettingsDeleteSamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/SecuritySettingsDeleteSamples.java index 0700c538e989..1364c146aa27 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/SecuritySettingsDeleteSamples.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/SecuritySettingsDeleteSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.generated; @@ -9,9 +9,7 @@ */ public final class SecuritySettingsDeleteSamples { /* - * x-ms-original-file: - * specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/StackHCI/stable/2024-04-01/examples/ - * DeleteSecuritySettings.json + * x-ms-original-file: 2026-02-01/DeleteSecuritySettings.json */ /** * Sample code: Delete Security Settings. diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/SecuritySettingsGetSamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/SecuritySettingsGetSamples.java index c1c85dc9d12a..53d0241c53f2 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/SecuritySettingsGetSamples.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/SecuritySettingsGetSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.generated; @@ -9,9 +9,7 @@ */ public final class SecuritySettingsGetSamples { /* - * x-ms-original-file: - * specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/StackHCI/stable/2024-04-01/examples/ - * GetSecuritySettings.json + * x-ms-original-file: 2026-02-01/GetSecuritySettings.json */ /** * Sample code: Get Security Settings. diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/SecuritySettingsListByClustersSamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/SecuritySettingsListByClustersSamples.java index 1e2ca2f86fbd..90245aef8c44 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/SecuritySettingsListByClustersSamples.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/SecuritySettingsListByClustersSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.generated; @@ -9,9 +9,7 @@ */ public final class SecuritySettingsListByClustersSamples { /* - * x-ms-original-file: - * specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/StackHCI/stable/2024-04-01/examples/ - * ListSecuritySettingsByCluster.json + * x-ms-original-file: 2026-02-01/ListSecuritySettingsByCluster.json */ /** * Sample code: List Security Settings. diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/SkusGetSamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/SkusGetSamples.java index f043e77780e2..2f12e9880dc8 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/SkusGetSamples.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/SkusGetSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.generated; @@ -9,9 +9,7 @@ */ public final class SkusGetSamples { /* - * x-ms-original-file: - * specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/StackHCI/stable/2024-04-01/examples/GetSku. - * json + * x-ms-original-file: 2026-02-01/GetSku.json */ /** * Sample code: Get Sku. diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/SkusListByOfferSamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/SkusListByOfferSamples.java index 2a4381f0b17a..4ef38e597e4e 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/SkusListByOfferSamples.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/SkusListByOfferSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.generated; @@ -9,9 +9,7 @@ */ public final class SkusListByOfferSamples { /* - * x-ms-original-file: - * specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/StackHCI/stable/2024-04-01/examples/ - * ListSkusByOffer.json + * x-ms-original-file: 2026-02-01/ListSkusByOffer.json */ /** * Sample code: List SKU resources by offer for the HCI Cluster. diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/UpdateRunsDeleteSamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/UpdateRunsDeleteSamples.java index 112d468c8567..774e65fa97a2 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/UpdateRunsDeleteSamples.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/UpdateRunsDeleteSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.generated; @@ -9,9 +9,7 @@ */ public final class UpdateRunsDeleteSamples { /* - * x-ms-original-file: - * specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/StackHCI/stable/2024-04-01/examples/ - * DeleteUpdateRuns.json + * x-ms-original-file: 2026-02-01/DeleteUpdateRuns.json */ /** * Sample code: Delete an Update. diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/UpdateRunsGetSamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/UpdateRunsGetSamples.java index d6719c2227be..711d344e946a 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/UpdateRunsGetSamples.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/UpdateRunsGetSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.generated; @@ -9,9 +9,7 @@ */ public final class UpdateRunsGetSamples { /* - * x-ms-original-file: - * specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/StackHCI/stable/2024-04-01/examples/ - * GetUpdateRuns.json + * x-ms-original-file: 2026-02-01/GetUpdateRuns.json */ /** * Sample code: Get Update runs under cluster resource. diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/UpdateRunsListSamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/UpdateRunsListSamples.java index 6b51f16e9a6c..d55c5e5ea003 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/UpdateRunsListSamples.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/UpdateRunsListSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.generated; @@ -9,9 +9,7 @@ */ public final class UpdateRunsListSamples { /* - * x-ms-original-file: - * specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/StackHCI/stable/2024-04-01/examples/ - * ListUpdateRuns.json + * x-ms-original-file: 2026-02-01/ListUpdateRuns.json */ /** * Sample code: List Update runs under cluster resource. diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/UpdateRunsPutSamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/UpdateRunsPutSamples.java index a679d1ba1e50..1f713084dd8e 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/UpdateRunsPutSamples.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/UpdateRunsPutSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.generated; @@ -14,9 +14,7 @@ */ public final class UpdateRunsPutSamples { /* - * x-ms-original-file: - * specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/StackHCI/stable/2024-04-01/examples/ - * PutUpdateRuns.json + * x-ms-original-file: 2026-02-01/PutUpdateRuns.json */ /** * Sample code: Get Update runs under cluster resource. diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/UpdateSummariesOperationDeleteSamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/UpdateSummariesOperationDeleteSamples.java index 5005dcc257c1..d41ed3a03244 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/UpdateSummariesOperationDeleteSamples.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/UpdateSummariesOperationDeleteSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.generated; @@ -9,9 +9,7 @@ */ public final class UpdateSummariesOperationDeleteSamples { /* - * x-ms-original-file: - * specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/StackHCI/stable/2024-04-01/examples/ - * DeleteUpdateSummaries.json + * x-ms-original-file: 2026-02-01/DeleteUpdateSummaries.json */ /** * Sample code: Delete an Update. diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/UpdateSummariesOperationGetSamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/UpdateSummariesOperationGetSamples.java index 73d520236136..be5f961fd0de 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/UpdateSummariesOperationGetSamples.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/UpdateSummariesOperationGetSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.generated; @@ -9,9 +9,7 @@ */ public final class UpdateSummariesOperationGetSamples { /* - * x-ms-original-file: - * specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/StackHCI/stable/2024-04-01/examples/ - * GetUpdateSummaries.json + * x-ms-original-file: 2026-02-01/GetUpdateSummaries.json */ /** * Sample code: Get Update summaries under cluster resource. diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/UpdateSummariesOperationListSamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/UpdateSummariesOperationListSamples.java index d83a60452872..58b7c45b42e7 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/UpdateSummariesOperationListSamples.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/UpdateSummariesOperationListSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.generated; @@ -9,9 +9,7 @@ */ public final class UpdateSummariesOperationListSamples { /* - * x-ms-original-file: - * specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/StackHCI/stable/2024-04-01/examples/ - * ListUpdateSummaries.json + * x-ms-original-file: 2026-02-01/ListUpdateSummaries.json */ /** * Sample code: Get Update summaries under cluster resource. diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/UpdateSummariesOperationPutSamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/UpdateSummariesOperationPutSamples.java index 291b837183e4..cb53c655e934 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/UpdateSummariesOperationPutSamples.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/UpdateSummariesOperationPutSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.generated; @@ -13,9 +13,7 @@ */ public final class UpdateSummariesOperationPutSamples { /* - * x-ms-original-file: - * specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/StackHCI/stable/2024-04-01/examples/ - * PutUpdateSummaries.json + * x-ms-original-file: 2026-02-01/PutUpdateSummaries.json */ /** * Sample code: Put Update summaries under cluster resource. diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/UpdatesDeleteSamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/UpdatesDeleteSamples.java index 9138aa5546fa..fe65e8e1b74d 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/UpdatesDeleteSamples.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/UpdatesDeleteSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.generated; @@ -9,9 +9,7 @@ */ public final class UpdatesDeleteSamples { /* - * x-ms-original-file: - * specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/StackHCI/stable/2024-04-01/examples/ - * DeleteUpdates.json + * x-ms-original-file: 2026-02-01/DeleteUpdates.json */ /** * Sample code: Delete an Update. diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/UpdatesGetSamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/UpdatesGetSamples.java index 04a56ba67409..85d3947d221c 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/UpdatesGetSamples.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/UpdatesGetSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.generated; @@ -9,9 +9,7 @@ */ public final class UpdatesGetSamples { /* - * x-ms-original-file: - * specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/StackHCI/stable/2024-04-01/examples/ - * GetUpdates.json + * x-ms-original-file: 2026-02-01/GetUpdates.json */ /** * Sample code: Get a specific update. diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/UpdatesListSamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/UpdatesListSamples.java index d8724f54bbf7..90aaec2b2dac 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/UpdatesListSamples.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/UpdatesListSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.generated; @@ -9,9 +9,7 @@ */ public final class UpdatesListSamples { /* - * x-ms-original-file: - * specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/StackHCI/stable/2024-04-01/examples/ - * ListUpdates.json + * x-ms-original-file: 2026-02-01/ListUpdates.json */ /** * Sample code: List available updates. diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/UpdatesPostSamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/UpdatesPostSamples.java index 586f3f372bb0..b3f2a9b9d1a4 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/UpdatesPostSamples.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/UpdatesPostSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.generated; @@ -9,9 +9,7 @@ */ public final class UpdatesPostSamples { /* - * x-ms-original-file: - * specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/StackHCI/stable/2024-04-01/examples/ - * PostUpdates.json + * x-ms-original-file: 2026-02-01/PostUpdates.json */ /** * Sample code: List available updates. diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/UpdatesPutSamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/UpdatesPutSamples.java index c27f4dc2ba57..38bc667b7c28 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/UpdatesPutSamples.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/UpdatesPutSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.generated; @@ -16,9 +16,7 @@ */ public final class UpdatesPutSamples { /* - * x-ms-original-file: - * specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/StackHCI/stable/2024-04-01/examples/ - * PutUpdates.json + * x-ms-original-file: 2026-02-01/PutUpdates.json */ /** * Sample code: Put a specific update. @@ -37,7 +35,7 @@ public static void putASpecificUpdate(com.azure.resourcemanager.azurestackhci.Az .withVersion("prerequisite version") .withPackageName("update package name"))) .withPackagePath("\\\\SU1FileServer\\SU1_Infrastructure_2\\Updates\\Packages\\Microsoft4.2203.2.32") - .withPackageSizeInMb(18858.0F) + .withPackageSizeInMb(18858.0D) .withDisplayName("AzS Update - 4.2203.2.32") .withVersion("4.2203.2.32") .withPublisher("Microsoft") @@ -45,7 +43,7 @@ public static void putASpecificUpdate(com.azure.resourcemanager.azurestackhci.Az .withAvailabilityType(AvailabilityType.LOCAL) .withPackageType("Infrastructure") .withAdditionalProperties("additional properties") - .withProgressPercentage(0.0F) + .withProgressPercentage(0.0D) .withNotifyMessage("Brief message with instructions for updates of AvailabilityType Notify") .apply(); } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/ValidatedSolutionRecipesGetSamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/ValidatedSolutionRecipesGetSamples.java new file mode 100644 index 000000000000..253036a61e99 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/ValidatedSolutionRecipesGetSamples.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.azurestackhci.generated; + +/** + * Samples for ValidatedSolutionRecipes Get. + */ +public final class ValidatedSolutionRecipesGetSamples { + /* + * x-ms-original-file: 2026-02-01/ValidatedSolutionRecipes_Get.json + */ + /** + * Sample code: ValidatedSolutionRecipes_Get. + * + * @param manager Entry point to AzureStackHciManager. + */ + public static void + validatedSolutionRecipesGet(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { + manager.validatedSolutionRecipes().getWithResponse("westus2", "10.2408.0", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/ValidatedSolutionRecipesListBySubscriptionLocationResourceSamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/ValidatedSolutionRecipesListBySubscriptionLocationResourceSamples.java new file mode 100644 index 000000000000..b7170a10a35f --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/ValidatedSolutionRecipesListBySubscriptionLocationResourceSamples.java @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.azurestackhci.generated; + +/** + * Samples for ValidatedSolutionRecipes ListBySubscriptionLocationResource. + */ +public final class ValidatedSolutionRecipesListBySubscriptionLocationResourceSamples { + /* + * x-ms-original-file: 2026-02-01/ValidatedSolutionRecipes_ListBySubscriptionLocationResource.json + */ + /** + * Sample code: ValidatedSolutionRecipes_ListBySubscriptionLocationResource. + * + * @param manager Entry point to AzureStackHciManager. + */ + public static void validatedSolutionRecipesListBySubscriptionLocationResource( + com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { + manager.validatedSolutionRecipes() + .listBySubscriptionLocationResource("westus2", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ArcConnectivityPropertiesTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ArcConnectivityPropertiesTests.java new file mode 100644 index 000000000000..6731ff8e27a7 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ArcConnectivityPropertiesTests.java @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.azurestackhci.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.azurestackhci.models.ArcConnectivityProperties; +import com.azure.resourcemanager.azurestackhci.models.ServiceConfiguration; +import com.azure.resourcemanager.azurestackhci.models.ServiceName; +import java.util.Arrays; +import org.junit.jupiter.api.Assertions; + +public final class ArcConnectivityPropertiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ArcConnectivityProperties model = BinaryData.fromString( + "{\"enabled\":false,\"serviceConfigurations\":[{\"serviceName\":\"WAC\",\"port\":3740091618502324159},{\"serviceName\":\"WAC\",\"port\":4533506116683097889}]}") + .toObject(ArcConnectivityProperties.class); + Assertions.assertFalse(model.enabled()); + Assertions.assertEquals(ServiceName.WAC, model.serviceConfigurations().get(0).serviceName()); + Assertions.assertEquals(3740091618502324159L, model.serviceConfigurations().get(0).port()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + ArcConnectivityProperties model = new ArcConnectivityProperties().withEnabled(false) + .withServiceConfigurations(Arrays.asList( + new ServiceConfiguration().withServiceName(ServiceName.WAC).withPort(3740091618502324159L), + new ServiceConfiguration().withServiceName(ServiceName.WAC).withPort(4533506116683097889L))); + model = BinaryData.fromObject(model).toObject(ArcConnectivityProperties.class); + Assertions.assertFalse(model.enabled()); + Assertions.assertEquals(ServiceName.WAC, model.serviceConfigurations().get(0).serviceName()); + Assertions.assertEquals(3740091618502324159L, model.serviceConfigurations().get(0).port()); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ArcIdentityResponseInnerTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ArcIdentityResponseInnerTests.java index e674b3e3168d..553bb1b20157 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ArcIdentityResponseInnerTests.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ArcIdentityResponseInnerTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.generated; @@ -11,13 +11,7 @@ public final class ArcIdentityResponseInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ArcIdentityResponseInner model = BinaryData.fromString( - "{\"properties\":{\"arcApplicationClientId\":\"fouflmmnkzsmo\",\"arcApplicationTenantId\":\"glougpbk\",\"arcServicePrincipalObjectId\":\"mutduqktaps\",\"arcApplicationObjectId\":\"gcue\"}}") + "{\"properties\":{\"arcApplicationClientId\":\"bzqqedqytbciq\",\"arcApplicationTenantId\":\"uflmm\",\"arcServicePrincipalObjectId\":\"zsm\",\"arcApplicationObjectId\":\"mglougpbkw\"}}") .toObject(ArcIdentityResponseInner.class); } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ArcIdentityResponseInner model = new ArcIdentityResponseInner(); - model = BinaryData.fromObject(model).toObject(ArcIdentityResponseInner.class); - } } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ArcIdentityResponsePropertiesTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ArcIdentityResponsePropertiesTests.java index f913d16bf394..59dcdc775fb3 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ArcIdentityResponsePropertiesTests.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ArcIdentityResponsePropertiesTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.generated; @@ -12,25 +12,11 @@ public final class ArcIdentityResponsePropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ArcIdentityResponseProperties model = BinaryData.fromString( - "{\"arcApplicationClientId\":\"umkdosvqwhbmd\",\"arcApplicationTenantId\":\"bjf\",\"arcServicePrincipalObjectId\":\"gmbmbexppbh\",\"arcApplicationObjectId\":\"qrolfpf\"}") + "{\"arcApplicationClientId\":\"utduqktapspwgcu\",\"arcApplicationTenantId\":\"tumkdosvqwhbm\",\"arcServicePrincipalObjectId\":\"bbjfddgmbmbexp\",\"arcApplicationObjectId\":\"htqqrolfp\"}") .toObject(ArcIdentityResponseProperties.class); - Assertions.assertEquals("umkdosvqwhbmd", model.arcApplicationClientId()); - Assertions.assertEquals("bjf", model.arcApplicationTenantId()); - Assertions.assertEquals("gmbmbexppbh", model.arcServicePrincipalObjectId()); - Assertions.assertEquals("qrolfpf", model.arcApplicationObjectId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ArcIdentityResponseProperties model - = new ArcIdentityResponseProperties().withArcApplicationClientId("umkdosvqwhbmd") - .withArcApplicationTenantId("bjf") - .withArcServicePrincipalObjectId("gmbmbexppbh") - .withArcApplicationObjectId("qrolfpf"); - model = BinaryData.fromObject(model).toObject(ArcIdentityResponseProperties.class); - Assertions.assertEquals("umkdosvqwhbmd", model.arcApplicationClientId()); - Assertions.assertEquals("bjf", model.arcApplicationTenantId()); - Assertions.assertEquals("gmbmbexppbh", model.arcServicePrincipalObjectId()); - Assertions.assertEquals("qrolfpf", model.arcApplicationObjectId()); + Assertions.assertEquals("utduqktapspwgcu", model.arcApplicationClientId()); + Assertions.assertEquals("tumkdosvqwhbm", model.arcApplicationTenantId()); + Assertions.assertEquals("bbjfddgmbmbexp", model.arcServicePrincipalObjectId()); + Assertions.assertEquals("htqqrolfp", model.arcApplicationObjectId()); } } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ArcSettingInnerTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ArcSettingInnerTests.java index 7f593b628c60..9dad68fbb1be 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ArcSettingInnerTests.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ArcSettingInnerTests.java @@ -1,39 +1,55 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.generated; import com.azure.core.util.BinaryData; import com.azure.resourcemanager.azurestackhci.fluent.models.ArcSettingInner; +import com.azure.resourcemanager.azurestackhci.models.ArcConnectivityProperties; +import com.azure.resourcemanager.azurestackhci.models.ServiceConfiguration; +import com.azure.resourcemanager.azurestackhci.models.ServiceName; +import java.util.Arrays; import org.junit.jupiter.api.Assertions; public final class ArcSettingInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ArcSettingInner model = BinaryData.fromString( - "{\"properties\":{\"provisioningState\":\"Succeeded\",\"arcInstanceResourceGroup\":\"msbzjhcrz\",\"arcApplicationClientId\":\"dphlxaolt\",\"arcApplicationTenantId\":\"trg\",\"arcServicePrincipalObjectId\":\"bpf\",\"arcApplicationObjectId\":\"s\",\"aggregateState\":\"DisableInProgress\",\"perNodeDetails\":[{\"name\":\"cjrwzoxxjtfellu\",\"arcInstance\":\"zitonpeqfpjkjl\",\"arcNodeServicePrincipalObjectId\":\"fpdvhpfxxypi\",\"state\":\"InProgress\"}],\"connectivityProperties\":\"dataayhuy\",\"defaultExtensions\":[{\"category\":\"odepoogin\",\"consentTime\":\"2021-04-24T19:55:27Z\"},{\"category\":\"iheogna\",\"consentTime\":\"2021-08-23T15:48:59Z\"}]},\"id\":\"theotusiv\",\"name\":\"evcciqihnhun\",\"type\":\"bwjzr\"}") + "{\"properties\":{\"provisioningState\":\"InProgress\",\"arcInstanceResourceGroup\":\"pzvgnwzsymglzufc\",\"arcApplicationClientId\":\"kohdbiha\",\"arcApplicationTenantId\":\"fhfcb\",\"arcServicePrincipalObjectId\":\"s\",\"arcApplicationObjectId\":\"ithxqhabifpi\",\"aggregateState\":\"Updating\",\"perNodeDetails\":[{\"name\":\"yscnpqxu\",\"arcInstance\":\"vyq\",\"arcNodeServicePrincipalObjectId\":\"wby\",\"state\":\"Deleted\"}],\"connectivityProperties\":{\"enabled\":true,\"serviceConfigurations\":[{\"serviceName\":\"WAC\",\"port\":6997715187439318616}]},\"defaultExtensions\":[{\"category\":\"vukxgau\",\"consentTime\":\"2021-10-29T03:26:02Z\"},{\"category\":\"nhsjcnyej\",\"consentTime\":\"2021-09-02T05:03:22Z\"}]},\"id\":\"htnapczwlokjyem\",\"name\":\"kvnipjoxz\",\"type\":\"nchgej\"}") .toObject(ArcSettingInner.class); - Assertions.assertEquals("msbzjhcrz", model.arcInstanceResourceGroup()); - Assertions.assertEquals("dphlxaolt", model.arcApplicationClientId()); - Assertions.assertEquals("trg", model.arcApplicationTenantId()); - Assertions.assertEquals("bpf", model.arcServicePrincipalObjectId()); - Assertions.assertEquals("s", model.arcApplicationObjectId()); + Assertions.assertEquals("pzvgnwzsymglzufc", model.arcInstanceResourceGroup()); + Assertions.assertEquals("kohdbiha", model.arcApplicationClientId()); + Assertions.assertEquals("fhfcb", model.arcApplicationTenantId()); + Assertions.assertEquals("s", model.arcServicePrincipalObjectId()); + Assertions.assertEquals("ithxqhabifpi", model.arcApplicationObjectId()); + Assertions.assertTrue(model.connectivityProperties().enabled()); + Assertions.assertEquals(ServiceName.WAC, + model.connectivityProperties().serviceConfigurations().get(0).serviceName()); + Assertions.assertEquals(6997715187439318616L, + model.connectivityProperties().serviceConfigurations().get(0).port()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - ArcSettingInner model = new ArcSettingInner().withArcInstanceResourceGroup("msbzjhcrz") - .withArcApplicationClientId("dphlxaolt") - .withArcApplicationTenantId("trg") - .withArcServicePrincipalObjectId("bpf") - .withArcApplicationObjectId("s") - .withConnectivityProperties("dataayhuy"); + ArcSettingInner model = new ArcSettingInner().withArcInstanceResourceGroup("pzvgnwzsymglzufc") + .withArcApplicationClientId("kohdbiha") + .withArcApplicationTenantId("fhfcb") + .withArcServicePrincipalObjectId("s") + .withArcApplicationObjectId("ithxqhabifpi") + .withConnectivityProperties(new ArcConnectivityProperties().withEnabled(true) + .withServiceConfigurations(Arrays.asList( + new ServiceConfiguration().withServiceName(ServiceName.WAC).withPort(6997715187439318616L)))); model = BinaryData.fromObject(model).toObject(ArcSettingInner.class); - Assertions.assertEquals("msbzjhcrz", model.arcInstanceResourceGroup()); - Assertions.assertEquals("dphlxaolt", model.arcApplicationClientId()); - Assertions.assertEquals("trg", model.arcApplicationTenantId()); - Assertions.assertEquals("bpf", model.arcServicePrincipalObjectId()); - Assertions.assertEquals("s", model.arcApplicationObjectId()); + Assertions.assertEquals("pzvgnwzsymglzufc", model.arcInstanceResourceGroup()); + Assertions.assertEquals("kohdbiha", model.arcApplicationClientId()); + Assertions.assertEquals("fhfcb", model.arcApplicationTenantId()); + Assertions.assertEquals("s", model.arcServicePrincipalObjectId()); + Assertions.assertEquals("ithxqhabifpi", model.arcApplicationObjectId()); + Assertions.assertTrue(model.connectivityProperties().enabled()); + Assertions.assertEquals(ServiceName.WAC, + model.connectivityProperties().serviceConfigurations().get(0).serviceName()); + Assertions.assertEquals(6997715187439318616L, + model.connectivityProperties().serviceConfigurations().get(0).port()); } } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ArcSettingListTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ArcSettingListTests.java index 5117e4e3b9de..016ca9a13fc6 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ArcSettingListTests.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ArcSettingListTests.java @@ -1,23 +1,30 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.generated; import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.azurestackhci.models.ArcSettingList; +import com.azure.resourcemanager.azurestackhci.implementation.models.ArcSettingList; +import com.azure.resourcemanager.azurestackhci.models.ServiceName; +import org.junit.jupiter.api.Assertions; public final class ArcSettingListTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ArcSettingList model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"provisioningState\":\"Disconnected\",\"arcInstanceResourceGroup\":\"gjxpybczmehmt\",\"arcApplicationClientId\":\"pbsphrupidgs\",\"arcApplicationTenantId\":\"bejhphoycmsxa\",\"arcServicePrincipalObjectId\":\"hdxbmtqio\",\"arcApplicationObjectId\":\"zehtbmu\",\"aggregateState\":\"Connected\",\"perNodeDetails\":[{\"name\":\"izhwlrxy\",\"arcInstance\":\"soqijg\",\"arcNodeServicePrincipalObjectId\":\"mbpazlobcufpdzn\",\"state\":\"Connected\"}],\"connectivityProperties\":\"dataqqjnqgl\",\"defaultExtensions\":[{\"category\":\"ufo\",\"consentTime\":\"2021-10-05T18:29:36Z\"},{\"category\":\"wifsq\",\"consentTime\":\"2021-08-09T09:02:18Z\"}]},\"id\":\"gdf\",\"name\":\"glzlhjxrifkwmrv\",\"type\":\"tsizntocipaoua\"},{\"properties\":{\"provisioningState\":\"Provisioning\",\"arcInstanceResourceGroup\":\"cmpoyfdkfogkny\",\"arcApplicationClientId\":\"ofjdde\",\"arcApplicationTenantId\":\"rd\",\"arcServicePrincipalObjectId\":\"pewnw\",\"arcApplicationObjectId\":\"itjz\",\"aggregateState\":\"Moving\",\"perNodeDetails\":[{\"name\":\"rh\",\"arcInstance\":\"fcqhsmyurkd\",\"arcNodeServicePrincipalObjectId\":\"lx\",\"state\":\"Disconnected\"},{\"name\":\"k\",\"arcInstance\":\"txukcdmp\",\"arcNodeServicePrincipalObjectId\":\"cryuan\",\"state\":\"Provisioning\"}],\"connectivityProperties\":\"datazdxtayrlhmwhf\",\"defaultExtensions\":[{\"category\":\"obmtukk\",\"consentTime\":\"2021-03-16T09:48:53Z\"},{\"category\":\"tihfx\",\"consentTime\":\"2021-07-26T10:14:38Z\"}]},\"id\":\"pzvgnwzsymglzufc\",\"name\":\"zk\",\"type\":\"hdbihan\"},{\"properties\":{\"provisioningState\":\"PartiallyConnected\",\"arcInstanceResourceGroup\":\"bj\",\"arcApplicationClientId\":\"a\",\"arcApplicationTenantId\":\"th\",\"arcServicePrincipalObjectId\":\"hab\",\"arcApplicationObjectId\":\"pikxwczbyscnpqxu\",\"aggregateState\":\"Succeeded\",\"perNodeDetails\":[{\"name\":\"iwbybrkxvdumjg\",\"arcInstance\":\"fwvuk\",\"arcNodeServicePrincipalObjectId\":\"audccsnhs\",\"state\":\"Disconnected\"},{\"name\":\"ejhkry\",\"arcInstance\":\"napczwlokjy\",\"arcNodeServicePrincipalObjectId\":\"kkvnipjox\",\"state\":\"Accepted\"},{\"name\":\"hgejspodma\",\"arcInstance\":\"zyde\",\"arcNodeServicePrincipalObjectId\":\"jwyahuxinpmqnja\",\"state\":\"Creating\"},{\"name\":\"jsprozvcpute\",\"arcInstance\":\"vwmf\",\"arcNodeServicePrincipalObjectId\":\"t\",\"state\":\"InProgress\"}],\"connectivityProperties\":\"datavpjhulsuuv\",\"defaultExtensions\":[{\"category\":\"zkrwfn\",\"consentTime\":\"2021-07-16T00:56:28Z\"},{\"category\":\"jpslwejd\",\"consentTime\":\"2021-02-19T06:09:33Z\"},{\"category\":\"yoqpsoaccta\",\"consentTime\":\"2021-06-15T10:03:50Z\"}]},\"id\":\"j\",\"name\":\"ahbc\",\"type\":\"yffdfdos\"}],\"nextLink\":\"expa\"}") + "{\"value\":[{\"properties\":{\"provisioningState\":\"DisableInProgress\",\"arcInstanceResourceGroup\":\"xbnjbiksq\",\"arcApplicationClientId\":\"lssai\",\"arcApplicationTenantId\":\"p\",\"arcServicePrincipalObjectId\":\"nzl\",\"arcApplicationObjectId\":\"fmppe\",\"aggregateState\":\"Error\",\"perNodeDetails\":[{\"name\":\"sabkyqduujitcjcz\",\"arcInstance\":\"evndh\",\"arcNodeServicePrincipalObjectId\":\"wpdappdsbdkv\",\"state\":\"Accepted\"},{\"name\":\"feusnhut\",\"arcInstance\":\"ltmrldh\",\"arcNodeServicePrincipalObjectId\":\"jzzd\",\"state\":\"Accepted\"}],\"connectivityProperties\":{\"enabled\":false,\"serviceConfigurations\":[{\"serviceName\":\"WAC\",\"port\":4634339895723122949},{\"serviceName\":\"WAC\",\"port\":5556090733611514478},{\"serviceName\":\"WAC\",\"port\":3195393764493000398}]},\"defaultExtensions\":[{\"category\":\"ndv\",\"consentTime\":\"2021-07-12T00:44:12Z\"},{\"category\":\"wyiftyhxhur\",\"consentTime\":\"2021-08-25T23:42:56Z\"},{\"category\":\"yxolniwp\",\"consentTime\":\"2021-07-02T03:55:48Z\"},{\"category\":\"jfkgiawxk\",\"consentTime\":\"2021-05-21T20:11:19Z\"}]},\"id\":\"lwckbasyypnddhs\",\"name\":\"cbacphejkotynqg\",\"type\":\"ulzndlikwyqk\"}],\"nextLink\":\"gibma\"}") .toObject(ArcSettingList.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ArcSettingList model = new ArcSettingList(); - model = BinaryData.fromObject(model).toObject(ArcSettingList.class); + Assertions.assertEquals("xbnjbiksq", model.value().get(0).arcInstanceResourceGroup()); + Assertions.assertEquals("lssai", model.value().get(0).arcApplicationClientId()); + Assertions.assertEquals("p", model.value().get(0).arcApplicationTenantId()); + Assertions.assertEquals("nzl", model.value().get(0).arcServicePrincipalObjectId()); + Assertions.assertEquals("fmppe", model.value().get(0).arcApplicationObjectId()); + Assertions.assertFalse(model.value().get(0).connectivityProperties().enabled()); + Assertions.assertEquals(ServiceName.WAC, + model.value().get(0).connectivityProperties().serviceConfigurations().get(0).serviceName()); + Assertions.assertEquals(4634339895723122949L, + model.value().get(0).connectivityProperties().serviceConfigurations().get(0).port()); + Assertions.assertEquals("gibma", model.nextLink()); } } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ArcSettingPropertiesTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ArcSettingPropertiesTests.java index 1bda1ff8bd3d..6a6035510bf5 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ArcSettingPropertiesTests.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ArcSettingPropertiesTests.java @@ -1,39 +1,58 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.generated; import com.azure.core.util.BinaryData; import com.azure.resourcemanager.azurestackhci.fluent.models.ArcSettingProperties; +import com.azure.resourcemanager.azurestackhci.models.ArcConnectivityProperties; +import com.azure.resourcemanager.azurestackhci.models.ServiceConfiguration; +import com.azure.resourcemanager.azurestackhci.models.ServiceName; +import java.util.Arrays; import org.junit.jupiter.api.Assertions; public final class ArcSettingPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ArcSettingProperties model = BinaryData.fromString( - "{\"provisioningState\":\"Deleted\",\"arcInstanceResourceGroup\":\"xgispemvtzfkufu\",\"arcApplicationClientId\":\"jofxqe\",\"arcApplicationTenantId\":\"jaeq\",\"arcServicePrincipalObjectId\":\"qjbasvms\",\"arcApplicationObjectId\":\"qulngsntnbybkzgc\",\"aggregateState\":\"Updating\",\"perNodeDetails\":[{\"name\":\"xwrljdouskcqvkoc\",\"arcInstance\":\"jdkwtnhxbnjb\",\"arcNodeServicePrincipalObjectId\":\"sqrglssainq\",\"state\":\"PartiallyConnected\"},{\"name\":\"zlljfmppeebvm\",\"arcInstance\":\"sabkyqduujitcjcz\",\"arcNodeServicePrincipalObjectId\":\"evndh\",\"state\":\"Canceled\"},{\"name\":\"d\",\"arcInstance\":\"p\",\"arcNodeServicePrincipalObjectId\":\"bdkvwrwjf\",\"state\":\"Disconnected\"},{\"name\":\"hutje\",\"arcInstance\":\"mrldhu\",\"arcNodeServicePrincipalObjectId\":\"zzd\",\"state\":\"Accepted\"}],\"connectivityProperties\":\"datahocdgeab\",\"defaultExtensions\":[{\"category\":\"uticndvkaozwyif\",\"consentTime\":\"2021-08-07T23:12:54Z\"}]}") + "{\"provisioningState\":\"PartiallyConnected\",\"arcInstanceResourceGroup\":\"mailzydehojw\",\"arcApplicationClientId\":\"huxinpmqnj\",\"arcApplicationTenantId\":\"wixjsprozvcp\",\"arcServicePrincipalObjectId\":\"eg\",\"arcApplicationObjectId\":\"wmfdatscmdvpjhul\",\"aggregateState\":\"Deleting\",\"perNodeDetails\":[{\"name\":\"jozkrwfndiod\",\"arcInstance\":\"slwejdpvw\",\"arcNodeServicePrincipalObjectId\":\"oqpsoa\",\"state\":\"Succeeded\"},{\"name\":\"zakljlahbc\",\"arcInstance\":\"ffdfdosygexpa\",\"arcNodeServicePrincipalObjectId\":\"akhmsbzjhcrz\",\"state\":\"DisableInProgress\"},{\"name\":\"hlxaolthqtr\",\"arcInstance\":\"jbp\",\"arcNodeServicePrincipalObjectId\":\"fsinzgvfcjrwzoxx\",\"state\":\"PartiallyConnected\"}],\"connectivityProperties\":{\"enabled\":true,\"serviceConfigurations\":[{\"serviceName\":\"WAC\",\"port\":6619682147047690446},{\"serviceName\":\"WAC\",\"port\":7202609969053429028},{\"serviceName\":\"WAC\",\"port\":5685465600666313009},{\"serviceName\":\"WAC\",\"port\":3411109218141355466}]},\"defaultExtensions\":[{\"category\":\"xofpdvhpfxxypi\",\"consentTime\":\"2020-12-31T08:59:56Z\"},{\"category\":\"ayhuy\",\"consentTime\":\"2021-05-05T04:33:07Z\"},{\"category\":\"odepoogin\",\"consentTime\":\"2021-04-24T19:55:27Z\"},{\"category\":\"iheogna\",\"consentTime\":\"2021-08-23T15:48:59Z\"}]}") .toObject(ArcSettingProperties.class); - Assertions.assertEquals("xgispemvtzfkufu", model.arcInstanceResourceGroup()); - Assertions.assertEquals("jofxqe", model.arcApplicationClientId()); - Assertions.assertEquals("jaeq", model.arcApplicationTenantId()); - Assertions.assertEquals("qjbasvms", model.arcServicePrincipalObjectId()); - Assertions.assertEquals("qulngsntnbybkzgc", model.arcApplicationObjectId()); + Assertions.assertEquals("mailzydehojw", model.arcInstanceResourceGroup()); + Assertions.assertEquals("huxinpmqnj", model.arcApplicationClientId()); + Assertions.assertEquals("wixjsprozvcp", model.arcApplicationTenantId()); + Assertions.assertEquals("eg", model.arcServicePrincipalObjectId()); + Assertions.assertEquals("wmfdatscmdvpjhul", model.arcApplicationObjectId()); + Assertions.assertTrue(model.connectivityProperties().enabled()); + Assertions.assertEquals(ServiceName.WAC, + model.connectivityProperties().serviceConfigurations().get(0).serviceName()); + Assertions.assertEquals(6619682147047690446L, + model.connectivityProperties().serviceConfigurations().get(0).port()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - ArcSettingProperties model = new ArcSettingProperties().withArcInstanceResourceGroup("xgispemvtzfkufu") - .withArcApplicationClientId("jofxqe") - .withArcApplicationTenantId("jaeq") - .withArcServicePrincipalObjectId("qjbasvms") - .withArcApplicationObjectId("qulngsntnbybkzgc") - .withConnectivityProperties("datahocdgeab"); + ArcSettingProperties model = new ArcSettingProperties().withArcInstanceResourceGroup("mailzydehojw") + .withArcApplicationClientId("huxinpmqnj") + .withArcApplicationTenantId("wixjsprozvcp") + .withArcServicePrincipalObjectId("eg") + .withArcApplicationObjectId("wmfdatscmdvpjhul") + .withConnectivityProperties(new ArcConnectivityProperties().withEnabled(true) + .withServiceConfigurations(Arrays.asList( + new ServiceConfiguration().withServiceName(ServiceName.WAC).withPort(6619682147047690446L), + new ServiceConfiguration().withServiceName(ServiceName.WAC).withPort(7202609969053429028L), + new ServiceConfiguration().withServiceName(ServiceName.WAC).withPort(5685465600666313009L), + new ServiceConfiguration().withServiceName(ServiceName.WAC).withPort(3411109218141355466L)))); model = BinaryData.fromObject(model).toObject(ArcSettingProperties.class); - Assertions.assertEquals("xgispemvtzfkufu", model.arcInstanceResourceGroup()); - Assertions.assertEquals("jofxqe", model.arcApplicationClientId()); - Assertions.assertEquals("jaeq", model.arcApplicationTenantId()); - Assertions.assertEquals("qjbasvms", model.arcServicePrincipalObjectId()); - Assertions.assertEquals("qulngsntnbybkzgc", model.arcApplicationObjectId()); + Assertions.assertEquals("mailzydehojw", model.arcInstanceResourceGroup()); + Assertions.assertEquals("huxinpmqnj", model.arcApplicationClientId()); + Assertions.assertEquals("wixjsprozvcp", model.arcApplicationTenantId()); + Assertions.assertEquals("eg", model.arcServicePrincipalObjectId()); + Assertions.assertEquals("wmfdatscmdvpjhul", model.arcApplicationObjectId()); + Assertions.assertTrue(model.connectivityProperties().enabled()); + Assertions.assertEquals(ServiceName.WAC, + model.connectivityProperties().serviceConfigurations().get(0).serviceName()); + Assertions.assertEquals(6619682147047690446L, + model.connectivityProperties().serviceConfigurations().get(0).port()); } } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ArcSettingsConsentAndInstallDefaultExtensionsWithResponseMockTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ArcSettingsConsentAndInstallDefaultExtensionsWithResponseMockTests.java index b9f42d81989a..77e77552d717 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ArcSettingsConsentAndInstallDefaultExtensionsWithResponseMockTests.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ArcSettingsConsentAndInstallDefaultExtensionsWithResponseMockTests.java @@ -1,16 +1,17 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.generated; import com.azure.core.credential.AccessToken; import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.azurestackhci.AzureStackHciManager; import com.azure.resourcemanager.azurestackhci.models.ArcSetting; +import com.azure.resourcemanager.azurestackhci.models.ServiceName; import java.nio.charset.StandardCharsets; import java.time.OffsetDateTime; import org.junit.jupiter.api.Assertions; @@ -21,23 +22,29 @@ public final class ArcSettingsConsentAndInstallDefaultExtensionsWithResponseMock @Test public void testConsentAndInstallDefaultExtensionsWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"provisioningState\":\"Provisioning\",\"arcInstanceResourceGroup\":\"tyvkunmignohi\",\"arcApplicationClientId\":\"gqogjwpindedva\",\"arcApplicationTenantId\":\"xbhmed\",\"arcServicePrincipalObjectId\":\"lbjywfcfxzirzzih\",\"arcApplicationObjectId\":\"ypusuvjslczwci\",\"aggregateState\":\"Canceled\",\"perNodeDetails\":[{\"name\":\"fryvdmvxadqac\",\"arcInstance\":\"gna\",\"arcNodeServicePrincipalObjectId\":\"a\",\"state\":\"NotSpecified\"},{\"name\":\"ktyjmf\",\"arcInstance\":\"l\",\"arcNodeServicePrincipalObjectId\":\"yq\",\"state\":\"Accepted\"},{\"name\":\"zgowox\",\"arcInstance\":\"je\",\"arcNodeServicePrincipalObjectId\":\"cxn\",\"state\":\"Succeeded\"},{\"name\":\"hlusrvxisi\",\"arcInstance\":\"ceagbjqvlsumywz\",\"arcNodeServicePrincipalObjectId\":\"hxgonoyjf\",\"state\":\"PartiallySucceeded\"}],\"connectivityProperties\":\"datab\",\"defaultExtensions\":[{\"category\":\"lkfk\",\"consentTime\":\"2021-08-22T16:22:42Z\"},{\"category\":\"vop\",\"consentTime\":\"2021-10-07T20:58:36Z\"},{\"category\":\"oqujlyegqavn\",\"consentTime\":\"2021-07-31T00:26:04Z\"}]},\"id\":\"qqbtny\",\"name\":\"pylx\",\"type\":\"bf\"}"; + = "{\"properties\":{\"provisioningState\":\"NotSpecified\",\"arcInstanceResourceGroup\":\"zlfbgr\",\"arcApplicationClientId\":\"gubsrtmdylpe\",\"arcApplicationTenantId\":\"ilttjzgczfcmfpfb\",\"arcServicePrincipalObjectId\":\"etre\",\"arcApplicationObjectId\":\"gvtshu\",\"aggregateState\":\"Error\",\"perNodeDetails\":[{\"name\":\"vmuqke\",\"arcInstance\":\"gjypanhxmpdxxze\",\"arcNodeServicePrincipalObjectId\":\"wzjwotnxlkfhg\",\"state\":\"Error\"}],\"connectivityProperties\":{\"enabled\":false,\"serviceConfigurations\":[{\"serviceName\":\"WAC\",\"port\":7482461763042640789}]},\"defaultExtensions\":[{\"category\":\"pcs\",\"consentTime\":\"2021-07-20T10:11:39Z\"},{\"category\":\"ovppqibukklvzrlr\",\"consentTime\":\"2021-07-06T16:42:41Z\"},{\"category\":\"metjs\",\"consentTime\":\"2021-08-13T14:27:41Z\"}]},\"id\":\"fqbqnasd\",\"name\":\"yenzsieuscpl\",\"type\":\"yvdgxlyzk\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); AzureStackHciManager manager = AzureStackHciManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); ArcSetting response = manager.arcSettings() - .consentAndInstallDefaultExtensionsWithResponse("va", "caszk", "xk", com.azure.core.util.Context.NONE) + .consentAndInstallDefaultExtensionsWithResponse("gbyfgwe", "qkjvxprwpxsoohu", "xlcskltez", + com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("tyvkunmignohi", response.arcInstanceResourceGroup()); - Assertions.assertEquals("gqogjwpindedva", response.arcApplicationClientId()); - Assertions.assertEquals("xbhmed", response.arcApplicationTenantId()); - Assertions.assertEquals("lbjywfcfxzirzzih", response.arcServicePrincipalObjectId()); - Assertions.assertEquals("ypusuvjslczwci", response.arcApplicationObjectId()); + Assertions.assertEquals("zlfbgr", response.arcInstanceResourceGroup()); + Assertions.assertEquals("gubsrtmdylpe", response.arcApplicationClientId()); + Assertions.assertEquals("ilttjzgczfcmfpfb", response.arcApplicationTenantId()); + Assertions.assertEquals("etre", response.arcServicePrincipalObjectId()); + Assertions.assertEquals("gvtshu", response.arcApplicationObjectId()); + Assertions.assertFalse(response.connectivityProperties().enabled()); + Assertions.assertEquals(ServiceName.WAC, + response.connectivityProperties().serviceConfigurations().get(0).serviceName()); + Assertions.assertEquals(7482461763042640789L, + response.connectivityProperties().serviceConfigurations().get(0).port()); } } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ArcSettingsCreateIdentityMockTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ArcSettingsCreateIdentityMockTests.java index 8c41676f4148..90dbc34f996d 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ArcSettingsCreateIdentityMockTests.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ArcSettingsCreateIdentityMockTests.java @@ -1,13 +1,13 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.generated; import com.azure.core.credential.AccessToken; import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.azurestackhci.AzureStackHciManager; import com.azure.resourcemanager.azurestackhci.models.ArcIdentityResponse; @@ -20,17 +20,17 @@ public final class ArcSettingsCreateIdentityMockTests { @Test public void testCreateIdentity() throws Exception { String responseStr - = "{\"properties\":{\"arcApplicationClientId\":\"fejdoqeykglty\",\"arcApplicationTenantId\":\"hqfgqkayejsx\",\"arcServicePrincipalObjectId\":\"gflwfgziiucijj\",\"arcApplicationObjectId\":\"atlijjjr\"}}"; + = "{\"properties\":{\"arcApplicationClientId\":\"ocgjs\",\"arcApplicationTenantId\":\"ouarhwvixqqggljk\",\"arcServicePrincipalObjectId\":\"sjrclrvtzq\",\"arcApplicationObjectId\":\"bctbhp\"}}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); AzureStackHciManager manager = AzureStackHciManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); ArcIdentityResponse response - = manager.arcSettings().createIdentity("x", "cakiqao", "djrkclamggl", com.azure.core.util.Context.NONE); + = manager.arcSettings().createIdentity("jflu", "ynbpvzlqywauy", "njc", com.azure.core.util.Context.NONE); } } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ArcSettingsCreateWithResponseMockTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ArcSettingsCreateWithResponseMockTests.java index e296dfd78578..918656cb2145 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ArcSettingsCreateWithResponseMockTests.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ArcSettingsCreateWithResponseMockTests.java @@ -1,18 +1,22 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.generated; import com.azure.core.credential.AccessToken; import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.azurestackhci.AzureStackHciManager; +import com.azure.resourcemanager.azurestackhci.models.ArcConnectivityProperties; import com.azure.resourcemanager.azurestackhci.models.ArcSetting; +import com.azure.resourcemanager.azurestackhci.models.ServiceConfiguration; +import com.azure.resourcemanager.azurestackhci.models.ServiceName; import java.nio.charset.StandardCharsets; import java.time.OffsetDateTime; +import java.util.Arrays; import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.Test; import reactor.core.publisher.Mono; @@ -21,30 +25,37 @@ public final class ArcSettingsCreateWithResponseMockTests { @Test public void testCreateWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"provisioningState\":\"PartiallySucceeded\",\"arcInstanceResourceGroup\":\"lgcndhzxrrfcfsrh\",\"arcApplicationClientId\":\"gsnxuw\",\"arcApplicationTenantId\":\"pphefsbzx\",\"arcServicePrincipalObjectId\":\"zxomeikjclwz\",\"arcApplicationObjectId\":\"nmwpf\",\"aggregateState\":\"NotSpecified\",\"perNodeDetails\":[{\"name\":\"zyqbxyxoyfpuq\",\"arcInstance\":\"qezxlhdj\",\"arcNodeServicePrincipalObjectId\":\"dcadwvpsozjiihjr\",\"state\":\"Deleting\"},{\"name\":\"rz\",\"arcInstance\":\"pnx\",\"arcNodeServicePrincipalObjectId\":\"v\",\"state\":\"Updating\"},{\"name\":\"gv\",\"arcInstance\":\"mxaursqftibtyi\",\"arcNodeServicePrincipalObjectId\":\"yvp\",\"state\":\"Deleted\"},{\"name\":\"jpnqnoowsbeden\",\"arcInstance\":\"xkxbhxvu\",\"arcNodeServicePrincipalObjectId\":\"ulgm\",\"state\":\"DisableInProgress\"}],\"connectivityProperties\":\"datavdyznf\",\"defaultExtensions\":[{\"category\":\"kskmqozzkivyhjrl\",\"consentTime\":\"2021-11-04T07:10:22Z\"},{\"category\":\"ixlqfhefkwabsolr\",\"consentTime\":\"2021-04-28T07:30:05Z\"},{\"category\":\"lmgnlqxsjx\",\"consentTime\":\"2021-09-23T03:21:08Z\"}]},\"id\":\"xhvuqbozool\",\"name\":\"qocarkuzlbc\",\"type\":\"ndtsnxawqytll\"}"; + = "{\"properties\":{\"provisioningState\":\"PartiallySucceeded\",\"arcInstanceResourceGroup\":\"caatsdohzniucbda\",\"arcApplicationClientId\":\"b\",\"arcApplicationTenantId\":\"injdllwktlepo\",\"arcServicePrincipalObjectId\":\"vvqxua\",\"arcApplicationObjectId\":\"cqwulynkgfcfd\",\"aggregateState\":\"NotSpecified\",\"perNodeDetails\":[{\"name\":\"xxtclhuulri\",\"arcInstance\":\"yokvjgbzsxebr\",\"arcNodeServicePrincipalObjectId\":\"ttfyhcdjwsuoard\",\"state\":\"InProgress\"}],\"connectivityProperties\":{\"enabled\":true,\"serviceConfigurations\":[{\"serviceName\":\"WAC\",\"port\":4965485797809115467},{\"serviceName\":\"WAC\",\"port\":181212846656517806},{\"serviceName\":\"WAC\",\"port\":8700956360206524200},{\"serviceName\":\"WAC\",\"port\":3971377482592634684}]},\"defaultExtensions\":[{\"category\":\"xiplkysolsyj\",\"consentTime\":\"2021-04-06T12:49:09Z\"}]},\"id\":\"lwhdmcvhtbb\",\"name\":\"jhfv\",\"type\":\"uwzb\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); AzureStackHciManager manager = AzureStackHciManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); ArcSetting response = manager.arcSettings() - .define("yeofltfnnxrkad") - .withExistingCluster("kzwjiqullq", "bdmvrscmqerndbr") - .withArcInstanceResourceGroup("fmu") - .withArcApplicationClientId("iripfohyk") - .withArcApplicationTenantId("xbbcbrw") - .withArcServicePrincipalObjectId("u") - .withArcApplicationObjectId("njizb") - .withConnectivityProperties("datarevkaapezkis") + .define("bezacfpztga") + .withExistingCluster("uykykipfsd", "epfnoc") + .withArcInstanceResourceGroup("jga") + .withArcApplicationClientId("kctgkp") + .withArcApplicationTenantId("kqzkcyzmff") + .withArcServicePrincipalObjectId("dyfcix") + .withArcApplicationObjectId("lcqvhoejgoiutgw") + .withConnectivityProperties(new ArcConnectivityProperties().withEnabled(false) + .withServiceConfigurations(Arrays.asList( + new ServiceConfiguration().withServiceName(ServiceName.WAC).withPort(7818421886306304685L)))) .create(); - Assertions.assertEquals("lgcndhzxrrfcfsrh", response.arcInstanceResourceGroup()); - Assertions.assertEquals("gsnxuw", response.arcApplicationClientId()); - Assertions.assertEquals("pphefsbzx", response.arcApplicationTenantId()); - Assertions.assertEquals("zxomeikjclwz", response.arcServicePrincipalObjectId()); - Assertions.assertEquals("nmwpf", response.arcApplicationObjectId()); + Assertions.assertEquals("caatsdohzniucbda", response.arcInstanceResourceGroup()); + Assertions.assertEquals("b", response.arcApplicationClientId()); + Assertions.assertEquals("injdllwktlepo", response.arcApplicationTenantId()); + Assertions.assertEquals("vvqxua", response.arcServicePrincipalObjectId()); + Assertions.assertEquals("cqwulynkgfcfd", response.arcApplicationObjectId()); + Assertions.assertTrue(response.connectivityProperties().enabled()); + Assertions.assertEquals(ServiceName.WAC, + response.connectivityProperties().serviceConfigurations().get(0).serviceName()); + Assertions.assertEquals(4965485797809115467L, + response.connectivityProperties().serviceConfigurations().get(0).port()); } } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ArcSettingsDeleteMockTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ArcSettingsDeleteMockTests.java index 6e58105e061f..b5862366de58 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ArcSettingsDeleteMockTests.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ArcSettingsDeleteMockTests.java @@ -1,13 +1,13 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.generated; import com.azure.core.credential.AccessToken; import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.azurestackhci.AzureStackHciManager; import java.nio.charset.StandardCharsets; @@ -25,9 +25,9 @@ public void testDelete() throws Exception { AzureStackHciManager manager = AzureStackHciManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - manager.arcSettings().delete("ngucaifpaurww", "ilfjqqacdmk", "wxdcvjwcyz", com.azure.core.util.Context.NONE); + manager.arcSettings().delete("inzabwmvoglj", "v", "pgidnw", com.azure.core.util.Context.NONE); } } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ArcSettingsGetWithResponseMockTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ArcSettingsGetWithResponseMockTests.java index fde9e18d5371..9f86c8be34c7 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ArcSettingsGetWithResponseMockTests.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ArcSettingsGetWithResponseMockTests.java @@ -1,16 +1,17 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.generated; import com.azure.core.credential.AccessToken; import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.azurestackhci.AzureStackHciManager; import com.azure.resourcemanager.azurestackhci.models.ArcSetting; +import com.azure.resourcemanager.azurestackhci.models.ServiceName; import java.nio.charset.StandardCharsets; import java.time.OffsetDateTime; import org.junit.jupiter.api.Assertions; @@ -21,23 +22,28 @@ public final class ArcSettingsGetWithResponseMockTests { @Test public void testGetWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"provisioningState\":\"Creating\",\"arcInstanceResourceGroup\":\"t\",\"arcApplicationClientId\":\"ikizbcu\",\"arcApplicationTenantId\":\"bvntnrgmqsorhce\",\"arcServicePrincipalObjectId\":\"gnlykm\",\"arcApplicationObjectId\":\"pwzvmdoksqdti\",\"aggregateState\":\"DisableInProgress\",\"perNodeDetails\":[{\"name\":\"oncqbazqicqch\",\"arcInstance\":\"tvx\",\"arcNodeServicePrincipalObjectId\":\"janepubdpkx\",\"state\":\"PartiallySucceeded\"},{\"name\":\"xiaodet\",\"arcInstance\":\"hkxdxuwsaifmc\",\"arcNodeServicePrincipalObjectId\":\"osbz\",\"state\":\"Succeeded\"},{\"name\":\"cvk\",\"arcInstance\":\"knjolgjyyxpve\",\"arcNodeServicePrincipalObjectId\":\"zerqzevxoqei\",\"state\":\"Connected\"},{\"name\":\"aljglzobl\",\"arcInstance\":\"aafrqulhmzyqbhd\",\"arcNodeServicePrincipalObjectId\":\"fjrqpjiyr\",\"state\":\"Deleted\"}],\"connectivityProperties\":\"datagaxwmzwdfkbnrzo\",\"defaultExtensions\":[{\"category\":\"tbqctqjfgx\",\"consentTime\":\"2021-01-03T19:23:32Z\"}]},\"id\":\"tgzdgv\",\"name\":\"yig\",\"type\":\"aqqilzdcduwjoed\"}"; + = "{\"properties\":{\"provisioningState\":\"Deleting\",\"arcInstanceResourceGroup\":\"bkhxj\",\"arcApplicationClientId\":\"oez\",\"arcApplicationTenantId\":\"xrkdknkobektm\",\"arcServicePrincipalObjectId\":\"z\",\"arcApplicationObjectId\":\"tzamicbig\",\"aggregateState\":\"Deleting\",\"perNodeDetails\":[{\"name\":\"eznuxkeu\",\"arcInstance\":\"raabmdlqjb\",\"arcNodeServicePrincipalObjectId\":\"pfixlhupmo\",\"state\":\"Provisioning\"},{\"name\":\"bdnpxpkcd\",\"arcInstance\":\"eyxel\",\"arcNodeServicePrincipalObjectId\":\"cghf\",\"state\":\"DisableInProgress\"},{\"name\":\"ssjyghsfx\",\"arcInstance\":\"bh\",\"arcNodeServicePrincipalObjectId\":\"mgmqfmef\",\"state\":\"Error\"},{\"name\":\"pd\",\"arcInstance\":\"gquxweysland\",\"arcNodeServicePrincipalObjectId\":\"cdjhunhg\",\"state\":\"PartiallySucceeded\"}],\"connectivityProperties\":{\"enabled\":true,\"serviceConfigurations\":[{\"serviceName\":\"WAC\",\"port\":4475675740093823957},{\"serviceName\":\"WAC\",\"port\":6000249307731349306}]},\"defaultExtensions\":[{\"category\":\"reimseob\",\"consentTime\":\"2021-05-26T23:09:40Z\"},{\"category\":\"tcyilbvz\",\"consentTime\":\"2021-05-11T14:07:38Z\"}]},\"id\":\"jzlquz\",\"name\":\"xokjxebj\",\"type\":\"b\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); AzureStackHciManager manager = AzureStackHciManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); ArcSetting response = manager.arcSettings() - .getWithResponse("jomevtfycnlb", "gjco", "kk", com.azure.core.util.Context.NONE) + .getWithResponse("xbmsgycqsx", "mdvewuyqaeohpjh", "ejkbvhhdaurgho", com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("t", response.arcInstanceResourceGroup()); - Assertions.assertEquals("ikizbcu", response.arcApplicationClientId()); - Assertions.assertEquals("bvntnrgmqsorhce", response.arcApplicationTenantId()); - Assertions.assertEquals("gnlykm", response.arcServicePrincipalObjectId()); - Assertions.assertEquals("pwzvmdoksqdti", response.arcApplicationObjectId()); + Assertions.assertEquals("bkhxj", response.arcInstanceResourceGroup()); + Assertions.assertEquals("oez", response.arcApplicationClientId()); + Assertions.assertEquals("xrkdknkobektm", response.arcApplicationTenantId()); + Assertions.assertEquals("z", response.arcServicePrincipalObjectId()); + Assertions.assertEquals("tzamicbig", response.arcApplicationObjectId()); + Assertions.assertTrue(response.connectivityProperties().enabled()); + Assertions.assertEquals(ServiceName.WAC, + response.connectivityProperties().serviceConfigurations().get(0).serviceName()); + Assertions.assertEquals(4475675740093823957L, + response.connectivityProperties().serviceConfigurations().get(0).port()); } } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ArcSettingsInitializeDisableProcessMockTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ArcSettingsInitializeDisableProcessMockTests.java index 82821a4cfb1a..4ff456d7ea93 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ArcSettingsInitializeDisableProcessMockTests.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ArcSettingsInitializeDisableProcessMockTests.java @@ -1,13 +1,13 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.generated; import com.azure.core.credential.AccessToken; import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.azurestackhci.AzureStackHciManager; import java.nio.charset.StandardCharsets; @@ -25,10 +25,10 @@ public void testInitializeDisableProcess() throws Exception { AzureStackHciManager manager = AzureStackHciManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); manager.arcSettings() - .initializeDisableProcess("abmvmsxbaevwjc", "kottlwuhvajmailf", "mjjz", com.azure.core.util.Context.NONE); + .initializeDisableProcess("itdshezsvkolru", "jovmozsaye", "razwzlpzbt", com.azure.core.util.Context.NONE); } } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ArcSettingsListByClusterMockTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ArcSettingsListByClusterMockTests.java index 0ddba175c9b6..8e505550d848 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ArcSettingsListByClusterMockTests.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ArcSettingsListByClusterMockTests.java @@ -1,17 +1,18 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.generated; import com.azure.core.credential.AccessToken; import com.azure.core.http.HttpClient; import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.azurestackhci.AzureStackHciManager; import com.azure.resourcemanager.azurestackhci.models.ArcSetting; +import com.azure.resourcemanager.azurestackhci.models.ServiceName; import java.nio.charset.StandardCharsets; import java.time.OffsetDateTime; import org.junit.jupiter.api.Assertions; @@ -22,22 +23,27 @@ public final class ArcSettingsListByClusterMockTests { @Test public void testListByCluster() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"provisioningState\":\"PartiallySucceeded\",\"arcInstanceResourceGroup\":\"xyfukzxuizhyhn\",\"arcApplicationClientId\":\"kpetiarxq\",\"arcApplicationTenantId\":\"bxdukecpxdazvd\",\"arcServicePrincipalObjectId\":\"tmmkosz\",\"arcApplicationObjectId\":\"blnsntrpcaqk\",\"aggregateState\":\"Deleting\",\"perNodeDetails\":[{\"name\":\"fmhklbnld\",\"arcInstance\":\"cbhhez\",\"arcNodeServicePrincipalObjectId\":\"u\",\"state\":\"PartiallySucceeded\"},{\"name\":\"xut\",\"arcInstance\":\"brruyuuatv\",\"arcNodeServicePrincipalObjectId\":\"bjwcolbmx\",\"state\":\"Connected\"},{\"name\":\"tpc\",\"arcInstance\":\"hprzrvxhmtfho\",\"arcNodeServicePrincipalObjectId\":\"xzcmjhngxno\",\"state\":\"Connected\"},{\"name\":\"disnj\",\"arcInstance\":\"hdlmydidwhe\",\"arcNodeServicePrincipalObjectId\":\"wwtjfdoesxxhmwc\",\"state\":\"Canceled\"}],\"connectivityProperties\":\"datayo\",\"defaultExtensions\":[{\"category\":\"xhn\",\"consentTime\":\"2021-05-20T23:38:08Z\"},{\"category\":\"jzrbhtmeplv\",\"consentTime\":\"2020-12-21T01:54:28Z\"},{\"category\":\"brlbpgs\",\"consentTime\":\"2021-08-24T01:01:07Z\"},{\"category\":\"nchjhgemuowakywa\",\"consentTime\":\"2021-05-09T15:29:15Z\"}]},\"id\":\"m\",\"name\":\"cgqtag\",\"type\":\"rclsso\"}]}"; + = "{\"value\":[{\"properties\":{\"provisioningState\":\"NotSpecified\",\"arcInstanceResourceGroup\":\"dt\",\"arcApplicationClientId\":\"qnacyheq\",\"arcApplicationTenantId\":\"pqqncju\",\"arcServicePrincipalObjectId\":\"hjozf\",\"arcApplicationObjectId\":\"cwmbupyvqyvli\",\"aggregateState\":\"NotSpecified\",\"perNodeDetails\":[{\"name\":\"jbsv\",\"arcInstance\":\"aieswhddzy\",\"arcNodeServicePrincipalObjectId\":\"snuepywyjln\",\"state\":\"Moving\"}],\"connectivityProperties\":{\"enabled\":false,\"serviceConfigurations\":[{\"serviceName\":\"WAC\",\"port\":435881832333043937},{\"serviceName\":\"WAC\",\"port\":6342448026509690625},{\"serviceName\":\"WAC\",\"port\":7320024280312961767}]},\"defaultExtensions\":[{\"category\":\"weebiphryv\",\"consentTime\":\"2021-02-27T05:10:33Z\"},{\"category\":\"w\",\"consentTime\":\"2021-10-11T10:50:48Z\"}]},\"id\":\"atjhdhzybspijhf\",\"name\":\"zgdkkagvwu\",\"type\":\"hsusmmor\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); AzureStackHciManager manager = AzureStackHciManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PagedIterable response - = manager.arcSettings().listByCluster("iisb", "mnppccekuztd", com.azure.core.util.Context.NONE); + = manager.arcSettings().listByCluster("ehaqidoyzltgio", "qoqpepiaeap", com.azure.core.util.Context.NONE); - Assertions.assertEquals("xyfukzxuizhyhn", response.iterator().next().arcInstanceResourceGroup()); - Assertions.assertEquals("kpetiarxq", response.iterator().next().arcApplicationClientId()); - Assertions.assertEquals("bxdukecpxdazvd", response.iterator().next().arcApplicationTenantId()); - Assertions.assertEquals("tmmkosz", response.iterator().next().arcServicePrincipalObjectId()); - Assertions.assertEquals("blnsntrpcaqk", response.iterator().next().arcApplicationObjectId()); + Assertions.assertEquals("dt", response.iterator().next().arcInstanceResourceGroup()); + Assertions.assertEquals("qnacyheq", response.iterator().next().arcApplicationClientId()); + Assertions.assertEquals("pqqncju", response.iterator().next().arcApplicationTenantId()); + Assertions.assertEquals("hjozf", response.iterator().next().arcServicePrincipalObjectId()); + Assertions.assertEquals("cwmbupyvqyvli", response.iterator().next().arcApplicationObjectId()); + Assertions.assertFalse(response.iterator().next().connectivityProperties().enabled()); + Assertions.assertEquals(ServiceName.WAC, + response.iterator().next().connectivityProperties().serviceConfigurations().get(0).serviceName()); + Assertions.assertEquals(435881832333043937L, + response.iterator().next().connectivityProperties().serviceConfigurations().get(0).port()); } } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ArcSettingsPatchPropertiesTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ArcSettingsPatchPropertiesTests.java index 6dfe90cfa612..f9ed1cef4b99 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ArcSettingsPatchPropertiesTests.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ArcSettingsPatchPropertiesTests.java @@ -1,22 +1,41 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.generated; import com.azure.core.util.BinaryData; import com.azure.resourcemanager.azurestackhci.fluent.models.ArcSettingsPatchProperties; +import com.azure.resourcemanager.azurestackhci.models.ArcConnectivityProperties; +import com.azure.resourcemanager.azurestackhci.models.ServiceConfiguration; +import com.azure.resourcemanager.azurestackhci.models.ServiceName; +import java.util.Arrays; +import org.junit.jupiter.api.Assertions; public final class ArcSettingsPatchPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - ArcSettingsPatchProperties model = BinaryData.fromString("{\"connectivityProperties\":\"datae\"}") + ArcSettingsPatchProperties model = BinaryData.fromString( + "{\"connectivityProperties\":{\"enabled\":false,\"serviceConfigurations\":[{\"serviceName\":\"WAC\",\"port\":4579047227223149451}]}}") .toObject(ArcSettingsPatchProperties.class); + Assertions.assertFalse(model.connectivityProperties().enabled()); + Assertions.assertEquals(ServiceName.WAC, + model.connectivityProperties().serviceConfigurations().get(0).serviceName()); + Assertions.assertEquals(4579047227223149451L, + model.connectivityProperties().serviceConfigurations().get(0).port()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - ArcSettingsPatchProperties model = new ArcSettingsPatchProperties().withConnectivityProperties("datae"); + ArcSettingsPatchProperties model = new ArcSettingsPatchProperties() + .withConnectivityProperties(new ArcConnectivityProperties().withEnabled(false) + .withServiceConfigurations(Arrays.asList( + new ServiceConfiguration().withServiceName(ServiceName.WAC).withPort(4579047227223149451L)))); model = BinaryData.fromObject(model).toObject(ArcSettingsPatchProperties.class); + Assertions.assertFalse(model.connectivityProperties().enabled()); + Assertions.assertEquals(ServiceName.WAC, + model.connectivityProperties().serviceConfigurations().get(0).serviceName()); + Assertions.assertEquals(4579047227223149451L, + model.connectivityProperties().serviceConfigurations().get(0).port()); } } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ArcSettingsPatchTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ArcSettingsPatchTests.java index 786ab793cee0..be5300035d66 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ArcSettingsPatchTests.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ArcSettingsPatchTests.java @@ -1,11 +1,15 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.generated; import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.azurestackhci.models.ArcConnectivityProperties; import com.azure.resourcemanager.azurestackhci.models.ArcSettingsPatch; +import com.azure.resourcemanager.azurestackhci.models.ServiceConfiguration; +import com.azure.resourcemanager.azurestackhci.models.ServiceName; +import java.util.Arrays; import java.util.HashMap; import java.util.Map; import org.junit.jupiter.api.Assertions; @@ -14,18 +18,31 @@ public final class ArcSettingsPatchTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ArcSettingsPatch model = BinaryData.fromString( - "{\"tags\":{\"nqgoulzndli\":\"hsgcbacphejkot\",\"dgak\":\"wyqkgfgibm\"},\"properties\":{\"connectivityProperties\":\"datarxybz\"}}") + "{\"tags\":{\"hqjbasvmsmj\":\"jaeq\",\"ybkzgcwr\":\"ulngsntn\"},\"properties\":{\"connectivityProperties\":{\"enabled\":true,\"serviceConfigurations\":[{\"serviceName\":\"WAC\",\"port\":5729741485194722983},{\"serviceName\":\"WAC\",\"port\":4069471963990822296},{\"serviceName\":\"WAC\",\"port\":6350015487998990980}]}}}") .toObject(ArcSettingsPatch.class); - Assertions.assertEquals("hsgcbacphejkot", model.tags().get("nqgoulzndli")); + Assertions.assertEquals("jaeq", model.tags().get("hqjbasvmsmj")); + Assertions.assertTrue(model.connectivityProperties().enabled()); + Assertions.assertEquals(ServiceName.WAC, + model.connectivityProperties().serviceConfigurations().get(0).serviceName()); + Assertions.assertEquals(5729741485194722983L, + model.connectivityProperties().serviceConfigurations().get(0).port()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - ArcSettingsPatch model - = new ArcSettingsPatch().withTags(mapOf("nqgoulzndli", "hsgcbacphejkot", "dgak", "wyqkgfgibm")) - .withConnectivityProperties("datarxybz"); + ArcSettingsPatch model = new ArcSettingsPatch().withTags(mapOf("hqjbasvmsmj", "jaeq", "ybkzgcwr", "ulngsntn")) + .withConnectivityProperties(new ArcConnectivityProperties().withEnabled(true) + .withServiceConfigurations(Arrays.asList( + new ServiceConfiguration().withServiceName(ServiceName.WAC).withPort(5729741485194722983L), + new ServiceConfiguration().withServiceName(ServiceName.WAC).withPort(4069471963990822296L), + new ServiceConfiguration().withServiceName(ServiceName.WAC).withPort(6350015487998990980L)))); model = BinaryData.fromObject(model).toObject(ArcSettingsPatch.class); - Assertions.assertEquals("hsgcbacphejkot", model.tags().get("nqgoulzndli")); + Assertions.assertEquals("jaeq", model.tags().get("hqjbasvmsmj")); + Assertions.assertTrue(model.connectivityProperties().enabled()); + Assertions.assertEquals(ServiceName.WAC, + model.connectivityProperties().serviceConfigurations().get(0).serviceName()); + Assertions.assertEquals(5729741485194722983L, + model.connectivityProperties().serviceConfigurations().get(0).port()); } // Use "Map.of" if available diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ArcSettingsReconcileMockTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ArcSettingsReconcileMockTests.java new file mode 100644 index 000000000000..2b5717830379 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ArcSettingsReconcileMockTests.java @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.azurestackhci.generated; + +import com.azure.core.credential.AccessToken; +import com.azure.core.http.HttpClient; +import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; +import com.azure.core.test.http.MockHttpResponse; +import com.azure.resourcemanager.azurestackhci.AzureStackHciManager; +import com.azure.resourcemanager.azurestackhci.models.ArcSetting; +import com.azure.resourcemanager.azurestackhci.models.ReconcileArcSettingsRequest; +import com.azure.resourcemanager.azurestackhci.models.ReconcileArcSettingsRequestProperties; +import com.azure.resourcemanager.azurestackhci.models.ServiceName; +import java.nio.charset.StandardCharsets; +import java.time.OffsetDateTime; +import java.util.Arrays; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Test; +import reactor.core.publisher.Mono; + +public final class ArcSettingsReconcileMockTests { + @Test + public void testReconcile() throws Exception { + String responseStr + = "{\"properties\":{\"provisioningState\":\"Succeeded\",\"arcInstanceResourceGroup\":\"mtmesrfsv\",\"arcApplicationClientId\":\"nkzpatqtdiswxsp\",\"arcApplicationTenantId\":\"koj\",\"arcServicePrincipalObjectId\":\"bbg\",\"arcApplicationObjectId\":\"ft\",\"aggregateState\":\"Disconnected\",\"perNodeDetails\":[{\"name\":\"vpvdylytcovqse\",\"arcInstance\":\"rf\",\"arcNodeServicePrincipalObjectId\":\"d\",\"state\":\"Deleted\"},{\"name\":\"nxmlbmuoswk\",\"arcInstance\":\"dihdcyyyzlwhb\",\"arcNodeServicePrincipalObjectId\":\"jnufzrf\",\"state\":\"InProgress\"},{\"name\":\"gnnbzrtf\",\"arcInstance\":\"dzuubjtvgjsxm\",\"arcNodeServicePrincipalObjectId\":\"jjvavdpww\",\"state\":\"Connected\"}],\"connectivityProperties\":{\"enabled\":true,\"serviceConfigurations\":[{\"serviceName\":\"WAC\",\"port\":6793474529750324860}]},\"defaultExtensions\":[{\"category\":\"wanmhkscauwazc\",\"consentTime\":\"2021-05-09T06:58:48Z\"}]},\"id\":\"riwgybjp\",\"name\":\"zokscvg\",\"type\":\"lix\"}"; + + HttpClient httpClient + = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); + AzureStackHciManager manager = AzureStackHciManager.configure() + .withHttpClient(httpClient) + .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); + + ArcSetting response = manager.arcSettings() + .reconcile("hxpcvrdnyeita", "eq", "dynzjahwr", + new ReconcileArcSettingsRequest().withProperties(new ReconcileArcSettingsRequestProperties() + .withClusterNodes(Arrays.asList("zczfkiceevs", "axwspcaxikhfjqeb", "lcxkxgzzromv"))), + com.azure.core.util.Context.NONE); + + Assertions.assertEquals("mtmesrfsv", response.arcInstanceResourceGroup()); + Assertions.assertEquals("nkzpatqtdiswxsp", response.arcApplicationClientId()); + Assertions.assertEquals("koj", response.arcApplicationTenantId()); + Assertions.assertEquals("bbg", response.arcServicePrincipalObjectId()); + Assertions.assertEquals("ft", response.arcApplicationObjectId()); + Assertions.assertTrue(response.connectivityProperties().enabled()); + Assertions.assertEquals(ServiceName.WAC, + response.connectivityProperties().serviceConfigurations().get(0).serviceName()); + Assertions.assertEquals(6793474529750324860L, + response.connectivityProperties().serviceConfigurations().get(0).port()); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/AssemblyInfoPayloadTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/AssemblyInfoPayloadTests.java new file mode 100644 index 000000000000..1000b694b941 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/AssemblyInfoPayloadTests.java @@ -0,0 +1,17 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.azurestackhci.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.azurestackhci.models.AssemblyInfoPayload; + +public final class AssemblyInfoPayloadTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + AssemblyInfoPayload model = BinaryData.fromString( + "{\"identifier\":\"uzqogsexnevf\",\"hash\":\"wnwmewzs\",\"fileName\":\"ceuzsoibjudpfr\",\"url\":\"rthzvaytdwkqbrqu\"}") + .toObject(AssemblyInfoPayload.class); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/AssemblyInfoTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/AssemblyInfoTests.java new file mode 100644 index 000000000000..8890a5dde532 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/AssemblyInfoTests.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.azurestackhci.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.azurestackhci.models.AssemblyInfo; + +public final class AssemblyInfoTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + AssemblyInfo model = BinaryData.fromString( + "{\"packageVersion\":\"gymare\",\"payload\":[{\"identifier\":\"xqugjhkycubedd\",\"hash\":\"sofwqmzqalkrmnji\",\"fileName\":\"xacqqudfnbyx\",\"url\":\"aabjyvayffimrz\"}]}") + .toObject(AssemblyInfo.class); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + AssemblyInfo model = new AssemblyInfo(); + model = BinaryData.fromObject(model).toObject(AssemblyInfo.class); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ClusterDesiredPropertiesTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ClusterDesiredPropertiesTests.java index 5d49ac02c9a2..ae543267c005 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ClusterDesiredPropertiesTests.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ClusterDesiredPropertiesTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.generated; @@ -14,19 +14,19 @@ public final class ClusterDesiredPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ClusterDesiredProperties model - = BinaryData.fromString("{\"windowsServerSubscription\":\"Disabled\",\"diagnosticLevel\":\"Enhanced\"}") + = BinaryData.fromString("{\"windowsServerSubscription\":\"Disabled\",\"diagnosticLevel\":\"Basic\"}") .toObject(ClusterDesiredProperties.class); Assertions.assertEquals(WindowsServerSubscription.DISABLED, model.windowsServerSubscription()); - Assertions.assertEquals(DiagnosticLevel.ENHANCED, model.diagnosticLevel()); + Assertions.assertEquals(DiagnosticLevel.BASIC, model.diagnosticLevel()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { ClusterDesiredProperties model = new ClusterDesiredProperties().withWindowsServerSubscription(WindowsServerSubscription.DISABLED) - .withDiagnosticLevel(DiagnosticLevel.ENHANCED); + .withDiagnosticLevel(DiagnosticLevel.BASIC); model = BinaryData.fromObject(model).toObject(ClusterDesiredProperties.class); Assertions.assertEquals(WindowsServerSubscription.DISABLED, model.windowsServerSubscription()); - Assertions.assertEquals(DiagnosticLevel.ENHANCED, model.diagnosticLevel()); + Assertions.assertEquals(DiagnosticLevel.BASIC, model.diagnosticLevel()); } } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ClusterIdentityResponseInnerTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ClusterIdentityResponseInnerTests.java index 4685ce7a890c..cd11195ad167 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ClusterIdentityResponseInnerTests.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ClusterIdentityResponseInnerTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.generated; @@ -11,13 +11,7 @@ public final class ClusterIdentityResponseInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ClusterIdentityResponseInner model = BinaryData.fromString( - "{\"properties\":{\"aadClientId\":\"ooxdjebwpuc\",\"aadTenantId\":\"fvovbvmeuecivy\",\"aadServicePrincipalObjectId\":\"ce\",\"aadApplicationObjectId\":\"jgjrwjueiotwm\"}}") + "{\"properties\":{\"aadClientId\":\"pnapnyiropuh\",\"aadTenantId\":\"gvpgy\",\"aadServicePrincipalObjectId\":\"qgitxmed\",\"aadApplicationObjectId\":\"c\"}}") .toObject(ClusterIdentityResponseInner.class); } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ClusterIdentityResponseInner model = new ClusterIdentityResponseInner(); - model = BinaryData.fromObject(model).toObject(ClusterIdentityResponseInner.class); - } } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ClusterIdentityResponsePropertiesTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ClusterIdentityResponsePropertiesTests.java index 5e36639c638b..73d66af961ea 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ClusterIdentityResponsePropertiesTests.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ClusterIdentityResponsePropertiesTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.generated; @@ -12,24 +12,11 @@ public final class ClusterIdentityResponsePropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ClusterIdentityResponseProperties model = BinaryData.fromString( - "{\"aadClientId\":\"ytdxwit\",\"aadTenantId\":\"rjaw\",\"aadServicePrincipalObjectId\":\"wgxhn\",\"aadApplicationObjectId\":\"kxfbkpycgklwndn\"}") + "{\"aadClientId\":\"ynqwwncwzzhxgk\",\"aadTenantId\":\"mgucna\",\"aadServicePrincipalObjectId\":\"t\",\"aadApplicationObjectId\":\"ellwptfdy\"}") .toObject(ClusterIdentityResponseProperties.class); - Assertions.assertEquals("ytdxwit", model.aadClientId()); - Assertions.assertEquals("rjaw", model.aadTenantId()); - Assertions.assertEquals("wgxhn", model.aadServicePrincipalObjectId()); - Assertions.assertEquals("kxfbkpycgklwndn", model.aadApplicationObjectId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ClusterIdentityResponseProperties model = new ClusterIdentityResponseProperties().withAadClientId("ytdxwit") - .withAadTenantId("rjaw") - .withAadServicePrincipalObjectId("wgxhn") - .withAadApplicationObjectId("kxfbkpycgklwndn"); - model = BinaryData.fromObject(model).toObject(ClusterIdentityResponseProperties.class); - Assertions.assertEquals("ytdxwit", model.aadClientId()); - Assertions.assertEquals("rjaw", model.aadTenantId()); - Assertions.assertEquals("wgxhn", model.aadServicePrincipalObjectId()); - Assertions.assertEquals("kxfbkpycgklwndn", model.aadApplicationObjectId()); + Assertions.assertEquals("ynqwwncwzzhxgk", model.aadClientId()); + Assertions.assertEquals("mgucna", model.aadTenantId()); + Assertions.assertEquals("t", model.aadServicePrincipalObjectId()); + Assertions.assertEquals("ellwptfdy", model.aadApplicationObjectId()); } } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ClusterListTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ClusterListTests.java deleted file mode 100644 index 9b7d2138854f..000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ClusterListTests.java +++ /dev/null @@ -1,149 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.azurestackhci.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.azurestackhci.fluent.models.ClusterInner; -import com.azure.resourcemanager.azurestackhci.models.ClusterDesiredProperties; -import com.azure.resourcemanager.azurestackhci.models.ClusterList; -import com.azure.resourcemanager.azurestackhci.models.DiagnosticLevel; -import com.azure.resourcemanager.azurestackhci.models.LogCollectionProperties; -import com.azure.resourcemanager.azurestackhci.models.ManagedServiceIdentityType; -import com.azure.resourcemanager.azurestackhci.models.RemoteSupportProperties; -import com.azure.resourcemanager.azurestackhci.models.SoftwareAssuranceIntent; -import com.azure.resourcemanager.azurestackhci.models.SoftwareAssuranceProperties; -import com.azure.resourcemanager.azurestackhci.models.UserAssignedIdentity; -import com.azure.resourcemanager.azurestackhci.models.WindowsServerSubscription; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class ClusterListTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ClusterList model = BinaryData.fromString( - "{\"value\":[{\"identity\":{\"principalId\":\"3abe74f6-a3d1-4c29-9b5e-12abc6e76a6f\",\"tenantId\":\"c2959bdd-2f97-4179-9732-e92591811f36\",\"type\":\"None\",\"userAssignedIdentities\":{\"jyj\":{\"principalId\":\"0f28a43e-e014-4ccd-8c6e-efdb54f0ff05\",\"clientId\":\"c3a6f3d2-061c-4fb9-8a13-42785e3735ec\"},\"aoyfhrtxilnerkuj\":{\"principalId\":\"4015ac4b-c739-4228-8c8e-4bbb6993f31c\",\"clientId\":\"9a549f0a-e272-47f3-be3b-64f95b56e1c2\"},\"l\":{\"principalId\":\"8f97f6aa-f1f3-41b0-bfc4-580996c7395a\",\"clientId\":\"a8038c1a-dca9-4011-9ab0-f0456799fc33\"},\"vfqawrlyxwjkcpr\":{\"principalId\":\"d51462af-b261-414a-96c5-b940baf5ae8e\",\"clientId\":\"710d2c46-5c16-4009-ba22-cc93f11dc964\"}}},\"properties\":{\"provisioningState\":\"Succeeded\",\"status\":\"DeploymentFailed\",\"connectivityStatus\":\"Connected\",\"cloudId\":\"bvpyss\",\"cloudManagementEndpoint\":\"nruj\",\"aadClientId\":\"uhmuouqfprwzwbn\",\"aadTenantId\":\"itnwuizgazxufi\",\"aadApplicationObjectId\":\"ckyfih\",\"aadServicePrincipalObjectId\":\"idf\",\"softwareAssuranceProperties\":{\"softwareAssuranceStatus\":\"Disabled\",\"softwareAssuranceIntent\":\"Enable\",\"lastUpdated\":\"2021-04-15T03:14:07Z\"},\"logCollectionProperties\":{\"fromDate\":\"2021-10-17T08:51:50Z\",\"toDate\":\"2021-06-04T23:46:10Z\",\"lastLogGenerated\":\"2021-02-04T19:12:37Z\",\"logCollectionSessionDetails\":[{},{},{},{}]},\"remoteSupportProperties\":{\"accessLevel\":\"DiagnosticsAndRepair\",\"expirationTimeStamp\":\"2021-10-31T03:21:56Z\",\"remoteSupportType\":\"Revoke\",\"remoteSupportNodeSettings\":[{},{},{},{}],\"remoteSupportSessionDetails\":[{},{},{}]},\"desiredProperties\":{\"windowsServerSubscription\":\"Disabled\",\"diagnosticLevel\":\"Basic\"},\"reportedProperties\":{\"clusterName\":\"mmxdcu\",\"clusterId\":\"fsrpymzidnse\",\"clusterVersion\":\"xtbzsgfyccsne\",\"nodes\":[{},{},{}],\"lastUpdated\":\"2021-09-03T07:34:10Z\",\"imdsAttestation\":\"Enabled\",\"diagnosticLevel\":\"Off\",\"supportedCapabilities\":[\"boo\"],\"clusterType\":\"FirstParty\",\"manufacturer\":\"ro\",\"oemActivation\":\"Disabled\"},\"isolatedVmAttestationConfiguration\":{\"attestationResourceId\":\"eeh\",\"relyingPartyServiceEndpoint\":\"vypyqrimzinpv\",\"attestationServiceEndpoint\":\"jdkirsoodqx\"},\"trialDaysRemaining\":34.670513,\"billingModel\":\"nohjt\",\"registrationTimestamp\":\"2020-12-26T05:08:12Z\",\"lastSyncTimestamp\":\"2021-01-23T02:14:07Z\",\"lastBillingTimestamp\":\"2021-05-11T08:11:32Z\",\"serviceEndpoint\":\"fiyipjxsqwpgrj\",\"resourceProviderObjectId\":\"norcjxvsnbyxqab\"},\"location\":\"ocpcy\",\"tags\":{\"klj\":\"rzafbljjgpbtoqcj\",\"qajzyulpkudjkr\":\"vbqid\"},\"id\":\"khbzhfepgzg\",\"name\":\"e\",\"type\":\"zloc\"},{\"identity\":{\"principalId\":\"6f5a9762-c534-42d7-a8fe-fddaf1c9594f\",\"tenantId\":\"953b261b-1ce5-4716-b460-57948cc62be8\",\"type\":\"SystemAssigned\",\"userAssignedIdentities\":{\"hbcsgl\":{\"principalId\":\"9d821af1-1a99-4514-b278-98729c5e3168\",\"clientId\":\"071a1122-43fb-4701-879a-cc04599c38d6\"},\"a\":{\"principalId\":\"707cddfe-4232-404a-b993-174940064526\",\"clientId\":\"fe75d49c-6503-48e2-83dc-90cc491d3aff\"},\"aodxo\":{\"principalId\":\"fa43fba5-041f-4d34-9893-371620415d6b\",\"clientId\":\"89d8af03-1e1d-4b4d-a091-8face594b5ba\"}}},\"properties\":{\"provisioningState\":\"Failed\",\"status\":\"Disconnected\",\"connectivityStatus\":\"NotYetRegistered\",\"cloudId\":\"okaj\",\"cloudManagementEndpoint\":\"npime\",\"aadClientId\":\"stxgc\",\"aadTenantId\":\"dg\",\"aadApplicationObjectId\":\"ajrmvdjwzrlovmc\",\"aadServicePrincipalObjectId\":\"hijco\",\"softwareAssuranceProperties\":{\"softwareAssuranceStatus\":\"Disabled\",\"softwareAssuranceIntent\":\"Disable\",\"lastUpdated\":\"2021-07-24T11:38:54Z\"},\"logCollectionProperties\":{\"fromDate\":\"2021-02-04T17:33:10Z\",\"toDate\":\"2021-10-17T01:50:40Z\",\"lastLogGenerated\":\"2021-02-18T20:34:43Z\",\"logCollectionSessionDetails\":[{},{},{},{}]},\"remoteSupportProperties\":{\"accessLevel\":\"DiagnosticsAndRepair\",\"expirationTimeStamp\":\"2021-04-20T10:26:18Z\",\"remoteSupportType\":\"Revoke\",\"remoteSupportNodeSettings\":[{},{},{},{}],\"remoteSupportSessionDetails\":[{}]},\"desiredProperties\":{\"windowsServerSubscription\":\"Disabled\",\"diagnosticLevel\":\"Basic\"},\"reportedProperties\":{\"clusterName\":\"fjpgddtocjjxhvp\",\"clusterId\":\"uexhdzx\",\"clusterVersion\":\"qeojnxqbzvddntw\",\"nodes\":[{}],\"lastUpdated\":\"2021-05-28T18:35Z\",\"imdsAttestation\":\"Enabled\",\"diagnosticLevel\":\"Enhanced\",\"supportedCapabilities\":[\"aoqvuh\"],\"clusterType\":\"ThirdParty\",\"manufacturer\":\"fcyddg\",\"oemActivation\":\"Enabled\"},\"isolatedVmAttestationConfiguration\":{\"attestationResourceId\":\"jqkwpyeicx\",\"relyingPartyServiceEndpoint\":\"ciwqvhk\",\"attestationServiceEndpoint\":\"xuigdtopbobj\"},\"trialDaysRemaining\":11.501741,\"billingModel\":\"e\",\"registrationTimestamp\":\"2021-07-13T01:02:50Z\",\"lastSyncTimestamp\":\"2021-01-02T08:53:50Z\",\"lastBillingTimestamp\":\"2021-01-27T21:23:24Z\",\"serviceEndpoint\":\"z\",\"resourceProviderObjectId\":\"vvtpgvdfgio\"},\"location\":\"ftutqxlngxlefgu\",\"tags\":{\"mi\":\"krxd\",\"abhjybi\":\"tthzrvqd\"},\"id\":\"ehoqfbowskan\",\"name\":\"ktzlcuiywg\",\"type\":\"ywgndrv\"},{\"identity\":{\"principalId\":\"57cb75eb-22a0-4204-8a42-05b2d9cbd8b0\",\"tenantId\":\"793e3cca-5706-4710-b366-834ba7c36df1\",\"type\":\"UserAssigned\",\"userAssignedIdentities\":{\"cgyncocpecf\":{\"principalId\":\"7eed1082-4c2e-48db-b829-79bae6d5d11f\",\"clientId\":\"c528e79c-024a-40cd-81f9-8d8f30c877df\"},\"coofsxlzev\":{\"principalId\":\"ad814dff-88b6-477c-b8cc-bac65d2905be\",\"clientId\":\"0dc3c164-818d-4af8-8068-584487b5292d\"},\"qjqabcypmivkwl\":{\"principalId\":\"144bc005-b61f-4cfa-b882-6f02dc954eb9\",\"clientId\":\"1c0aa821-3310-456a-9913-beadf5f8b363\"}}},\"properties\":{\"provisioningState\":\"DisableInProgress\",\"status\":\"NotSpecified\",\"connectivityStatus\":\"NotYetRegistered\",\"cloudId\":\"nbacfi\",\"cloudManagementEndpoint\":\"l\",\"aadClientId\":\"x\",\"aadTenantId\":\"qgtz\",\"aadApplicationObjectId\":\"pnqbqqwxrjfe\",\"aadServicePrincipalObjectId\":\"lnwsubisn\",\"softwareAssuranceProperties\":{\"softwareAssuranceStatus\":\"Enabled\",\"softwareAssuranceIntent\":\"Disable\",\"lastUpdated\":\"2021-03-01T16:11:14Z\"},\"logCollectionProperties\":{\"fromDate\":\"2021-05-16T06:09:12Z\",\"toDate\":\"2021-11-21T01:43:49Z\",\"lastLogGenerated\":\"2021-08-23T00:35:40Z\",\"logCollectionSessionDetails\":[{},{},{},{}]},\"remoteSupportProperties\":{\"accessLevel\":\"Diagnostics\",\"expirationTimeStamp\":\"2021-01-15T20:14:13Z\",\"remoteSupportType\":\"Revoke\",\"remoteSupportNodeSettings\":[{},{}],\"remoteSupportSessionDetails\":[{},{},{},{}]},\"desiredProperties\":{\"windowsServerSubscription\":\"Disabled\",\"diagnosticLevel\":\"Enhanced\"},\"reportedProperties\":{\"clusterName\":\"seiphe\",\"clusterId\":\"lokeyy\",\"clusterVersion\":\"nj\",\"nodes\":[{},{},{}],\"lastUpdated\":\"2021-10-26T11:35:52Z\",\"imdsAttestation\":\"Enabled\",\"diagnosticLevel\":\"Enhanced\",\"supportedCapabilities\":[\"pj\"],\"clusterType\":\"ThirdParty\",\"manufacturer\":\"xazjpqyegual\",\"oemActivation\":\"Enabled\"},\"isolatedVmAttestationConfiguration\":{\"attestationResourceId\":\"e\",\"relyingPartyServiceEndpoint\":\"zzvdudgwds\",\"attestationServiceEndpoint\":\"hotwmcynpwlbjnp\"},\"trialDaysRemaining\":39.36754,\"billingModel\":\"tadehxnltyfsopp\",\"registrationTimestamp\":\"2021-06-21T13:34:16Z\",\"lastSyncTimestamp\":\"2020-12-22T21:06:46Z\",\"lastBillingTimestamp\":\"2021-04-15T21:03:11Z\",\"serviceEndpoint\":\"dejbavo\",\"resourceProviderObjectId\":\"zdmohctbqvu\"},\"location\":\"xdn\",\"tags\":{\"azjdyggd\":\"owgujjugwdkcglhs\"},\"id\":\"jixhbk\",\"name\":\"ofqweykhmenevfye\",\"type\":\"fwhybcibvy\"},{\"identity\":{\"principalId\":\"84c2648e-4061-447a-9a9f-e8f43680a046\",\"tenantId\":\"40ea4519-5b48-44e2-8523-3479e0bc8ade\",\"type\":\"None\",\"userAssignedIdentities\":{\"aamdect\":{\"principalId\":\"e8e69ba9-c4c2-4397-85f6-280636474bdd\",\"clientId\":\"fec1990f-d375-4f3c-b9fa-204eb3b995cd\"},\"iqscjeypv\":{\"principalId\":\"da157403-7363-4264-8419-1d1e3d3b49f0\",\"clientId\":\"d9407878-4847-4f4a-a67c-faa9f7b7eacb\"}}},\"properties\":{\"provisioningState\":\"Deleted\",\"status\":\"ConnectedRecently\",\"connectivityStatus\":\"NotYetRegistered\",\"cloudId\":\"jrefovgmkqsle\",\"cloudManagementEndpoint\":\"vxyqjpkcattpngjc\",\"aadClientId\":\"czsqpjhvm\",\"aadTenantId\":\"jvnysounqe\",\"aadApplicationObjectId\":\"noae\",\"aadServicePrincipalObjectId\":\"fhyhltrpmopjmcma\",\"softwareAssuranceProperties\":{\"softwareAssuranceStatus\":\"Enabled\",\"softwareAssuranceIntent\":\"Disable\",\"lastUpdated\":\"2021-10-23T10:51:29Z\"},\"logCollectionProperties\":{\"fromDate\":\"2021-05-27T00:11:36Z\",\"toDate\":\"2021-05-15T07:44:06Z\",\"lastLogGenerated\":\"2021-01-11T08:50:44Z\",\"logCollectionSessionDetails\":[{}]},\"remoteSupportProperties\":{\"accessLevel\":\"DiagnosticsAndRepair\",\"expirationTimeStamp\":\"2021-10-28T19:56:48Z\",\"remoteSupportType\":\"Revoke\",\"remoteSupportNodeSettings\":[{},{},{}],\"remoteSupportSessionDetails\":[{},{},{},{}]},\"desiredProperties\":{\"windowsServerSubscription\":\"Enabled\",\"diagnosticLevel\":\"Off\"},\"reportedProperties\":{\"clusterName\":\"axbezyiuo\",\"clusterId\":\"twhrdxwzywqsm\",\"clusterVersion\":\"ureximoryocfs\",\"nodes\":[{}],\"lastUpdated\":\"2021-10-09T18:45:34Z\",\"imdsAttestation\":\"Enabled\",\"diagnosticLevel\":\"Enhanced\",\"supportedCapabilities\":[\"i\",\"uxh\",\"yudxorrqnbp\",\"czvyifq\"],\"clusterType\":\"FirstParty\",\"manufacturer\":\"vjsllrmvvdfw\",\"oemActivation\":\"Enabled\"},\"isolatedVmAttestationConfiguration\":{\"attestationResourceId\":\"pulexxbczw\",\"relyingPartyServiceEndpoint\":\"uwiqzb\",\"attestationServiceEndpoint\":\"vsovmyokac\"},\"trialDaysRemaining\":41.273003,\"billingModel\":\"lhzdobp\",\"registrationTimestamp\":\"2021-10-04T03:33:51Z\",\"lastSyncTimestamp\":\"2021-08-24T14:10:03Z\",\"lastBillingTimestamp\":\"2021-03-22T21:31:03Z\",\"serviceEndpoint\":\"nchrkcciww\",\"resourceProviderObjectId\":\"uqkhrsajiwku\"},\"location\":\"oskg\",\"tags\":{\"dyjrrfbyaosv\":\"uuimjmvxieduug\"},\"id\":\"xc\",\"name\":\"onpc\",\"type\":\"hocohslkev\"}],\"nextLink\":\"ggzfbu\"}") - .toObject(ClusterList.class); - Assertions.assertEquals("ocpcy", model.value().get(0).location()); - Assertions.assertEquals("rzafbljjgpbtoqcj", model.value().get(0).tags().get("klj")); - Assertions.assertEquals(ManagedServiceIdentityType.NONE, model.value().get(0).typeIdentityType()); - Assertions.assertEquals("nruj", model.value().get(0).cloudManagementEndpoint()); - Assertions.assertEquals("uhmuouqfprwzwbn", model.value().get(0).aadClientId()); - Assertions.assertEquals("itnwuizgazxufi", model.value().get(0).aadTenantId()); - Assertions.assertEquals("ckyfih", model.value().get(0).aadApplicationObjectId()); - Assertions.assertEquals("idf", model.value().get(0).aadServicePrincipalObjectId()); - Assertions.assertEquals(SoftwareAssuranceIntent.ENABLE, - model.value().get(0).softwareAssuranceProperties().softwareAssuranceIntent()); - Assertions.assertEquals(WindowsServerSubscription.DISABLED, - model.value().get(0).desiredProperties().windowsServerSubscription()); - Assertions.assertEquals(DiagnosticLevel.BASIC, model.value().get(0).desiredProperties().diagnosticLevel()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ClusterList model - = new ClusterList() - .withValue( - Arrays - .asList( - new ClusterInner().withLocation("ocpcy") - .withTags(mapOf("klj", "rzafbljjgpbtoqcj", "qajzyulpkudjkr", "vbqid")) - .withTypeIdentityType(ManagedServiceIdentityType.NONE) - .withUserAssignedIdentities(mapOf("jyj", new UserAssignedIdentity(), "aoyfhrtxilnerkuj", - new UserAssignedIdentity(), "l", new UserAssignedIdentity(), "vfqawrlyxwjkcpr", - new UserAssignedIdentity())) - .withCloudManagementEndpoint("nruj") - .withAadClientId("uhmuouqfprwzwbn") - .withAadTenantId("itnwuizgazxufi") - .withAadApplicationObjectId("ckyfih") - .withAadServicePrincipalObjectId("idf") - .withSoftwareAssuranceProperties(new SoftwareAssuranceProperties() - .withSoftwareAssuranceIntent(SoftwareAssuranceIntent.ENABLE)) - .withLogCollectionProperties(new LogCollectionProperties()) - .withRemoteSupportProperties(new RemoteSupportProperties()) - .withDesiredProperties(new ClusterDesiredProperties() - .withWindowsServerSubscription(WindowsServerSubscription.DISABLED) - .withDiagnosticLevel(DiagnosticLevel.BASIC)), - new ClusterInner().withLocation("ftutqxlngxlefgu") - .withTags(mapOf("mi", "krxd", "abhjybi", "tthzrvqd")) - .withTypeIdentityType(ManagedServiceIdentityType.SYSTEM_ASSIGNED) - .withUserAssignedIdentities(mapOf("hbcsgl", new UserAssignedIdentity(), "a", - new UserAssignedIdentity(), "aodxo", new UserAssignedIdentity())) - .withCloudManagementEndpoint("npime") - .withAadClientId("stxgc") - .withAadTenantId("dg") - .withAadApplicationObjectId("ajrmvdjwzrlovmc") - .withAadServicePrincipalObjectId("hijco") - .withSoftwareAssuranceProperties(new SoftwareAssuranceProperties() - .withSoftwareAssuranceIntent(SoftwareAssuranceIntent.DISABLE)) - .withLogCollectionProperties(new LogCollectionProperties()) - .withRemoteSupportProperties(new RemoteSupportProperties()) - .withDesiredProperties(new ClusterDesiredProperties() - .withWindowsServerSubscription(WindowsServerSubscription.DISABLED) - .withDiagnosticLevel(DiagnosticLevel.BASIC)), - new ClusterInner().withLocation("xdn") - .withTags(mapOf("azjdyggd", "owgujjugwdkcglhs")) - .withTypeIdentityType(ManagedServiceIdentityType.USER_ASSIGNED) - .withUserAssignedIdentities( - mapOf("cgyncocpecf", new UserAssignedIdentity(), "coofsxlzev", - new UserAssignedIdentity(), "qjqabcypmivkwl", new UserAssignedIdentity())) - .withCloudManagementEndpoint("l") - .withAadClientId("x") - .withAadTenantId("qgtz") - .withAadApplicationObjectId("pnqbqqwxrjfe") - .withAadServicePrincipalObjectId("lnwsubisn") - .withSoftwareAssuranceProperties(new SoftwareAssuranceProperties() - .withSoftwareAssuranceIntent(SoftwareAssuranceIntent.DISABLE)) - .withLogCollectionProperties(new LogCollectionProperties()) - .withRemoteSupportProperties(new RemoteSupportProperties()) - .withDesiredProperties(new ClusterDesiredProperties() - .withWindowsServerSubscription(WindowsServerSubscription.DISABLED) - .withDiagnosticLevel(DiagnosticLevel.ENHANCED)), - new ClusterInner().withLocation("oskg") - .withTags(mapOf("dyjrrfbyaosv", "uuimjmvxieduug")) - .withTypeIdentityType(ManagedServiceIdentityType.NONE) - .withUserAssignedIdentities(mapOf("aamdect", new UserAssignedIdentity(), "iqscjeypv", - new UserAssignedIdentity())) - .withCloudManagementEndpoint("vxyqjpkcattpngjc") - .withAadClientId("czsqpjhvm") - .withAadTenantId("jvnysounqe") - .withAadApplicationObjectId("noae") - .withAadServicePrincipalObjectId("fhyhltrpmopjmcma") - .withSoftwareAssuranceProperties(new SoftwareAssuranceProperties() - .withSoftwareAssuranceIntent(SoftwareAssuranceIntent.DISABLE)) - .withLogCollectionProperties(new LogCollectionProperties()) - .withRemoteSupportProperties(new RemoteSupportProperties()) - .withDesiredProperties(new ClusterDesiredProperties() - .withWindowsServerSubscription(WindowsServerSubscription.ENABLED) - .withDiagnosticLevel(DiagnosticLevel.OFF)))); - model = BinaryData.fromObject(model).toObject(ClusterList.class); - Assertions.assertEquals("ocpcy", model.value().get(0).location()); - Assertions.assertEquals("rzafbljjgpbtoqcj", model.value().get(0).tags().get("klj")); - Assertions.assertEquals(ManagedServiceIdentityType.NONE, model.value().get(0).typeIdentityType()); - Assertions.assertEquals("nruj", model.value().get(0).cloudManagementEndpoint()); - Assertions.assertEquals("uhmuouqfprwzwbn", model.value().get(0).aadClientId()); - Assertions.assertEquals("itnwuizgazxufi", model.value().get(0).aadTenantId()); - Assertions.assertEquals("ckyfih", model.value().get(0).aadApplicationObjectId()); - Assertions.assertEquals("idf", model.value().get(0).aadServicePrincipalObjectId()); - Assertions.assertEquals(SoftwareAssuranceIntent.ENABLE, - model.value().get(0).softwareAssuranceProperties().softwareAssuranceIntent()); - Assertions.assertEquals(WindowsServerSubscription.DISABLED, - model.value().get(0).desiredProperties().windowsServerSubscription()); - Assertions.assertEquals(DiagnosticLevel.BASIC, model.value().get(0).desiredProperties().diagnosticLevel()); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ClusterNodeTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ClusterNodeTests.java index e68437b25b09..87c41eabca1f 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ClusterNodeTests.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ClusterNodeTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.generated; @@ -11,13 +11,7 @@ public final class ClusterNodeTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ClusterNode model = BinaryData.fromString( - "{\"name\":\"mhjjdhtldwkyzx\",\"id\":39.051258,\"windowsServerSubscription\":\"Enabled\",\"nodeType\":\"FirstParty\",\"ehcResourceId\":\"cwsvlxotog\",\"manufacturer\":\"rupqsxvnmicy\",\"model\":\"ceoveilovno\",\"osName\":\"fj\",\"osVersion\":\"njbkcnxdhbttkph\",\"osDisplayVersion\":\"pnvjtoqnermclf\",\"serialNumber\":\"phoxus\",\"coreCount\":47.54292,\"memoryInGiB\":47.44032,\"lastLicensingTimestamp\":\"2021-09-10T10:11:16Z\",\"oemActivation\":\"Disabled\"}") + "{\"name\":\"jfcn\",\"id\":4.609222895527343,\"windowsServerSubscription\":\"Disabled\",\"nodeType\":\"ThirdParty\",\"ehcResourceId\":\"ttkphywpnvjtoqne\",\"manufacturer\":\"clfp\",\"model\":\"hoxus\",\"osName\":\"pabgyeps\",\"osVersion\":\"tazqugxywpmueefj\",\"osDisplayVersion\":\"fqkquj\",\"serialNumber\":\"suyonobglaocq\",\"coreCount\":15.741170001214488,\"memoryInGiB\":1.921075020730334,\"lastLicensingTimestamp\":\"2021-02-11T06:40:02Z\",\"oemActivation\":\"Enabled\"}") .toObject(ClusterNode.class); } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ClusterNode model = new ClusterNode(); - model = BinaryData.fromObject(model).toObject(ClusterNode.class); - } } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ClusterPatchPropertiesTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ClusterPatchPropertiesTests.java index 640f618858ea..e764f67cfde5 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ClusterPatchPropertiesTests.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ClusterPatchPropertiesTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.generated; @@ -15,29 +15,29 @@ public final class ClusterPatchPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ClusterPatchProperties model = BinaryData.fromString( - "{\"cloudManagementEndpoint\":\"laexqp\",\"aadClientId\":\"adm\",\"aadTenantId\":\"rcrgvx\",\"desiredProperties\":{\"windowsServerSubscription\":\"Disabled\",\"diagnosticLevel\":\"Enhanced\"}}") + "{\"cloudManagementEndpoint\":\"lve\",\"aadClientId\":\"lupj\",\"aadTenantId\":\"hfxobbcswsrtj\",\"desiredProperties\":{\"windowsServerSubscription\":\"Enabled\",\"diagnosticLevel\":\"Enhanced\"}}") .toObject(ClusterPatchProperties.class); - Assertions.assertEquals("laexqp", model.cloudManagementEndpoint()); - Assertions.assertEquals("adm", model.aadClientId()); - Assertions.assertEquals("rcrgvx", model.aadTenantId()); - Assertions.assertEquals(WindowsServerSubscription.DISABLED, + Assertions.assertEquals("lve", model.cloudManagementEndpoint()); + Assertions.assertEquals("lupj", model.aadClientId()); + Assertions.assertEquals("hfxobbcswsrtj", model.aadTenantId()); + Assertions.assertEquals(WindowsServerSubscription.ENABLED, model.desiredProperties().windowsServerSubscription()); Assertions.assertEquals(DiagnosticLevel.ENHANCED, model.desiredProperties().diagnosticLevel()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - ClusterPatchProperties model = new ClusterPatchProperties().withCloudManagementEndpoint("laexqp") - .withAadClientId("adm") - .withAadTenantId("rcrgvx") + ClusterPatchProperties model = new ClusterPatchProperties().withCloudManagementEndpoint("lve") + .withAadClientId("lupj") + .withAadTenantId("hfxobbcswsrtj") .withDesiredProperties( - new ClusterDesiredProperties().withWindowsServerSubscription(WindowsServerSubscription.DISABLED) + new ClusterDesiredProperties().withWindowsServerSubscription(WindowsServerSubscription.ENABLED) .withDiagnosticLevel(DiagnosticLevel.ENHANCED)); model = BinaryData.fromObject(model).toObject(ClusterPatchProperties.class); - Assertions.assertEquals("laexqp", model.cloudManagementEndpoint()); - Assertions.assertEquals("adm", model.aadClientId()); - Assertions.assertEquals("rcrgvx", model.aadTenantId()); - Assertions.assertEquals(WindowsServerSubscription.DISABLED, + Assertions.assertEquals("lve", model.cloudManagementEndpoint()); + Assertions.assertEquals("lupj", model.aadClientId()); + Assertions.assertEquals("hfxobbcswsrtj", model.aadTenantId()); + Assertions.assertEquals(WindowsServerSubscription.ENABLED, model.desiredProperties().windowsServerSubscription()); Assertions.assertEquals(DiagnosticLevel.ENHANCED, model.desiredProperties().diagnosticLevel()); } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ClusterPatchTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ClusterPatchTests.java index 6fc04c03d7e9..be5e95d8a743 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ClusterPatchTests.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ClusterPatchTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.generated; @@ -19,40 +19,39 @@ public final class ClusterPatchTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ClusterPatch model = BinaryData.fromString( - "{\"tags\":{\"g\":\"obglaocqxtcc\",\"wfudwpzntxhdzhl\":\"udxytlmoyrx\",\"hckfrlhrx\":\"qj\"},\"identity\":{\"principalId\":\"5b5b5a7e-4f90-47b8-980d-6dc8dfda626d\",\"tenantId\":\"16cb7545-8cd6-4328-b0aa-9f346c3b939b\",\"type\":\"UserAssigned\",\"userAssignedIdentities\":{\"n\":{\"principalId\":\"cdf2c07b-a565-4c59-88a0-380aa53c1120\",\"clientId\":\"9af84a5d-90d6-4fda-9b19-047e2cd5eb62\"},\"p\":{\"principalId\":\"e8e9ffc2-995c-48ba-8f4a-9d5ce978fb9a\",\"clientId\":\"a7778dcb-6252-4939-ab54-cce7d591e137\"},\"fkuwbcrnwbmehhse\":{\"principalId\":\"49d6f22e-261d-4a30-b039-ad64a91c6b1b\",\"clientId\":\"b57699f3-1bbf-4eba-a1f3-2676ae7eb43d\"},\"us\":{\"principalId\":\"c78a3401-c300-4bc7-bce9-02bea3f895fd\",\"clientId\":\"93439df9-dbb4-47cc-90db-7af65f5f597d\"}}},\"properties\":{\"cloudManagementEndpoint\":\"lhspkdee\",\"aadClientId\":\"ofmxagkvtmelmqkr\",\"aadTenantId\":\"hvljuahaquh\",\"desiredProperties\":{\"windowsServerSubscription\":\"Disabled\",\"diagnosticLevel\":\"Basic\"}}}") + "{\"tags\":{\"adm\":\"qpv\",\"r\":\"sr\",\"fmisg\":\"vxpvgomz\"},\"identity\":{\"principalId\":\"b\",\"tenantId\":\"ldawkzbaliourqha\",\"type\":\"UserAssigned\",\"userAssignedIdentities\":{\"ovbvmeueciv\":{\"principalId\":\"shsfwxosowzxcu\",\"clientId\":\"cjooxdjebwpucwwf\"},\"it\":{\"principalId\":\"zceuojgjrw\",\"clientId\":\"eiotwmcdytdx\"},\"skxfbk\":{\"principalId\":\"rjaw\",\"clientId\":\"wgxhn\"}}},\"properties\":{\"cloudManagementEndpoint\":\"gklwn\",\"aadClientId\":\"hjdauwhvylwz\",\"aadTenantId\":\"dhxujznbmpo\",\"desiredProperties\":{\"windowsServerSubscription\":\"Disabled\",\"diagnosticLevel\":\"Off\"}}}") .toObject(ClusterPatch.class); - Assertions.assertEquals("obglaocqxtcc", model.tags().get("g")); + Assertions.assertEquals("qpv", model.tags().get("adm")); Assertions.assertEquals(ManagedServiceIdentityType.USER_ASSIGNED, model.type()); - Assertions.assertEquals("lhspkdee", model.cloudManagementEndpoint()); - Assertions.assertEquals("ofmxagkvtmelmqkr", model.aadClientId()); - Assertions.assertEquals("hvljuahaquh", model.aadTenantId()); + Assertions.assertEquals("gklwn", model.cloudManagementEndpoint()); + Assertions.assertEquals("hjdauwhvylwz", model.aadClientId()); + Assertions.assertEquals("dhxujznbmpo", model.aadTenantId()); Assertions.assertEquals(WindowsServerSubscription.DISABLED, model.desiredProperties().windowsServerSubscription()); - Assertions.assertEquals(DiagnosticLevel.BASIC, model.desiredProperties().diagnosticLevel()); + Assertions.assertEquals(DiagnosticLevel.OFF, model.desiredProperties().diagnosticLevel()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - ClusterPatch model = new ClusterPatch() - .withTags(mapOf("g", "obglaocqxtcc", "wfudwpzntxhdzhl", "udxytlmoyrx", "hckfrlhrx", "qj")) + ClusterPatch model = new ClusterPatch().withTags(mapOf("adm", "qpv", "r", "sr", "fmisg", "vxpvgomz")) .withType(ManagedServiceIdentityType.USER_ASSIGNED) - .withUserAssignedIdentities(mapOf("n", new UserAssignedIdentity(), "p", new UserAssignedIdentity(), - "fkuwbcrnwbmehhse", new UserAssignedIdentity(), "us", new UserAssignedIdentity())) - .withCloudManagementEndpoint("lhspkdee") - .withAadClientId("ofmxagkvtmelmqkr") - .withAadTenantId("hvljuahaquh") + .withUserAssignedIdentities(mapOf("ovbvmeueciv", new UserAssignedIdentity(), "it", + new UserAssignedIdentity(), "skxfbk", new UserAssignedIdentity())) + .withCloudManagementEndpoint("gklwn") + .withAadClientId("hjdauwhvylwz") + .withAadTenantId("dhxujznbmpo") .withDesiredProperties( new ClusterDesiredProperties().withWindowsServerSubscription(WindowsServerSubscription.DISABLED) - .withDiagnosticLevel(DiagnosticLevel.BASIC)); + .withDiagnosticLevel(DiagnosticLevel.OFF)); model = BinaryData.fromObject(model).toObject(ClusterPatch.class); - Assertions.assertEquals("obglaocqxtcc", model.tags().get("g")); + Assertions.assertEquals("qpv", model.tags().get("adm")); Assertions.assertEquals(ManagedServiceIdentityType.USER_ASSIGNED, model.type()); - Assertions.assertEquals("lhspkdee", model.cloudManagementEndpoint()); - Assertions.assertEquals("ofmxagkvtmelmqkr", model.aadClientId()); - Assertions.assertEquals("hvljuahaquh", model.aadTenantId()); + Assertions.assertEquals("gklwn", model.cloudManagementEndpoint()); + Assertions.assertEquals("hjdauwhvylwz", model.aadClientId()); + Assertions.assertEquals("dhxujznbmpo", model.aadTenantId()); Assertions.assertEquals(WindowsServerSubscription.DISABLED, model.desiredProperties().windowsServerSubscription()); - Assertions.assertEquals(DiagnosticLevel.BASIC, model.desiredProperties().diagnosticLevel()); + Assertions.assertEquals(DiagnosticLevel.OFF, model.desiredProperties().diagnosticLevel()); } // Use "Map.of" if available diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ClusterReportedPropertiesTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ClusterReportedPropertiesTests.java index 28dfbdb6317f..de8229677c79 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ClusterReportedPropertiesTests.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ClusterReportedPropertiesTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.generated; @@ -13,15 +13,8 @@ public final class ClusterReportedPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ClusterReportedProperties model = BinaryData.fromString( - "{\"clusterName\":\"xaepdkzjancuxr\",\"clusterId\":\"wbavxbniwdj\",\"clusterVersion\":\"zt\",\"nodes\":[{\"name\":\"gnxytxhpzxbz\",\"id\":65.9889,\"windowsServerSubscription\":\"Disabled\",\"nodeType\":\"ThirdParty\",\"ehcResourceId\":\"uhxwtctyqiklbbov\",\"manufacturer\":\"wzbhvgyugu\",\"model\":\"vmkfssxqu\",\"osName\":\"fpl\",\"osVersion\":\"gsxnkjzkdeslpv\",\"osDisplayVersion\":\"pwiyig\",\"serialNumber\":\"pkdwzbai\",\"coreCount\":69.34189,\"memoryInGiB\":3.11566,\"lastLicensingTimestamp\":\"2021-01-25T19:39:32Z\",\"oemActivation\":\"Enabled\"}],\"lastUpdated\":\"2021-10-03T00:53:14Z\",\"imdsAttestation\":\"Enabled\",\"diagnosticLevel\":\"Off\",\"supportedCapabilities\":[\"nabckhsmtx\"],\"clusterType\":\"FirstParty\",\"manufacturer\":\"btfhvpesaps\",\"oemActivation\":\"Disabled\"}") + "{\"clusterName\":\"rcvpnazzmhjrunmp\",\"clusterId\":\"tdbhrbnla\",\"clusterVersion\":\"xmyskp\",\"nodes\":[{\"name\":\"btkcxywnytnrsyn\",\"id\":52.88253093916484,\"windowsServerSubscription\":\"Disabled\",\"nodeType\":\"FirstParty\",\"ehcResourceId\":\"zfcl\",\"manufacturer\":\"axdbabph\",\"model\":\"rqlfktsthsucocmn\",\"osName\":\"azt\",\"osVersion\":\"twwrqp\",\"osDisplayVersion\":\"dckzywbiexz\",\"serialNumber\":\"yueaxibxujwb\",\"coreCount\":21.26956580062709,\"memoryInGiB\":63.57293194581869,\"lastLicensingTimestamp\":\"2021-11-10T04:08:23Z\",\"oemActivation\":\"Enabled\"},{\"name\":\"epdkzja\",\"id\":8.1512942355927,\"windowsServerSubscription\":\"Enabled\",\"nodeType\":\"ThirdParty\",\"ehcResourceId\":\"avxbniwdjswztsdb\",\"manufacturer\":\"nxytxh\",\"model\":\"xbzpfzab\",\"osName\":\"cuh\",\"osVersion\":\"tcty\",\"osDisplayVersion\":\"klbb\",\"serialNumber\":\"plwzbhvgyugu\",\"coreCount\":55.35860047242734,\"memoryInGiB\":73.60287621973309,\"lastLicensingTimestamp\":\"2021-04-09T14:20:22Z\",\"oemActivation\":\"Enabled\"},{\"name\":\"kfplgmgsxnk\",\"id\":13.776535210652352,\"windowsServerSubscription\":\"Disabled\",\"nodeType\":\"ThirdParty\",\"ehcResourceId\":\"lopwiyig\",\"manufacturer\":\"pkdwzbai\",\"model\":\"bbaumnyquped\",\"osName\":\"jn\",\"osVersion\":\"ckhsmtxpsieb\",\"osDisplayVersion\":\"hvpesapskrdqm\",\"serialNumber\":\"jdhtldwkyzxu\",\"coreCount\":8.840523335123107,\"memoryInGiB\":6.429881322785458,\"lastLicensingTimestamp\":\"2021-01-31T22:27:42Z\",\"oemActivation\":\"Enabled\"}],\"lastUpdated\":\"2021-01-19T16:43:53Z\",\"msiExpirationTimeStamp\":\"2021-01-31T03:54:24Z\",\"imdsAttestation\":\"Disabled\",\"diagnosticLevel\":\"Basic\",\"supportedCapabilities\":[\"pqsxvnmicy\",\"vce\"],\"clusterType\":\"FirstParty\",\"manufacturer\":\"lo\",\"oemActivation\":\"Disabled\",\"hardwareClass\":\"Small\"}") .toObject(ClusterReportedProperties.class); - Assertions.assertEquals(DiagnosticLevel.OFF, model.diagnosticLevel()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ClusterReportedProperties model = new ClusterReportedProperties().withDiagnosticLevel(DiagnosticLevel.OFF); - model = BinaryData.fromObject(model).toObject(ClusterReportedProperties.class); - Assertions.assertEquals(DiagnosticLevel.OFF, model.diagnosticLevel()); + Assertions.assertEquals(DiagnosticLevel.BASIC, model.diagnosticLevel()); } } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ClustersConfigureRemoteSupportMockTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ClustersConfigureRemoteSupportMockTests.java deleted file mode 100644 index 56df7232cf72..000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ClustersConfigureRemoteSupportMockTests.java +++ /dev/null @@ -1,61 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.azurestackhci.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.azurestackhci.AzureStackHciManager; -import com.azure.resourcemanager.azurestackhci.models.Cluster; -import com.azure.resourcemanager.azurestackhci.models.DiagnosticLevel; -import com.azure.resourcemanager.azurestackhci.models.ManagedServiceIdentityType; -import com.azure.resourcemanager.azurestackhci.models.RemoteSupportRequest; -import com.azure.resourcemanager.azurestackhci.models.RemoteSupportRequestProperties; -import com.azure.resourcemanager.azurestackhci.models.RemoteSupportType; -import com.azure.resourcemanager.azurestackhci.models.SoftwareAssuranceIntent; -import com.azure.resourcemanager.azurestackhci.models.WindowsServerSubscription; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class ClustersConfigureRemoteSupportMockTests { - @Test - public void testConfigureRemoteSupport() throws Exception { - String responseStr - = "{\"identity\":{\"principalId\":\"83fc1202-d8a9-4a6f-9172-7acf49fbea20\",\"tenantId\":\"0961d115-1052-4bd1-a4c0-b1991ca99853\",\"type\":\"SystemAssigned\",\"userAssignedIdentities\":{\"xu\":{\"principalId\":\"b575256c-1a67-4015-be42-e96585294269\",\"clientId\":\"213623c4-429b-415b-ae58-95f181870758\"},\"pfdvhaxdv\":{\"principalId\":\"cb1e61ed-addf-4b3b-87a9-026c6fa3efa3\",\"clientId\":\"08fe3015-ebd6-46b0-aeea-2caf89fb8073\"},\"ehpphthdklmveta\":{\"principalId\":\"aa5ba488-bf78-482b-89a1-ded65cb00e34\",\"clientId\":\"24f45df4-3c82-46b4-83b0-e8ca08d396fa\"}}},\"properties\":{\"provisioningState\":\"Succeeded\",\"status\":\"NotSpecified\",\"connectivityStatus\":\"NotYetRegistered\",\"cloudId\":\"wgiksbbvtoo\",\"cloudManagementEndpoint\":\"p\",\"aadClientId\":\"wp\",\"aadTenantId\":\"hgjtnhtukfaci\",\"aadApplicationObjectId\":\"bfntumeezbxvq\",\"aadServicePrincipalObjectId\":\"nuvwcgasgomtmjzw\",\"softwareAssuranceProperties\":{\"softwareAssuranceStatus\":\"Disabled\",\"softwareAssuranceIntent\":\"Enable\",\"lastUpdated\":\"2021-04-20T10:00:56Z\"},\"logCollectionProperties\":{\"fromDate\":\"2021-06-19T19:54:52Z\",\"toDate\":\"2021-08-06T00:39:29Z\",\"lastLogGenerated\":\"2021-02-10T04:05:47Z\",\"logCollectionSessionDetails\":[{\"logStartTime\":\"2021-02-07T23:38:04Z\",\"logEndTime\":\"2021-10-21T13:20:35Z\",\"timeCollected\":\"2021-08-23T00:31:41Z\",\"logSize\":4891435980141713838,\"logCollectionStatus\":\"Failed\",\"logCollectionJobType\":\"OnDemand\",\"correlationId\":\"ll\",\"endTimeCollected\":\"2021-10-05T03:59:42Z\",\"logCollectionError\":{}},{\"logStartTime\":\"2021-11-03T13:45:26Z\",\"logEndTime\":\"2021-10-12T13:30:19Z\",\"timeCollected\":\"2021-03-16T03:23:22Z\",\"logSize\":2662581133111301135,\"logCollectionStatus\":\"InProgress\",\"logCollectionJobType\":\"Scheduled\",\"correlationId\":\"mlyotg\",\"endTimeCollected\":\"2021-01-04T07:08:54Z\",\"logCollectionError\":{}},{\"logStartTime\":\"2021-05-06T10:13:33Z\",\"logEndTime\":\"2021-10-19T20:33:09Z\",\"timeCollected\":\"2021-02-14T10:44:54Z\",\"logSize\":8357561947868417233,\"logCollectionStatus\":\"None\",\"logCollectionJobType\":\"OnDemand\",\"correlationId\":\"bxeetqujxcxxqn\",\"endTimeCollected\":\"2021-08-16T20:52:08Z\",\"logCollectionError\":{}},{\"logStartTime\":\"2021-04-15T05:07:22Z\",\"logEndTime\":\"2021-10-10T07:02:55Z\",\"timeCollected\":\"2021-05-20T04:42:02Z\",\"logSize\":7207641865244379752,\"logCollectionStatus\":\"Failed\",\"logCollectionJobType\":\"Scheduled\",\"correlationId\":\"v\",\"endTimeCollected\":\"2021-04-17T16:51:58Z\",\"logCollectionError\":{}}]},\"remoteSupportProperties\":{\"accessLevel\":\"DiagnosticsAndRepair\",\"expirationTimeStamp\":\"2021-09-30T10:56:46Z\",\"remoteSupportType\":\"Enable\",\"remoteSupportNodeSettings\":[{\"arcResourceId\":\"ilcchskxxkansbvr\",\"state\":\"qgvtojrulfu\",\"createdAt\":\"2021-09-20T21:53:57Z\",\"updatedAt\":\"2021-11-30T18:51:59Z\",\"connectionStatus\":\"hcfjzhxlyubqjro\",\"connectionErrorMessage\":\"vrjeqmtzzbeqrztr\",\"transcriptLocation\":\"lxrdhabsrwrsn\"},{\"arcResourceId\":\"pqatiwkkvyanxkv\",\"state\":\"semsvuvd\",\"createdAt\":\"2021-07-09T07:15:04Z\",\"updatedAt\":\"2021-03-06T23:53:15Z\",\"connectionStatus\":\"qmmlivrjjxnwx\",\"connectionErrorMessage\":\"hpojxl\",\"transcriptLocation\":\"z\"},{\"arcResourceId\":\"pgfquwzpwiibelwc\",\"state\":\"wkwbpjx\",\"createdAt\":\"2021-07-06T07:22:37Z\",\"updatedAt\":\"2021-05-19T01:42:55Z\",\"connectionStatus\":\"sqtbxxniu\",\"connectionErrorMessage\":\"dzhgbdgzpags\",\"transcriptLocation\":\"nadbu\"},{\"arcResourceId\":\"r\",\"state\":\"fllmqiy\",\"createdAt\":\"2021-08-15T19:08:33Z\",\"updatedAt\":\"2021-11-16T18:35:26Z\",\"connectionStatus\":\"nkkiiwvmtumxpy\",\"connectionErrorMessage\":\"jfuaxroqvqpilrgu\",\"transcriptLocation\":\"anlduwzorxsb\"}],\"remoteSupportSessionDetails\":[{\"sessionStartTime\":\"2021-02-04T06:25:12Z\",\"sessionEndTime\":\"2021-04-10T14:35:27Z\",\"nodeName\":\"mxkqvf\",\"duration\":2889876698432401855,\"accessLevel\":\"Diagnostics\"},{\"sessionStartTime\":\"2021-02-18T05:36:17Z\",\"sessionEndTime\":\"2021-07-14T16:46:48Z\",\"nodeName\":\"wyvpj\",\"duration\":1357868514258880860,\"accessLevel\":\"DiagnosticsAndRepair\"}]},\"desiredProperties\":{\"windowsServerSubscription\":\"Disabled\",\"diagnosticLevel\":\"Enhanced\"},\"reportedProperties\":{\"clusterName\":\"exkydfb\",\"clusterId\":\"javh\",\"clusterVersion\":\"rkjd\",\"nodes\":[{\"name\":\"liegftcvbi\",\"id\":81.57286,\"windowsServerSubscription\":\"Enabled\",\"nodeType\":\"FirstParty\",\"ehcResourceId\":\"dnkefgm\",\"manufacturer\":\"hcebuvczldbglzo\",\"model\":\"baaq\",\"osName\":\"ekaj\",\"osVersion\":\"yzgsnorbjgmnz\",\"osDisplayVersion\":\"t\",\"serialNumber\":\"rxkhlob\",\"coreCount\":79.76163,\"memoryInGiB\":19.954985,\"lastLicensingTimestamp\":\"2021-05-11T18:13:33Z\",\"oemActivation\":\"Disabled\"}],\"lastUpdated\":\"2021-03-08T05:22:54Z\",\"imdsAttestation\":\"Enabled\",\"diagnosticLevel\":\"Off\",\"supportedCapabilities\":[\"uosnuud\"],\"clusterType\":\"ThirdParty\",\"manufacturer\":\"hyibdrqrswh\",\"oemActivation\":\"Disabled\"},\"isolatedVmAttestationConfiguration\":{\"attestationResourceId\":\"y\",\"relyingPartyServiceEndpoint\":\"wtjoxz\",\"attestationServiceEndpoint\":\"wfqchvcz\"},\"trialDaysRemaining\":0.509882,\"billingModel\":\"nctagfyvrtpqpem\",\"registrationTimestamp\":\"2021-07-17T01:09:25Z\",\"lastSyncTimestamp\":\"2021-02-06T15:16:06Z\",\"lastBillingTimestamp\":\"2021-12-03T07:21:37Z\",\"serviceEndpoint\":\"dqhqyhwqwemv\",\"resourceProviderObjectId\":\"abckmzeoxinhgre\"},\"location\":\"twhlpuzjpce\",\"tags\":{\"phmsexroq\":\"zangprbfaxyxzlbc\",\"nfee\":\"ndktxfv\",\"bgnixxoww\":\"gpkrie\"},\"id\":\"kyfwnwpiwxeiicr\",\"name\":\"p\",\"type\":\"pk\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - AzureStackHciManager manager = AzureStackHciManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - Cluster response = manager.clusters() - .configureRemoteSupport("ezsdsuxheq", "gcruxspinym", - new RemoteSupportRequest().withProperties(new RemoteSupportRequestProperties() - .withExpirationTimestamp(OffsetDateTime.parse("2021-06-04T16:05:44Z")) - .withRemoteSupportType(RemoteSupportType.ENABLE)), - com.azure.core.util.Context.NONE); - - Assertions.assertEquals("twhlpuzjpce", response.location()); - Assertions.assertEquals("zangprbfaxyxzlbc", response.tags().get("phmsexroq")); - Assertions.assertEquals(ManagedServiceIdentityType.SYSTEM_ASSIGNED, response.typeIdentityType()); - Assertions.assertEquals("p", response.cloudManagementEndpoint()); - Assertions.assertEquals("wp", response.aadClientId()); - Assertions.assertEquals("hgjtnhtukfaci", response.aadTenantId()); - Assertions.assertEquals("bfntumeezbxvq", response.aadApplicationObjectId()); - Assertions.assertEquals("nuvwcgasgomtmjzw", response.aadServicePrincipalObjectId()); - Assertions.assertEquals(SoftwareAssuranceIntent.ENABLE, - response.softwareAssuranceProperties().softwareAssuranceIntent()); - Assertions.assertEquals(WindowsServerSubscription.DISABLED, - response.desiredProperties().windowsServerSubscription()); - Assertions.assertEquals(DiagnosticLevel.ENHANCED, response.desiredProperties().diagnosticLevel()); - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ClustersCreateIdentityMockTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ClustersCreateIdentityMockTests.java index 5250708e6eb3..c2b3fd8ee59c 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ClustersCreateIdentityMockTests.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ClustersCreateIdentityMockTests.java @@ -1,13 +1,13 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.generated; import com.azure.core.credential.AccessToken; import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.azurestackhci.AzureStackHciManager; import com.azure.resourcemanager.azurestackhci.models.ClusterIdentityResponse; @@ -20,17 +20,17 @@ public final class ClustersCreateIdentityMockTests { @Test public void testCreateIdentity() throws Exception { String responseStr - = "{\"properties\":{\"aadClientId\":\"ledjcustbvtqigd\",\"aadTenantId\":\"vsgeafgf\",\"aadServicePrincipalObjectId\":\"ehxlzsxezppk\",\"aadApplicationObjectId\":\"aaeskyfjlpze\"}}"; + = "{\"properties\":{\"aadClientId\":\"ayscseydzje\",\"aadTenantId\":\"xm\",\"aadServicePrincipalObjectId\":\"kvmuwrxlniwmcp\",\"aadApplicationObjectId\":\"rdlhvdvmiphbe\"}}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); AzureStackHciManager manager = AzureStackHciManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); ClusterIdentityResponse response - = manager.clusters().createIdentity("lsyj", "eolctaebf", com.azure.core.util.Context.NONE); + = manager.clusters().createIdentity("ngu", "aby", com.azure.core.util.Context.NONE); } } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ClustersCreateWithResponseMockTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ClustersCreateWithResponseMockTests.java deleted file mode 100644 index 89682cebd9f9..000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ClustersCreateWithResponseMockTests.java +++ /dev/null @@ -1,92 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.azurestackhci.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.azurestackhci.AzureStackHciManager; -import com.azure.resourcemanager.azurestackhci.models.Cluster; -import com.azure.resourcemanager.azurestackhci.models.ClusterDesiredProperties; -import com.azure.resourcemanager.azurestackhci.models.DiagnosticLevel; -import com.azure.resourcemanager.azurestackhci.models.LogCollectionProperties; -import com.azure.resourcemanager.azurestackhci.models.ManagedServiceIdentityType; -import com.azure.resourcemanager.azurestackhci.models.RemoteSupportProperties; -import com.azure.resourcemanager.azurestackhci.models.SoftwareAssuranceIntent; -import com.azure.resourcemanager.azurestackhci.models.SoftwareAssuranceProperties; -import com.azure.resourcemanager.azurestackhci.models.UserAssignedIdentity; -import com.azure.resourcemanager.azurestackhci.models.WindowsServerSubscription; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class ClustersCreateWithResponseMockTests { - @Test - public void testCreateWithResponse() throws Exception { - String responseStr - = "{\"identity\":{\"principalId\":\"33b9725c-39e1-4f46-ac71-c8fd624c348a\",\"tenantId\":\"d034c756-7750-4854-9603-17b0e99f4d16\",\"type\":\"UserAssigned\",\"userAssignedIdentities\":{\"t\":{\"principalId\":\"eefcd083-6f4e-47fa-b032-b9a90fa54c0c\",\"clientId\":\"2a17e21f-0f6b-4022-a4db-7d41b3644147\"},\"molpcqyde\":{\"principalId\":\"310e2ba7-6013-47c6-ad85-7425c0c5ef56\",\"clientId\":\"f6b9e9f9-5a95-474d-9145-ea615a11056d\"},\"skiczd\":{\"principalId\":\"12b2456b-7cec-460d-a09e-f95c482c74bc\",\"clientId\":\"1dd8b1fc-8657-4d94-83a0-57d309e7b6c1\"},\"eizikgqaboohxbms\":{\"principalId\":\"2400a659-6b39-4414-b6be-4e42028c832a\",\"clientId\":\"0e7d1bcc-41b3-40f4-85ee-9f737e366abc\"}}},\"properties\":{\"provisioningState\":\"Provisioning\",\"status\":\"Error\",\"connectivityStatus\":\"NotSpecified\",\"cloudId\":\"vewuyqaeoh\",\"cloudManagementEndpoint\":\"hgejkbvhhdaurgh\",\"aadClientId\":\"xaex\",\"aadTenantId\":\"hxjxjoezlqxrkdkn\",\"aadApplicationObjectId\":\"bekt\",\"aadServicePrincipalObjectId\":\"o\",\"softwareAssuranceProperties\":{\"softwareAssuranceStatus\":\"Disabled\",\"softwareAssuranceIntent\":\"Disable\",\"lastUpdated\":\"2021-06-22T14:04:52Z\"},\"logCollectionProperties\":{\"fromDate\":\"2020-12-28T13:33:15Z\",\"toDate\":\"2020-12-24T14:15:46Z\",\"lastLogGenerated\":\"2021-02-10T19:11:34Z\",\"logCollectionSessionDetails\":[{\"logStartTime\":\"2021-10-27T12:48:20Z\",\"logEndTime\":\"2021-10-28T14:26:59Z\",\"timeCollected\":\"2021-11-07T15:02:52Z\",\"logSize\":6876179074329642977,\"logCollectionStatus\":\"Succeeded\",\"logCollectionJobType\":\"Scheduled\",\"correlationId\":\"bmdlqjbed\",\"endTimeCollected\":\"2021-04-13T18:01:59Z\",\"logCollectionError\":{}},{\"logStartTime\":\"2021-05-30T19:18:21Z\",\"logEndTime\":\"2021-09-04T03:17:34Z\",\"timeCollected\":\"2021-05-22T06:53:40Z\",\"logSize\":1873661597049622764,\"logCollectionStatus\":\"Failed\",\"logCollectionJobType\":\"OnDemand\",\"correlationId\":\"xpkcdp\",\"endTimeCollected\":\"2021-05-29T14:33:46Z\",\"logCollectionError\":{}},{\"logStartTime\":\"2021-07-13T06:57:28Z\",\"logEndTime\":\"2021-11-10T07:43:10Z\",\"timeCollected\":\"2021-05-14T16:09:24Z\",\"logSize\":2408862410974547227,\"logCollectionStatus\":\"Failed\",\"logCollectionJobType\":\"Scheduled\",\"correlationId\":\"jyg\",\"endTimeCollected\":\"2021-04-10T00:07:42Z\",\"logCollectionError\":{}},{\"logStartTime\":\"2021-02-08T05:06:19Z\",\"logEndTime\":\"2021-11-10T12:39:45Z\",\"timeCollected\":\"2021-07-10T03:31:24Z\",\"logSize\":5940808250160111921,\"logCollectionStatus\":\"None\",\"logCollectionJobType\":\"OnDemand\",\"correlationId\":\"gvqcpdwj\",\"endTimeCollected\":\"2021-01-03T16:46:04Z\",\"logCollectionError\":{}}]},\"remoteSupportProperties\":{\"accessLevel\":\"Diagnostics\",\"expirationTimeStamp\":\"2021-11-22T22:58:24Z\",\"remoteSupportType\":\"Enable\",\"remoteSupportNodeSettings\":[{\"arcResourceId\":\"cdjhunhg\",\"state\":\"gawnrrnquo\",\"createdAt\":\"2021-04-17T12:36:08Z\",\"updatedAt\":\"2021-01-28T18:03:35Z\",\"connectionStatus\":\"eimseobfsxstcyil\",\"connectionErrorMessage\":\"zmmx\",\"transcriptLocation\":\"zlquzexo\"},{\"arcResourceId\":\"xebjvbz\",\"state\":\"zabwmvog\",\"createdAt\":\"2021-11-23T09:45:11Z\",\"updatedAt\":\"2021-02-22T10:33:03Z\",\"connectionStatus\":\"gi\",\"connectionErrorMessage\":\"wcehaqidoyzlt\",\"transcriptLocation\":\"omqo\"},{\"arcResourceId\":\"epiaeapfsergd\",\"state\":\"eqn\",\"createdAt\":\"2021-11-04T23:22:14Z\",\"updatedAt\":\"2021-04-16T16:17:47Z\",\"connectionStatus\":\"wbpqqncjubkhjoz\",\"connectionErrorMessage\":\"mcwmbup\",\"transcriptLocation\":\"qyvliqiipsejbsvs\"}],\"remoteSupportSessionDetails\":[{\"sessionStartTime\":\"2021-07-02T19:45:24Z\",\"sessionEndTime\":\"2021-01-13T14:45:34Z\",\"nodeName\":\"dzydisnuep\",\"duration\":3643735732741373341,\"accessLevel\":\"DiagnosticsAndRepair\"},{\"sessionStartTime\":\"2021-01-10T21:45:57Z\",\"sessionEndTime\":\"2021-09-29T18:06:51Z\",\"nodeName\":\"ttdiia\",\"duration\":6520305168269543676,\"accessLevel\":\"DiagnosticsAndRepair\"},{\"sessionStartTime\":\"2021-01-09T11:54:07Z\",\"sessionEndTime\":\"2021-05-22T02:36:51Z\",\"nodeName\":\"ebiphryvcjwqwoq\",\"duration\":7314568991883609573,\"accessLevel\":\"DiagnosticsAndRepair\"},{\"sessionStartTime\":\"2021-11-03T16:42:03Z\",\"sessionEndTime\":\"2021-03-06T14:36:39Z\",\"nodeName\":\"s\",\"duration\":4001919220570472502,\"accessLevel\":\"DiagnosticsAndRepair\"}]},\"desiredProperties\":{\"windowsServerSubscription\":\"Enabled\",\"diagnosticLevel\":\"Off\"},\"reportedProperties\":{\"clusterName\":\"v\",\"clusterId\":\"khsusmmorf\",\"clusterVersion\":\"hwilz\",\"nodes\":[{\"name\":\"jmriprlkdneyttlr\",\"id\":87.365326,\"windowsServerSubscription\":\"Disabled\",\"nodeType\":\"FirstParty\",\"ehcResourceId\":\"tpumltwjfluxynb\",\"manufacturer\":\"zlqywauyqn\",\"model\":\"khmocgjs\",\"osName\":\"ouarhwvixqqggljk\",\"osVersion\":\"sjrclrvtzq\",\"osDisplayVersion\":\"bctbhp\",\"serialNumber\":\"xpc\",\"coreCount\":40.743237,\"memoryInGiB\":3.5265923,\"lastLicensingTimestamp\":\"2021-08-27T15:37:44Z\",\"oemActivation\":\"Enabled\"},{\"name\":\"eq\",\"id\":4.6417713,\"windowsServerSubscription\":\"Enabled\",\"nodeType\":\"ThirdParty\",\"ehcResourceId\":\"wriuomzczfkic\",\"manufacturer\":\"vsaaxwsp\",\"model\":\"xikhfj\",\"osName\":\"bglcxkxgzzromvy\",\"osVersion\":\"sem\",\"osDisplayVersion\":\"esrfsvpinkzpatq\",\"serialNumber\":\"iswxspv\",\"coreCount\":71.246414,\"memoryInGiB\":56.06608,\"lastLicensingTimestamp\":\"2021-11-07T00:53:27Z\",\"oemActivation\":\"Disabled\"},{\"name\":\"pftesubzpvpvdy\",\"id\":81.08345,\"windowsServerSubscription\":\"Enabled\",\"nodeType\":\"ThirdParty\",\"ehcResourceId\":\"eu\",\"manufacturer\":\"fjb\",\"model\":\"zfxnxmlbmuos\",\"osName\":\"jmdihdcyyyzlw\",\"osVersion\":\"wzjnufz\",\"osDisplayVersion\":\"gmdq\",\"serialNumber\":\"nbzrtfte\",\"coreCount\":78.62227,\"memoryInGiB\":78.94032,\"lastLicensingTimestamp\":\"2021-08-16T22:24:01Z\",\"oemActivation\":\"Disabled\"},{\"name\":\"sxmtyjjvavdp\",\"id\":14.428884,\"windowsServerSubscription\":\"Disabled\",\"nodeType\":\"ThirdParty\",\"ehcResourceId\":\"titsf\",\"manufacturer\":\"fwanm\",\"model\":\"scauwazcgwdfr\",\"osName\":\"gyb\",\"osVersion\":\"ozokscvglli\",\"osDisplayVersion\":\"gbyfgwe\",\"serialNumber\":\"k\",\"coreCount\":40.628033,\"memoryInGiB\":7.843375,\"lastLicensingTimestamp\":\"2021-06-05T16:00:28Z\",\"oemActivation\":\"Enabled\"}],\"lastUpdated\":\"2021-03-20T16:40:18Z\",\"imdsAttestation\":\"Enabled\",\"diagnosticLevel\":\"Off\",\"supportedCapabilities\":[\"skl\",\"e\",\"uugggzlfbgrd\"],\"clusterType\":\"ThirdParty\",\"manufacturer\":\"srtmdylperpiltt\",\"oemActivation\":\"Disabled\"},\"isolatedVmAttestationConfiguration\":{\"attestationResourceId\":\"fcm\",\"relyingPartyServiceEndpoint\":\"fbodetresrgvts\",\"attestationServiceEndpoint\":\"vftwaiv\"},\"trialDaysRemaining\":41.889103,\"billingModel\":\"evzgjypanh\",\"registrationTimestamp\":\"2021-08-20T09:01:24Z\",\"lastSyncTimestamp\":\"2021-10-11T22:17:45Z\",\"lastBillingTimestamp\":\"2021-06-06T18:24:53Z\",\"serviceEndpoint\":\"twwzjw\",\"resourceProviderObjectId\":\"nxlkfhglhrfoxqwe\"},\"location\":\"snhpcselqx\",\"tags\":{\"rl\":\"pqibukklv\",\"vfqbqna\":\"mlccmetjscz\"},\"id\":\"dsyenzsieuscpl\",\"name\":\"yvdgxlyzk\",\"type\":\"itdshezsvkolru\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - AzureStackHciManager manager = AzureStackHciManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - Cluster response = manager.clusters() - .define("xxij") - .withRegion("do") - .withExistingResourceGroup("dm") - .withTags(mapOf("hmnulwem", "zfjjnnuxxrkk", "flu", "dcifrhjulrsulwz")) - .withTypeIdentityType(ManagedServiceIdentityType.SYSTEM_ASSIGNED) - .withUserAssignedIdentities( - mapOf("gyacwrasekwef", new UserAssignedIdentity(), "inwoqartwyxq", new UserAssignedIdentity())) - .withCloudManagementEndpoint("jezcjumvps") - .withAadClientId("ioyoiglkmiq") - .withAadTenantId("nracli") - .withAadApplicationObjectId("fqpspkladyd") - .withAadServicePrincipalObjectId("hautw") - .withSoftwareAssuranceProperties( - new SoftwareAssuranceProperties().withSoftwareAssuranceIntent(SoftwareAssuranceIntent.ENABLE)) - .withLogCollectionProperties(new LogCollectionProperties()) - .withRemoteSupportProperties(new RemoteSupportProperties()) - .withDesiredProperties( - new ClusterDesiredProperties().withWindowsServerSubscription(WindowsServerSubscription.DISABLED) - .withDiagnosticLevel(DiagnosticLevel.ENHANCED)) - .create(); - - Assertions.assertEquals("snhpcselqx", response.location()); - Assertions.assertEquals("pqibukklv", response.tags().get("rl")); - Assertions.assertEquals(ManagedServiceIdentityType.USER_ASSIGNED, response.typeIdentityType()); - Assertions.assertEquals("hgejkbvhhdaurgh", response.cloudManagementEndpoint()); - Assertions.assertEquals("xaex", response.aadClientId()); - Assertions.assertEquals("hxjxjoezlqxrkdkn", response.aadTenantId()); - Assertions.assertEquals("bekt", response.aadApplicationObjectId()); - Assertions.assertEquals("o", response.aadServicePrincipalObjectId()); - Assertions.assertEquals(SoftwareAssuranceIntent.DISABLE, - response.softwareAssuranceProperties().softwareAssuranceIntent()); - Assertions.assertEquals(WindowsServerSubscription.ENABLED, - response.desiredProperties().windowsServerSubscription()); - Assertions.assertEquals(DiagnosticLevel.OFF, response.desiredProperties().diagnosticLevel()); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ClustersDeleteMockTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ClustersDeleteMockTests.java index 3f7fe5a56c5e..046e34aa0123 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ClustersDeleteMockTests.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ClustersDeleteMockTests.java @@ -1,13 +1,13 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.generated; import com.azure.core.credential.AccessToken; import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.azurestackhci.AzureStackHciManager; import java.nio.charset.StandardCharsets; @@ -25,9 +25,9 @@ public void testDelete() throws Exception { AzureStackHciManager manager = AzureStackHciManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - manager.clusters().delete("pj", "tlzm", com.azure.core.util.Context.NONE); + manager.clusters().delete("uqxbpiatwfauje", "qdtadrakgdd", com.azure.core.util.Context.NONE); } } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ClustersExtendSoftwareAssuranceBenefitMockTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ClustersExtendSoftwareAssuranceBenefitMockTests.java deleted file mode 100644 index 3c8e8b5cadd6..000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ClustersExtendSoftwareAssuranceBenefitMockTests.java +++ /dev/null @@ -1,60 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.azurestackhci.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.azurestackhci.AzureStackHciManager; -import com.azure.resourcemanager.azurestackhci.models.Cluster; -import com.azure.resourcemanager.azurestackhci.models.DiagnosticLevel; -import com.azure.resourcemanager.azurestackhci.models.ManagedServiceIdentityType; -import com.azure.resourcemanager.azurestackhci.models.SoftwareAssuranceChangeRequest; -import com.azure.resourcemanager.azurestackhci.models.SoftwareAssuranceChangeRequestProperties; -import com.azure.resourcemanager.azurestackhci.models.SoftwareAssuranceIntent; -import com.azure.resourcemanager.azurestackhci.models.WindowsServerSubscription; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class ClustersExtendSoftwareAssuranceBenefitMockTests { - @Test - public void testExtendSoftwareAssuranceBenefit() throws Exception { - String responseStr - = "{\"identity\":{\"principalId\":\"a1c0d1b5-155b-47db-8881-25e30ad3f49f\",\"tenantId\":\"95bad002-bc63-47a0-a9a6-9cc1b847edc9\",\"type\":\"None\",\"userAssignedIdentities\":{\"tmk\":{\"principalId\":\"f131e288-9ee8-45ea-a8dd-257b689bcc22\",\"clientId\":\"77ff6a15-2c07-43e8-bb08-06b9da4ac95e\"}}},\"properties\":{\"provisioningState\":\"Succeeded\",\"status\":\"DeploymentInProgress\",\"connectivityStatus\":\"NotYetRegistered\",\"cloudId\":\"xofqovchi\",\"cloudManagementEndpoint\":\"p\",\"aadClientId\":\"fidusztekxbyjgm\",\"aadTenantId\":\"e\",\"aadApplicationObjectId\":\"yihpqadagrh\",\"aadServicePrincipalObjectId\":\"icxdwyjfo\",\"softwareAssuranceProperties\":{\"softwareAssuranceStatus\":\"Disabled\",\"softwareAssuranceIntent\":\"Disable\",\"lastUpdated\":\"2021-08-25T11:50:02Z\"},\"logCollectionProperties\":{\"fromDate\":\"2021-04-13T00:22:08Z\",\"toDate\":\"2021-08-21T21:09:47Z\",\"lastLogGenerated\":\"2021-11-22T15:26:05Z\",\"logCollectionSessionDetails\":[{\"logStartTime\":\"2021-07-09T20:14:47Z\",\"logEndTime\":\"2021-05-21T15:56:42Z\",\"timeCollected\":\"2021-05-26T18:15:22Z\",\"logSize\":4267812501058114274,\"logCollectionStatus\":\"Failed\",\"logCollectionJobType\":\"OnDemand\",\"correlationId\":\"lscrdpibfdyjduss\",\"endTimeCollected\":\"2021-06-08T13:08:24Z\",\"logCollectionError\":{}},{\"logStartTime\":\"2021-09-05T00:37:54Z\",\"logEndTime\":\"2021-06-13T22:26:49Z\",\"timeCollected\":\"2021-11-26T05:02:46Z\",\"logSize\":7353880373342288472,\"logCollectionStatus\":\"InProgress\",\"logCollectionJobType\":\"Scheduled\",\"correlationId\":\"hbfrnuybfflj\",\"endTimeCollected\":\"2021-06-08T15:40:26Z\",\"logCollectionError\":{}}]},\"remoteSupportProperties\":{\"accessLevel\":\"Diagnostics\",\"expirationTimeStamp\":\"2021-08-11T06:24:02Z\",\"remoteSupportType\":\"Revoke\",\"remoteSupportNodeSettings\":[{\"arcResourceId\":\"dusr\",\"state\":\"xfavsqwudoh\",\"createdAt\":\"2021-05-08T17:26:42Z\",\"updatedAt\":\"2021-11-14T01:49:53Z\",\"connectionStatus\":\"l\",\"connectionErrorMessage\":\"psimsf\",\"transcriptLocation\":\"pofqpmbhy\"},{\"arcResourceId\":\"sdrmmttjxophgerh\",\"state\":\"vgohtw\",\"createdAt\":\"2021-11-04T11:49:52Z\",\"updatedAt\":\"2020-12-30T16:03:16Z\",\"connectionStatus\":\"ixysf\",\"connectionErrorMessage\":\"msqywwwmhkruwae\",\"transcriptLocation\":\"ympmlqoin\"},{\"arcResourceId\":\"duewihapfj\",\"state\":\"knjdiqfliejhp\",\"createdAt\":\"2021-08-22T05:16:33Z\",\"updatedAt\":\"2021-08-23T08:00:50Z\",\"connectionStatus\":\"fsbw\",\"connectionErrorMessage\":\"ivbvzi\",\"transcriptLocation\":\"wxgoooxzpra\"}],\"remoteSupportSessionDetails\":[{\"sessionStartTime\":\"2020-12-20T08:32:34Z\",\"sessionEndTime\":\"2021-05-19T19:16:08Z\",\"nodeName\":\"dgzigjsugswhgs\",\"duration\":5564706572038132947,\"accessLevel\":\"Diagnostics\"}]},\"desiredProperties\":{\"windowsServerSubscription\":\"Disabled\",\"diagnosticLevel\":\"Basic\"},\"reportedProperties\":{\"clusterName\":\"ohzha\",\"clusterId\":\"v\",\"clusterVersion\":\"xbg\",\"nodes\":[{\"name\":\"rvqchoadhrsxqvzv\",\"id\":29.559118,\"windowsServerSubscription\":\"Disabled\",\"nodeType\":\"FirstParty\",\"ehcResourceId\":\"fajglzrsubklrxhj\",\"manufacturer\":\"tcetjdv\",\"model\":\"dieq\",\"osName\":\"wa\",\"osVersion\":\"wdxvqzxoebwg\",\"osDisplayVersion\":\"bibanbau\",\"serialNumber\":\"tzvp\",\"coreCount\":51.154564,\"memoryInGiB\":78.0847,\"lastLicensingTimestamp\":\"2021-07-29T22:27:22Z\",\"oemActivation\":\"Disabled\"}],\"lastUpdated\":\"2021-11-26T19:20:25Z\",\"imdsAttestation\":\"Disabled\",\"diagnosticLevel\":\"Enhanced\",\"supportedCapabilities\":[\"anbtttkgsu\"],\"clusterType\":\"ThirdParty\",\"manufacturer\":\"swgkpjhboyikebh\",\"oemActivation\":\"Disabled\"},\"isolatedVmAttestationConfiguration\":{\"attestationResourceId\":\"gwl\",\"relyingPartyServiceEndpoint\":\"hueoijyzcqyp\",\"attestationServiceEndpoint\":\"zufgs\"},\"trialDaysRemaining\":9.9179325,\"billingModel\":\"y\",\"registrationTimestamp\":\"2021-01-25T09:28:03Z\",\"lastSyncTimestamp\":\"2021-01-28T19:23:55Z\",\"lastBillingTimestamp\":\"2020-12-26T21:13:09Z\",\"serviceEndpoint\":\"pqa\",\"resourceProviderObjectId\":\"mkncfgybmxsnxo\"},\"location\":\"ullojk\",\"tags\":{\"wdjuxdbdljzgdy\":\"hg\",\"sgzlrqhb\":\"cvuq\"},\"id\":\"nq\",\"name\":\"gdxwbsfpyxx\",\"type\":\"jlf\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - AzureStackHciManager manager = AzureStackHciManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - Cluster response - = manager.clusters() - .extendSoftwareAssuranceBenefit("toyrplixlajml", "pq", - new SoftwareAssuranceChangeRequest().withProperties(new SoftwareAssuranceChangeRequestProperties() - .withSoftwareAssuranceIntent(SoftwareAssuranceIntent.DISABLE)), - com.azure.core.util.Context.NONE); - - Assertions.assertEquals("ullojk", response.location()); - Assertions.assertEquals("hg", response.tags().get("wdjuxdbdljzgdy")); - Assertions.assertEquals(ManagedServiceIdentityType.NONE, response.typeIdentityType()); - Assertions.assertEquals("p", response.cloudManagementEndpoint()); - Assertions.assertEquals("fidusztekxbyjgm", response.aadClientId()); - Assertions.assertEquals("e", response.aadTenantId()); - Assertions.assertEquals("yihpqadagrh", response.aadApplicationObjectId()); - Assertions.assertEquals("icxdwyjfo", response.aadServicePrincipalObjectId()); - Assertions.assertEquals(SoftwareAssuranceIntent.DISABLE, - response.softwareAssuranceProperties().softwareAssuranceIntent()); - Assertions.assertEquals(WindowsServerSubscription.DISABLED, - response.desiredProperties().windowsServerSubscription()); - Assertions.assertEquals(DiagnosticLevel.BASIC, response.desiredProperties().diagnosticLevel()); - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ClustersGetByResourceGroupWithResponseMockTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ClustersGetByResourceGroupWithResponseMockTests.java deleted file mode 100644 index 8043d0ac3be4..000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ClustersGetByResourceGroupWithResponseMockTests.java +++ /dev/null @@ -1,55 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.azurestackhci.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.azurestackhci.AzureStackHciManager; -import com.azure.resourcemanager.azurestackhci.models.Cluster; -import com.azure.resourcemanager.azurestackhci.models.DiagnosticLevel; -import com.azure.resourcemanager.azurestackhci.models.ManagedServiceIdentityType; -import com.azure.resourcemanager.azurestackhci.models.SoftwareAssuranceIntent; -import com.azure.resourcemanager.azurestackhci.models.WindowsServerSubscription; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class ClustersGetByResourceGroupWithResponseMockTests { - @Test - public void testGetByResourceGroupWithResponse() throws Exception { - String responseStr - = "{\"identity\":{\"principalId\":\"20c97887-7d42-478d-bd59-86e3635bc098\",\"tenantId\":\"41018299-5da9-4691-838d-d620dc82c209\",\"type\":\"None\",\"userAssignedIdentities\":{\"renxolriyehqbe\":{\"principalId\":\"e5683214-85f2-490d-82b4-adb498d43f9e\",\"clientId\":\"dc154b25-c23d-4ac2-8182-a30a792401f8\"},\"lhydwbdbfgrlpu\":{\"principalId\":\"ab7fc8d4-a0cd-4689-a13d-86d6f64037fb\",\"clientId\":\"8072ac09-5c9d-4780-b600-a8b96b8ec1cb\"}}},\"properties\":{\"provisioningState\":\"DisableInProgress\",\"status\":\"ConnectedRecently\",\"connectivityStatus\":\"NotConnectedRecently\",\"cloudId\":\"mpathubtah\",\"cloudManagementEndpoint\":\"an\",\"aadClientId\":\"wllbv\",\"aadTenantId\":\"zsffte\",\"aadApplicationObjectId\":\"us\",\"aadServicePrincipalObjectId\":\"tjtgravaqogfkb\",\"softwareAssuranceProperties\":{\"softwareAssuranceStatus\":\"Disabled\",\"softwareAssuranceIntent\":\"Disable\",\"lastUpdated\":\"2021-07-22T12:18:14Z\"},\"logCollectionProperties\":{\"fromDate\":\"2021-07-02T19:24:21Z\",\"toDate\":\"2021-10-06T16:35:36Z\",\"lastLogGenerated\":\"2021-08-16T10:10:51Z\",\"logCollectionSessionDetails\":[{\"logStartTime\":\"2021-04-25T17:49:51Z\",\"logEndTime\":\"2021-05-25T10:22:53Z\",\"timeCollected\":\"2021-10-25T21:45:01Z\",\"logSize\":5671896095521184545,\"logCollectionStatus\":\"Succeeded\",\"logCollectionJobType\":\"Scheduled\",\"correlationId\":\"whczzqrhmng\",\"endTimeCollected\":\"2021-11-08T04:12:55Z\",\"logCollectionError\":{}},{\"logStartTime\":\"2021-09-24T22:34:02Z\",\"logEndTime\":\"2021-10-02T13:30:34Z\",\"timeCollected\":\"2021-04-19T22:17:21Z\",\"logSize\":4983330695304354539,\"logCollectionStatus\":\"None\",\"logCollectionJobType\":\"OnDemand\",\"correlationId\":\"chl\",\"endTimeCollected\":\"2021-11-13T06:25:36Z\",\"logCollectionError\":{}},{\"logStartTime\":\"2021-04-19T20:50:14Z\",\"logEndTime\":\"2021-01-20T19:39:16Z\",\"timeCollected\":\"2021-04-28T18:17:17Z\",\"logSize\":9142556233920666772,\"logCollectionStatus\":\"InProgress\",\"logCollectionJobType\":\"OnDemand\",\"correlationId\":\"xkbrfg\",\"endTimeCollected\":\"2021-09-01T06:36:17Z\",\"logCollectionError\":{}}]},\"remoteSupportProperties\":{\"accessLevel\":\"DiagnosticsAndRepair\",\"expirationTimeStamp\":\"2021-04-12T17:31:30Z\",\"remoteSupportType\":\"Revoke\",\"remoteSupportNodeSettings\":[{\"arcResourceId\":\"qrxetfgcwvr\",\"state\":\"dqntycnawthv\",\"createdAt\":\"2021-07-10T21:24:04Z\",\"updatedAt\":\"2021-04-30T15:22:04Z\",\"connectionStatus\":\"yeamcmhudf\",\"connectionErrorMessage\":\"cehokw\",\"transcriptLocation\":\"qtwloes\"}],\"remoteSupportSessionDetails\":[{\"sessionStartTime\":\"2021-04-22T13:34:52Z\",\"sessionEndTime\":\"2021-03-30T21:09:09Z\",\"nodeName\":\"yrukoi\",\"duration\":8271517726373471913,\"accessLevel\":\"Diagnostics\"},{\"sessionStartTime\":\"2021-03-26T19:42:44Z\",\"sessionEndTime\":\"2021-10-03T13:52:51Z\",\"nodeName\":\"pjlh\",\"duration\":3498524662642148931,\"accessLevel\":\"DiagnosticsAndRepair\"},{\"sessionStartTime\":\"2021-08-26T17:06:24Z\",\"sessionEndTime\":\"2021-08-25T15:20:24Z\",\"nodeName\":\"qkkwhbgxvellvul\",\"duration\":258858222209929710,\"accessLevel\":\"DiagnosticsAndRepair\"},{\"sessionStartTime\":\"2021-11-16T23:48:23Z\",\"sessionEndTime\":\"2021-12-05T20:30:24Z\",\"nodeName\":\"tvmcly\",\"duration\":7261970206067613622,\"accessLevel\":\"DiagnosticsAndRepair\"}]},\"desiredProperties\":{\"windowsServerSubscription\":\"Enabled\",\"diagnosticLevel\":\"Basic\"},\"reportedProperties\":{\"clusterName\":\"fzuvrzmz\",\"clusterId\":\"zjqr\",\"clusterVersion\":\"pv\",\"nodes\":[{\"name\":\"foebo\",\"id\":12.669712,\"windowsServerSubscription\":\"Disabled\",\"nodeType\":\"FirstParty\",\"ehcResourceId\":\"ohoqkpjtnqjilayw\",\"manufacturer\":\"cwm\",\"model\":\"yrilmhxdqaolf\",\"osName\":\"nkkbjpjvlywltmfw\",\"osVersion\":\"bjwhlwyjfnqzocr\",\"osDisplayVersion\":\"gczeuntgx\",\"serialNumber\":\"ca\",\"coreCount\":86.22356,\"memoryInGiB\":86.274,\"lastLicensingTimestamp\":\"2021-10-09T15:57:20Z\",\"oemActivation\":\"Enabled\"},{\"name\":\"vnyttzgi\",\"id\":13.321484,\"windowsServerSubscription\":\"Disabled\",\"nodeType\":\"FirstParty\",\"ehcResourceId\":\"mgb\",\"manufacturer\":\"lqtxnrflkndrn\",\"model\":\"gfjo\",\"osName\":\"daqotwfh\",\"osVersion\":\"xwgsa\",\"osDisplayVersion\":\"c\",\"serialNumber\":\"owzafczu\",\"coreCount\":93.52678,\"memoryInGiB\":82.20888,\"lastLicensingTimestamp\":\"2021-04-06T10:07:56Z\",\"oemActivation\":\"Disabled\"}],\"lastUpdated\":\"2021-05-28T06:59:52Z\",\"imdsAttestation\":\"Enabled\",\"diagnosticLevel\":\"Enhanced\",\"supportedCapabilities\":[\"ti\",\"jnsxzajlnsjhwjuy\",\"xbxq\"],\"clusterType\":\"FirstParty\",\"manufacturer\":\"aytuadxkxeqbwp\",\"oemActivation\":\"Enabled\"},\"isolatedVmAttestationConfiguration\":{\"attestationResourceId\":\"ksarcdrnxsluvl\",\"relyingPartyServiceEndpoint\":\"adltxkpbqhvfdq\",\"attestationServiceEndpoint\":\"w\"},\"trialDaysRemaining\":89.20991,\"billingModel\":\"zdanojis\",\"registrationTimestamp\":\"2021-08-07T00:54:04Z\",\"lastSyncTimestamp\":\"2021-09-13T20:00:32Z\",\"lastBillingTimestamp\":\"2021-11-09T04:21:58Z\",\"serviceEndpoint\":\"tuz\",\"resourceProviderObjectId\":\"ctibpvbka\"},\"location\":\"xsmzygdf\",\"tags\":{\"so\":\"wseivmakxh\",\"bectvtfjmskdch\":\"ljuxl\",\"kzaz\":\"aiubavlzwpvgmfa\",\"rokzrthqetwpq\":\"gokedgjqafkm\"},\"id\":\"tvaoznqn\",\"name\":\"xiezeagmceit\",\"type\":\"ugedh\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - AzureStackHciManager manager = AzureStackHciManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - Cluster response = manager.clusters() - .getByResourceGroupWithResponse("bninjgazlsvbzfc", "uoeedwjcci", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("xsmzygdf", response.location()); - Assertions.assertEquals("wseivmakxh", response.tags().get("so")); - Assertions.assertEquals(ManagedServiceIdentityType.NONE, response.typeIdentityType()); - Assertions.assertEquals("an", response.cloudManagementEndpoint()); - Assertions.assertEquals("wllbv", response.aadClientId()); - Assertions.assertEquals("zsffte", response.aadTenantId()); - Assertions.assertEquals("us", response.aadApplicationObjectId()); - Assertions.assertEquals("tjtgravaqogfkb", response.aadServicePrincipalObjectId()); - Assertions.assertEquals(SoftwareAssuranceIntent.DISABLE, - response.softwareAssuranceProperties().softwareAssuranceIntent()); - Assertions.assertEquals(WindowsServerSubscription.ENABLED, - response.desiredProperties().windowsServerSubscription()); - Assertions.assertEquals(DiagnosticLevel.BASIC, response.desiredProperties().diagnosticLevel()); - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ClustersListByResourceGroupMockTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ClustersListByResourceGroupMockTests.java deleted file mode 100644 index 81f876ee1831..000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ClustersListByResourceGroupMockTests.java +++ /dev/null @@ -1,56 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.azurestackhci.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.azurestackhci.AzureStackHciManager; -import com.azure.resourcemanager.azurestackhci.models.Cluster; -import com.azure.resourcemanager.azurestackhci.models.DiagnosticLevel; -import com.azure.resourcemanager.azurestackhci.models.ManagedServiceIdentityType; -import com.azure.resourcemanager.azurestackhci.models.SoftwareAssuranceIntent; -import com.azure.resourcemanager.azurestackhci.models.WindowsServerSubscription; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class ClustersListByResourceGroupMockTests { - @Test - public void testListByResourceGroup() throws Exception { - String responseStr - = "{\"value\":[{\"identity\":{\"principalId\":\"76c19fd3-a8a2-428b-b8b1-71917b078139\",\"tenantId\":\"1cdc8460-6057-4ebd-a79a-967205711ca4\",\"type\":\"SystemAssigned\",\"userAssignedIdentities\":{\"rzd\":{\"principalId\":\"067bebda-b856-44fc-8333-2e7f3c3b69f1\",\"clientId\":\"19f0d73b-a771-4146-ac92-8efc07257fd0\"},\"skzptjxulweucyr\":{\"principalId\":\"20aa2ea0-0072-41fb-b64b-c3378c37dc78\",\"clientId\":\"0308730e-140c-4fed-9ce5-69253b8df7a4\"}}},\"properties\":{\"provisioningState\":\"Moving\",\"status\":\"NotSpecified\",\"connectivityStatus\":\"NotSpecified\",\"cloudId\":\"gcj\",\"cloudManagementEndpoint\":\"n\",\"aadClientId\":\"hokamvfej\",\"aadTenantId\":\"nttmbq\",\"aadApplicationObjectId\":\"bzfivfok\",\"aadServicePrincipalObjectId\":\"sthhzagjfwy\",\"softwareAssuranceProperties\":{\"softwareAssuranceStatus\":\"Disabled\",\"softwareAssuranceIntent\":\"Enable\",\"lastUpdated\":\"2021-08-26T05:12:13Z\"},\"logCollectionProperties\":{\"fromDate\":\"2021-05-06T13:16:52Z\",\"toDate\":\"2021-07-25T18:07:22Z\",\"lastLogGenerated\":\"2021-07-26T22:31:28Z\",\"logCollectionSessionDetails\":[{\"logStartTime\":\"2021-01-21T21:09:44Z\",\"logEndTime\":\"2021-05-08T19:05:52Z\",\"timeCollected\":\"2021-12-08T12:43:53Z\",\"logSize\":6939845740099592279,\"logCollectionStatus\":\"Succeeded\",\"logCollectionJobType\":\"OnDemand\",\"correlationId\":\"gmihzpimcqr\",\"endTimeCollected\":\"2021-10-24T06:08:21Z\",\"logCollectionError\":{}},{\"logStartTime\":\"2021-09-20T05:50:56Z\",\"logEndTime\":\"2021-08-05T10:06:57Z\",\"timeCollected\":\"2021-09-07T11:16:11Z\",\"logSize\":8016682642169928370,\"logCollectionStatus\":\"Succeeded\",\"logCollectionJobType\":\"OnDemand\",\"correlationId\":\"hzvqnsqktcmbjwz\",\"endTimeCollected\":\"2021-06-16T03:12:12Z\",\"logCollectionError\":{}},{\"logStartTime\":\"2021-03-16T06:59:07Z\",\"logEndTime\":\"2021-09-17T07:57:52Z\",\"timeCollected\":\"2021-05-04T22:59:21Z\",\"logSize\":5868735635066716572,\"logCollectionStatus\":\"Failed\",\"logCollectionJobType\":\"Scheduled\",\"correlationId\":\"sqjcemqbmfuvqarw\",\"endTimeCollected\":\"2021-05-10T19:32:23Z\",\"logCollectionError\":{}},{\"logStartTime\":\"2021-07-16T14:19:09Z\",\"logEndTime\":\"2021-10-06T23:58:53Z\",\"timeCollected\":\"2021-04-05T16:03:48Z\",\"logSize\":7848988341385216516,\"logCollectionStatus\":\"Succeeded\",\"logCollectionJobType\":\"OnDemand\",\"correlationId\":\"td\",\"endTimeCollected\":\"2021-09-26T12:41:41Z\",\"logCollectionError\":{}}]},\"remoteSupportProperties\":{\"accessLevel\":\"DiagnosticsAndRepair\",\"expirationTimeStamp\":\"2021-02-10T07:45:24Z\",\"remoteSupportType\":\"Enable\",\"remoteSupportNodeSettings\":[{\"arcResourceId\":\"dbtwaokbavly\",\"state\":\"aaknwfr\",\"createdAt\":\"2021-03-15T22:48:32Z\",\"updatedAt\":\"2021-12-08T22:25:30Z\",\"connectionStatus\":\"p\",\"connectionErrorMessage\":\"jdigatole\",\"transcriptLocation\":\"cbctnanqimwbzx\"},{\"arcResourceId\":\"cldpkawn\",\"state\":\"laimouxwk\",\"createdAt\":\"2021-11-27T17:21:56Z\",\"updatedAt\":\"2020-12-29T15:26:50Z\",\"connectionStatus\":\"fco\",\"connectionErrorMessage\":\"icziuswswjrkb\",\"transcriptLocation\":\"jhbtqq\"}],\"remoteSupportSessionDetails\":[{\"sessionStartTime\":\"2021-05-28T05:56:34Z\",\"sessionEndTime\":\"2021-09-14T02:43Z\",\"nodeName\":\"wbivqvogfuyzwvbh\",\"duration\":1678698951923393252,\"accessLevel\":\"Diagnostics\"}]},\"desiredProperties\":{\"windowsServerSubscription\":\"Disabled\",\"diagnosticLevel\":\"Off\"},\"reportedProperties\":{\"clusterName\":\"ikcdrdaasax\",\"clusterId\":\"bsmfkwiyjvz\",\"clusterVersion\":\"osrnawnvzmlnkoy\",\"nodes\":[{\"name\":\"jabjqqa\",\"id\":68.090454,\"windowsServerSubscription\":\"Disabled\",\"nodeType\":\"ThirdParty\",\"ehcResourceId\":\"udndoabhjxw\",\"manufacturer\":\"weuipmpvksmi\",\"model\":\"sqxtltclkrdpq\",\"osName\":\"hyrfrakkldgr\",\"osVersion\":\"fcmfcn\",\"osDisplayVersion\":\"ajqmat\",\"serialNumber\":\"tie\",\"coreCount\":25.239485,\"memoryInGiB\":32.494797,\"lastLicensingTimestamp\":\"2021-08-12T03:38:51Z\",\"oemActivation\":\"Disabled\"},{\"name\":\"bmtlpqagyno\",\"id\":50.55483,\"windowsServerSubscription\":\"Enabled\",\"nodeType\":\"FirstParty\",\"ehcResourceId\":\"incryqxzx\",\"manufacturer\":\"zi\",\"model\":\"qimiymqr\",\"osName\":\"guhfupe\",\"osVersion\":\"svvoqsbpkflanfk\",\"osDisplayVersion\":\"syaowuzowp\",\"serialNumber\":\"hdkcprgu\",\"coreCount\":89.84289,\"memoryInGiB\":80.36083,\"lastLicensingTimestamp\":\"2021-02-01T20:30:38Z\",\"oemActivation\":\"Enabled\"}],\"lastUpdated\":\"2021-11-06T22:01:21Z\",\"imdsAttestation\":\"Enabled\",\"diagnosticLevel\":\"Enhanced\",\"supportedCapabilities\":[\"ud\",\"izcbfzmcrunfhiuc\",\"mfbcpaqktkrum\"],\"clusterType\":\"FirstParty\",\"manufacturer\":\"kyzbfvxovqkxiux\",\"oemActivation\":\"Enabled\"},\"isolatedVmAttestationConfiguration\":{\"attestationResourceId\":\"r\",\"relyingPartyServiceEndpoint\":\"yhlwcjsqg\",\"attestationServiceEndpoint\":\"hffbxrq\"},\"trialDaysRemaining\":41.991467,\"billingModel\":\"peuqlsdxeqztvxwm\",\"registrationTimestamp\":\"2021-08-04T10:36:28Z\",\"lastSyncTimestamp\":\"2021-03-28T03:59:41Z\",\"lastBillingTimestamp\":\"2021-05-02T23:28:12Z\",\"serviceEndpoint\":\"awwamecleqiouln\",\"resourceProviderObjectId\":\"zyoeo\"},\"location\":\"tollh\",\"tags\":{\"tzlnglxpn\":\"dm\",\"xigvjrktpgaeuk\":\"vyoanfbcswqagywv\"},\"id\":\"awohpmw\",\"name\":\"qnucs\",\"type\":\"lhsidsjtdl\"}]}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - AzureStackHciManager manager = AzureStackHciManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response - = manager.clusters().listByResourceGroup("vzilmhiv", com.azure.core.util.Context.NONE); - - Assertions.assertEquals("tollh", response.iterator().next().location()); - Assertions.assertEquals("dm", response.iterator().next().tags().get("tzlnglxpn")); - Assertions.assertEquals(ManagedServiceIdentityType.SYSTEM_ASSIGNED, - response.iterator().next().typeIdentityType()); - Assertions.assertEquals("n", response.iterator().next().cloudManagementEndpoint()); - Assertions.assertEquals("hokamvfej", response.iterator().next().aadClientId()); - Assertions.assertEquals("nttmbq", response.iterator().next().aadTenantId()); - Assertions.assertEquals("bzfivfok", response.iterator().next().aadApplicationObjectId()); - Assertions.assertEquals("sthhzagjfwy", response.iterator().next().aadServicePrincipalObjectId()); - Assertions.assertEquals(SoftwareAssuranceIntent.ENABLE, - response.iterator().next().softwareAssuranceProperties().softwareAssuranceIntent()); - Assertions.assertEquals(WindowsServerSubscription.DISABLED, - response.iterator().next().desiredProperties().windowsServerSubscription()); - Assertions.assertEquals(DiagnosticLevel.OFF, response.iterator().next().desiredProperties().diagnosticLevel()); - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ClustersListMockTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ClustersListMockTests.java deleted file mode 100644 index 450062658cfc..000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ClustersListMockTests.java +++ /dev/null @@ -1,55 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.azurestackhci.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.azurestackhci.AzureStackHciManager; -import com.azure.resourcemanager.azurestackhci.models.Cluster; -import com.azure.resourcemanager.azurestackhci.models.DiagnosticLevel; -import com.azure.resourcemanager.azurestackhci.models.ManagedServiceIdentityType; -import com.azure.resourcemanager.azurestackhci.models.SoftwareAssuranceIntent; -import com.azure.resourcemanager.azurestackhci.models.WindowsServerSubscription; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class ClustersListMockTests { - @Test - public void testList() throws Exception { - String responseStr - = "{\"value\":[{\"identity\":{\"principalId\":\"45674139-81e8-42cb-98c6-c5e80982eaa1\",\"tenantId\":\"d4e93696-2a29-4264-9d56-d8aabe3a6c03\",\"type\":\"None\",\"userAssignedIdentities\":{\"exn\":{\"principalId\":\"29d84dc7-f4dc-4bd2-8bd0-e8b45f7923ed\",\"clientId\":\"028d5e46-5f8a-42b5-902c-7c54fb03f3c1\"}}},\"properties\":{\"provisioningState\":\"NotSpecified\",\"status\":\"ValidationSuccess\",\"connectivityStatus\":\"NotYetRegistered\",\"cloudId\":\"x\",\"cloudManagementEndpoint\":\"abjkdtfohfao\",\"aadClientId\":\"vkiwrsiwdyjqu\",\"aadTenantId\":\"kcrr\",\"aadApplicationObjectId\":\"eek\",\"aadServicePrincipalObjectId\":\"uehogdd\",\"softwareAssuranceProperties\":{\"softwareAssuranceStatus\":\"Enabled\",\"softwareAssuranceIntent\":\"Disable\",\"lastUpdated\":\"2021-07-11T10:57:54Z\"},\"logCollectionProperties\":{\"fromDate\":\"2021-01-06T13:23:28Z\",\"toDate\":\"2021-12-03T23:32:55Z\",\"lastLogGenerated\":\"2021-12-09T15:31:40Z\",\"logCollectionSessionDetails\":[{\"logStartTime\":\"2021-04-15T12:16:51Z\",\"logEndTime\":\"2021-12-06T01:52:16Z\",\"timeCollected\":\"2021-03-18T17:00:36Z\",\"logSize\":5089706177234380966,\"logCollectionStatus\":\"Succeeded\",\"logCollectionJobType\":\"Scheduled\",\"correlationId\":\"vzt\",\"endTimeCollected\":\"2021-03-09T11:05:21Z\",\"logCollectionError\":{}},{\"logStartTime\":\"2021-08-20T03:01:03Z\",\"logEndTime\":\"2021-08-25T12:23:03Z\",\"timeCollected\":\"2021-06-23T22:20:55Z\",\"logSize\":953608876389392721,\"logCollectionStatus\":\"Succeeded\",\"logCollectionJobType\":\"OnDemand\",\"correlationId\":\"fdde\",\"endTimeCollected\":\"2021-04-12T12:04:13Z\",\"logCollectionError\":{}},{\"logStartTime\":\"2021-08-21T18:37:30Z\",\"logEndTime\":\"2020-12-25T11:31:23Z\",\"timeCollected\":\"2021-09-30T19:59:55Z\",\"logSize\":1480578356337551776,\"logCollectionStatus\":\"None\",\"logCollectionJobType\":\"Scheduled\",\"correlationId\":\"vmywhsbrcarycsjj\",\"endTimeCollected\":\"2021-08-11T01:22:34Z\",\"logCollectionError\":{}},{\"logStartTime\":\"2021-02-11T21:53:10Z\",\"logEndTime\":\"2021-06-09T21:20:06Z\",\"timeCollected\":\"2021-03-09T06:10:14Z\",\"logSize\":518379516929503139,\"logCollectionStatus\":\"Succeeded\",\"logCollectionJobType\":\"OnDemand\",\"correlationId\":\"rr\",\"endTimeCollected\":\"2021-09-17T17:40:03Z\",\"logCollectionError\":{}}]},\"remoteSupportProperties\":{\"accessLevel\":\"DiagnosticsAndRepair\",\"expirationTimeStamp\":\"2021-09-05T10:47:38Z\",\"remoteSupportType\":\"Revoke\",\"remoteSupportNodeSettings\":[{\"arcResourceId\":\"pmfbfununmpzkr\",\"state\":\"yifkdschlzvf\",\"createdAt\":\"2021-03-30T02:21:42Z\",\"updatedAt\":\"2021-07-17T09:23:33Z\",\"connectionStatus\":\"jwg\",\"connectionErrorMessage\":\"nphbkgfyrt\",\"transcriptLocation\":\"mhmjpjs\"},{\"arcResourceId\":\"fp\",\"state\":\"wtyg\",\"createdAt\":\"2020-12-29T02:29:21Z\",\"updatedAt\":\"2021-05-16T09:34:56Z\",\"connectionStatus\":\"eharxifv\",\"connectionErrorMessage\":\"rxtmbpjptnvw\",\"transcriptLocation\":\"rsidqpxlbtpakf\"}],\"remoteSupportSessionDetails\":[{\"sessionStartTime\":\"2021-07-21T20:48:18Z\",\"sessionEndTime\":\"2021-10-30T03:58:04Z\",\"nodeName\":\"kyutrymdwmfjhpyc\",\"duration\":1031808729537103141,\"accessLevel\":\"DiagnosticsAndRepair\"},{\"sessionStartTime\":\"2021-08-24T21:59:02Z\",\"sessionEndTime\":\"2021-10-27T16:03:46Z\",\"nodeName\":\"drlefgnaavuag\",\"duration\":2102845836389182101,\"accessLevel\":\"DiagnosticsAndRepair\"},{\"sessionStartTime\":\"2021-11-25T11:03:28Z\",\"sessionEndTime\":\"2021-04-08T19:55:23Z\",\"nodeName\":\"ctuhspfefyihduye\",\"duration\":4383132154985570043,\"accessLevel\":\"DiagnosticsAndRepair\"}]},\"desiredProperties\":{\"windowsServerSubscription\":\"Enabled\",\"diagnosticLevel\":\"Basic\"},\"reportedProperties\":{\"clusterName\":\"suthhllnmwynefx\",\"clusterId\":\"lf\",\"clusterVersion\":\"atxtjrrlkmdskjhh\",\"nodes\":[{\"name\":\"jfoxcxscvslxl\",\"id\":4.2046843,\"windowsServerSubscription\":\"Enabled\",\"nodeType\":\"FirstParty\",\"ehcResourceId\":\"kmyjmkxett\",\"manufacturer\":\"lojfkqidnqto\",\"model\":\"jhqxc\",\"osName\":\"htkbtnq\",\"osVersion\":\"ngldmbiipsn\",\"osDisplayVersion\":\"wl\",\"serialNumber\":\"znxhhllxr\",\"coreCount\":95.013336,\"memoryInGiB\":42.536728,\"lastLicensingTimestamp\":\"2021-06-26T09:38:10Z\",\"oemActivation\":\"Enabled\"},{\"name\":\"oajxeiygles\",\"id\":30.896765,\"windowsServerSubscription\":\"Disabled\",\"nodeType\":\"ThirdParty\",\"ehcResourceId\":\"ctrceqnkbr\",\"manufacturer\":\"obehdmljz\",\"model\":\"vume\",\"osName\":\"pbibn\",\"osVersion\":\"phepifexleqirc\",\"osDisplayVersion\":\"cly\",\"serialNumber\":\"gxvrpjl\",\"coreCount\":52.70626,\"memoryInGiB\":96.086845,\"lastLicensingTimestamp\":\"2021-03-27T15:26:01Z\",\"oemActivation\":\"Enabled\"},{\"name\":\"nettepdjxqeskoy\",\"id\":31.382202,\"windowsServerSubscription\":\"Enabled\",\"nodeType\":\"ThirdParty\",\"ehcResourceId\":\"aewse\",\"manufacturer\":\"eskwxeg\",\"model\":\"hrg\",\"osName\":\"zhctm\",\"osVersion\":\"sghpbcbcpzarpze\",\"osDisplayVersion\":\"cdl\",\"serialNumber\":\"zmpypefcpczshnu\",\"coreCount\":42.157166,\"memoryInGiB\":49.67236,\"lastLicensingTimestamp\":\"2021-01-15T03:44:07Z\",\"oemActivation\":\"Disabled\"},{\"name\":\"huytuszx\",\"id\":23.604797,\"windowsServerSubscription\":\"Enabled\",\"nodeType\":\"FirstParty\",\"ehcResourceId\":\"w\",\"manufacturer\":\"ukvzwydwttha\",\"model\":\"gkskjivbss\",\"osName\":\"jqf\",\"osVersion\":\"peexpgeumilhwuit\",\"osDisplayVersion\":\"exyionofninbd\",\"serialNumber\":\"s\",\"coreCount\":93.86298,\"memoryInGiB\":13.063449,\"lastLicensingTimestamp\":\"2021-03-08T05:21:03Z\",\"oemActivation\":\"Enabled\"}],\"lastUpdated\":\"2020-12-23T13:52:52Z\",\"imdsAttestation\":\"Disabled\",\"diagnosticLevel\":\"Basic\",\"supportedCapabilities\":[\"av\",\"zbcyksiv\",\"fogdrtbfcm\"],\"clusterType\":\"FirstParty\",\"manufacturer\":\"sjcwjjxsgmbawvif\",\"oemActivation\":\"Enabled\"},\"isolatedVmAttestationConfiguration\":{\"attestationResourceId\":\"if\",\"relyingPartyServiceEndpoint\":\"cjxwkloozrvtxvcm\",\"attestationServiceEndpoint\":\"unlcpxxv\"},\"trialDaysRemaining\":25.181086,\"billingModel\":\"yngjgvrquvpygglp\",\"registrationTimestamp\":\"2021-10-12T15:29:26Z\",\"lastSyncTimestamp\":\"2021-05-19T05:39:03Z\",\"lastBillingTimestamp\":\"2021-03-23T16:26:12Z\",\"serviceEndpoint\":\"jt\",\"resourceProviderObjectId\":\"hxmfqryarvsxzqb\"},\"location\":\"cjkay\",\"tags\":{\"dubtlmj\":\"hz\",\"djxyxgbkkqvjcteo\":\"gblioskkfmkm\",\"pxvjnzd\":\"dlrslskk\",\"pcnab\":\"vocoj\"},\"id\":\"zf\",\"name\":\"nggy\",\"type\":\"e\"}]}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - AzureStackHciManager manager = AzureStackHciManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = manager.clusters().list(com.azure.core.util.Context.NONE); - - Assertions.assertEquals("cjkay", response.iterator().next().location()); - Assertions.assertEquals("hz", response.iterator().next().tags().get("dubtlmj")); - Assertions.assertEquals(ManagedServiceIdentityType.NONE, response.iterator().next().typeIdentityType()); - Assertions.assertEquals("abjkdtfohfao", response.iterator().next().cloudManagementEndpoint()); - Assertions.assertEquals("vkiwrsiwdyjqu", response.iterator().next().aadClientId()); - Assertions.assertEquals("kcrr", response.iterator().next().aadTenantId()); - Assertions.assertEquals("eek", response.iterator().next().aadApplicationObjectId()); - Assertions.assertEquals("uehogdd", response.iterator().next().aadServicePrincipalObjectId()); - Assertions.assertEquals(SoftwareAssuranceIntent.DISABLE, - response.iterator().next().softwareAssuranceProperties().softwareAssuranceIntent()); - Assertions.assertEquals(WindowsServerSubscription.ENABLED, - response.iterator().next().desiredProperties().windowsServerSubscription()); - Assertions.assertEquals(DiagnosticLevel.BASIC, - response.iterator().next().desiredProperties().diagnosticLevel()); - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ClustersTriggerLogCollectionMockTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ClustersTriggerLogCollectionMockTests.java deleted file mode 100644 index 99cdc27631a1..000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ClustersTriggerLogCollectionMockTests.java +++ /dev/null @@ -1,60 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.azurestackhci.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.azurestackhci.AzureStackHciManager; -import com.azure.resourcemanager.azurestackhci.models.Cluster; -import com.azure.resourcemanager.azurestackhci.models.DiagnosticLevel; -import com.azure.resourcemanager.azurestackhci.models.LogCollectionRequest; -import com.azure.resourcemanager.azurestackhci.models.LogCollectionRequestProperties; -import com.azure.resourcemanager.azurestackhci.models.ManagedServiceIdentityType; -import com.azure.resourcemanager.azurestackhci.models.SoftwareAssuranceIntent; -import com.azure.resourcemanager.azurestackhci.models.WindowsServerSubscription; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class ClustersTriggerLogCollectionMockTests { - @Test - public void testTriggerLogCollection() throws Exception { - String responseStr - = "{\"identity\":{\"principalId\":\"d80e69a3-e162-41ca-ba9b-1bc35c809346\",\"tenantId\":\"0b4ecb5a-f57e-4b25-8ba1-3cf0125add45\",\"type\":\"SystemAssigned\",\"userAssignedIdentities\":{\"ovribq\":{\"principalId\":\"3b79dc40-ae37-4122-b965-318fce2e012e\",\"clientId\":\"286a33a1-3b6a-478d-b5d7-459156b62e8c\"}}},\"properties\":{\"provisioningState\":\"Succeeded\",\"status\":\"NotYetRegistered\",\"connectivityStatus\":\"NotSpecified\",\"cloudId\":\"taznkcqwwxwjyof\",\"cloudManagementEndpoint\":\"hnkbtlwljssmctsn\",\"aadClientId\":\"kpwolg\",\"aadTenantId\":\"ubxbteogfgfiijr\",\"aadApplicationObjectId\":\"wlefksxqceazfpxg\",\"aadServicePrincipalObjectId\":\"qvzvlu\",\"softwareAssuranceProperties\":{\"softwareAssuranceStatus\":\"Disabled\",\"softwareAssuranceIntent\":\"Enable\",\"lastUpdated\":\"2021-06-14T11:44:36Z\"},\"logCollectionProperties\":{\"fromDate\":\"2021-05-24T23:17:46Z\",\"toDate\":\"2021-03-03T06:35:43Z\",\"lastLogGenerated\":\"2021-07-14T22:22:26Z\",\"logCollectionSessionDetails\":[{\"logStartTime\":\"2021-08-12T03:41:34Z\",\"logEndTime\":\"2021-07-02T15:12:28Z\",\"timeCollected\":\"2021-08-22T05:41:09Z\",\"logSize\":7533324825716135469,\"logCollectionStatus\":\"InProgress\",\"logCollectionJobType\":\"OnDemand\",\"correlationId\":\"jdhsoy\",\"endTimeCollected\":\"2021-10-03T11:49:53Z\",\"logCollectionError\":{}}]},\"remoteSupportProperties\":{\"accessLevel\":\"DiagnosticsAndRepair\",\"expirationTimeStamp\":\"2021-11-12T07:02:25Z\",\"remoteSupportType\":\"Revoke\",\"remoteSupportNodeSettings\":[{\"arcResourceId\":\"boujstkfvv\",\"state\":\"hxcd\",\"createdAt\":\"2020-12-22T05:34:09Z\",\"updatedAt\":\"2021-03-14T15:19:04Z\",\"connectionStatus\":\"ygnxcgjtfrnqukt\",\"connectionErrorMessage\":\"nslnlrxsmyltrwnt\",\"transcriptLocation\":\"tbgwjdxwnazkur\"}],\"remoteSupportSessionDetails\":[{\"sessionStartTime\":\"2021-06-12T09:43:04Z\",\"sessionEndTime\":\"2021-11-02T22:00:47Z\",\"nodeName\":\"hsetwwj\",\"duration\":3302215545380544215,\"accessLevel\":\"Diagnostics\"},{\"sessionStartTime\":\"2021-06-13T21:06:36Z\",\"sessionEndTime\":\"2021-04-07T08:12:26Z\",\"nodeName\":\"y\",\"duration\":6688942895771681924,\"accessLevel\":\"Diagnostics\"}]},\"desiredProperties\":{\"windowsServerSubscription\":\"Enabled\",\"diagnosticLevel\":\"Basic\"},\"reportedProperties\":{\"clusterName\":\"keys\",\"clusterId\":\"wfopazdazg\",\"clusterVersion\":\"qgpewqcfutmdpvoz\",\"nodes\":[{\"name\":\"bknlzcl\",\"id\":99.73375,\"windowsServerSubscription\":\"Enabled\",\"nodeType\":\"FirstParty\",\"ehcResourceId\":\"ndc\",\"manufacturer\":\"dwzqauxzanhmkvfr\",\"model\":\"kudrbcpftx\",\"osName\":\"qyemebu\",\"osVersion\":\"ucmci\",\"osDisplayVersion\":\"nee\",\"serialNumber\":\"jauwcgxefnohaitr\",\"coreCount\":28.120434,\"memoryInGiB\":41.137814,\"lastLicensingTimestamp\":\"2021-03-02T16:05:57Z\",\"oemActivation\":\"Enabled\"},{\"name\":\"asmxubvfbngf\",\"id\":84.15061,\"windowsServerSubscription\":\"Disabled\",\"nodeType\":\"FirstParty\",\"ehcResourceId\":\"iylfmpztrau\",\"manufacturer\":\"vhl\",\"model\":\"culregpqt\",\"osName\":\"jhvrztnvgyshqrdg\",\"osVersion\":\"wmewjzlpyk\",\"osDisplayVersion\":\"azzwjcay\",\"serialNumber\":\"zrransyb\",\"coreCount\":75.015366,\"memoryInGiB\":26.378132,\"lastLicensingTimestamp\":\"2021-09-20T13:23:20Z\",\"oemActivation\":\"Enabled\"}],\"lastUpdated\":\"2021-03-21T23:43:17Z\",\"imdsAttestation\":\"Disabled\",\"diagnosticLevel\":\"Basic\",\"supportedCapabilities\":[\"fscjfn\",\"jwvuag\",\"qwtltngvmreupt\"],\"clusterType\":\"ThirdParty\",\"manufacturer\":\"m\",\"oemActivation\":\"Disabled\"},\"isolatedVmAttestationConfiguration\":{\"attestationResourceId\":\"olxf\",\"relyingPartyServiceEndpoint\":\"aghm\",\"attestationServiceEndpoint\":\"nwlslrcigtzjcvbx\"},\"trialDaysRemaining\":4.619074,\"billingModel\":\"snsso\",\"registrationTimestamp\":\"2021-08-20T00:22:26Z\",\"lastSyncTimestamp\":\"2021-09-29T19:56:37Z\",\"lastBillingTimestamp\":\"2021-02-25T19:52:15Z\",\"serviceEndpoint\":\"nievwffc\",\"resourceProviderObjectId\":\"yezslpu\"},\"location\":\"cbdsvalpnptwtrk\",\"tags\":{\"x\":\"azwu\",\"obfelhldiuhz\":\"qvn\"},\"id\":\"gqlmfaewzgi\",\"name\":\"djpxpqht\",\"type\":\"qhnmhk\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - AzureStackHciManager manager = AzureStackHciManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - Cluster response = manager.clusters() - .triggerLogCollection("ecominxojjluxxd", "ilz", - new LogCollectionRequest().withProperties( - new LogCollectionRequestProperties().withFromDate(OffsetDateTime.parse("2021-05-18T19:06:31Z")) - .withToDate(OffsetDateTime.parse("2021-08-12T20:15:45Z"))), - com.azure.core.util.Context.NONE); - - Assertions.assertEquals("cbdsvalpnptwtrk", response.location()); - Assertions.assertEquals("azwu", response.tags().get("x")); - Assertions.assertEquals(ManagedServiceIdentityType.SYSTEM_ASSIGNED, response.typeIdentityType()); - Assertions.assertEquals("hnkbtlwljssmctsn", response.cloudManagementEndpoint()); - Assertions.assertEquals("kpwolg", response.aadClientId()); - Assertions.assertEquals("ubxbteogfgfiijr", response.aadTenantId()); - Assertions.assertEquals("wlefksxqceazfpxg", response.aadApplicationObjectId()); - Assertions.assertEquals("qvzvlu", response.aadServicePrincipalObjectId()); - Assertions.assertEquals(SoftwareAssuranceIntent.ENABLE, - response.softwareAssuranceProperties().softwareAssuranceIntent()); - Assertions.assertEquals(WindowsServerSubscription.ENABLED, - response.desiredProperties().windowsServerSubscription()); - Assertions.assertEquals(DiagnosticLevel.BASIC, response.desiredProperties().diagnosticLevel()); - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/DefaultExtensionDetailsTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/DefaultExtensionDetailsTests.java index 97441b65ae1c..27092e9872c3 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/DefaultExtensionDetailsTests.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/DefaultExtensionDetailsTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.generated; @@ -11,13 +11,7 @@ public final class DefaultExtensionDetailsTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { DefaultExtensionDetails model - = BinaryData.fromString("{\"category\":\"asy\",\"consentTime\":\"2021-10-21T22:29:11Z\"}") + = BinaryData.fromString("{\"category\":\"pemvtzfkufubljof\",\"consentTime\":\"2021-09-01T11:04:48Z\"}") .toObject(DefaultExtensionDetails.class); } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DefaultExtensionDetails model = new DefaultExtensionDetails(); - model = BinaryData.fromObject(model).toObject(DefaultExtensionDetails.class); - } } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/DeploymentClusterTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/DeploymentClusterTests.java index c3593478341b..145c8ea14fe0 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/DeploymentClusterTests.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/DeploymentClusterTests.java @@ -1,10 +1,11 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.generated; import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.azurestackhci.models.ClusterPattern; import com.azure.resourcemanager.azurestackhci.models.DeploymentCluster; import org.junit.jupiter.api.Assertions; @@ -12,27 +13,30 @@ public final class DeploymentClusterTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { DeploymentCluster model = BinaryData.fromString( - "{\"name\":\"xyawj\",\"witnessType\":\"aq\",\"witnessPath\":\"lyjpk\",\"cloudAccountName\":\"dzyexznelixh\",\"azureServiceEndpoint\":\"ztfolhbnxk\"}") + "{\"name\":\"bsrfbj\",\"witnessType\":\"twss\",\"witnessPath\":\"ftpvjzbexil\",\"cloudAccountName\":\"nfqqnvwp\",\"azureServiceEndpoint\":\"taruoujmkcj\",\"hardwareClass\":\"Large\",\"clusterPattern\":\"RackAware\"}") .toObject(DeploymentCluster.class); - Assertions.assertEquals("xyawj", model.name()); - Assertions.assertEquals("aq", model.witnessType()); - Assertions.assertEquals("lyjpk", model.witnessPath()); - Assertions.assertEquals("dzyexznelixh", model.cloudAccountName()); - Assertions.assertEquals("ztfolhbnxk", model.azureServiceEndpoint()); + Assertions.assertEquals("bsrfbj", model.name()); + Assertions.assertEquals("twss", model.witnessType()); + Assertions.assertEquals("ftpvjzbexil", model.witnessPath()); + Assertions.assertEquals("nfqqnvwp", model.cloudAccountName()); + Assertions.assertEquals("taruoujmkcj", model.azureServiceEndpoint()); + Assertions.assertEquals(ClusterPattern.RACK_AWARE, model.clusterPattern()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - DeploymentCluster model = new DeploymentCluster().withName("xyawj") - .withWitnessType("aq") - .withWitnessPath("lyjpk") - .withCloudAccountName("dzyexznelixh") - .withAzureServiceEndpoint("ztfolhbnxk"); + DeploymentCluster model = new DeploymentCluster().withName("bsrfbj") + .withWitnessType("twss") + .withWitnessPath("ftpvjzbexil") + .withCloudAccountName("nfqqnvwp") + .withAzureServiceEndpoint("taruoujmkcj") + .withClusterPattern(ClusterPattern.RACK_AWARE); model = BinaryData.fromObject(model).toObject(DeploymentCluster.class); - Assertions.assertEquals("xyawj", model.name()); - Assertions.assertEquals("aq", model.witnessType()); - Assertions.assertEquals("lyjpk", model.witnessPath()); - Assertions.assertEquals("dzyexznelixh", model.cloudAccountName()); - Assertions.assertEquals("ztfolhbnxk", model.azureServiceEndpoint()); + Assertions.assertEquals("bsrfbj", model.name()); + Assertions.assertEquals("twss", model.witnessType()); + Assertions.assertEquals("ftpvjzbexil", model.witnessPath()); + Assertions.assertEquals("nfqqnvwp", model.cloudAccountName()); + Assertions.assertEquals("taruoujmkcj", model.azureServiceEndpoint()); + Assertions.assertEquals(ClusterPattern.RACK_AWARE, model.clusterPattern()); } } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/DeploymentSettingAdapterPropertyOverridesTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/DeploymentSettingAdapterPropertyOverridesTests.java index 4dbe5a3ecddf..940ee1f6f951 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/DeploymentSettingAdapterPropertyOverridesTests.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/DeploymentSettingAdapterPropertyOverridesTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.generated; @@ -12,22 +12,22 @@ public final class DeploymentSettingAdapterPropertyOverridesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { DeploymentSettingAdapterPropertyOverrides model = BinaryData.fromString( - "{\"jumboPacket\":\"fikdowwqu\",\"networkDirect\":\"xzxcl\",\"networkDirectTechnology\":\"thhqzonosggbh\"}") + "{\"jumboPacket\":\"vvcnayr\",\"networkDirect\":\"rnxxmueed\",\"networkDirectTechnology\":\"rdvstkwqqtch\"}") .toObject(DeploymentSettingAdapterPropertyOverrides.class); - Assertions.assertEquals("fikdowwqu", model.jumboPacket()); - Assertions.assertEquals("xzxcl", model.networkDirect()); - Assertions.assertEquals("thhqzonosggbh", model.networkDirectTechnology()); + Assertions.assertEquals("vvcnayr", model.jumboPacket()); + Assertions.assertEquals("rnxxmueed", model.networkDirect()); + Assertions.assertEquals("rdvstkwqqtch", model.networkDirectTechnology()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { DeploymentSettingAdapterPropertyOverrides model - = new DeploymentSettingAdapterPropertyOverrides().withJumboPacket("fikdowwqu") - .withNetworkDirect("xzxcl") - .withNetworkDirectTechnology("thhqzonosggbh"); + = new DeploymentSettingAdapterPropertyOverrides().withJumboPacket("vvcnayr") + .withNetworkDirect("rnxxmueed") + .withNetworkDirectTechnology("rdvstkwqqtch"); model = BinaryData.fromObject(model).toObject(DeploymentSettingAdapterPropertyOverrides.class); - Assertions.assertEquals("fikdowwqu", model.jumboPacket()); - Assertions.assertEquals("xzxcl", model.networkDirect()); - Assertions.assertEquals("thhqzonosggbh", model.networkDirectTechnology()); + Assertions.assertEquals("vvcnayr", model.jumboPacket()); + Assertions.assertEquals("rnxxmueed", model.networkDirect()); + Assertions.assertEquals("rdvstkwqqtch", model.networkDirectTechnology()); } } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/DeploymentSettingHostNetworkTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/DeploymentSettingHostNetworkTests.java index 8a8e19f6c163..de9c8ce57842 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/DeploymentSettingHostNetworkTests.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/DeploymentSettingHostNetworkTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.generated; @@ -19,120 +19,160 @@ public final class DeploymentSettingHostNetworkTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { DeploymentSettingHostNetwork model = BinaryData.fromString( - "{\"intents\":[{\"name\":\"xcto\",\"trafficType\":[\"kdmoi\",\"postmgrcfbunrm\"],\"adapter\":[\"hhkxbp\",\"jy\"],\"overrideVirtualSwitchConfiguration\":false,\"virtualSwitchConfigurationOverrides\":{\"enableIov\":\"j\",\"loadBalancingAlgorithm\":\"gudivkrtswbxqz\"},\"overrideQosPolicy\":false,\"qosPolicyOverrides\":{\"priorityValue8021Action_Cluster\":\"auvjfdxxivet\",\"priorityValue8021Action_SMB\":\"cqaqtdoqmcbx\",\"bandwidthPercentage_SMB\":\"vxysl\"},\"overrideAdapterProperty\":true,\"adapterPropertyOverrides\":{\"jumboPacket\":\"xoblytkbl\",\"networkDirect\":\"ewwwfbkrvrnsv\",\"networkDirectTechnology\":\"q\"}},{\"name\":\"hxcr\",\"trafficType\":[\"ovasrruvwbhsqfsu\",\"cgjbirxbp\"],\"adapter\":[\"rfbjf\",\"twss\",\"t\"],\"overrideVirtualSwitchConfiguration\":false,\"virtualSwitchConfigurationOverrides\":{\"enableIov\":\"zbexilzznfqqnvw\",\"loadBalancingAlgorithm\":\"qtaruoujmkcjhwq\"},\"overrideQosPolicy\":true,\"qosPolicyOverrides\":{\"priorityValue8021Action_Cluster\":\"bnw\",\"priorityValue8021Action_SMB\":\"wgdrjervnaenqp\",\"bandwidthPercentage_SMB\":\"indoygmifthnzd\"},\"overrideAdapterProperty\":false,\"adapterPropertyOverrides\":{\"jumboPacket\":\"nayqi\",\"networkDirect\":\"nduhavhqlkthum\",\"networkDirectTechnology\":\"olbgycduiertgccy\"}}],\"storageNetworks\":[{\"name\":\"l\",\"networkAdapterName\":\"slqlfmmdn\",\"vlanId\":\"glzpswiydm\",\"storageAdapterIPInfo\":[{\"physicalNode\":\"zdxss\",\"ipv4Address\":\"bzmnvdfznud\",\"subnetMask\":\"dvxzbncblylpst\"}]},{\"name\":\"hh\",\"networkAdapterName\":\"rzdzucerscdnt\",\"vlanId\":\"vfiwjmygtdss\",\"storageAdapterIPInfo\":[{\"physicalNode\":\"mweriofzpy\",\"ipv4Address\":\"emwabnet\",\"subnetMask\":\"hszhedplvwiwu\"},{\"physicalNode\":\"wmbesldnkw\",\"ipv4Address\":\"pp\",\"subnetMask\":\"lcxog\"}]}],\"storageConnectivitySwitchless\":true,\"enableStorageAutoIp\":true}") + "{\"intents\":[{\"name\":\"wubmwmbesldn\",\"trafficType\":[\"tppjflcx\",\"gaokonzmnsikv\",\"kqze\",\"qkdltfz\"],\"adapter\":[\"hvhgureod\"],\"overrideVirtualSwitchConfiguration\":true,\"virtualSwitchConfigurationOverrides\":{\"enableIov\":\"agxti\",\"loadBalancingAlgorithm\":\"dxbx\"},\"overrideQosPolicy\":true,\"qosPolicyOverrides\":{\"priorityValue8021Action_Cluster\":\"gqxndlkzgxhuripl\",\"priorityValue8021Action_SMB\":\"odxun\",\"bandwidthPercentage_SMB\":\"ebxmubyynt\"},\"overrideAdapterProperty\":false,\"adapterPropertyOverrides\":{\"jumboPacket\":\"tkoievseotgq\",\"networkDirect\":\"ltmuwlauwzizx\",\"networkDirectTechnology\":\"pgcjefuzmuvp\"}},{\"name\":\"tdum\",\"trafficType\":[\"pxebmnzbt\"],\"adapter\":[\"pglkf\",\"ohdneuel\",\"phsdyhto\"],\"overrideVirtualSwitchConfiguration\":true,\"virtualSwitchConfigurationOverrides\":{\"enableIov\":\"owwquuvxz\",\"loadBalancingAlgorithm\":\"lvithhqzonosgg\"},\"overrideQosPolicy\":false,\"qosPolicyOverrides\":{\"priorityValue8021Action_Cluster\":\"fwdsj\",\"priorityValue8021Action_SMB\":\"aljutiiswac\",\"bandwidthPercentage_SMB\":\"gdkz\"},\"overrideAdapterProperty\":true,\"adapterPropertyOverrides\":{\"jumboPacket\":\"vhqcrail\",\"networkDirect\":\"n\",\"networkDirectTechnology\":\"fuflrwdmhdlx\"}}],\"storageNetworks\":[{\"name\":\"sag\",\"networkAdapterName\":\"cnihgwqapnedgfbc\",\"vlanId\":\"cvqvpkeqdcv\",\"storageAdapterIPInfo\":[{\"physicalNode\":\"ood\",\"ipv4Address\":\"tbobz\",\"subnetMask\":\"pcjwv\"},{\"physicalNode\":\"dldwmgxc\",\"ipv4Address\":\"slpmutwuo\",\"subnetMask\":\"rpkhjwn\"},{\"physicalNode\":\"qsluicp\",\"ipv4Address\":\"gk\",\"subnetMask\":\"lvmbmpaxmodfvuef\"},{\"physicalNode\":\"sbpfvmwyhr\",\"ipv4Address\":\"uyfta\",\"subnetMask\":\"cpwi\"}]},{\"name\":\"vqtmnub\",\"networkAdapterName\":\"kpzksmondjmq\",\"vlanId\":\"vypomgkopkwho\",\"storageAdapterIPInfo\":[{\"physicalNode\":\"jqg\",\"ipv4Address\":\"smocmbq\",\"subnetMask\":\"vmkcx\"},{\"physicalNode\":\"apvhelxprgly\",\"ipv4Address\":\"dd\",\"subnetMask\":\"cbcuejrjxgciqi\"},{\"physicalNode\":\"hos\",\"ipv4Address\":\"dqrhzoymib\",\"subnetMask\":\"qyib\"}]},{\"name\":\"wfluszdt\",\"networkAdapterName\":\"rkwofyyvoqa\",\"vlanId\":\"iexpbtgiwbwo\",\"storageAdapterIPInfo\":[{\"physicalNode\":\"shrtdtkcnqxwb\",\"ipv4Address\":\"kulpiujwaasi\",\"subnetMask\":\"i\"},{\"physicalNode\":\"byuqerpqlp\",\"ipv4Address\":\"cciuqgbdbutau\",\"subnetMask\":\"btkuwhh\"}]},{\"name\":\"ykojoxafnndlpic\",\"networkAdapterName\":\"o\",\"vlanId\":\"kcdyhbpk\",\"storageAdapterIPInfo\":[{\"physicalNode\":\"reqnovvqfov\",\"ipv4Address\":\"xywsuws\",\"subnetMask\":\"s\"},{\"physicalNode\":\"sytgadgvraea\",\"ipv4Address\":\"e\",\"subnetMask\":\"zar\"},{\"physicalNode\":\"lquuijfqkacewii\",\"ipv4Address\":\"pubjibw\",\"subnetMask\":\"f\"},{\"physicalNode\":\"hqkvpuvksgplsak\",\"ipv4Address\":\"n\",\"subnetMask\":\"ynl\"}]}],\"storageConnectivitySwitchless\":true,\"enableStorageAutoIp\":false}") .toObject(DeploymentSettingHostNetwork.class); - Assertions.assertEquals("xcto", model.intents().get(0).name()); - Assertions.assertEquals("kdmoi", model.intents().get(0).trafficType().get(0)); - Assertions.assertEquals("hhkxbp", model.intents().get(0).adapter().get(0)); - Assertions.assertEquals(false, model.intents().get(0).overrideVirtualSwitchConfiguration()); - Assertions.assertEquals("j", model.intents().get(0).virtualSwitchConfigurationOverrides().enableIov()); - Assertions.assertEquals("gudivkrtswbxqz", + Assertions.assertEquals("wubmwmbesldn", model.intents().get(0).name()); + Assertions.assertEquals("tppjflcx", model.intents().get(0).trafficType().get(0)); + Assertions.assertEquals("hvhgureod", model.intents().get(0).adapter().get(0)); + Assertions.assertTrue(model.intents().get(0).overrideVirtualSwitchConfiguration()); + Assertions.assertEquals("agxti", model.intents().get(0).virtualSwitchConfigurationOverrides().enableIov()); + Assertions.assertEquals("dxbx", model.intents().get(0).virtualSwitchConfigurationOverrides().loadBalancingAlgorithm()); - Assertions.assertEquals(false, model.intents().get(0).overrideQosPolicy()); - Assertions.assertEquals("auvjfdxxivet", + Assertions.assertTrue(model.intents().get(0).overrideQosPolicy()); + Assertions.assertEquals("gqxndlkzgxhuripl", model.intents().get(0).qosPolicyOverrides().priorityValue8021ActionCluster()); - Assertions.assertEquals("cqaqtdoqmcbx", - model.intents().get(0).qosPolicyOverrides().priorityValue8021ActionSmb()); - Assertions.assertEquals("vxysl", model.intents().get(0).qosPolicyOverrides().bandwidthPercentageSmb()); - Assertions.assertEquals(true, model.intents().get(0).overrideAdapterProperty()); - Assertions.assertEquals("xoblytkbl", model.intents().get(0).adapterPropertyOverrides().jumboPacket()); - Assertions.assertEquals("ewwwfbkrvrnsv", model.intents().get(0).adapterPropertyOverrides().networkDirect()); - Assertions.assertEquals("q", model.intents().get(0).adapterPropertyOverrides().networkDirectTechnology()); - Assertions.assertEquals("l", model.storageNetworks().get(0).name()); - Assertions.assertEquals("slqlfmmdn", model.storageNetworks().get(0).networkAdapterName()); - Assertions.assertEquals("glzpswiydm", model.storageNetworks().get(0).vlanId()); - Assertions.assertEquals("zdxss", model.storageNetworks().get(0).storageAdapterIpInfo().get(0).physicalNode()); - Assertions.assertEquals("bzmnvdfznud", - model.storageNetworks().get(0).storageAdapterIpInfo().get(0).ipv4Address()); - Assertions.assertEquals("dvxzbncblylpst", - model.storageNetworks().get(0).storageAdapterIpInfo().get(0).subnetMask()); - Assertions.assertEquals(true, model.storageConnectivitySwitchless()); - Assertions.assertEquals(true, model.enableStorageAutoIp()); + Assertions.assertEquals("odxun", model.intents().get(0).qosPolicyOverrides().priorityValue8021ActionSmb()); + Assertions.assertEquals("ebxmubyynt", model.intents().get(0).qosPolicyOverrides().bandwidthPercentageSmb()); + Assertions.assertFalse(model.intents().get(0).overrideAdapterProperty()); + Assertions.assertEquals("tkoievseotgq", model.intents().get(0).adapterPropertyOverrides().jumboPacket()); + Assertions.assertEquals("ltmuwlauwzizx", model.intents().get(0).adapterPropertyOverrides().networkDirect()); + Assertions.assertEquals("pgcjefuzmuvp", + model.intents().get(0).adapterPropertyOverrides().networkDirectTechnology()); + Assertions.assertEquals("sag", model.storageNetworks().get(0).name()); + Assertions.assertEquals("cnihgwqapnedgfbc", model.storageNetworks().get(0).networkAdapterName()); + Assertions.assertEquals("cvqvpkeqdcv", model.storageNetworks().get(0).vlanId()); + Assertions.assertEquals("ood", model.storageNetworks().get(0).storageAdapterIpInfo().get(0).physicalNode()); + Assertions.assertEquals("tbobz", model.storageNetworks().get(0).storageAdapterIpInfo().get(0).ipv4Address()); + Assertions.assertEquals("pcjwv", model.storageNetworks().get(0).storageAdapterIpInfo().get(0).subnetMask()); + Assertions.assertTrue(model.storageConnectivitySwitchless()); + Assertions.assertFalse(model.enableStorageAutoIp()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - DeploymentSettingHostNetwork model = new DeploymentSettingHostNetwork() - .withIntents(Arrays.asList( - new DeploymentSettingIntents().withName("xcto") - .withTrafficType(Arrays.asList("kdmoi", "postmgrcfbunrm")) - .withAdapter(Arrays.asList("hhkxbp", "jy")) - .withOverrideVirtualSwitchConfiguration(false) - .withVirtualSwitchConfigurationOverrides( - new DeploymentSettingVirtualSwitchConfigurationOverrides().withEnableIov("j") - .withLoadBalancingAlgorithm("gudivkrtswbxqz")) - .withOverrideQosPolicy(false) - .withQosPolicyOverrides(new QosPolicyOverrides().withPriorityValue8021ActionCluster("auvjfdxxivet") - .withPriorityValue8021ActionSmb("cqaqtdoqmcbx") - .withBandwidthPercentageSmb("vxysl")) - .withOverrideAdapterProperty(true) - .withAdapterPropertyOverrides(new DeploymentSettingAdapterPropertyOverrides() - .withJumboPacket("xoblytkbl") - .withNetworkDirect("ewwwfbkrvrnsv") - .withNetworkDirectTechnology("q")), - new DeploymentSettingIntents().withName("hxcr") - .withTrafficType(Arrays.asList("ovasrruvwbhsqfsu", "cgjbirxbp")) - .withAdapter(Arrays.asList("rfbjf", "twss", "t")) - .withOverrideVirtualSwitchConfiguration(false) - .withVirtualSwitchConfigurationOverrides( - new DeploymentSettingVirtualSwitchConfigurationOverrides().withEnableIov("zbexilzznfqqnvw") - .withLoadBalancingAlgorithm("qtaruoujmkcjhwq")) - .withOverrideQosPolicy(true) - .withQosPolicyOverrides(new QosPolicyOverrides().withPriorityValue8021ActionCluster("bnw") - .withPriorityValue8021ActionSmb("wgdrjervnaenqp") - .withBandwidthPercentageSmb("indoygmifthnzd")) - .withOverrideAdapterProperty(false) - .withAdapterPropertyOverrides( - new DeploymentSettingAdapterPropertyOverrides().withJumboPacket("nayqi") - .withNetworkDirect("nduhavhqlkthum") - .withNetworkDirectTechnology("olbgycduiertgccy")))) - .withStorageNetworks(Arrays.asList( - new DeploymentSettingStorageNetworks().withName("l") - .withNetworkAdapterName("slqlfmmdn") - .withVlanId("glzpswiydm") - .withStorageAdapterIpInfo( - Arrays.asList(new DeploymentSettingStorageAdapterIpInfo().withPhysicalNode("zdxss") - .withIpv4Address("bzmnvdfznud") - .withSubnetMask("dvxzbncblylpst"))), - new DeploymentSettingStorageNetworks().withName("hh") - .withNetworkAdapterName("rzdzucerscdnt") - .withVlanId("vfiwjmygtdss") - .withStorageAdapterIpInfo(Arrays.asList( - new DeploymentSettingStorageAdapterIpInfo().withPhysicalNode("mweriofzpy") - .withIpv4Address("emwabnet") - .withSubnetMask("hszhedplvwiwu"), - new DeploymentSettingStorageAdapterIpInfo().withPhysicalNode("wmbesldnkw") - .withIpv4Address("pp") - .withSubnetMask("lcxog"))))) - .withStorageConnectivitySwitchless(true) - .withEnableStorageAutoIp(true); + DeploymentSettingHostNetwork model + = new DeploymentSettingHostNetwork() + .withIntents( + Arrays + .asList( + new DeploymentSettingIntents().withName("wubmwmbesldn") + .withTrafficType(Arrays.asList("tppjflcx", "gaokonzmnsikv", "kqze", "qkdltfz")) + .withAdapter(Arrays.asList("hvhgureod")) + .withOverrideVirtualSwitchConfiguration(true) + .withVirtualSwitchConfigurationOverrides( + new DeploymentSettingVirtualSwitchConfigurationOverrides().withEnableIov("agxti") + .withLoadBalancingAlgorithm("dxbx")) + .withOverrideQosPolicy(true) + .withQosPolicyOverrides( + new QosPolicyOverrides().withPriorityValue8021ActionCluster("gqxndlkzgxhuripl") + .withPriorityValue8021ActionSmb("odxun") + .withBandwidthPercentageSmb("ebxmubyynt")) + .withOverrideAdapterProperty(false) + .withAdapterPropertyOverrides( + new DeploymentSettingAdapterPropertyOverrides().withJumboPacket("tkoievseotgq") + .withNetworkDirect("ltmuwlauwzizx") + .withNetworkDirectTechnology("pgcjefuzmuvp")), + new DeploymentSettingIntents().withName("tdum") + .withTrafficType(Arrays.asList("pxebmnzbt")) + .withAdapter(Arrays.asList("pglkf", "ohdneuel", "phsdyhto")) + .withOverrideVirtualSwitchConfiguration(true) + .withVirtualSwitchConfigurationOverrides( + new DeploymentSettingVirtualSwitchConfigurationOverrides() + .withEnableIov("owwquuvxz") + .withLoadBalancingAlgorithm("lvithhqzonosgg")) + .withOverrideQosPolicy(false) + .withQosPolicyOverrides( + new QosPolicyOverrides().withPriorityValue8021ActionCluster("fwdsj") + .withPriorityValue8021ActionSmb("aljutiiswac") + .withBandwidthPercentageSmb("gdkz")) + .withOverrideAdapterProperty(true) + .withAdapterPropertyOverrides( + new DeploymentSettingAdapterPropertyOverrides().withJumboPacket("vhqcrail") + .withNetworkDirect("n") + .withNetworkDirectTechnology("fuflrwdmhdlx")))) + .withStorageNetworks(Arrays.asList( + new DeploymentSettingStorageNetworks().withName("sag") + .withNetworkAdapterName("cnihgwqapnedgfbc") + .withVlanId("cvqvpkeqdcv") + .withStorageAdapterIpInfo(Arrays.asList( + new DeploymentSettingStorageAdapterIpInfo().withPhysicalNode("ood") + .withIpv4Address("tbobz") + .withSubnetMask("pcjwv"), + new DeploymentSettingStorageAdapterIpInfo().withPhysicalNode("dldwmgxc") + .withIpv4Address("slpmutwuo") + .withSubnetMask("rpkhjwn"), + new DeploymentSettingStorageAdapterIpInfo().withPhysicalNode("qsluicp") + .withIpv4Address("gk") + .withSubnetMask("lvmbmpaxmodfvuef"), + new DeploymentSettingStorageAdapterIpInfo().withPhysicalNode("sbpfvmwyhr") + .withIpv4Address("uyfta") + .withSubnetMask("cpwi"))), + new DeploymentSettingStorageNetworks().withName("vqtmnub") + .withNetworkAdapterName("kpzksmondjmq") + .withVlanId("vypomgkopkwho") + .withStorageAdapterIpInfo(Arrays.asList( + new DeploymentSettingStorageAdapterIpInfo().withPhysicalNode("jqg") + .withIpv4Address("smocmbq") + .withSubnetMask("vmkcx"), + new DeploymentSettingStorageAdapterIpInfo().withPhysicalNode("apvhelxprgly") + .withIpv4Address("dd") + .withSubnetMask("cbcuejrjxgciqi"), + new DeploymentSettingStorageAdapterIpInfo().withPhysicalNode("hos") + .withIpv4Address("dqrhzoymib") + .withSubnetMask("qyib"))), + new DeploymentSettingStorageNetworks().withName("wfluszdt") + .withNetworkAdapterName("rkwofyyvoqa") + .withVlanId("iexpbtgiwbwo") + .withStorageAdapterIpInfo(Arrays.asList( + new DeploymentSettingStorageAdapterIpInfo().withPhysicalNode("shrtdtkcnqxwb") + .withIpv4Address("kulpiujwaasi") + .withSubnetMask("i"), + new DeploymentSettingStorageAdapterIpInfo().withPhysicalNode("byuqerpqlp") + .withIpv4Address("cciuqgbdbutau") + .withSubnetMask("btkuwhh"))), + new DeploymentSettingStorageNetworks().withName("ykojoxafnndlpic") + .withNetworkAdapterName("o") + .withVlanId("kcdyhbpk") + .withStorageAdapterIpInfo(Arrays.asList( + new DeploymentSettingStorageAdapterIpInfo().withPhysicalNode("reqnovvqfov") + .withIpv4Address("xywsuws") + .withSubnetMask("s"), + new DeploymentSettingStorageAdapterIpInfo().withPhysicalNode("sytgadgvraea") + .withIpv4Address("e") + .withSubnetMask("zar"), + new DeploymentSettingStorageAdapterIpInfo().withPhysicalNode("lquuijfqkacewii") + .withIpv4Address("pubjibw") + .withSubnetMask("f"), + new DeploymentSettingStorageAdapterIpInfo().withPhysicalNode("hqkvpuvksgplsak") + .withIpv4Address("n") + .withSubnetMask("ynl"))))) + .withStorageConnectivitySwitchless(true) + .withEnableStorageAutoIp(false); model = BinaryData.fromObject(model).toObject(DeploymentSettingHostNetwork.class); - Assertions.assertEquals("xcto", model.intents().get(0).name()); - Assertions.assertEquals("kdmoi", model.intents().get(0).trafficType().get(0)); - Assertions.assertEquals("hhkxbp", model.intents().get(0).adapter().get(0)); - Assertions.assertEquals(false, model.intents().get(0).overrideVirtualSwitchConfiguration()); - Assertions.assertEquals("j", model.intents().get(0).virtualSwitchConfigurationOverrides().enableIov()); - Assertions.assertEquals("gudivkrtswbxqz", + Assertions.assertEquals("wubmwmbesldn", model.intents().get(0).name()); + Assertions.assertEquals("tppjflcx", model.intents().get(0).trafficType().get(0)); + Assertions.assertEquals("hvhgureod", model.intents().get(0).adapter().get(0)); + Assertions.assertTrue(model.intents().get(0).overrideVirtualSwitchConfiguration()); + Assertions.assertEquals("agxti", model.intents().get(0).virtualSwitchConfigurationOverrides().enableIov()); + Assertions.assertEquals("dxbx", model.intents().get(0).virtualSwitchConfigurationOverrides().loadBalancingAlgorithm()); - Assertions.assertEquals(false, model.intents().get(0).overrideQosPolicy()); - Assertions.assertEquals("auvjfdxxivet", + Assertions.assertTrue(model.intents().get(0).overrideQosPolicy()); + Assertions.assertEquals("gqxndlkzgxhuripl", model.intents().get(0).qosPolicyOverrides().priorityValue8021ActionCluster()); - Assertions.assertEquals("cqaqtdoqmcbx", - model.intents().get(0).qosPolicyOverrides().priorityValue8021ActionSmb()); - Assertions.assertEquals("vxysl", model.intents().get(0).qosPolicyOverrides().bandwidthPercentageSmb()); - Assertions.assertEquals(true, model.intents().get(0).overrideAdapterProperty()); - Assertions.assertEquals("xoblytkbl", model.intents().get(0).adapterPropertyOverrides().jumboPacket()); - Assertions.assertEquals("ewwwfbkrvrnsv", model.intents().get(0).adapterPropertyOverrides().networkDirect()); - Assertions.assertEquals("q", model.intents().get(0).adapterPropertyOverrides().networkDirectTechnology()); - Assertions.assertEquals("l", model.storageNetworks().get(0).name()); - Assertions.assertEquals("slqlfmmdn", model.storageNetworks().get(0).networkAdapterName()); - Assertions.assertEquals("glzpswiydm", model.storageNetworks().get(0).vlanId()); - Assertions.assertEquals("zdxss", model.storageNetworks().get(0).storageAdapterIpInfo().get(0).physicalNode()); - Assertions.assertEquals("bzmnvdfznud", - model.storageNetworks().get(0).storageAdapterIpInfo().get(0).ipv4Address()); - Assertions.assertEquals("dvxzbncblylpst", - model.storageNetworks().get(0).storageAdapterIpInfo().get(0).subnetMask()); - Assertions.assertEquals(true, model.storageConnectivitySwitchless()); - Assertions.assertEquals(true, model.enableStorageAutoIp()); + Assertions.assertEquals("odxun", model.intents().get(0).qosPolicyOverrides().priorityValue8021ActionSmb()); + Assertions.assertEquals("ebxmubyynt", model.intents().get(0).qosPolicyOverrides().bandwidthPercentageSmb()); + Assertions.assertFalse(model.intents().get(0).overrideAdapterProperty()); + Assertions.assertEquals("tkoievseotgq", model.intents().get(0).adapterPropertyOverrides().jumboPacket()); + Assertions.assertEquals("ltmuwlauwzizx", model.intents().get(0).adapterPropertyOverrides().networkDirect()); + Assertions.assertEquals("pgcjefuzmuvp", + model.intents().get(0).adapterPropertyOverrides().networkDirectTechnology()); + Assertions.assertEquals("sag", model.storageNetworks().get(0).name()); + Assertions.assertEquals("cnihgwqapnedgfbc", model.storageNetworks().get(0).networkAdapterName()); + Assertions.assertEquals("cvqvpkeqdcv", model.storageNetworks().get(0).vlanId()); + Assertions.assertEquals("ood", model.storageNetworks().get(0).storageAdapterIpInfo().get(0).physicalNode()); + Assertions.assertEquals("tbobz", model.storageNetworks().get(0).storageAdapterIpInfo().get(0).ipv4Address()); + Assertions.assertEquals("pcjwv", model.storageNetworks().get(0).storageAdapterIpInfo().get(0).subnetMask()); + Assertions.assertTrue(model.storageConnectivitySwitchless()); + Assertions.assertFalse(model.enableStorageAutoIp()); } } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/DeploymentSettingIntentsTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/DeploymentSettingIntentsTests.java index b07fff0097ab..c7113f494be9 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/DeploymentSettingIntentsTests.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/DeploymentSettingIntentsTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.generated; @@ -16,58 +16,55 @@ public final class DeploymentSettingIntentsTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { DeploymentSettingIntents model = BinaryData.fromString( - "{\"name\":\"m\",\"trafficType\":[\"kvmkqzeqq\",\"dltfz\",\"mhhv\"],\"adapter\":[\"r\"],\"overrideVirtualSwitchConfiguration\":true,\"virtualSwitchConfigurationOverrides\":{\"enableIov\":\"obdagxtibqdxb\",\"loadBalancingAlgorithm\":\"akbogqxndlkzgxh\"},\"overrideQosPolicy\":true,\"qosPolicyOverrides\":{\"priorityValue8021Action_Cluster\":\"bpodxunkbebxm\",\"priorityValue8021Action_SMB\":\"yyntwl\",\"bandwidthPercentage_SMB\":\"qtkoievs\"},\"overrideAdapterProperty\":false,\"adapterPropertyOverrides\":{\"jumboPacket\":\"rlltmuwlauwzizx\",\"networkDirect\":\"pgcjefuzmuvp\",\"networkDirectTechnology\":\"tdum\"}}") + "{\"name\":\"xodlqiyntorzih\",\"trafficType\":[\"sjswsrms\",\"yzrpzbchckqqzq\"],\"adapter\":[\"iysui\"],\"overrideVirtualSwitchConfiguration\":true,\"virtualSwitchConfigurationOverrides\":{\"enableIov\":\"edyatrwyhqmibzyh\",\"loadBalancingAlgorithm\":\"tsmypyynpcdp\"},\"overrideQosPolicy\":true,\"qosPolicyOverrides\":{\"priorityValue8021Action_Cluster\":\"mwzn\",\"priorityValue8021Action_SMB\":\"biknsorgjhxbld\",\"bandwidthPercentage_SMB\":\"wwrlkdmtncv\"},\"overrideAdapterProperty\":true,\"adapterPropertyOverrides\":{\"jumboPacket\":\"lxdy\",\"networkDirect\":\"syocogjltdtbnnha\",\"networkDirectTechnology\":\"ocrkvcikh\"}}") .toObject(DeploymentSettingIntents.class); - Assertions.assertEquals("m", model.name()); - Assertions.assertEquals("kvmkqzeqq", model.trafficType().get(0)); - Assertions.assertEquals("r", model.adapter().get(0)); - Assertions.assertEquals(true, model.overrideVirtualSwitchConfiguration()); - Assertions.assertEquals("obdagxtibqdxb", model.virtualSwitchConfigurationOverrides().enableIov()); - Assertions.assertEquals("akbogqxndlkzgxh", - model.virtualSwitchConfigurationOverrides().loadBalancingAlgorithm()); - Assertions.assertEquals(true, model.overrideQosPolicy()); - Assertions.assertEquals("bpodxunkbebxm", model.qosPolicyOverrides().priorityValue8021ActionCluster()); - Assertions.assertEquals("yyntwl", model.qosPolicyOverrides().priorityValue8021ActionSmb()); - Assertions.assertEquals("qtkoievs", model.qosPolicyOverrides().bandwidthPercentageSmb()); - Assertions.assertEquals(false, model.overrideAdapterProperty()); - Assertions.assertEquals("rlltmuwlauwzizx", model.adapterPropertyOverrides().jumboPacket()); - Assertions.assertEquals("pgcjefuzmuvp", model.adapterPropertyOverrides().networkDirect()); - Assertions.assertEquals("tdum", model.adapterPropertyOverrides().networkDirectTechnology()); + Assertions.assertEquals("xodlqiyntorzih", model.name()); + Assertions.assertEquals("sjswsrms", model.trafficType().get(0)); + Assertions.assertEquals("iysui", model.adapter().get(0)); + Assertions.assertTrue(model.overrideVirtualSwitchConfiguration()); + Assertions.assertEquals("edyatrwyhqmibzyh", model.virtualSwitchConfigurationOverrides().enableIov()); + Assertions.assertEquals("tsmypyynpcdp", model.virtualSwitchConfigurationOverrides().loadBalancingAlgorithm()); + Assertions.assertTrue(model.overrideQosPolicy()); + Assertions.assertEquals("mwzn", model.qosPolicyOverrides().priorityValue8021ActionCluster()); + Assertions.assertEquals("biknsorgjhxbld", model.qosPolicyOverrides().priorityValue8021ActionSmb()); + Assertions.assertEquals("wwrlkdmtncv", model.qosPolicyOverrides().bandwidthPercentageSmb()); + Assertions.assertTrue(model.overrideAdapterProperty()); + Assertions.assertEquals("lxdy", model.adapterPropertyOverrides().jumboPacket()); + Assertions.assertEquals("syocogjltdtbnnha", model.adapterPropertyOverrides().networkDirect()); + Assertions.assertEquals("ocrkvcikh", model.adapterPropertyOverrides().networkDirectTechnology()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - DeploymentSettingIntents model = new DeploymentSettingIntents().withName("m") - .withTrafficType(Arrays.asList("kvmkqzeqq", "dltfz", "mhhv")) - .withAdapter(Arrays.asList("r")) + DeploymentSettingIntents model = new DeploymentSettingIntents().withName("xodlqiyntorzih") + .withTrafficType(Arrays.asList("sjswsrms", "yzrpzbchckqqzq")) + .withAdapter(Arrays.asList("iysui")) .withOverrideVirtualSwitchConfiguration(true) .withVirtualSwitchConfigurationOverrides( - new DeploymentSettingVirtualSwitchConfigurationOverrides().withEnableIov("obdagxtibqdxb") - .withLoadBalancingAlgorithm("akbogqxndlkzgxh")) + new DeploymentSettingVirtualSwitchConfigurationOverrides().withEnableIov("edyatrwyhqmibzyh") + .withLoadBalancingAlgorithm("tsmypyynpcdp")) .withOverrideQosPolicy(true) - .withQosPolicyOverrides(new QosPolicyOverrides().withPriorityValue8021ActionCluster("bpodxunkbebxm") - .withPriorityValue8021ActionSmb("yyntwl") - .withBandwidthPercentageSmb("qtkoievs")) - .withOverrideAdapterProperty(false) - .withAdapterPropertyOverrides( - new DeploymentSettingAdapterPropertyOverrides().withJumboPacket("rlltmuwlauwzizx") - .withNetworkDirect("pgcjefuzmuvp") - .withNetworkDirectTechnology("tdum")); + .withQosPolicyOverrides(new QosPolicyOverrides().withPriorityValue8021ActionCluster("mwzn") + .withPriorityValue8021ActionSmb("biknsorgjhxbld") + .withBandwidthPercentageSmb("wwrlkdmtncv")) + .withOverrideAdapterProperty(true) + .withAdapterPropertyOverrides(new DeploymentSettingAdapterPropertyOverrides().withJumboPacket("lxdy") + .withNetworkDirect("syocogjltdtbnnha") + .withNetworkDirectTechnology("ocrkvcikh")); model = BinaryData.fromObject(model).toObject(DeploymentSettingIntents.class); - Assertions.assertEquals("m", model.name()); - Assertions.assertEquals("kvmkqzeqq", model.trafficType().get(0)); - Assertions.assertEquals("r", model.adapter().get(0)); - Assertions.assertEquals(true, model.overrideVirtualSwitchConfiguration()); - Assertions.assertEquals("obdagxtibqdxb", model.virtualSwitchConfigurationOverrides().enableIov()); - Assertions.assertEquals("akbogqxndlkzgxh", - model.virtualSwitchConfigurationOverrides().loadBalancingAlgorithm()); - Assertions.assertEquals(true, model.overrideQosPolicy()); - Assertions.assertEquals("bpodxunkbebxm", model.qosPolicyOverrides().priorityValue8021ActionCluster()); - Assertions.assertEquals("yyntwl", model.qosPolicyOverrides().priorityValue8021ActionSmb()); - Assertions.assertEquals("qtkoievs", model.qosPolicyOverrides().bandwidthPercentageSmb()); - Assertions.assertEquals(false, model.overrideAdapterProperty()); - Assertions.assertEquals("rlltmuwlauwzizx", model.adapterPropertyOverrides().jumboPacket()); - Assertions.assertEquals("pgcjefuzmuvp", model.adapterPropertyOverrides().networkDirect()); - Assertions.assertEquals("tdum", model.adapterPropertyOverrides().networkDirectTechnology()); + Assertions.assertEquals("xodlqiyntorzih", model.name()); + Assertions.assertEquals("sjswsrms", model.trafficType().get(0)); + Assertions.assertEquals("iysui", model.adapter().get(0)); + Assertions.assertTrue(model.overrideVirtualSwitchConfiguration()); + Assertions.assertEquals("edyatrwyhqmibzyh", model.virtualSwitchConfigurationOverrides().enableIov()); + Assertions.assertEquals("tsmypyynpcdp", model.virtualSwitchConfigurationOverrides().loadBalancingAlgorithm()); + Assertions.assertTrue(model.overrideQosPolicy()); + Assertions.assertEquals("mwzn", model.qosPolicyOverrides().priorityValue8021ActionCluster()); + Assertions.assertEquals("biknsorgjhxbld", model.qosPolicyOverrides().priorityValue8021ActionSmb()); + Assertions.assertEquals("wwrlkdmtncv", model.qosPolicyOverrides().bandwidthPercentageSmb()); + Assertions.assertTrue(model.overrideAdapterProperty()); + Assertions.assertEquals("lxdy", model.adapterPropertyOverrides().jumboPacket()); + Assertions.assertEquals("syocogjltdtbnnha", model.adapterPropertyOverrides().networkDirect()); + Assertions.assertEquals("ocrkvcikh", model.adapterPropertyOverrides().networkDirectTechnology()); } } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/DeploymentSettingListResultTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/DeploymentSettingListResultTests.java index f918223e61ad..09e20126f120 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/DeploymentSettingListResultTests.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/DeploymentSettingListResultTests.java @@ -1,52 +1,25 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.generated; import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.azurestackhci.fluent.models.DeploymentSettingInner; -import com.azure.resourcemanager.azurestackhci.models.DeploymentConfiguration; -import com.azure.resourcemanager.azurestackhci.models.DeploymentData; +import com.azure.resourcemanager.azurestackhci.implementation.models.DeploymentSettingListResult; import com.azure.resourcemanager.azurestackhci.models.DeploymentMode; -import com.azure.resourcemanager.azurestackhci.models.DeploymentSettingListResult; import com.azure.resourcemanager.azurestackhci.models.OperationType; -import com.azure.resourcemanager.azurestackhci.models.ScaleUnits; -import java.util.Arrays; import org.junit.jupiter.api.Assertions; public final class DeploymentSettingListResultTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { DeploymentSettingListResult model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"provisioningState\":\"Disconnected\",\"arcNodeResourceIds\":[\"rzqlveu\",\"lupj\"],\"deploymentMode\":\"Deploy\",\"operationType\":\"ClusterUpgrade\",\"deploymentConfiguration\":{\"version\":\"obbc\",\"scaleUnits\":[{\"deploymentData\":{}},{\"deploymentData\":{}},{\"deploymentData\":{}},{\"deploymentData\":{}}]},\"reportedProperties\":{\"validationStatus\":{\"status\":\"jriplrbpbewtghf\",\"steps\":[{},{},{}]},\"deploymentStatus\":{\"status\":\"wxzvlvqhjkb\",\"steps\":[{},{},{},{}]}}},\"id\":\"t\",\"name\":\"mxiebw\",\"type\":\"aloayqcgwrtzju\"}],\"nextLink\":\"wyzmhtxon\"}") + "{\"value\":[{\"properties\":{\"provisioningState\":\"Accepted\",\"arcNodeResourceIds\":[\"m\",\"ev\"],\"deploymentMode\":\"Validate\",\"operationType\":\"ClusterProvisioning\",\"deploymentConfiguration\":{\"version\":\"rrilbywdxsmic\",\"scaleUnits\":[{\"deploymentData\":{}},{\"deploymentData\":{}},{\"deploymentData\":{}}]},\"reportedProperties\":{\"validationStatus\":{\"status\":\"scjfnyns\",\"steps\":[{}]},\"deploymentStatus\":{\"status\":\"zdvoqytibyowbb\",\"steps\":[{},{},{},{}]}}},\"id\":\"vutpthjoxo\",\"name\":\"smsks\",\"type\":\"pi\"},{\"properties\":{\"provisioningState\":\"Disconnected\",\"arcNodeResourceIds\":[\"jxkcgxxlxsff\",\"cvizqzdwlvw\",\"youpfgfbkj\"],\"deploymentMode\":\"Deploy\",\"operationType\":\"ClusterProvisioning\",\"deploymentConfiguration\":{\"version\":\"gkfmins\",\"scaleUnits\":[{\"deploymentData\":{}},{\"deploymentData\":{}},{\"deploymentData\":{}}]},\"reportedProperties\":{\"validationStatus\":{\"status\":\"ttsttktlahbqact\",\"steps\":[{},{},{}]},\"deploymentStatus\":{\"status\":\"kxitmmqtgqqqxhr\",\"steps\":[{},{},{}]}}},\"id\":\"cpjuisa\",\"name\":\"okqdzfvaz\",\"type\":\"vjlfrqtt\"},{\"properties\":{\"provisioningState\":\"Moving\",\"arcNodeResourceIds\":[\"atnwxyiopi\",\"kqqfk\"],\"deploymentMode\":\"Validate\",\"operationType\":\"ClusterUpgrade\",\"deploymentConfiguration\":{\"version\":\"kdmligovi\",\"scaleUnits\":[{\"deploymentData\":{}},{\"deploymentData\":{}},{\"deploymentData\":{}},{\"deploymentData\":{}}]},\"reportedProperties\":{\"validationStatus\":{\"status\":\"mloazuru\",\"steps\":[{}]},\"deploymentStatus\":{\"status\":\"orbteoy\",\"steps\":[{}]}}},\"id\":\"xakvvjgslor\",\"name\":\"il\",\"type\":\"yw\"},{\"properties\":{\"provisioningState\":\"Canceled\",\"arcNodeResourceIds\":[\"xnyed\"],\"deploymentMode\":\"Validate\",\"operationType\":\"ClusterUpgrade\",\"deploymentConfiguration\":{\"version\":\"udtjuewbc\",\"scaleUnits\":[{\"deploymentData\":{}},{\"deploymentData\":{}},{\"deploymentData\":{}},{\"deploymentData\":{}}]},\"reportedProperties\":{\"validationStatus\":{\"status\":\"whcjyxcc\",\"steps\":[{},{},{}]},\"deploymentStatus\":{\"status\":\"yakk\",\"steps\":[{}]}}},\"id\":\"xgwjplmagstcyoh\",\"name\":\"fkyrk\",\"type\":\"bdgiogsjk\"}],\"nextLink\":\"wqjnob\"}") .toObject(DeploymentSettingListResult.class); - Assertions.assertEquals("rzqlveu", model.value().get(0).arcNodeResourceIds().get(0)); - Assertions.assertEquals(DeploymentMode.DEPLOY, model.value().get(0).deploymentMode()); - Assertions.assertEquals(OperationType.CLUSTER_UPGRADE, model.value().get(0).operationType()); - Assertions.assertEquals("obbc", model.value().get(0).deploymentConfiguration().version()); - Assertions.assertEquals("wyzmhtxon", model.nextLink()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DeploymentSettingListResult model - = new DeploymentSettingListResult() - .withValue( - Arrays.asList(new DeploymentSettingInner().withArcNodeResourceIds(Arrays.asList("rzqlveu", "lupj")) - .withDeploymentMode(DeploymentMode.DEPLOY) - .withOperationType(OperationType.CLUSTER_UPGRADE) - .withDeploymentConfiguration(new DeploymentConfiguration().withVersion("obbc") - .withScaleUnits(Arrays.asList(new ScaleUnits().withDeploymentData(new DeploymentData()), - new ScaleUnits().withDeploymentData(new DeploymentData()), - new ScaleUnits().withDeploymentData(new DeploymentData()), - new ScaleUnits().withDeploymentData(new DeploymentData())))))) - .withNextLink("wyzmhtxon"); - model = BinaryData.fromObject(model).toObject(DeploymentSettingListResult.class); - Assertions.assertEquals("rzqlveu", model.value().get(0).arcNodeResourceIds().get(0)); - Assertions.assertEquals(DeploymentMode.DEPLOY, model.value().get(0).deploymentMode()); - Assertions.assertEquals(OperationType.CLUSTER_UPGRADE, model.value().get(0).operationType()); - Assertions.assertEquals("obbc", model.value().get(0).deploymentConfiguration().version()); - Assertions.assertEquals("wyzmhtxon", model.nextLink()); + Assertions.assertEquals("m", model.value().get(0).arcNodeResourceIds().get(0)); + Assertions.assertEquals(DeploymentMode.VALIDATE, model.value().get(0).deploymentMode()); + Assertions.assertEquals(OperationType.CLUSTER_PROVISIONING, model.value().get(0).operationType()); + Assertions.assertEquals("rrilbywdxsmic", model.value().get(0).deploymentConfiguration().version()); + Assertions.assertEquals("wqjnob", model.nextLink()); } } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/DeploymentSettingStorageAdapterIpInfoTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/DeploymentSettingStorageAdapterIpInfoTests.java index 18abd42de276..15753f6c0926 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/DeploymentSettingStorageAdapterIpInfoTests.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/DeploymentSettingStorageAdapterIpInfoTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.generated; @@ -11,22 +11,23 @@ public final class DeploymentSettingStorageAdapterIpInfoTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - DeploymentSettingStorageAdapterIpInfo model - = BinaryData.fromString("{\"physicalNode\":\"ld\",\"ipv4Address\":\"gx\",\"subnetMask\":\"rslpmutwuoeg\"}") - .toObject(DeploymentSettingStorageAdapterIpInfo.class); - Assertions.assertEquals("ld", model.physicalNode()); - Assertions.assertEquals("gx", model.ipv4Address()); - Assertions.assertEquals("rslpmutwuoeg", model.subnetMask()); + DeploymentSettingStorageAdapterIpInfo model = BinaryData + .fromString("{\"physicalNode\":\"vimjwos\",\"ipv4Address\":\"xitc\",\"subnetMask\":\"fcktqumiekke\"}") + .toObject(DeploymentSettingStorageAdapterIpInfo.class); + Assertions.assertEquals("vimjwos", model.physicalNode()); + Assertions.assertEquals("xitc", model.ipv4Address()); + Assertions.assertEquals("fcktqumiekke", model.subnetMask()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - DeploymentSettingStorageAdapterIpInfo model = new DeploymentSettingStorageAdapterIpInfo().withPhysicalNode("ld") - .withIpv4Address("gx") - .withSubnetMask("rslpmutwuoeg"); + DeploymentSettingStorageAdapterIpInfo model + = new DeploymentSettingStorageAdapterIpInfo().withPhysicalNode("vimjwos") + .withIpv4Address("xitc") + .withSubnetMask("fcktqumiekke"); model = BinaryData.fromObject(model).toObject(DeploymentSettingStorageAdapterIpInfo.class); - Assertions.assertEquals("ld", model.physicalNode()); - Assertions.assertEquals("gx", model.ipv4Address()); - Assertions.assertEquals("rslpmutwuoeg", model.subnetMask()); + Assertions.assertEquals("vimjwos", model.physicalNode()); + Assertions.assertEquals("xitc", model.ipv4Address()); + Assertions.assertEquals("fcktqumiekke", model.subnetMask()); } } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/DeploymentSettingStorageNetworksTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/DeploymentSettingStorageNetworksTests.java index 17bfafd5d33f..1f9418788903 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/DeploymentSettingStorageNetworksTests.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/DeploymentSettingStorageNetworksTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.generated; @@ -14,34 +14,40 @@ public final class DeploymentSettingStorageNetworksTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { DeploymentSettingStorageNetworks model = BinaryData.fromString( - "{\"name\":\"hfwdsjnkaljutiis\",\"networkAdapterName\":\"cffgdkzzewk\",\"vlanId\":\"hqcrailvpnpp\",\"storageAdapterIPInfo\":[{\"physicalNode\":\"rwdmhdlxyjrxsa\",\"ipv4Address\":\"fcnihgwq\",\"subnetMask\":\"nedgfbc\"},{\"physicalNode\":\"cvqvpkeqdcv\",\"ipv4Address\":\"hvoodsotbobzd\",\"subnetMask\":\"cjwvn\"}]}") + "{\"name\":\"lmfmtdaay\",\"networkAdapterName\":\"v\",\"vlanId\":\"gpiohgwxrtfudxe\",\"storageAdapterIPInfo\":[{\"physicalNode\":\"qagvrvm\",\"ipv4Address\":\"k\",\"subnetMask\":\"ghimdblx\"},{\"physicalNode\":\"imfnjhfjx\",\"ipv4Address\":\"szkkfoqre\",\"subnetMask\":\"kzikfjawneaivxwc\"},{\"physicalNode\":\"lpcirelsf\",\"ipv4Address\":\"enwabfatk\",\"subnetMask\":\"dxbjhwuaanozj\"},{\"physicalNode\":\"ph\",\"ipv4Address\":\"ulpjr\",\"subnetMask\":\"ag\"}]}") .toObject(DeploymentSettingStorageNetworks.class); - Assertions.assertEquals("hfwdsjnkaljutiis", model.name()); - Assertions.assertEquals("cffgdkzzewk", model.networkAdapterName()); - Assertions.assertEquals("hqcrailvpnpp", model.vlanId()); - Assertions.assertEquals("rwdmhdlxyjrxsa", model.storageAdapterIpInfo().get(0).physicalNode()); - Assertions.assertEquals("fcnihgwq", model.storageAdapterIpInfo().get(0).ipv4Address()); - Assertions.assertEquals("nedgfbc", model.storageAdapterIpInfo().get(0).subnetMask()); + Assertions.assertEquals("lmfmtdaay", model.name()); + Assertions.assertEquals("v", model.networkAdapterName()); + Assertions.assertEquals("gpiohgwxrtfudxe", model.vlanId()); + Assertions.assertEquals("qagvrvm", model.storageAdapterIpInfo().get(0).physicalNode()); + Assertions.assertEquals("k", model.storageAdapterIpInfo().get(0).ipv4Address()); + Assertions.assertEquals("ghimdblx", model.storageAdapterIpInfo().get(0).subnetMask()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - DeploymentSettingStorageNetworks model = new DeploymentSettingStorageNetworks().withName("hfwdsjnkaljutiis") - .withNetworkAdapterName("cffgdkzzewk") - .withVlanId("hqcrailvpnpp") + DeploymentSettingStorageNetworks model = new DeploymentSettingStorageNetworks().withName("lmfmtdaay") + .withNetworkAdapterName("v") + .withVlanId("gpiohgwxrtfudxe") .withStorageAdapterIpInfo(Arrays.asList( - new DeploymentSettingStorageAdapterIpInfo().withPhysicalNode("rwdmhdlxyjrxsa") - .withIpv4Address("fcnihgwq") - .withSubnetMask("nedgfbc"), - new DeploymentSettingStorageAdapterIpInfo().withPhysicalNode("cvqvpkeqdcv") - .withIpv4Address("hvoodsotbobzd") - .withSubnetMask("cjwvn"))); + new DeploymentSettingStorageAdapterIpInfo().withPhysicalNode("qagvrvm") + .withIpv4Address("k") + .withSubnetMask("ghimdblx"), + new DeploymentSettingStorageAdapterIpInfo().withPhysicalNode("imfnjhfjx") + .withIpv4Address("szkkfoqre") + .withSubnetMask("kzikfjawneaivxwc"), + new DeploymentSettingStorageAdapterIpInfo().withPhysicalNode("lpcirelsf") + .withIpv4Address("enwabfatk") + .withSubnetMask("dxbjhwuaanozj"), + new DeploymentSettingStorageAdapterIpInfo().withPhysicalNode("ph") + .withIpv4Address("ulpjr") + .withSubnetMask("ag"))); model = BinaryData.fromObject(model).toObject(DeploymentSettingStorageNetworks.class); - Assertions.assertEquals("hfwdsjnkaljutiis", model.name()); - Assertions.assertEquals("cffgdkzzewk", model.networkAdapterName()); - Assertions.assertEquals("hqcrailvpnpp", model.vlanId()); - Assertions.assertEquals("rwdmhdlxyjrxsa", model.storageAdapterIpInfo().get(0).physicalNode()); - Assertions.assertEquals("fcnihgwq", model.storageAdapterIpInfo().get(0).ipv4Address()); - Assertions.assertEquals("nedgfbc", model.storageAdapterIpInfo().get(0).subnetMask()); + Assertions.assertEquals("lmfmtdaay", model.name()); + Assertions.assertEquals("v", model.networkAdapterName()); + Assertions.assertEquals("gpiohgwxrtfudxe", model.vlanId()); + Assertions.assertEquals("qagvrvm", model.storageAdapterIpInfo().get(0).physicalNode()); + Assertions.assertEquals("k", model.storageAdapterIpInfo().get(0).ipv4Address()); + Assertions.assertEquals("ghimdblx", model.storageAdapterIpInfo().get(0).subnetMask()); } } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/DeploymentSettingVirtualSwitchConfigurationOverridesTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/DeploymentSettingVirtualSwitchConfigurationOverridesTests.java index 539884e50e75..d339c9a3d92d 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/DeploymentSettingVirtualSwitchConfigurationOverridesTests.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/DeploymentSettingVirtualSwitchConfigurationOverridesTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.generated; @@ -12,19 +12,19 @@ public final class DeploymentSettingVirtualSwitchConfigurationOverridesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { DeploymentSettingVirtualSwitchConfigurationOverrides model - = BinaryData.fromString("{\"enableIov\":\"p\",\"loadBalancingAlgorithm\":\"ebmnzbtbhjpglk\"}") + = BinaryData.fromString("{\"enableIov\":\"p\",\"loadBalancingAlgorithm\":\"qgxqquezikyw\"}") .toObject(DeploymentSettingVirtualSwitchConfigurationOverrides.class); Assertions.assertEquals("p", model.enableIov()); - Assertions.assertEquals("ebmnzbtbhjpglk", model.loadBalancingAlgorithm()); + Assertions.assertEquals("qgxqquezikyw", model.loadBalancingAlgorithm()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { DeploymentSettingVirtualSwitchConfigurationOverrides model = new DeploymentSettingVirtualSwitchConfigurationOverrides().withEnableIov("p") - .withLoadBalancingAlgorithm("ebmnzbtbhjpglk"); + .withLoadBalancingAlgorithm("qgxqquezikyw"); model = BinaryData.fromObject(model).toObject(DeploymentSettingVirtualSwitchConfigurationOverrides.class); Assertions.assertEquals("p", model.enableIov()); - Assertions.assertEquals("ebmnzbtbhjpglk", model.loadBalancingAlgorithm()); + Assertions.assertEquals("qgxqquezikyw", model.loadBalancingAlgorithm()); } } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/DeploymentSettingsCreateOrUpdateMockTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/DeploymentSettingsCreateOrUpdateMockTests.java index b3275e5ebbb2..2839cca06b93 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/DeploymentSettingsCreateOrUpdateMockTests.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/DeploymentSettingsCreateOrUpdateMockTests.java @@ -1,13 +1,13 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.generated; import com.azure.core.credential.AccessToken; import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.azurestackhci.AzureStackHciManager; import com.azure.resourcemanager.azurestackhci.models.DeploymentConfiguration; @@ -28,29 +28,29 @@ public final class DeploymentSettingsCreateOrUpdateMockTests { @Test public void testCreateOrUpdate() throws Exception { String responseStr - = "{\"properties\":{\"provisioningState\":\"Succeeded\",\"arcNodeResourceIds\":[\"tclhuulriqbyokv\",\"gbzsxebrslt\",\"fyhcdjw\",\"uoard\"],\"deploymentMode\":\"Deploy\",\"operationType\":\"ClusterUpgrade\",\"deploymentConfiguration\":{\"version\":\"pufpbpgnrholhu\",\"scaleUnits\":[{\"deploymentData\":{},\"sbePartnerInfo\":{}},{\"deploymentData\":{},\"sbePartnerInfo\":{}},{\"deploymentData\":{},\"sbePartnerInfo\":{}}]},\"reportedProperties\":{\"validationStatus\":{\"status\":\"kysolsyjprxs\",\"steps\":[{},{}]},\"deploymentStatus\":{\"status\":\"cvhtbbzjhfvh\",\"steps\":[{}]}}},\"id\":\"xpcq\",\"name\":\"gihotjeco\",\"type\":\"mx\"}"; + = "{\"properties\":{\"provisioningState\":\"Succeeded\",\"arcNodeResourceIds\":[\"pzqxlcweakfec\",\"vxfaqufqizj\",\"ppwooaj\",\"yyjmjjxiz\"],\"deploymentMode\":\"Validate\",\"operationType\":\"ClusterUpgrade\",\"deploymentConfiguration\":{\"version\":\"zls\",\"scaleUnits\":[{\"deploymentData\":{},\"sbePartnerInfo\":{}},{\"deploymentData\":{},\"sbePartnerInfo\":{}},{\"deploymentData\":{},\"sbePartnerInfo\":{}},{\"deploymentData\":{},\"sbePartnerInfo\":{}}]},\"reportedProperties\":{\"validationStatus\":{\"status\":\"jtyqpd\",\"steps\":[{}]},\"deploymentStatus\":{\"status\":\"hz\",\"steps\":[{},{}]}}},\"id\":\"vczdjiahuqymjzu\",\"name\":\"wwmejjqhddwvmqx\",\"type\":\"yookyfozkbnzxby\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); AzureStackHciManager manager = AzureStackHciManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); DeploymentSetting response = manager.deploymentSettings() - .define("spugzfeuzjljmph") - .withExistingCluster("lndbeaqbkixv", "lwynpbbfqvzfj") - .withArcNodeResourceIds(Arrays.asList("o", "gj", "mi", "uydoccnx")) - .withDeploymentMode(DeploymentMode.DEPLOY) - .withOperationType(OperationType.CLUSTER_PROVISIONING) - .withDeploymentConfiguration(new DeploymentConfiguration().withVersion("bui") + .define("f") + .withExistingCluster("abenqlamwmg", "way") + .withArcNodeResourceIds(Arrays.asList("jstbhemhcucsqsnx")) + .withDeploymentMode(DeploymentMode.VALIDATE) + .withOperationType(OperationType.CLUSTER_UPGRADE) + .withDeploymentConfiguration(new DeploymentConfiguration().withVersion("eapdrbzyv") .withScaleUnits(Arrays.asList(new ScaleUnits().withDeploymentData(new DeploymentData()) .withSbePartnerInfo(new SbePartnerInfo())))) .create(); - Assertions.assertEquals("tclhuulriqbyokv", response.arcNodeResourceIds().get(0)); - Assertions.assertEquals(DeploymentMode.DEPLOY, response.deploymentMode()); + Assertions.assertEquals("pzqxlcweakfec", response.arcNodeResourceIds().get(0)); + Assertions.assertEquals(DeploymentMode.VALIDATE, response.deploymentMode()); Assertions.assertEquals(OperationType.CLUSTER_UPGRADE, response.operationType()); - Assertions.assertEquals("pufpbpgnrholhu", response.deploymentConfiguration().version()); + Assertions.assertEquals("zls", response.deploymentConfiguration().version()); } } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/DeploymentSettingsGetWithResponseMockTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/DeploymentSettingsGetWithResponseMockTests.java index cef67bc7e194..f53c6f9615e9 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/DeploymentSettingsGetWithResponseMockTests.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/DeploymentSettingsGetWithResponseMockTests.java @@ -1,13 +1,13 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.generated; import com.azure.core.credential.AccessToken; import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.azurestackhci.AzureStackHciManager; import com.azure.resourcemanager.azurestackhci.models.DeploymentMode; @@ -23,22 +23,22 @@ public final class DeploymentSettingsGetWithResponseMockTests { @Test public void testGetWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"provisioningState\":\"Error\",\"arcNodeResourceIds\":[\"yies\",\"cwiqbuout\"],\"deploymentMode\":\"Validate\",\"operationType\":\"ClusterUpgrade\",\"deploymentConfiguration\":{\"version\":\"leofj\",\"scaleUnits\":[{\"deploymentData\":{},\"sbePartnerInfo\":{}},{\"deploymentData\":{},\"sbePartnerInfo\":{}}]},\"reportedProperties\":{\"validationStatus\":{\"status\":\"vdajfwn\",\"steps\":[{},{},{},{}]},\"deploymentStatus\":{\"status\":\"ciqgjjrlhiqlwixv\",\"steps\":[{}]}}},\"id\":\"g\",\"name\":\"xtndopgjttbasua\",\"type\":\"ap\"}"; + = "{\"properties\":{\"provisioningState\":\"DisableInProgress\",\"arcNodeResourceIds\":[\"sf\",\"rlduyehiiittugy\",\"qwrldaxur\"],\"deploymentMode\":\"Validate\",\"operationType\":\"ClusterUpgrade\",\"deploymentConfiguration\":{\"version\":\"sozjvxdzciggbnv\",\"scaleUnits\":[{\"deploymentData\":{},\"sbePartnerInfo\":{}},{\"deploymentData\":{},\"sbePartnerInfo\":{}}]},\"reportedProperties\":{\"validationStatus\":{\"status\":\"zyxwhoe\",\"steps\":[{}]},\"deploymentStatus\":{\"status\":\"bdoeysf\",\"steps\":[{},{},{}]}}},\"id\":\"twuuhauegnk\",\"name\":\"mnfeub\",\"type\":\"zjy\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); AzureStackHciManager manager = AzureStackHciManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); DeploymentSetting response = manager.deploymentSettings() - .getWithResponse("mliqmvlb", "i", "eaqgrvgpomxpupd", com.azure.core.util.Context.NONE) + .getWithResponse("ekzyqxadyfhb", "wkhojqttbspvkhg", "aqjsgyzstujr", com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("yies", response.arcNodeResourceIds().get(0)); + Assertions.assertEquals("sf", response.arcNodeResourceIds().get(0)); Assertions.assertEquals(DeploymentMode.VALIDATE, response.deploymentMode()); Assertions.assertEquals(OperationType.CLUSTER_UPGRADE, response.operationType()); - Assertions.assertEquals("leofj", response.deploymentConfiguration().version()); + Assertions.assertEquals("sozjvxdzciggbnv", response.deploymentConfiguration().version()); } } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/DeploymentSettingsListByClustersMockTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/DeploymentSettingsListByClustersMockTests.java index 1052dd12c2a2..d3695d6c4396 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/DeploymentSettingsListByClustersMockTests.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/DeploymentSettingsListByClustersMockTests.java @@ -1,14 +1,14 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.generated; import com.azure.core.credential.AccessToken; import com.azure.core.http.HttpClient; import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.azurestackhci.AzureStackHciManager; import com.azure.resourcemanager.azurestackhci.models.DeploymentMode; @@ -24,21 +24,21 @@ public final class DeploymentSettingsListByClustersMockTests { @Test public void testListByClusters() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"provisioningState\":\"Canceled\",\"arcNodeResourceIds\":[\"kipfsdyepf\",\"ocmbezacf\",\"ztgaz\"],\"deploymentMode\":\"Validate\",\"operationType\":\"ClusterUpgrade\",\"deploymentConfiguration\":{\"version\":\"gaaokctgkp\",\"scaleUnits\":[{\"deploymentData\":{},\"sbePartnerInfo\":{}},{\"deploymentData\":{},\"sbePartnerInfo\":{}},{\"deploymentData\":{},\"sbePartnerInfo\":{}},{\"deploymentData\":{},\"sbePartnerInfo\":{}}]},\"reportedProperties\":{\"validationStatus\":{\"status\":\"mffngdyfcixr\",\"steps\":[{},{},{},{}]},\"deploymentStatus\":{\"status\":\"hoe\",\"steps\":[{},{},{},{}]}}},\"id\":\"utgwrmkahpqha\",\"name\":\"yntacihnco\",\"type\":\"mip\"}]}"; + = "{\"value\":[{\"properties\":{\"provisioningState\":\"Updating\",\"arcNodeResourceIds\":[\"fopueoqusvwluj\"],\"deploymentMode\":\"Deploy\",\"operationType\":\"ClusterUpgrade\",\"deploymentConfiguration\":{\"version\":\"bittoztjdqumqvf\",\"scaleUnits\":[{\"deploymentData\":{},\"sbePartnerInfo\":{}}]},\"reportedProperties\":{\"validationStatus\":{\"status\":\"tgctxe\",\"steps\":[{}]},\"deploymentStatus\":{\"status\":\"yurbel\",\"steps\":[{}]}}},\"id\":\"ryizwbxgde\",\"name\":\"xlayunomir\",\"type\":\"p\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); AzureStackHciManager manager = AzureStackHciManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PagedIterable response - = manager.deploymentSettings().listByClusters("jovmozsaye", "razwzlpzbt", com.azure.core.util.Context.NONE); + = manager.deploymentSettings().listByClusters("kwfugiphrrkuu", "nqd", com.azure.core.util.Context.NONE); - Assertions.assertEquals("kipfsdyepf", response.iterator().next().arcNodeResourceIds().get(0)); - Assertions.assertEquals(DeploymentMode.VALIDATE, response.iterator().next().deploymentMode()); + Assertions.assertEquals("fopueoqusvwluj", response.iterator().next().arcNodeResourceIds().get(0)); + Assertions.assertEquals(DeploymentMode.DEPLOY, response.iterator().next().deploymentMode()); Assertions.assertEquals(OperationType.CLUSTER_UPGRADE, response.iterator().next().operationType()); - Assertions.assertEquals("gaaokctgkp", response.iterator().next().deploymentConfiguration().version()); + Assertions.assertEquals("bittoztjdqumqvf", response.iterator().next().deploymentConfiguration().version()); } } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/DeploymentStepTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/DeploymentStepTests.java index 5fd7e9a23ee1..32182d14f066 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/DeploymentStepTests.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/DeploymentStepTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.generated; @@ -11,13 +11,7 @@ public final class DeploymentStepTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { DeploymentStep model = BinaryData.fromString( - "{\"name\":\"hhahhxvrhmzkwpjg\",\"description\":\"spughftqsxhq\",\"fullStepIndex\":\"j\",\"startTimeUtc\":\"kndxdigrjgu\",\"endTimeUtc\":\"zdmsyqtfi\",\"status\":\"hbotzingamvppho\",\"steps\":[{\"name\":\"udphqamvdkfwyn\",\"description\":\"vtbvkayh\",\"fullStepIndex\":\"nvyq\",\"startTimeUtc\":\"tkzwpcnpwzc\",\"endTimeUtc\":\"esgvvsccyaj\",\"status\":\"qfhwyg\",\"steps\":[{\"name\":\"nk\",\"description\":\"usemdwzrmuhap\",\"fullStepIndex\":\"qdpsqxqvpsvu\",\"startTimeUtc\":\"mgccelvezrypq\",\"endTimeUtc\":\"feo\",\"status\":\"rqwky\",\"steps\":[{}],\"exception\":[\"pg\",\"edkowepbqpcrfk\",\"wccsnjvcdwxlpqek\"]},{\"name\":\"nkhtjsyingw\",\"description\":\"atmtdhtmdvy\",\"fullStepIndex\":\"ikdgszywkbir\",\"startTimeUtc\":\"uzhlhkjoqrv\",\"endTimeUtc\":\"aatjinrvgoupmfi\",\"status\":\"fggjioolvr\",\"steps\":[{},{}],\"exception\":[\"kkgll\",\"wjygvjayvblmhvk\",\"uhbxvvy\"]},{\"name\":\"s\",\"description\":\"byrqufeg\",\"fullStepIndex\":\"vwz\",\"startTimeUtc\":\"nhlmctlpdng\",\"endTimeUtc\":\"vgbmhr\",\"status\":\"kw\",\"steps\":[{},{},{}],\"exception\":[\"jvegrhbpnaixexcc\",\"dreaxh\",\"exdrrvqahqkg\",\"tpwijnh\"]}],\"exception\":[\"vfycxzb\",\"voowvr\",\"mtg\"]},{\"name\":\"ppyostronzmyhgf\",\"description\":\"nsxkmcwaekrrjr\",\"fullStepIndex\":\"fxtsgum\",\"startTimeUtc\":\"glikkxwslolb\",\"endTimeUtc\":\"vuzlm\",\"status\":\"elfk\",\"steps\":[{\"name\":\"crpw\",\"description\":\"eznoig\",\"fullStepIndex\":\"njwmwkpnbsazejj\",\"startTimeUtc\":\"kagfhsxtt\",\"endTimeUtc\":\"gzxnfaazpxdtnk\",\"status\":\"kqjjlwuenvrkp\",\"steps\":[{},{},{},{}],\"exception\":[\"bre\",\"qaaysjkixqt\"]},{\"name\":\"ttezlw\",\"description\":\"fiakpjpqqm\",\"fullStepIndex\":\"d\",\"startTimeUtc\":\"mmji\",\"endTimeUtc\":\"eozphv\",\"status\":\"uyqncygupkvipmd\",\"steps\":[{}],\"exception\":[\"upev\",\"hfstotxhojujbyp\"]},{\"name\":\"mc\",\"description\":\"hixbjxyfwnyl\",\"fullStepIndex\":\"ool\",\"startTimeUtc\":\"tpkiwkkbnujry\",\"endTimeUtc\":\"tylbfpncurdoiw\",\"status\":\"thtywub\",\"steps\":[{},{},{}],\"exception\":[\"wqknfdn\"]},{\"name\":\"jchrdgoihxumw\",\"description\":\"ond\",\"fullStepIndex\":\"luudfdlwggytsb\",\"startTimeUtc\":\"ovvtgseinqfiu\",\"endTimeUtc\":\"qknp\",\"status\":\"gnepttwqmsni\",\"steps\":[{}],\"exception\":[\"qnrojlpijnkrxfrd\",\"hcrat\",\"zzronasx\",\"ft\"]}],\"exception\":[\"yzhftwesgogczh\",\"nnxk\"]}],\"exception\":[\"nyhmossxkkgthr\",\"gh\",\"jbdhqxvc\"]}") + "{\"name\":\"ox\",\"description\":\"ggufhyaomtb\",\"fullStepIndex\":\"havgrvk\",\"startTimeUtc\":\"ovjzhpjbibgjmfx\",\"endTimeUtc\":\"vfcluyovwxnbkfe\",\"status\":\"xscyhwzdgirujbz\",\"steps\":[{\"name\":\"zzbtdcqvpniyujvi\",\"description\":\"wdsh\",\"fullStepIndex\":\"snrbgyefrymsgao\",\"startTimeUtc\":\"mwn\",\"endTimeUtc\":\"tmr\",\"status\":\"irctymoxoftpipiw\",\"steps\":[{\"name\":\"hxacpqjlihhyu\",\"description\":\"skasdvlmfwdgzxu\",\"fullStepIndex\":\"cvpa\",\"startTimeUtc\":\"sreuzvxurisjnh\",\"endTimeUtc\":\"txifqj\",\"status\":\"xmrhu\",\"steps\":[{}],\"exception\":[\"esutrgjupauutpw\",\"qhih\",\"jqgwzp\",\"fqntcyp\"]}],\"exception\":[\"vfoimwksli\"]},{\"name\":\"izjx\",\"description\":\"dfcea\",\"fullStepIndex\":\"lhvygdyftu\",\"startTimeUtc\":\"twnawjslbiwkojgc\",\"endTimeUtc\":\"tsf\",\"status\":\"nbaeqphchqn\",\"steps\":[{\"name\":\"x\",\"description\":\"uwrykqgaifmvikl\",\"fullStepIndex\":\"dvk\",\"startTimeUtc\":\"ejd\",\"endTimeUtc\":\"xcv\",\"status\":\"rhnj\",\"steps\":[{},{},{}],\"exception\":[\"tnovqfzgemjdftul\"]},{\"name\":\"tduceamt\",\"description\":\"zuo\",\"fullStepIndex\":\"jw\",\"startTimeUtc\":\"wqiok\",\"endTimeUtc\":\"sx\",\"status\":\"jmsvpkjp\",\"steps\":[{}],\"exception\":[\"fz\"]}],\"exception\":[\"yxgtczh\",\"ydbsd\"]},{\"name\":\"m\",\"description\":\"maehvbbxurip\",\"fullStepIndex\":\"fnhtbaxkgxyw\",\"startTimeUtc\":\"kpyklyhp\",\"endTimeUtc\":\"odpvruudlgzib\",\"status\":\"ostgkts\",\"steps\":[{\"name\":\"eclze\",\"description\":\"bcvhzlhpl\",\"fullStepIndex\":\"qkdlw\",\"startTimeUtc\":\"fbumlkx\",\"endTimeUtc\":\"qjfsmlmbtxhw\",\"status\":\"wsrt\",\"steps\":[{},{},{}],\"exception\":[\"zbrhubskhudyg\",\"ookk\",\"fqjbvleo\"]},{\"name\":\"ml\",\"description\":\"qtqzfavyv\",\"fullStepIndex\":\"qybaryeua\",\"startTimeUtc\":\"kq\",\"endTimeUtc\":\"qgzsles\",\"status\":\"bhernntiew\",\"steps\":[{}],\"exception\":[\"quwrbehwag\",\"hbuffkmrq\",\"mvvhmxtdrjfuta\"]},{\"name\":\"ebjvewzcjzn\",\"description\":\"cpmguaadraufact\",\"fullStepIndex\":\"hzovaj\",\"startTimeUtc\":\"iuxxpshneekulfg\",\"endTimeUtc\":\"qubkw\",\"status\":\"enr\",\"steps\":[{},{}],\"exception\":[\"jbazpjuohminy\",\"lnorwmdu\",\"wpklvxw\",\"ygdxpgpqchis\"]},{\"name\":\"pnnbjc\",\"description\":\"gibbdaxc\",\"fullStepIndex\":\"fozauorsuk\",\"startTimeUtc\":\"wbqpl\",\"endTimeUtc\":\"vnuuepzl\",\"status\":\"hw\",\"steps\":[{},{},{}],\"exception\":[\"wey\",\"qdunvmnnrwrbior\",\"talywjhhgdnhxms\"]}],\"exception\":[\"omi\",\"ox\",\"gdufiqnd\"]}],\"exception\":[\"zaofjchvcyy\",\"s\",\"gdotcubiipuipwo\",\"onmacjekniz\"]}") .toObject(DeploymentStep.class); } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DeploymentStep model = new DeploymentStep(); - model = BinaryData.fromObject(model).toObject(DeploymentStep.class); - } } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/DeviceConfigurationTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/DeviceConfigurationTests.java index 3321cb116a64..aab205237f93 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/DeviceConfigurationTests.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/DeviceConfigurationTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.generated; @@ -14,42 +14,52 @@ public final class DeviceConfigurationTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { DeviceConfiguration model = BinaryData.fromString( - "{\"nicDetails\":[{\"adapterName\":\"fhjirwgdnqzbrfk\",\"interfaceDescription\":\"zhzmtksjci\",\"componentId\":\"igsxcdgljplk\",\"driverVersion\":\"acht\",\"ip4Address\":\"flrytswfpfm\",\"subnetMask\":\"ycxnmskw\",\"defaultGateway\":\"jjyslurlps\",\"dnsServers\":[\"vpedwqslsrh\"],\"defaultIsolationId\":\"qvwwsko\"}],\"deviceMetadata\":\"cbrwi\"}") + "{\"nicDetails\":[{\"adapterName\":\"lca\",\"interfaceDescription\":\"cjuhplrvkm\",\"componentId\":\"wmj\",\"driverVersion\":\"gfggcvkyylizrzbj\",\"ip4Address\":\"fxsfuztlvtmv\",\"subnetMask\":\"bwidql\",\"defaultGateway\":\"ukoveofi\",\"dnsServers\":[\"jfnmjmvlwyz\"],\"defaultIsolationId\":\"blkujrllfojuidjp\"},{\"adapterName\":\"yjucejikzoeo\",\"interfaceDescription\":\"tzejetjklnt\",\"componentId\":\"yjuzkdb\",\"driverVersion\":\"o\",\"ip4Address\":\"rzvh\",\"subnetMask\":\"wtrhtgv\",\"defaultGateway\":\"pcrrk\",\"dnsServers\":[\"w\",\"mjsmwr\"],\"defaultIsolationId\":\"cdxfzzzwyjafitl\"}],\"deviceMetadata\":\"uy\"}") .toObject(DeviceConfiguration.class); - Assertions.assertEquals("fhjirwgdnqzbrfk", model.nicDetails().get(0).adapterName()); - Assertions.assertEquals("zhzmtksjci", model.nicDetails().get(0).interfaceDescription()); - Assertions.assertEquals("igsxcdgljplk", model.nicDetails().get(0).componentId()); - Assertions.assertEquals("acht", model.nicDetails().get(0).driverVersion()); - Assertions.assertEquals("flrytswfpfm", model.nicDetails().get(0).ip4Address()); - Assertions.assertEquals("ycxnmskw", model.nicDetails().get(0).subnetMask()); - Assertions.assertEquals("jjyslurlps", model.nicDetails().get(0).defaultGateway()); - Assertions.assertEquals("vpedwqslsrh", model.nicDetails().get(0).dnsServers().get(0)); - Assertions.assertEquals("qvwwsko", model.nicDetails().get(0).defaultIsolationId()); - Assertions.assertEquals("cbrwi", model.deviceMetadata()); + Assertions.assertEquals("lca", model.nicDetails().get(0).adapterName()); + Assertions.assertEquals("cjuhplrvkm", model.nicDetails().get(0).interfaceDescription()); + Assertions.assertEquals("wmj", model.nicDetails().get(0).componentId()); + Assertions.assertEquals("gfggcvkyylizrzbj", model.nicDetails().get(0).driverVersion()); + Assertions.assertEquals("fxsfuztlvtmv", model.nicDetails().get(0).ip4Address()); + Assertions.assertEquals("bwidql", model.nicDetails().get(0).subnetMask()); + Assertions.assertEquals("ukoveofi", model.nicDetails().get(0).defaultGateway()); + Assertions.assertEquals("jfnmjmvlwyz", model.nicDetails().get(0).dnsServers().get(0)); + Assertions.assertEquals("blkujrllfojuidjp", model.nicDetails().get(0).defaultIsolationId()); + Assertions.assertEquals("uy", model.deviceMetadata()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - DeviceConfiguration model - = new DeviceConfiguration().withNicDetails(Arrays.asList(new NicDetail().withAdapterName("fhjirwgdnqzbrfk") - .withInterfaceDescription("zhzmtksjci") - .withComponentId("igsxcdgljplk") - .withDriverVersion("acht") - .withIp4Address("flrytswfpfm") - .withSubnetMask("ycxnmskw") - .withDefaultGateway("jjyslurlps") - .withDnsServers(Arrays.asList("vpedwqslsrh")) - .withDefaultIsolationId("qvwwsko"))).withDeviceMetadata("cbrwi"); + DeviceConfiguration model = new DeviceConfiguration().withNicDetails(Arrays.asList( + new NicDetail().withAdapterName("lca") + .withInterfaceDescription("cjuhplrvkm") + .withComponentId("wmj") + .withDriverVersion("gfggcvkyylizrzbj") + .withIp4Address("fxsfuztlvtmv") + .withSubnetMask("bwidql") + .withDefaultGateway("ukoveofi") + .withDnsServers(Arrays.asList("jfnmjmvlwyz")) + .withDefaultIsolationId("blkujrllfojuidjp"), + new NicDetail().withAdapterName("yjucejikzoeo") + .withInterfaceDescription("tzejetjklnt") + .withComponentId("yjuzkdb") + .withDriverVersion("o") + .withIp4Address("rzvh") + .withSubnetMask("wtrhtgv") + .withDefaultGateway("pcrrk") + .withDnsServers(Arrays.asList("w", "mjsmwr")) + .withDefaultIsolationId("cdxfzzzwyjafitl"))) + .withDeviceMetadata("uy"); model = BinaryData.fromObject(model).toObject(DeviceConfiguration.class); - Assertions.assertEquals("fhjirwgdnqzbrfk", model.nicDetails().get(0).adapterName()); - Assertions.assertEquals("zhzmtksjci", model.nicDetails().get(0).interfaceDescription()); - Assertions.assertEquals("igsxcdgljplk", model.nicDetails().get(0).componentId()); - Assertions.assertEquals("acht", model.nicDetails().get(0).driverVersion()); - Assertions.assertEquals("flrytswfpfm", model.nicDetails().get(0).ip4Address()); - Assertions.assertEquals("ycxnmskw", model.nicDetails().get(0).subnetMask()); - Assertions.assertEquals("jjyslurlps", model.nicDetails().get(0).defaultGateway()); - Assertions.assertEquals("vpedwqslsrh", model.nicDetails().get(0).dnsServers().get(0)); - Assertions.assertEquals("qvwwsko", model.nicDetails().get(0).defaultIsolationId()); - Assertions.assertEquals("cbrwi", model.deviceMetadata()); + Assertions.assertEquals("lca", model.nicDetails().get(0).adapterName()); + Assertions.assertEquals("cjuhplrvkm", model.nicDetails().get(0).interfaceDescription()); + Assertions.assertEquals("wmj", model.nicDetails().get(0).componentId()); + Assertions.assertEquals("gfggcvkyylizrzbj", model.nicDetails().get(0).driverVersion()); + Assertions.assertEquals("fxsfuztlvtmv", model.nicDetails().get(0).ip4Address()); + Assertions.assertEquals("bwidql", model.nicDetails().get(0).subnetMask()); + Assertions.assertEquals("ukoveofi", model.nicDetails().get(0).defaultGateway()); + Assertions.assertEquals("jfnmjmvlwyz", model.nicDetails().get(0).dnsServers().get(0)); + Assertions.assertEquals("blkujrllfojuidjp", model.nicDetails().get(0).defaultIsolationId()); + Assertions.assertEquals("uy", model.deviceMetadata()); } } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/DnsZonesTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/DnsZonesTests.java new file mode 100644 index 000000000000..a2ea9e4064bc --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/DnsZonesTests.java @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.azurestackhci.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.azurestackhci.models.DnsZones; +import java.util.Arrays; +import org.junit.jupiter.api.Assertions; + +public final class DnsZonesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + DnsZones model + = BinaryData.fromString("{\"dnsZoneName\":\"wjmy\",\"dnsForwarder\":[\"sslswtmweriof\",\"pyqs\"]}") + .toObject(DnsZones.class); + Assertions.assertEquals("wjmy", model.dnsZoneName()); + Assertions.assertEquals("sslswtmweriof", model.dnsForwarder().get(0)); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + DnsZones model + = new DnsZones().withDnsZoneName("wjmy").withDnsForwarder(Arrays.asList("sslswtmweriof", "pyqs")); + model = BinaryData.fromObject(model).toObject(DnsZones.class); + Assertions.assertEquals("wjmy", model.dnsZoneName()); + Assertions.assertEquals("sslswtmweriof", model.dnsForwarder().get(0)); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/EceActionStatusTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/EceActionStatusTests.java index ab6fef3daec3..ab5c1b801339 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/EceActionStatusTests.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/EceActionStatusTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.generated; @@ -11,13 +11,7 @@ public final class EceActionStatusTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { EceActionStatus model = BinaryData.fromString( - "{\"status\":\"rtwaenuuzko\",\"steps\":[{\"name\":\"nrfdw\",\"description\":\"uhhziuiefozbhdm\",\"fullStepIndex\":\"l\",\"startTimeUtc\":\"qhoftrmaequiah\",\"endTimeUtc\":\"cslfaoqzpiyylha\",\"status\":\"swhccsphk\",\"steps\":[{\"name\":\"itqscywuggwoluhc\",\"description\":\"wem\",\"fullStepIndex\":\"i\",\"startTimeUtc\":\"brgz\",\"endTimeUtc\":\"msweypqwdxggicc\",\"status\":\"xqhuexm\",\"steps\":[{},{},{}],\"exception\":[\"tvlz\",\"wem\",\"zrncsdt\",\"lusiy\"]},{\"name\":\"sfgytguslfead\",\"description\":\"gq\",\"fullStepIndex\":\"yhejhzisxgfp\",\"startTimeUtc\":\"olppvksrpqvujz\",\"endTimeUtc\":\"ehtwdwrft\",\"status\":\"iby\",\"steps\":[{}],\"exception\":[\"h\",\"hfwpracstwit\",\"khevxccedc\",\"nmdyodnwzxl\"]},{\"name\":\"cvnhltiugc\",\"description\":\"avvwxqi\",\"fullStepIndex\":\"qunyowxwlmdjr\",\"startTimeUtc\":\"fgbvfvpdbo\",\"endTimeUtc\":\"cizsjqlhkrribdei\",\"status\":\"ipqkghvxndzwm\",\"steps\":[{},{}],\"exception\":[\"jpjorwkqnyhgb\",\"j\"]}],\"exception\":[\"vfxzsjab\",\"bsystawfsdjpvk\",\"p\",\"jxbkzbzkdvn\"]},{\"name\":\"abudurgk\",\"description\":\"mokzhjjklf\",\"fullStepIndex\":\"mouwqlgzrfzeey\",\"startTimeUtc\":\"izikayuhq\",\"endTimeUtc\":\"jbsybbqw\",\"status\":\"t\",\"steps\":[{\"name\":\"fp\",\"description\":\"mpipaslthaqfxs\",\"fullStepIndex\":\"wutwbdsre\",\"startTimeUtc\":\"drhneuyow\",\"endTimeUtc\":\"d\",\"status\":\"t\",\"steps\":[{}],\"exception\":[\"rcgp\",\"kpzi\",\"ejzanlfz\"]},{\"name\":\"av\",\"description\":\"bzonok\",\"fullStepIndex\":\"rjqc\",\"startTimeUtc\":\"gzpfrla\",\"endTimeUtc\":\"zrnw\",\"status\":\"indfpwpjyl\",\"steps\":[{},{},{},{}],\"exception\":[\"flsjc\"]}],\"exception\":[\"zfjvfbgofe\",\"jagrqmqhldvr\",\"iiojnal\",\"hfkvtvsexsowuel\"]}]}") + "{\"status\":\"wcvtbvkayhmtnvyq\",\"steps\":[{\"name\":\"zwpcnpwzcjaesg\",\"description\":\"sccyajguqf\",\"fullStepIndex\":\"ygz\",\"startTimeUtc\":\"dnkfx\",\"endTimeUtc\":\"emdwzrmuhapfc\",\"status\":\"psqxq\",\"steps\":[{\"name\":\"uoymgccelvezry\",\"description\":\"lmfeokerq\",\"fullStepIndex\":\"yhko\",\"startTimeUtc\":\"pg\",\"endTimeUtc\":\"dkow\",\"status\":\"bqpc\",\"steps\":[{},{}],\"exception\":[\"ccsnjvcdwxlpq\",\"kftnkhtjsyin\",\"wfqatmtd\",\"tmdvypgikdgs\"]}],\"exception\":[\"kbir\"]},{\"name\":\"uzhlhkjoqrv\",\"description\":\"aatjinrvgoupmfi\",\"fullStepIndex\":\"fggjioolvr\",\"startTimeUtc\":\"kvtkkg\",\"endTimeUtc\":\"qwjygvja\",\"status\":\"blmhvkzuhb\",\"steps\":[{\"name\":\"hgsopbyrqufegx\",\"description\":\"wz\",\"fullStepIndex\":\"nhlmctlpdng\",\"startTimeUtc\":\"vgbmhr\",\"endTimeUtc\":\"kw\",\"status\":\"ijejvegrhbpn\",\"steps\":[{},{},{},{}],\"exception\":[\"ccbdre\",\"xhcexdrrvqahq\",\"ghtpw\",\"jnhyjsvf\"]},{\"name\":\"xzb\",\"description\":\"oowvrv\",\"fullStepIndex\":\"gjqppy\",\"startTimeUtc\":\"tronzmyhgfi\",\"endTimeUtc\":\"sxkm\",\"status\":\"a\",\"steps\":[{},{},{}],\"exception\":[\"reafxtsgumhjg\",\"ikkx\",\"slol\"]}],\"exception\":[\"vuzlm\",\"felfktg\"]},{\"name\":\"crpw\",\"description\":\"eznoig\",\"fullStepIndex\":\"njwmwkpnbsazejj\",\"startTimeUtc\":\"kagfhsxtt\",\"endTimeUtc\":\"gzxnfaazpxdtnk\",\"status\":\"kqjjlwuenvrkp\",\"steps\":[{\"name\":\"ibreb\",\"description\":\"aysjkixqtnqttez\",\"fullStepIndex\":\"fffiak\",\"startTimeUtc\":\"pqqmted\",\"endTimeUtc\":\"mmji\",\"status\":\"eozphv\",\"steps\":[{},{},{},{}],\"exception\":[\"ncyg\",\"p\",\"vipmdscwxqupevzh\"]},{\"name\":\"totxhojujb\",\"description\":\"elmcuvhixbjxyfw\",\"fullStepIndex\":\"lrcoolsttpki\",\"startTimeUtc\":\"kbnujr\",\"endTimeUtc\":\"vtylbfpncu\",\"status\":\"oiwiithtywub\",\"steps\":[{},{},{}],\"exception\":[\"wqknfdn\"]},{\"name\":\"jchrdgoihxumw\",\"description\":\"ond\",\"fullStepIndex\":\"luudfdlwggytsb\",\"startTimeUtc\":\"ovvtgseinqfiu\",\"endTimeUtc\":\"qknp\",\"status\":\"gnepttwqmsni\",\"steps\":[{}],\"exception\":[\"qnrojlpijnkrxfrd\",\"hcrat\",\"zzronasx\",\"ft\"]},{\"name\":\"qyzhf\",\"description\":\"esgogc\",\"fullStepIndex\":\"onnxkrlgnyhm\",\"startTimeUtc\":\"sxkkg\",\"endTimeUtc\":\"rrghxjbdhqxvcxgf\",\"status\":\"dsofbshrns\",\"steps\":[{},{}],\"exception\":[\"dvzyybycnun\",\"jsrtk\"]}],\"exception\":[\"nopqgikyzirtx\",\"yuxzejntpsewgi\",\"ilqu\",\"rydxtqm\"]}]}") .toObject(EceActionStatus.class); } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - EceActionStatus model = new EceActionStatus(); - model = BinaryData.fromObject(model).toObject(EceActionStatus.class); - } } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/EceReportedPropertiesTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/EceReportedPropertiesTests.java index 541200b06bb2..7ee5fc275e9b 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/EceReportedPropertiesTests.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/EceReportedPropertiesTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.generated; @@ -11,13 +11,7 @@ public final class EceReportedPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { EceReportedProperties model = BinaryData.fromString( - "{\"validationStatus\":{\"status\":\"kcnqxwbpo\",\"steps\":[{\"name\":\"iujwa\",\"description\":\"ipqiiobyuqerpq\",\"fullStepIndex\":\"qwcciuqg\",\"startTimeUtc\":\"butauvfb\",\"endTimeUtc\":\"uwhhmhykojoxafn\",\"status\":\"lpichk\",\"steps\":[{\"name\":\"cdyhbpkkpwdreqn\",\"description\":\"vq\",\"fullStepIndex\":\"vljxywsu\",\"startTimeUtc\":\"yrs\",\"endTimeUtc\":\"sytgadgvraea\",\"status\":\"e\",\"steps\":[{}],\"exception\":[\"rwlqu\",\"ijfqkacewiipfp\",\"bjibwwiftohq\",\"vpuvks\"]},{\"name\":\"lsa\",\"description\":\"ynfs\",\"fullStepIndex\":\"ljphuopxodl\",\"startTimeUtc\":\"ynt\",\"endTimeUtc\":\"zihleosjswsr\",\"status\":\"lyzrpzbchckqqzqi\",\"steps\":[{},{}],\"exception\":[\"uiizynke\",\"yatrwy\",\"q\",\"ibzyhwitsmyp\"]},{\"name\":\"npcdpumnzgm\",\"description\":\"nmabik\",\"fullStepIndex\":\"orgjhxbldt\",\"startTimeUtc\":\"wrlkdmtn\",\"endTimeUtc\":\"ok\",\"status\":\"llxdyhgs\",\"steps\":[{},{},{}],\"exception\":[\"jlt\",\"tbnnha\",\"oocrkvcikhnv\",\"amqgxqquezikyw\"]},{\"name\":\"xkalla\",\"description\":\"elwuipi\",\"fullStepIndex\":\"jzkzi\",\"startTimeUtc\":\"vvcnayr\",\"endTimeUtc\":\"rnxxmueed\",\"status\":\"rdvstkwqqtch\",\"steps\":[{},{},{}],\"exception\":[\"mtdaa\",\"gdv\",\"vgpiohgwxrt\",\"udxepxgyqagv\"]}],\"exception\":[\"npkukghimdblx\",\"wi\",\"fnjhfjxwmszkkfo\",\"rey\"]},{\"name\":\"zi\",\"description\":\"jawneaiv\",\"fullStepIndex\":\"czelpcirel\",\"startTimeUtc\":\"eae\",\"endTimeUtc\":\"abfatkl\",\"status\":\"xbjhwuaanozjosph\",\"steps\":[{\"name\":\"pjrvxagl\",\"description\":\"imjwosyt\",\"fullStepIndex\":\"tcs\",\"startTimeUtc\":\"cktqumiekkezzi\",\"endTimeUtc\":\"ly\",\"status\":\"hdgqggeb\",\"steps\":[{}],\"exception\":[\"aeqidbqfatpxll\"]},{\"name\":\"cyjmoadsuvarmy\",\"description\":\"mjsjqb\",\"fullStepIndex\":\"hyxxrwlycoduhpk\",\"startTimeUtc\":\"gymare\",\"endTimeUtc\":\"ajxq\",\"status\":\"jhkycub\",\"steps\":[{},{},{},{}],\"exception\":[\"sofwqmzqalkrmnji\",\"pxacqqudfn\",\"yxbaaabjyvayf\"]}],\"exception\":[\"rzrtuzqogsex\"]}]},\"deploymentStatus\":{\"status\":\"fdnw\",\"steps\":[{\"name\":\"wzsyyceuzs\",\"description\":\"bjudpfrxtrthzv\",\"fullStepIndex\":\"tdwkqbrq\",\"startTimeUtc\":\"paxh\",\"endTimeUtc\":\"iilivpdtiirqtd\",\"status\":\"axoruzfgsquy\",\"steps\":[{\"name\":\"xleptramx\",\"description\":\"zwl\",\"fullStepIndex\":\"wxuqlcvydypatdoo\",\"startTimeUtc\":\"jkniodko\",\"endTimeUtc\":\"bw\",\"status\":\"jhemms\",\"steps\":[{},{}],\"exception\":[\"rodtjinfwjlfl\"]},{\"name\":\"acjvefkd\",\"description\":\"oakggkfpag\",\"fullStepIndex\":\"wpu\",\"startTimeUtc\":\"qblylsyxkqj\",\"endTimeUtc\":\"jervtia\",\"status\":\"sdszue\",\"steps\":[{},{}],\"exception\":[\"kfzbeyvpnqicvi\",\"v\"]}],\"exception\":[\"xdxr\",\"uukzclewyhmlw\",\"aztz\"]},{\"name\":\"fn\",\"description\":\"kwyfzqwhxxbuyqax\",\"fullStepIndex\":\"eqz\",\"startTimeUtc\":\"priolx\",\"endTimeUtc\":\"jaltolmnc\",\"status\":\"obqwcsdbnwdcfh\",\"steps\":[{\"name\":\"pfuvglsbjjca\",\"description\":\"xbvtvudu\",\"fullStepIndex\":\"cormr\",\"startTimeUtc\":\"qtvcofudflvkgj\",\"endTimeUtc\":\"gdknnqv\",\"status\":\"znqntoru\",\"steps\":[{},{},{},{}],\"exception\":[\"hmk\"]},{\"name\":\"grauwjuetaebur\",\"description\":\"dmovsm\",\"fullStepIndex\":\"xwabmqoe\",\"startTimeUtc\":\"ifrvtpu\",\"endTimeUtc\":\"jmqlgkfb\",\"status\":\"doaon\",\"steps\":[{},{}],\"exception\":[\"tujitcjedft\",\"waezkojvd\"]},{\"name\":\"zfoqouicybxar\",\"description\":\"szufoxciqopidoa\",\"fullStepIndex\":\"iodhkhazxkhnz\",\"startTimeUtc\":\"nlwntoe\",\"endTimeUtc\":\"kdwbwhkszz\",\"status\":\"rvexztvb\",\"steps\":[{},{},{}],\"exception\":[\"ra\"]},{\"name\":\"zkoowtlmnguxawqa\",\"description\":\"syuuximerq\",\"fullStepIndex\":\"bw\",\"startTimeUtc\":\"nkbykutwpfhp\",\"endTimeUtc\":\"m\",\"status\":\"skdsnfdsdoakg\",\"steps\":[{}],\"exception\":[\"kzevdlhewpusds\"]}],\"exception\":[\"vogvbbejdcngqqmo\",\"kufgmj\",\"rwr\"]}]}}") + "{\"validationStatus\":{\"status\":\"zkfzbeyv\",\"steps\":[{\"name\":\"cvinvkjjxdxrbuuk\",\"description\":\"lewyhmlwpaz\",\"fullStepIndex\":\"pofncck\",\"startTimeUtc\":\"fz\",\"endTimeUtc\":\"hxx\",\"status\":\"yq\",\"steps\":[{\"name\":\"eqz\",\"description\":\"priolx\",\"fullStepIndex\":\"jaltolmnc\",\"startTimeUtc\":\"obqwcsdbnwdcfh\",\"endTimeUtc\":\"qdpfuvglsbjjca\",\"status\":\"xbvtvudu\",\"steps\":[{},{}],\"exception\":[\"mr\",\"xqtvcofu\",\"f\"]},{\"name\":\"kgjubgdknnqvsazn\",\"description\":\"tor\",\"fullStepIndex\":\"sgsahmkycgr\",\"startTimeUtc\":\"wjue\",\"endTimeUtc\":\"eburu\",\"status\":\"movsmzlxwabmqoe\",\"steps\":[{},{}],\"exception\":[\"vtpuqujmqlgk\"]},{\"name\":\"tndoaongbjc\",\"description\":\"ujitcjedftww\",\"fullStepIndex\":\"zkoj\",\"startTimeUtc\":\"c\",\"endTimeUtc\":\"foqouicybx\",\"status\":\"zg\",\"steps\":[{},{}],\"exception\":[\"x\",\"iqopidoamciod\",\"khazxkhnzbonlwn\",\"oegokdwbwh\"]}],\"exception\":[\"zcmrvexztvb\"]}]},\"deploymentStatus\":{\"status\":\"sfraoyzko\",\"steps\":[{\"name\":\"mnguxawqaldsyu\",\"description\":\"imerqfobwyznk\",\"fullStepIndex\":\"kutwpf\",\"startTimeUtc\":\"a\",\"endTimeUtc\":\"hrskdsnfd\",\"status\":\"oakgtdlmkkzev\",\"steps\":[{\"name\":\"wpusdsttwvogv\",\"description\":\"ejdcngqqmoakuf\",\"fullStepIndex\":\"jzrwrdgrtw\",\"startTimeUtc\":\"nuuzkopbm\",\"endTimeUtc\":\"rfdwoyu\",\"status\":\"ziuiefozbhdm\",\"steps\":[{}],\"exception\":[\"qhoftrmaequiah\",\"icslfaoq\"]},{\"name\":\"iyylhalnswhccsp\",\"description\":\"aivwitqscywu\",\"fullStepIndex\":\"woluhczbwemhair\",\"startTimeUtc\":\"rgzdwmsweyp\",\"endTimeUtc\":\"dxggicccnxqhuexm\",\"status\":\"tlstvlzywem\",\"steps\":[{},{},{}],\"exception\":[\"sdtclusiypbs\",\"gytguslfead\",\"ygqukyhejh\",\"isxgfp\"]},{\"name\":\"olppvksrpqvujz\",\"description\":\"ehtwdwrft\",\"fullStepIndex\":\"iby\",\"startTimeUtc\":\"dl\",\"endTimeUtc\":\"shfwpracstwity\",\"status\":\"evxccedcp\",\"steps\":[{},{},{}],\"exception\":[\"dnwzxltjcvnhltiu\"]}],\"exception\":[\"navvwx\",\"ibyqunyowxwlmdj\"]},{\"name\":\"vfgbvfvpdboda\",\"description\":\"zsjqlh\",\"fullStepIndex\":\"r\",\"startTimeUtc\":\"deibqip\",\"endTimeUtc\":\"ghvxndzwmkrefa\",\"status\":\"jorwkqnyhgbij\",\"steps\":[{\"name\":\"fxzsjabibsyst\",\"description\":\"fsdjpvkvp\",\"fullStepIndex\":\"xbkzbzkdvncj\",\"startTimeUtc\":\"udurgkakmokz\",\"endTimeUtc\":\"jk\",\"status\":\"fhmouwq\",\"steps\":[{},{}],\"exception\":[\"zeeyebi\",\"ikayuhqlbjbsybb\",\"wrv\"]},{\"name\":\"dgmfpgvmpipasl\",\"description\":\"aqfxss\",\"fullStepIndex\":\"u\",\"startTimeUtc\":\"bdsrez\",\"endTimeUtc\":\"rhneuyowq\",\"status\":\"wyt\",\"steps\":[{}],\"exception\":[\"rcgp\",\"kpzi\",\"ejzanlfz\"]},{\"name\":\"av\",\"description\":\"bzonok\",\"fullStepIndex\":\"rjqc\",\"startTimeUtc\":\"gzpfrla\",\"endTimeUtc\":\"zrnw\",\"status\":\"indfpwpjyl\",\"steps\":[{},{},{},{}],\"exception\":[\"flsjc\"]},{\"name\":\"szfjvfbgofelja\",\"description\":\"qmqhldvriii\",\"fullStepIndex\":\"nalghfkvtvsexso\",\"startTimeUtc\":\"el\",\"endTimeUtc\":\"hhahhxvrhmzkwpjg\",\"status\":\"spughftqsxhq\",\"steps\":[{}],\"exception\":[\"kndxdigrjgu\",\"fzdm\",\"yqtfihwh\"]}],\"exception\":[\"z\",\"ngamvpphosz\",\"zudphqamvdkfw\"]}]}}") .toObject(EceReportedProperties.class); } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - EceReportedProperties model = new EceReportedProperties(); - model = BinaryData.fromObject(model).toObject(EceReportedProperties.class); - } } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/EdgeDeviceInnerTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/EdgeDeviceInnerTests.java index ef33536bf4bd..a78448bf6f74 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/EdgeDeviceInnerTests.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/EdgeDeviceInnerTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.generated; @@ -11,8 +11,7 @@ public final class EdgeDeviceInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { EdgeDeviceInner model = BinaryData - .fromString( - "{\"kind\":\"EdgeDevice\",\"id\":\"opqgikyzirtxdyux\",\"name\":\"ejnt\",\"type\":\"sewgioilqukr\"}") + .fromString("{\"kind\":\"EdgeDevice\",\"id\":\"w\",\"name\":\"epdfgkmtdherng\",\"type\":\"tcjuahokqto\"}") .toObject(EdgeDeviceInner.class); } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/EdgeDeviceJobInnerTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/EdgeDeviceJobInnerTests.java new file mode 100644 index 000000000000..f97fe32e7def --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/EdgeDeviceJobInnerTests.java @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.azurestackhci.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.azurestackhci.fluent.models.EdgeDeviceJobInner; + +public final class EdgeDeviceJobInnerTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + EdgeDeviceJobInner model = BinaryData + .fromString( + "{\"kind\":\"EdgeDeviceJob\",\"id\":\"yhddvia\",\"name\":\"egfnmntfpmvmemfn\",\"type\":\"zdwvvbalxl\"}") + .toObject(EdgeDeviceJobInner.class); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + EdgeDeviceJobInner model = new EdgeDeviceJobInner(); + model = BinaryData.fromObject(model).toObject(EdgeDeviceJobInner.class); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/EdgeDeviceJobListResultTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/EdgeDeviceJobListResultTests.java new file mode 100644 index 000000000000..2f07400d835d --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/EdgeDeviceJobListResultTests.java @@ -0,0 +1,19 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.azurestackhci.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.azurestackhci.implementation.models.EdgeDeviceJobListResult; +import org.junit.jupiter.api.Assertions; + +public final class EdgeDeviceJobListResultTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + EdgeDeviceJobListResult model = BinaryData.fromString( + "{\"value\":[{\"kind\":\"EdgeDeviceJob\",\"id\":\"m\",\"name\":\"sycxhxzgaz\",\"type\":\"taboidvmf\"}],\"nextLink\":\"ppu\"}") + .toObject(EdgeDeviceJobListResult.class); + Assertions.assertEquals("ppu", model.nextLink()); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/EdgeDeviceJobsCreateOrUpdateMockTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/EdgeDeviceJobsCreateOrUpdateMockTests.java new file mode 100644 index 000000000000..096d428b01a6 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/EdgeDeviceJobsCreateOrUpdateMockTests.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.azurestackhci.generated; + +import com.azure.core.credential.AccessToken; +import com.azure.core.http.HttpClient; +import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; +import com.azure.core.test.http.MockHttpResponse; +import com.azure.resourcemanager.azurestackhci.AzureStackHciManager; +import com.azure.resourcemanager.azurestackhci.fluent.models.EdgeDeviceJobInner; +import com.azure.resourcemanager.azurestackhci.models.EdgeDeviceJob; +import java.nio.charset.StandardCharsets; +import java.time.OffsetDateTime; +import org.junit.jupiter.api.Test; +import reactor.core.publisher.Mono; + +public final class EdgeDeviceJobsCreateOrUpdateMockTests { + @Test + public void testCreateOrUpdate() throws Exception { + String responseStr = "{\"kind\":\"EdgeDeviceJob\",\"id\":\"wl\",\"name\":\"q\",\"type\":\"ejkluxxr\"}"; + + HttpClient httpClient + = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); + AzureStackHciManager manager = AzureStackHciManager.configure() + .withHttpClient(httpClient) + .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); + + EdgeDeviceJob response = manager.edgeDeviceJobs() + .createOrUpdate("zpgf", "umjdjxhzghg", "dkynrceqa", new EdgeDeviceJobInner(), + com.azure.core.util.Context.NONE); + + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/PublishersGetWithResponseMockTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/EdgeDeviceJobsGetWithResponseMockTests.java similarity index 64% rename from sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/PublishersGetWithResponseMockTests.java rename to sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/EdgeDeviceJobsGetWithResponseMockTests.java index 5bb05e38d574..3526391eca2c 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/PublishersGetWithResponseMockTests.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/EdgeDeviceJobsGetWithResponseMockTests.java @@ -1,36 +1,36 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.generated; import com.azure.core.credential.AccessToken; import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.azurestackhci.AzureStackHciManager; -import com.azure.resourcemanager.azurestackhci.models.Publisher; +import com.azure.resourcemanager.azurestackhci.models.EdgeDeviceJob; import java.nio.charset.StandardCharsets; import java.time.OffsetDateTime; import org.junit.jupiter.api.Test; import reactor.core.publisher.Mono; -public final class PublishersGetWithResponseMockTests { +public final class EdgeDeviceJobsGetWithResponseMockTests { @Test public void testGetWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"provisioningState\":\"pfuofixcnpcfykkp\"},\"id\":\"cpawmp\",\"name\":\"prdpwrpc\",\"type\":\"pcf\"}"; + = "{\"kind\":\"EdgeDeviceJob\",\"id\":\"epwoggg\",\"name\":\"cwn\",\"type\":\"htfmcqbsudzpgc\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); AzureStackHciManager manager = AzureStackHciManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - Publisher response = manager.publishers() - .getWithResponse("eajczxvlgsrgkr", "izrpywlptyuqhrl", "cs", com.azure.core.util.Context.NONE) + EdgeDeviceJob response = manager.edgeDeviceJobs() + .getWithResponse("fqpgaixwrgr", "kderf", "swqi", com.azure.core.util.Context.NONE) .getValue(); } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/PublishersListByClusterMockTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/EdgeDeviceJobsListByEdgeDeviceMockTests.java similarity index 61% rename from sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/PublishersListByClusterMockTests.java rename to sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/EdgeDeviceJobsListByEdgeDeviceMockTests.java index 743726d7c9f7..667c8773511b 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/PublishersListByClusterMockTests.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/EdgeDeviceJobsListByEdgeDeviceMockTests.java @@ -1,37 +1,37 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.generated; import com.azure.core.credential.AccessToken; import com.azure.core.http.HttpClient; import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.azurestackhci.AzureStackHciManager; -import com.azure.resourcemanager.azurestackhci.models.Publisher; +import com.azure.resourcemanager.azurestackhci.models.EdgeDeviceJob; import java.nio.charset.StandardCharsets; import java.time.OffsetDateTime; import org.junit.jupiter.api.Test; import reactor.core.publisher.Mono; -public final class PublishersListByClusterMockTests { +public final class EdgeDeviceJobsListByEdgeDeviceMockTests { @Test - public void testListByCluster() throws Exception { + public void testListByEdgeDevice() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"provisioningState\":\"jew\"},\"id\":\"hwkxjjmztnl\",\"name\":\"soodtmvecdhdy\",\"type\":\"wcrpt\"}]}"; + = "{\"value\":[{\"kind\":\"EdgeDeviceJob\",\"id\":\"poq\",\"name\":\"xyemhkft\",\"type\":\"aew\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); AzureStackHciManager manager = AzureStackHciManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - PagedIterable response - = manager.publishers().listByCluster("dxqlfrolq", "wnk", com.azure.core.util.Context.NONE); + PagedIterable response = manager.edgeDeviceJobs() + .listByEdgeDevice("zobuzmsxgamtdtk", "ppthuzdprmimrl", com.azure.core.util.Context.NONE); } } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/EdgeDeviceListResultTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/EdgeDeviceListResultTests.java index af9b0722c657..3bd7bfb1c08a 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/EdgeDeviceListResultTests.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/EdgeDeviceListResultTests.java @@ -1,29 +1,19 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.generated; import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.azurestackhci.fluent.models.EdgeDeviceInner; -import com.azure.resourcemanager.azurestackhci.models.EdgeDeviceListResult; -import java.util.Arrays; +import com.azure.resourcemanager.azurestackhci.implementation.models.EdgeDeviceListResult; import org.junit.jupiter.api.Assertions; public final class EdgeDeviceListResultTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { EdgeDeviceListResult model = BinaryData.fromString( - "{\"value\":[{\"kind\":\"EdgeDevice\",\"id\":\"rpdsof\",\"name\":\"shrnsvbuswdvz\",\"type\":\"ybycnunvj\"}],\"nextLink\":\"tkfa\"}") + "{\"value\":[{\"kind\":\"EdgeDevice\",\"id\":\"b\",\"name\":\"fdb\",\"type\":\"jbzten\"},{\"kind\":\"EdgeDevice\",\"id\":\"kzykjtjk\",\"name\":\"sxfwushcdp\",\"type\":\"upnqrmgjfb\"},{\"kind\":\"EdgeDevice\",\"id\":\"uwxeoiojfizf\",\"name\":\"vkjzwfbcyaykm\",\"type\":\"fz\"},{\"kind\":\"EdgeDevice\",\"id\":\"fwxrzxmdew\",\"name\":\"rsxkr\",\"type\":\"lbjazejww\"}],\"nextLink\":\"yoyp\"}") .toObject(EdgeDeviceListResult.class); - Assertions.assertEquals("tkfa", model.nextLink()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - EdgeDeviceListResult model - = new EdgeDeviceListResult().withValue(Arrays.asList(new EdgeDeviceInner())).withNextLink("tkfa"); - model = BinaryData.fromObject(model).toObject(EdgeDeviceListResult.class); - Assertions.assertEquals("tkfa", model.nextLink()); + Assertions.assertEquals("yoyp", model.nextLink()); } } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/EdgeDevicePropertiesTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/EdgeDevicePropertiesTests.java index 1370e13ec6a0..c7d9a4fae288 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/EdgeDevicePropertiesTests.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/EdgeDevicePropertiesTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.generated; @@ -15,42 +15,42 @@ public final class EdgeDevicePropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { EdgeDeviceProperties model = BinaryData.fromString( - "{\"deviceConfiguration\":{\"nicDetails\":[{\"adapterName\":\"gddeimaw\",\"interfaceDescription\":\"vgkk\",\"componentId\":\"ui\",\"driverVersion\":\"cjc\",\"ip4Address\":\"tbw\",\"subnetMask\":\"sqowxwc\",\"defaultGateway\":\"likytwvczcswka\",\"dnsServers\":[\"jyfdvlv\",\"b\",\"rnfxtgddp\",\"th\"],\"defaultIsolationId\":\"n\"}],\"deviceMetadata\":\"aoyankcoeqswa\"},\"provisioningState\":\"InProgress\"}") + "{\"deviceConfiguration\":{\"nicDetails\":[{\"adapterName\":\"cuyzlwhhmemhoocl\",\"interfaceDescription\":\"n\",\"componentId\":\"memczjkmmyk\",\"driverVersion\":\"jxsglhsr\",\"ip4Address\":\"yejylmbkzudnigrf\",\"subnetMask\":\"otjewlpxuzzjgnre\",\"defaultGateway\":\"yhqotoihiqakydi\",\"dnsServers\":[\"rkwpzdqtvhcspod\",\"qaxsipietgbebjf\",\"lbmoichd\"],\"defaultIsolationId\":\"nfpubntnbatz\"}],\"deviceMetadata\":\"qs\"},\"provisioningState\":\"PartiallySucceeded\"}") .toObject(EdgeDeviceProperties.class); - Assertions.assertEquals("gddeimaw", model.deviceConfiguration().nicDetails().get(0).adapterName()); - Assertions.assertEquals("vgkk", model.deviceConfiguration().nicDetails().get(0).interfaceDescription()); - Assertions.assertEquals("ui", model.deviceConfiguration().nicDetails().get(0).componentId()); - Assertions.assertEquals("cjc", model.deviceConfiguration().nicDetails().get(0).driverVersion()); - Assertions.assertEquals("tbw", model.deviceConfiguration().nicDetails().get(0).ip4Address()); - Assertions.assertEquals("sqowxwc", model.deviceConfiguration().nicDetails().get(0).subnetMask()); - Assertions.assertEquals("likytwvczcswka", model.deviceConfiguration().nicDetails().get(0).defaultGateway()); - Assertions.assertEquals("jyfdvlv", model.deviceConfiguration().nicDetails().get(0).dnsServers().get(0)); - Assertions.assertEquals("n", model.deviceConfiguration().nicDetails().get(0).defaultIsolationId()); - Assertions.assertEquals("aoyankcoeqswa", model.deviceConfiguration().deviceMetadata()); + Assertions.assertEquals("cuyzlwhhmemhoocl", model.deviceConfiguration().nicDetails().get(0).adapterName()); + Assertions.assertEquals("n", model.deviceConfiguration().nicDetails().get(0).interfaceDescription()); + Assertions.assertEquals("memczjkmmyk", model.deviceConfiguration().nicDetails().get(0).componentId()); + Assertions.assertEquals("jxsglhsr", model.deviceConfiguration().nicDetails().get(0).driverVersion()); + Assertions.assertEquals("yejylmbkzudnigrf", model.deviceConfiguration().nicDetails().get(0).ip4Address()); + Assertions.assertEquals("otjewlpxuzzjgnre", model.deviceConfiguration().nicDetails().get(0).subnetMask()); + Assertions.assertEquals("yhqotoihiqakydi", model.deviceConfiguration().nicDetails().get(0).defaultGateway()); + Assertions.assertEquals("rkwpzdqtvhcspod", model.deviceConfiguration().nicDetails().get(0).dnsServers().get(0)); + Assertions.assertEquals("nfpubntnbatz", model.deviceConfiguration().nicDetails().get(0).defaultIsolationId()); + Assertions.assertEquals("qs", model.deviceConfiguration().deviceMetadata()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { EdgeDeviceProperties model = new EdgeDeviceProperties().withDeviceConfiguration( - new DeviceConfiguration().withNicDetails(Arrays.asList(new NicDetail().withAdapterName("gddeimaw") - .withInterfaceDescription("vgkk") - .withComponentId("ui") - .withDriverVersion("cjc") - .withIp4Address("tbw") - .withSubnetMask("sqowxwc") - .withDefaultGateway("likytwvczcswka") - .withDnsServers(Arrays.asList("jyfdvlv", "b", "rnfxtgddp", "th")) - .withDefaultIsolationId("n"))).withDeviceMetadata("aoyankcoeqswa")); + new DeviceConfiguration().withNicDetails(Arrays.asList(new NicDetail().withAdapterName("cuyzlwhhmemhoocl") + .withInterfaceDescription("n") + .withComponentId("memczjkmmyk") + .withDriverVersion("jxsglhsr") + .withIp4Address("yejylmbkzudnigrf") + .withSubnetMask("otjewlpxuzzjgnre") + .withDefaultGateway("yhqotoihiqakydi") + .withDnsServers(Arrays.asList("rkwpzdqtvhcspod", "qaxsipietgbebjf", "lbmoichd")) + .withDefaultIsolationId("nfpubntnbatz"))).withDeviceMetadata("qs")); model = BinaryData.fromObject(model).toObject(EdgeDeviceProperties.class); - Assertions.assertEquals("gddeimaw", model.deviceConfiguration().nicDetails().get(0).adapterName()); - Assertions.assertEquals("vgkk", model.deviceConfiguration().nicDetails().get(0).interfaceDescription()); - Assertions.assertEquals("ui", model.deviceConfiguration().nicDetails().get(0).componentId()); - Assertions.assertEquals("cjc", model.deviceConfiguration().nicDetails().get(0).driverVersion()); - Assertions.assertEquals("tbw", model.deviceConfiguration().nicDetails().get(0).ip4Address()); - Assertions.assertEquals("sqowxwc", model.deviceConfiguration().nicDetails().get(0).subnetMask()); - Assertions.assertEquals("likytwvczcswka", model.deviceConfiguration().nicDetails().get(0).defaultGateway()); - Assertions.assertEquals("jyfdvlv", model.deviceConfiguration().nicDetails().get(0).dnsServers().get(0)); - Assertions.assertEquals("n", model.deviceConfiguration().nicDetails().get(0).defaultIsolationId()); - Assertions.assertEquals("aoyankcoeqswa", model.deviceConfiguration().deviceMetadata()); + Assertions.assertEquals("cuyzlwhhmemhoocl", model.deviceConfiguration().nicDetails().get(0).adapterName()); + Assertions.assertEquals("n", model.deviceConfiguration().nicDetails().get(0).interfaceDescription()); + Assertions.assertEquals("memczjkmmyk", model.deviceConfiguration().nicDetails().get(0).componentId()); + Assertions.assertEquals("jxsglhsr", model.deviceConfiguration().nicDetails().get(0).driverVersion()); + Assertions.assertEquals("yejylmbkzudnigrf", model.deviceConfiguration().nicDetails().get(0).ip4Address()); + Assertions.assertEquals("otjewlpxuzzjgnre", model.deviceConfiguration().nicDetails().get(0).subnetMask()); + Assertions.assertEquals("yhqotoihiqakydi", model.deviceConfiguration().nicDetails().get(0).defaultGateway()); + Assertions.assertEquals("rkwpzdqtvhcspod", model.deviceConfiguration().nicDetails().get(0).dnsServers().get(0)); + Assertions.assertEquals("nfpubntnbatz", model.deviceConfiguration().nicDetails().get(0).defaultIsolationId()); + Assertions.assertEquals("qs", model.deviceConfiguration().deviceMetadata()); } } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/EdgeDevicesCreateOrUpdateMockTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/EdgeDevicesCreateOrUpdateMockTests.java index 377aeeb6aba6..08011058d5e4 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/EdgeDevicesCreateOrUpdateMockTests.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/EdgeDevicesCreateOrUpdateMockTests.java @@ -1,13 +1,13 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.generated; import com.azure.core.credential.AccessToken; import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.azurestackhci.AzureStackHciManager; import com.azure.resourcemanager.azurestackhci.fluent.models.EdgeDeviceInner; @@ -20,17 +20,17 @@ public final class EdgeDevicesCreateOrUpdateMockTests { @Test public void testCreateOrUpdate() throws Exception { - String responseStr = "{\"kind\":\"EdgeDevice\",\"id\":\"kqmt\",\"name\":\"apeqiscrpil\",\"type\":\"ftr\"}"; + String responseStr = "{\"kind\":\"EdgeDevice\",\"id\":\"spi\",\"name\":\"leimixlmdbgicehf\",\"type\":\"sm\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); AzureStackHciManager manager = AzureStackHciManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); EdgeDevice response = manager.edgeDevices() - .createOrUpdate("qfkyfhiwvjaqu", "by", new EdgeDeviceInner(), com.azure.core.util.Context.NONE); + .createOrUpdate("fhsdpzouhkt", "rxqwqnjxrd", new EdgeDeviceInner(), com.azure.core.util.Context.NONE); } } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/EdgeDevicesGetWithResponseMockTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/EdgeDevicesGetWithResponseMockTests.java index 6d89e5c82b11..a380a46b3333 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/EdgeDevicesGetWithResponseMockTests.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/EdgeDevicesGetWithResponseMockTests.java @@ -1,13 +1,13 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.generated; import com.azure.core.credential.AccessToken; import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.azurestackhci.AzureStackHciManager; import com.azure.resourcemanager.azurestackhci.models.EdgeDevice; @@ -19,18 +19,18 @@ public final class EdgeDevicesGetWithResponseMockTests { @Test public void testGetWithResponse() throws Exception { - String responseStr = "{\"kind\":\"EdgeDevice\",\"id\":\"kxxi\",\"name\":\"wgxql\",\"type\":\"ekotjgxi\"}"; + String responseStr + = "{\"kind\":\"EdgeDevice\",\"id\":\"mq\",\"name\":\"nrrfijhggabqb\",\"type\":\"amklilirwdv\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); AzureStackHciManager manager = AzureStackHciManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - EdgeDevice response = manager.edgeDevices() - .getWithResponse("ersejeg", "rkjguwrjmwvvbt", com.azure.core.util.Context.NONE) - .getValue(); + EdgeDevice response + = manager.edgeDevices().getWithResponse("tecloamfmxtll", "l", com.azure.core.util.Context.NONE).getValue(); } } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/EdgeDevicesListMockTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/EdgeDevicesListMockTests.java index 4180775e402b..42c5ee25407b 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/EdgeDevicesListMockTests.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/EdgeDevicesListMockTests.java @@ -1,14 +1,14 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.generated; import com.azure.core.credential.AccessToken; import com.azure.core.http.HttpClient; import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.azurestackhci.AzureStackHciManager; import com.azure.resourcemanager.azurestackhci.models.EdgeDevice; @@ -21,17 +21,17 @@ public final class EdgeDevicesListMockTests { @Test public void testList() throws Exception { String responseStr - = "{\"value\":[{\"kind\":\"EdgeDevice\",\"id\":\"derltfokyksyim\",\"name\":\"ccgrvkcxzznn\",\"type\":\"i\"}]}"; + = "{\"value\":[{\"kind\":\"EdgeDevice\",\"id\":\"tz\",\"name\":\"paxwfqty\",\"type\":\"qi\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); AzureStackHciManager manager = AzureStackHciManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PagedIterable response - = manager.edgeDevices().list("vlrrskapbxwieexu", com.azure.core.util.Context.NONE); + = manager.edgeDevices().list("rjuqbpxtokl", com.azure.core.util.Context.NONE); } } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/EdgeDevicesValidateMockTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/EdgeDevicesValidateMockTests.java index 0d892d1f3149..d3166f20ef2b 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/EdgeDevicesValidateMockTests.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/EdgeDevicesValidateMockTests.java @@ -1,13 +1,13 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.generated; import com.azure.core.credential.AccessToken; import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.azurestackhci.AzureStackHciManager; import com.azure.resourcemanager.azurestackhci.models.ValidateRequest; @@ -21,18 +21,19 @@ public final class EdgeDevicesValidateMockTests { @Test public void testValidate() throws Exception { - String responseStr = "{\"status\":\"ybnxgztlcgc\"}"; + String responseStr = "{\"status\":\"onaaxwmgzrujlqc\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); AzureStackHciManager manager = AzureStackHciManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); ValidateResponse response = manager.edgeDevices() - .validate("rejdaahuqim", "dahlfxlmuifmuadj", - new ValidateRequest().withEdgeDeviceIds(Arrays.asList("snc")).withAdditionalInfo("iioshjgcz"), + .validate("rcltungbsoljckm", "i", + new ValidateRequest().withEdgeDeviceIds(Arrays.asList("b", "uck", "kdskswtiiqqc", "ikclsm")) + .withAdditionalInfo("nsswoyk"), com.azure.core.util.Context.NONE); } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ExtensionListTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ExtensionListTests.java index 3067db135276..9710e5d96b35 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ExtensionListTests.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ExtensionListTests.java @@ -1,23 +1,25 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.generated; import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.azurestackhci.models.ExtensionList; +import com.azure.resourcemanager.azurestackhci.implementation.models.ExtensionList; +import org.junit.jupiter.api.Assertions; public final class ExtensionListTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ExtensionList model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"provisioningState\":\"PartiallySucceeded\",\"extensionParameters\":{\"forceUpdateTag\":\"zdgiruj\",\"publisher\":\"bomvzzbtdcqv\",\"type\":\"iyujviylwdshfs\",\"typeHandlerVersion\":\"rbgyefry\",\"autoUpgradeMinorVersion\":false,\"settings\":\"dataojfmwnco\",\"protectedSettings\":\"datarfh\",\"enableAutomaticUpgrade\":true},\"aggregateState\":\"Moving\",\"perNodeExtensionDetails\":[{\"name\":\"oftpipiwycz\",\"extension\":\"xacpqjli\",\"typeHandlerVersion\":\"yuspskas\",\"state\":\"Failed\",\"instanceView\":{}},{\"name\":\"wdgzxulucv\",\"extension\":\"mrsreuzvxurisjnh\",\"typeHandlerVersion\":\"txifqj\",\"state\":\"PartiallySucceeded\",\"instanceView\":{}},{\"name\":\"hu\",\"extension\":\"wp\",\"typeHandlerVersion\":\"sutrgjup\",\"state\":\"Disconnected\",\"instanceView\":{}},{\"name\":\"woqhihe\",\"extension\":\"g\",\"typeHandlerVersion\":\"pnfqntcyp\",\"state\":\"PartiallyConnected\",\"instanceView\":{}}],\"managedBy\":\"Azure\"},\"id\":\"mwks\",\"name\":\"ircizjxvy\",\"type\":\"fceacvlhvygd\"},{\"properties\":{\"provisioningState\":\"Accepted\",\"extensionParameters\":{\"forceUpdateTag\":\"twnawjslbiwkojgc\",\"publisher\":\"tsf\",\"type\":\"nbaeqphchqn\",\"typeHandlerVersion\":\"rpxeh\",\"autoUpgradeMinorVersion\":true,\"settings\":\"datak\",\"protectedSettings\":\"dataaifmvikl\",\"enableAutomaticUpgrade\":false},\"aggregateState\":\"Deleted\",\"perNodeExtensionDetails\":[{\"name\":\"jdz\",\"extension\":\"cvdsrhnj\",\"typeHandlerVersion\":\"olvtnovqfzge\",\"state\":\"Succeeded\",\"instanceView\":{}},{\"name\":\"uljltduceamtmcz\",\"extension\":\"m\",\"typeHandlerVersion\":\"wcw\",\"state\":\"NotSpecified\",\"instanceView\":{}},{\"name\":\"nssxmojmsvpk\",\"extension\":\"rvkwc\",\"typeHandlerVersion\":\"ql\",\"state\":\"NotSpecified\",\"instanceView\":{}}],\"managedBy\":\"User\"},\"id\":\"heyd\",\"name\":\"sdshmkxmaehvb\",\"type\":\"xu\"},{\"properties\":{\"provisioningState\":\"Moving\",\"extensionParameters\":{\"forceUpdateTag\":\"n\",\"publisher\":\"baxk\",\"type\":\"ywrckp\",\"typeHandlerVersion\":\"lyhpluodpvruud\",\"autoUpgradeMinorVersion\":false,\"settings\":\"databth\",\"protectedSettings\":\"datatgk\",\"enableAutomaticUpgrade\":true},\"aggregateState\":\"Error\",\"perNodeExtensionDetails\":[{\"name\":\"lzedqbcvhzlhplo\",\"extension\":\"kdl\",\"typeHandlerVersion\":\"qfbumlkxtrqjf\",\"state\":\"Updating\",\"instanceView\":{}},{\"name\":\"txhwgfws\",\"extension\":\"a\",\"typeHandlerVersion\":\"oezbrhubsk\",\"state\":\"PartiallyConnected\",\"instanceView\":{}}],\"managedBy\":\"User\"},\"id\":\"okkqfqjbvleo\",\"name\":\"fmluiqtqzfavyvn\",\"type\":\"qybaryeua\"},{\"properties\":{\"provisioningState\":\"Provisioning\",\"extensionParameters\":{\"forceUpdateTag\":\"qgzsles\",\"publisher\":\"bhernntiew\",\"type\":\"cv\",\"typeHandlerVersion\":\"uwrbehwagoh\",\"autoUpgradeMinorVersion\":false,\"settings\":\"datakmr\",\"protectedSettings\":\"datamvvhmxtdrjfuta\",\"enableAutomaticUpgrade\":true},\"aggregateState\":\"Accepted\",\"perNodeExtensionDetails\":[{\"name\":\"zcjznmwcpmgua\",\"extension\":\"raufactkahzova\",\"typeHandlerVersion\":\"ziuxxpshnee\",\"state\":\"Updating\",\"instanceView\":{}},{\"name\":\"slqubkwdl\",\"extension\":\"rds\",\"typeHandlerVersion\":\"ujbazpjuohminyfl\",\"state\":\"Succeeded\",\"instanceView\":{}},{\"name\":\"duvwpklvxwmygd\",\"extension\":\"gpqch\",\"typeHandlerVersion\":\"zepn\",\"state\":\"NotSpecified\",\"instanceView\":{}}],\"managedBy\":\"User\"},\"id\":\"ibbdaxconfoza\",\"name\":\"orsukokwbqp\",\"type\":\"hlvnuuepzlr\"}],\"nextLink\":\"wzsoldweyuqdunv\"}") + "{\"value\":[{\"properties\":{\"provisioningState\":\"Moving\",\"extensionParameters\":{\"forceUpdateTag\":\"vhcs\",\"publisher\":\"zlwxaeaovur\",\"type\":\"dndsbdweade\",\"typeHandlerVersion\":\"mwntopagttmvmma\",\"autoUpgradeMinorVersion\":true,\"settings\":\"dataylkjztjiuazjcg\",\"protectedSettings\":\"dataitpfinzcpdl\",\"enableAutomaticUpgrade\":false},\"aggregateState\":\"Error\",\"perNodeExtensionDetails\":[{\"name\":\"bd\",\"extension\":\"cqguef\",\"typeHandlerVersion\":\"ompheqdur\",\"state\":\"Succeeded\",\"instanceView\":{}},{\"name\":\"lf\",\"extension\":\"u\",\"typeHandlerVersion\":\"ckyeclcdigpta\",\"state\":\"PartiallyConnected\",\"instanceView\":{}},{\"name\":\"qxucycijoc\",\"extension\":\"iutgj\",\"typeHandlerVersion\":\"z\",\"state\":\"PartiallyConnected\",\"instanceView\":{}}],\"managedBy\":\"User\"},\"id\":\"jb\",\"name\":\"xjeaoqaqbzgyh\",\"type\":\"w\"}],\"nextLink\":\"uatbwbqamteuliy\"}") .toObject(ExtensionList.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ExtensionList model = new ExtensionList(); - model = BinaryData.fromObject(model).toObject(ExtensionList.class); + Assertions.assertEquals("vhcs", model.value().get(0).forceUpdateTag()); + Assertions.assertEquals("zlwxaeaovur", model.value().get(0).publisher()); + Assertions.assertEquals("dndsbdweade", model.value().get(0).typePropertiesType()); + Assertions.assertEquals("mwntopagttmvmma", model.value().get(0).typeHandlerVersion()); + Assertions.assertTrue(model.value().get(0).autoUpgradeMinorVersion()); + Assertions.assertFalse(model.value().get(0).enableAutomaticUpgrade()); + Assertions.assertEquals("uatbwbqamteuliy", model.nextLink()); } } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ExtensionParametersTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ExtensionParametersTests.java index f8a5c7574915..9bd94ad3ee21 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ExtensionParametersTests.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ExtensionParametersTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.generated; @@ -12,32 +12,32 @@ public final class ExtensionParametersTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ExtensionParameters model = BinaryData.fromString( - "{\"forceUpdateTag\":\"juisavokqdzf\",\"publisher\":\"zivj\",\"type\":\"rqttbajlkatnw\",\"typeHandlerVersion\":\"iopid\",\"autoUpgradeMinorVersion\":true,\"settings\":\"datakuvscxkdm\",\"protectedSettings\":\"datagovibrxkpmloazu\",\"enableAutomaticUpgrade\":true}") + "{\"forceUpdateTag\":\"tvbczsulm\",\"publisher\":\"glmep\",\"type\":\"fs\",\"typeHandlerVersion\":\"kgsangpszng\",\"autoUpgradeMinorVersion\":false,\"settings\":\"dataylkvecjuj\",\"protectedSettings\":\"datagoadyedmzr\",\"enableAutomaticUpgrade\":true}") .toObject(ExtensionParameters.class); - Assertions.assertEquals("juisavokqdzf", model.forceUpdateTag()); - Assertions.assertEquals("zivj", model.publisher()); - Assertions.assertEquals("rqttbajlkatnw", model.type()); - Assertions.assertEquals("iopid", model.typeHandlerVersion()); - Assertions.assertEquals(true, model.autoUpgradeMinorVersion()); - Assertions.assertEquals(true, model.enableAutomaticUpgrade()); + Assertions.assertEquals("tvbczsulm", model.forceUpdateTag()); + Assertions.assertEquals("glmep", model.publisher()); + Assertions.assertEquals("fs", model.type()); + Assertions.assertEquals("kgsangpszng", model.typeHandlerVersion()); + Assertions.assertFalse(model.autoUpgradeMinorVersion()); + Assertions.assertTrue(model.enableAutomaticUpgrade()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - ExtensionParameters model = new ExtensionParameters().withForceUpdateTag("juisavokqdzf") - .withPublisher("zivj") - .withType("rqttbajlkatnw") - .withTypeHandlerVersion("iopid") - .withAutoUpgradeMinorVersion(true) - .withSettings("datakuvscxkdm") - .withProtectedSettings("datagovibrxkpmloazu") + ExtensionParameters model = new ExtensionParameters().withForceUpdateTag("tvbczsulm") + .withPublisher("glmep") + .withType("fs") + .withTypeHandlerVersion("kgsangpszng") + .withAutoUpgradeMinorVersion(false) + .withSettings("dataylkvecjuj") + .withProtectedSettings("datagoadyedmzr") .withEnableAutomaticUpgrade(true); model = BinaryData.fromObject(model).toObject(ExtensionParameters.class); - Assertions.assertEquals("juisavokqdzf", model.forceUpdateTag()); - Assertions.assertEquals("zivj", model.publisher()); - Assertions.assertEquals("rqttbajlkatnw", model.type()); - Assertions.assertEquals("iopid", model.typeHandlerVersion()); - Assertions.assertEquals(true, model.autoUpgradeMinorVersion()); - Assertions.assertEquals(true, model.enableAutomaticUpgrade()); + Assertions.assertEquals("tvbczsulm", model.forceUpdateTag()); + Assertions.assertEquals("glmep", model.publisher()); + Assertions.assertEquals("fs", model.type()); + Assertions.assertEquals("kgsangpszng", model.typeHandlerVersion()); + Assertions.assertFalse(model.autoUpgradeMinorVersion()); + Assertions.assertTrue(model.enableAutomaticUpgrade()); } } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ExtensionPatchParametersTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ExtensionPatchParametersTests.java index a91a072ad7cd..f20ea30ed33c 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ExtensionPatchParametersTests.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ExtensionPatchParametersTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.generated; @@ -12,20 +12,20 @@ public final class ExtensionPatchParametersTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ExtensionPatchParameters model = BinaryData.fromString( - "{\"typeHandlerVersion\":\"dnhfuk\",\"enableAutomaticUpgrade\":true,\"settings\":\"datacswsmystul\",\"protectedSettings\":\"dataypfcvlerchpqbmf\"}") + "{\"typeHandlerVersion\":\"dxyurnpnuhza\",\"enableAutomaticUpgrade\":true,\"settings\":\"datauhiigbyl\",\"protectedSettings\":\"dataigvxvatvcrk\"}") .toObject(ExtensionPatchParameters.class); - Assertions.assertEquals("dnhfuk", model.typeHandlerVersion()); - Assertions.assertEquals(true, model.enableAutomaticUpgrade()); + Assertions.assertEquals("dxyurnpnuhza", model.typeHandlerVersion()); + Assertions.assertTrue(model.enableAutomaticUpgrade()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - ExtensionPatchParameters model = new ExtensionPatchParameters().withTypeHandlerVersion("dnhfuk") + ExtensionPatchParameters model = new ExtensionPatchParameters().withTypeHandlerVersion("dxyurnpnuhza") .withEnableAutomaticUpgrade(true) - .withSettings("datacswsmystul") - .withProtectedSettings("dataypfcvlerchpqbmf"); + .withSettings("datauhiigbyl") + .withProtectedSettings("dataigvxvatvcrk"); model = BinaryData.fromObject(model).toObject(ExtensionPatchParameters.class); - Assertions.assertEquals("dnhfuk", model.typeHandlerVersion()); - Assertions.assertEquals(true, model.enableAutomaticUpgrade()); + Assertions.assertEquals("dxyurnpnuhza", model.typeHandlerVersion()); + Assertions.assertTrue(model.enableAutomaticUpgrade()); } } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ExtensionPatchPropertiesTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ExtensionPatchPropertiesTests.java index 0903bd644e15..6d5754f3b6e8 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ExtensionPatchPropertiesTests.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ExtensionPatchPropertiesTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.generated; @@ -13,21 +13,21 @@ public final class ExtensionPatchPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ExtensionPatchProperties model = BinaryData.fromString( - "{\"extensionParameters\":{\"typeHandlerVersion\":\"wvvb\",\"enableAutomaticUpgrade\":false,\"settings\":\"datal\",\"protectedSettings\":\"datahpodbzev\"}}") + "{\"extensionParameters\":{\"typeHandlerVersion\":\"yuffatsgf\",\"enableAutomaticUpgrade\":false,\"settings\":\"datacxb\",\"protectedSettings\":\"databh\"}}") .toObject(ExtensionPatchProperties.class); - Assertions.assertEquals("wvvb", model.extensionParameters().typeHandlerVersion()); - Assertions.assertEquals(false, model.extensionParameters().enableAutomaticUpgrade()); + Assertions.assertEquals("yuffatsgf", model.extensionParameters().typeHandlerVersion()); + Assertions.assertFalse(model.extensionParameters().enableAutomaticUpgrade()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { ExtensionPatchProperties model = new ExtensionPatchProperties() - .withExtensionParameters(new ExtensionPatchParameters().withTypeHandlerVersion("wvvb") + .withExtensionParameters(new ExtensionPatchParameters().withTypeHandlerVersion("yuffatsgf") .withEnableAutomaticUpgrade(false) - .withSettings("datal") - .withProtectedSettings("datahpodbzev")); + .withSettings("datacxb") + .withProtectedSettings("databh")); model = BinaryData.fromObject(model).toObject(ExtensionPatchProperties.class); - Assertions.assertEquals("wvvb", model.extensionParameters().typeHandlerVersion()); - Assertions.assertEquals(false, model.extensionParameters().enableAutomaticUpgrade()); + Assertions.assertEquals("yuffatsgf", model.extensionParameters().typeHandlerVersion()); + Assertions.assertFalse(model.extensionParameters().enableAutomaticUpgrade()); } } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ExtensionPatchTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ExtensionPatchTests.java index 0309afeaf6c5..4084ee292919 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ExtensionPatchTests.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ExtensionPatchTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.generated; @@ -13,21 +13,21 @@ public final class ExtensionPatchTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ExtensionPatch model = BinaryData.fromString( - "{\"properties\":{\"extensionParameters\":{\"typeHandlerVersion\":\"sjkmnwqj\",\"enableAutomaticUpgrade\":true,\"settings\":\"dataiyhddvi\",\"protectedSettings\":\"dataegfnmntfpmvmemfn\"}}}") + "{\"properties\":{\"extensionParameters\":{\"typeHandlerVersion\":\"erppt\",\"enableAutomaticUpgrade\":false,\"settings\":\"datanzmnhiilia\",\"protectedSettings\":\"datacjgckbbcccgzpra\"}}}") .toObject(ExtensionPatch.class); - Assertions.assertEquals("sjkmnwqj", model.extensionParameters().typeHandlerVersion()); - Assertions.assertEquals(true, model.extensionParameters().enableAutomaticUpgrade()); + Assertions.assertEquals("erppt", model.extensionParameters().typeHandlerVersion()); + Assertions.assertFalse(model.extensionParameters().enableAutomaticUpgrade()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { ExtensionPatch model = new ExtensionPatch() - .withExtensionParameters(new ExtensionPatchParameters().withTypeHandlerVersion("sjkmnwqj") - .withEnableAutomaticUpgrade(true) - .withSettings("dataiyhddvi") - .withProtectedSettings("dataegfnmntfpmvmemfn")); + .withExtensionParameters(new ExtensionPatchParameters().withTypeHandlerVersion("erppt") + .withEnableAutomaticUpgrade(false) + .withSettings("datanzmnhiilia") + .withProtectedSettings("datacjgckbbcccgzpra")); model = BinaryData.fromObject(model).toObject(ExtensionPatch.class); - Assertions.assertEquals("sjkmnwqj", model.extensionParameters().typeHandlerVersion()); - Assertions.assertEquals(true, model.extensionParameters().enableAutomaticUpgrade()); + Assertions.assertEquals("erppt", model.extensionParameters().typeHandlerVersion()); + Assertions.assertFalse(model.extensionParameters().enableAutomaticUpgrade()); } } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ExtensionProfileTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ExtensionProfileTests.java index 3d92530fd628..65378b332aff 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ExtensionProfileTests.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ExtensionProfileTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.generated; @@ -11,13 +11,7 @@ public final class ExtensionProfileTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ExtensionProfile model = BinaryData.fromString( - "{\"extensions\":[{\"extensionName\":\"dyvt\",\"state\":\"Failed\",\"errorDetails\":[{\"exception\":\"piudeugfsxzecpa\"}],\"extensionResourceId\":\"kufykhvu\",\"typeHandlerVersion\":\"epmrut\",\"managedBy\":\"Azure\"},{\"extensionName\":\"aobn\",\"state\":\"Canceled\",\"errorDetails\":[{\"exception\":\"ltymkmvguihywart\"},{\"exception\":\"phkixkykxdssjpe\"}],\"extensionResourceId\":\"ucfx\",\"typeHandlerVersion\":\"kkflrmymyincqlhr\",\"managedBy\":\"Azure\"}]}") + "{\"extensions\":[{\"extensionName\":\"m\",\"state\":\"Deleted\",\"errorDetails\":[{\"exception\":\"xhnpo\"}],\"extensionResourceId\":\"qwcabvnui\",\"typeHandlerVersion\":\"ey\",\"managedBy\":\"Azure\"}]}") .toObject(ExtensionProfile.class); } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ExtensionProfile model = new ExtensionProfile(); - model = BinaryData.fromObject(model).toObject(ExtensionProfile.class); - } } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ExtensionUpgradeParametersTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ExtensionUpgradeParametersTests.java index 45520bcded0d..bcb11dc8648f 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ExtensionUpgradeParametersTests.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ExtensionUpgradeParametersTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.generated; @@ -12,14 +12,14 @@ public final class ExtensionUpgradeParametersTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ExtensionUpgradeParameters model - = BinaryData.fromString("{\"targetVersion\":\"babwidfcxss\"}").toObject(ExtensionUpgradeParameters.class); - Assertions.assertEquals("babwidfcxss", model.targetVersion()); + = BinaryData.fromString("{\"targetVersion\":\"pkcvmwf\"}").toObject(ExtensionUpgradeParameters.class); + Assertions.assertEquals("pkcvmwf", model.targetVersion()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - ExtensionUpgradeParameters model = new ExtensionUpgradeParameters().withTargetVersion("babwidfcxss"); + ExtensionUpgradeParameters model = new ExtensionUpgradeParameters().withTargetVersion("pkcvmwf"); model = BinaryData.fromObject(model).toObject(ExtensionUpgradeParameters.class); - Assertions.assertEquals("babwidfcxss", model.targetVersion()); + Assertions.assertEquals("pkcvmwf", model.targetVersion()); } } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ExtensionsCreateMockTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ExtensionsCreateMockTests.java index 8699a0f33873..a648b288b02f 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ExtensionsCreateMockTests.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ExtensionsCreateMockTests.java @@ -1,13 +1,13 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.generated; import com.azure.core.credential.AccessToken; import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.azurestackhci.AzureStackHciManager; import com.azure.resourcemanager.azurestackhci.models.Extension; @@ -21,33 +21,33 @@ public final class ExtensionsCreateMockTests { @Test public void testCreate() throws Exception { String responseStr - = "{\"properties\":{\"provisioningState\":\"Succeeded\",\"extensionParameters\":{\"forceUpdateTag\":\"oyrfgxk\",\"publisher\":\"pmypgfq\",\"type\":\"tyw\",\"typeHandlerVersion\":\"a\",\"autoUpgradeMinorVersion\":false,\"settings\":\"datajpewpyjlfx\",\"protectedSettings\":\"datapqcrzgeuqxbpiat\",\"enableAutomaticUpgrade\":true},\"aggregateState\":\"Succeeded\",\"perNodeExtensionDetails\":[{\"name\":\"d\",\"extension\":\"dr\",\"typeHandlerVersion\":\"gddhjkrukizyhgs\",\"state\":\"Moving\",\"instanceView\":{\"name\":\"ktxqfpjbqgg\",\"type\":\"eiwdhdmncgbfzu\",\"typeHandlerVersion\":\"stunmlh\",\"status\":{}}},{\"name\":\"bkl\",\"extension\":\"ich\",\"typeHandlerVersion\":\"sysmvxodgw\",\"state\":\"Failed\",\"instanceView\":{\"name\":\"ifc\",\"type\":\"bdujgcwxvecbb\",\"typeHandlerVersion\":\"trdxri\",\"status\":{}}},{\"name\":\"bbgiarksykpgdqxw\",\"extension\":\"zrwiqrxha\",\"typeHandlerVersion\":\"cdosqkptj\",\"state\":\"Canceled\",\"instanceView\":{\"name\":\"mmainwhe\",\"type\":\"kp\",\"typeHandlerVersion\":\"wuntobuiz\",\"status\":{}}}],\"managedBy\":\"Azure\"},\"id\":\"wgvydjufb\",\"name\":\"klblaxp\",\"type\":\"gjwdab\"}"; + = "{\"properties\":{\"provisioningState\":\"Succeeded\",\"extensionParameters\":{\"forceUpdateTag\":\"vfwjlo\",\"publisher\":\"ekfsrm\",\"type\":\"klajvcfocz\",\"typeHandlerVersion\":\"pejovt\",\"autoUpgradeMinorVersion\":false,\"settings\":\"datahwhhnoyrzaaoe\",\"protectedSettings\":\"datapmjen\",\"enableAutomaticUpgrade\":false},\"aggregateState\":\"Failed\",\"perNodeExtensionDetails\":[{\"name\":\"xc\",\"extension\":\"oxdjxldnaryy\",\"typeHandlerVersion\":\"zkdolrndwdbvxvza\",\"state\":\"Updating\",\"instanceView\":{\"name\":\"qxlun\",\"type\":\"th\",\"typeHandlerVersion\":\"xqqxmyzkla\",\"status\":{}}},{\"name\":\"pohrvm\",\"extension\":\"qr\",\"typeHandlerVersion\":\"a\",\"state\":\"Connected\",\"instanceView\":{\"name\":\"llaslkskhjqjpv\",\"type\":\"ihxjtgzgtai\",\"typeHandlerVersion\":\"b\",\"status\":{}}},{\"name\":\"oig\",\"extension\":\"fsgsa\",\"typeHandlerVersion\":\"w\",\"state\":\"Failed\",\"instanceView\":{\"name\":\"ljql\",\"type\":\"pmrjctryl\",\"typeHandlerVersion\":\"xebuhsxrznmg\",\"status\":{}}}],\"managedBy\":\"Azure\"},\"id\":\"yckhefrbhseue\",\"name\":\"bgpxebjlu\",\"type\":\"caytujraxdtpryj\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); AzureStackHciManager manager = AzureStackHciManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); Extension response = manager.extensions() - .define("xkf") - .withExistingArcSetting("neakh", "mhobcyan", "fvqtvkhgvoo") - .withForceUpdateTag("mhcctopuowy") - .withPublisher("skbyhquhczygx") - .withTypePropertiesType("ajpxecxqnwhscoza") - .withTypeHandlerVersion("vgxsm") + .define("zjgcfjfx") + .withExistingArcSetting("tvcshtkutzcttb", "gdirda", "m") + .withForceUpdateTag("rmuydgfttmdofg") + .withPublisher("agfuoftnxod") + .withTypePropertiesType("m") + .withTypeHandlerVersion("jwiygmgsevmdmze") .withAutoUpgradeMinorVersion(true) - .withSettings("datawirfljf") - .withProtectedSettings("dataxqou") + .withSettings("datatgfczljdncidtjva") + .withProtectedSettings("datayznm") .withEnableAutomaticUpgrade(false) .create(); - Assertions.assertEquals("oyrfgxk", response.forceUpdateTag()); - Assertions.assertEquals("pmypgfq", response.publisher()); - Assertions.assertEquals("tyw", response.typePropertiesType()); - Assertions.assertEquals("a", response.typeHandlerVersion()); - Assertions.assertEquals(false, response.autoUpgradeMinorVersion()); - Assertions.assertEquals(true, response.enableAutomaticUpgrade()); + Assertions.assertEquals("vfwjlo", response.forceUpdateTag()); + Assertions.assertEquals("ekfsrm", response.publisher()); + Assertions.assertEquals("klajvcfocz", response.typePropertiesType()); + Assertions.assertEquals("pejovt", response.typeHandlerVersion()); + Assertions.assertFalse(response.autoUpgradeMinorVersion()); + Assertions.assertFalse(response.enableAutomaticUpgrade()); } } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ExtensionsDeleteMockTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ExtensionsDeleteMockTests.java index 78cc78e0c2f5..2104e52c776c 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ExtensionsDeleteMockTests.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ExtensionsDeleteMockTests.java @@ -1,13 +1,13 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.generated; import com.azure.core.credential.AccessToken; import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.azurestackhci.AzureStackHciManager; import java.nio.charset.StandardCharsets; @@ -25,10 +25,10 @@ public void testDelete() throws Exception { AzureStackHciManager manager = AzureStackHciManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); manager.extensions() - .delete("vsnvlaq", "nzyzawatuwqko", "bczothymgobllms", "wgwima", com.azure.core.util.Context.NONE); + .delete("qoq", "umov", "fbpbvzopaxmfmvsm", "woxfaxdtnqifbsa", com.azure.core.util.Context.NONE); } } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ExtensionsGetWithResponseMockTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ExtensionsGetWithResponseMockTests.java index af490f165274..38b1357f4c78 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ExtensionsGetWithResponseMockTests.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ExtensionsGetWithResponseMockTests.java @@ -1,13 +1,13 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.generated; import com.azure.core.credential.AccessToken; import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.azurestackhci.AzureStackHciManager; import com.azure.resourcemanager.azurestackhci.models.Extension; @@ -21,24 +21,24 @@ public final class ExtensionsGetWithResponseMockTests { @Test public void testGetWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"provisioningState\":\"Error\",\"extensionParameters\":{\"forceUpdateTag\":\"h\",\"publisher\":\"jsbcml\",\"type\":\"ahz\",\"typeHandlerVersion\":\"uroolkolirhhm\",\"autoUpgradeMinorVersion\":true,\"settings\":\"datau\",\"protectedSettings\":\"datafjzc\",\"enableAutomaticUpgrade\":true},\"aggregateState\":\"Error\",\"perNodeExtensionDetails\":[{\"name\":\"ahfxwccok\",\"extension\":\"kuk\",\"typeHandlerVersion\":\"c\",\"state\":\"PartiallySucceeded\",\"instanceView\":{\"name\":\"hoqeqshavljqk\",\"type\":\"rqolnthbb\",\"typeHandlerVersion\":\"gzukw\",\"status\":{}}},{\"name\":\"zkjthfceyjn\",\"extension\":\"mlfuyfjbp\",\"typeHandlerVersion\":\"ddhlrufzcqyj\",\"state\":\"Canceled\",\"instanceView\":{\"name\":\"iocuselqkr\",\"type\":\"zrhxuddqmdtf\",\"typeHandlerVersion\":\"sjmrkkhm\",\"status\":{}}}],\"managedBy\":\"Azure\"},\"id\":\"gyqi\",\"name\":\"okwtjawhvagnqfqq\",\"type\":\"lcvmyolcaymjch\"}"; + = "{\"properties\":{\"provisioningState\":\"InProgress\",\"extensionParameters\":{\"forceUpdateTag\":\"s\",\"publisher\":\"cm\",\"type\":\"wmlgicvnpv\",\"typeHandlerVersion\":\"hgjnaq\",\"autoUpgradeMinorVersion\":false,\"settings\":\"dataslz\",\"protectedSettings\":\"datacdsvmwbitek\",\"enableAutomaticUpgrade\":true},\"aggregateState\":\"InProgress\",\"perNodeExtensionDetails\":[{\"name\":\"ybxq\",\"extension\":\"hgybfzdqekivycpz\",\"typeHandlerVersion\":\"diz\",\"state\":\"Deleting\",\"instanceView\":{\"name\":\"bhtrezpzlpryfm\",\"type\":\"dutzfkg\",\"typeHandlerVersion\":\"no\",\"status\":{}}},{\"name\":\"cgndjgdp\",\"extension\":\"ggqqyeqfcb\",\"typeHandlerVersion\":\"lpyuflqjf\",\"state\":\"Failed\",\"instanceView\":{\"name\":\"cyohigimwdcs\",\"type\":\"kqnqvkixnmbzme\",\"typeHandlerVersion\":\"yrzwim\",\"status\":{}}},{\"name\":\"yspzvrie\",\"extension\":\"fphmdzxplg\",\"typeHandlerVersion\":\"vdvatlzmgsc\",\"state\":\"Error\",\"instanceView\":{\"name\":\"bkkz\",\"type\":\"lzdmnfmfwsxafo\",\"typeHandlerVersion\":\"worimmovzwdehk\",\"status\":{}}}],\"managedBy\":\"User\"},\"id\":\"fovanyrvapr\",\"name\":\"gelg\",\"type\":\"ewikfyaqandmym\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); AzureStackHciManager manager = AzureStackHciManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); Extension response = manager.extensions() - .getWithResponse("ikff", "fgkuh", "nwhvuldbkkejj", "jigawgaz", com.azure.core.util.Context.NONE) + .getWithResponse("ny", "lleiq", "cbgvsbt", "ertoxadhxuvj", com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("h", response.forceUpdateTag()); - Assertions.assertEquals("jsbcml", response.publisher()); - Assertions.assertEquals("ahz", response.typePropertiesType()); - Assertions.assertEquals("uroolkolirhhm", response.typeHandlerVersion()); - Assertions.assertEquals(true, response.autoUpgradeMinorVersion()); - Assertions.assertEquals(true, response.enableAutomaticUpgrade()); + Assertions.assertEquals("s", response.forceUpdateTag()); + Assertions.assertEquals("cm", response.publisher()); + Assertions.assertEquals("wmlgicvnpv", response.typePropertiesType()); + Assertions.assertEquals("hgjnaq", response.typeHandlerVersion()); + Assertions.assertFalse(response.autoUpgradeMinorVersion()); + Assertions.assertTrue(response.enableAutomaticUpgrade()); } } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ExtensionsListByArcSettingMockTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ExtensionsListByArcSettingMockTests.java index 619858e267a3..365bff339476 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ExtensionsListByArcSettingMockTests.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ExtensionsListByArcSettingMockTests.java @@ -1,14 +1,14 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.generated; import com.azure.core.credential.AccessToken; import com.azure.core.http.HttpClient; import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.azurestackhci.AzureStackHciManager; import com.azure.resourcemanager.azurestackhci.models.Extension; @@ -22,23 +22,23 @@ public final class ExtensionsListByArcSettingMockTests { @Test public void testListByArcSetting() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"provisioningState\":\"Connected\",\"extensionParameters\":{\"forceUpdateTag\":\"ylrwoxzg\",\"publisher\":\"syxjijeyp\",\"type\":\"rbkerdkd\",\"typeHandlerVersion\":\"awqwjxild\",\"autoUpgradeMinorVersion\":true,\"settings\":\"datafeygzqp\",\"protectedSettings\":\"dataisf\",\"enableAutomaticUpgrade\":true},\"aggregateState\":\"Deleting\",\"perNodeExtensionDetails\":[{\"name\":\"xumentqontwhy\",\"extension\":\"ymulwivqtowl\",\"typeHandlerVersion\":\"sycoybajasqub\",\"state\":\"Canceled\",\"instanceView\":{\"name\":\"whjq\",\"type\":\"chqohtfxcpupuk\",\"typeHandlerVersion\":\"mjzpwdlvwtiwsm\",\"status\":{}}},{\"name\":\"onhqnam\",\"extension\":\"ultassae\",\"typeHandlerVersion\":\"wnaze\",\"state\":\"PartiallyConnected\",\"instanceView\":{\"name\":\"jlcyizy\",\"type\":\"cvxodkrvfsxxby\",\"typeHandlerVersion\":\"sqlv\",\"status\":{}}},{\"name\":\"pwgoljt\",\"extension\":\"nm\",\"typeHandlerVersion\":\"dobygoogxqapj\",\"state\":\"Updating\",\"instanceView\":{\"name\":\"jfucsaodjnosdkv\",\"type\":\"fasgm\",\"typeHandlerVersion\":\"rnzpducdaak\",\"status\":{}}}],\"managedBy\":\"User\"},\"id\":\"zboimyfpqdo\",\"name\":\"kpp\",\"type\":\"wyytfvpctf\"}]}"; + = "{\"value\":[{\"properties\":{\"provisioningState\":\"Error\",\"extensionParameters\":{\"forceUpdateTag\":\"edpksriwmmtmqrxr\",\"publisher\":\"vvyczy\",\"type\":\"ubt\",\"typeHandlerVersion\":\"bxiqahragpxmibpl\",\"autoUpgradeMinorVersion\":true,\"settings\":\"datayryefqm\",\"protectedSettings\":\"datavyztxlno\",\"enableAutomaticUpgrade\":true},\"aggregateState\":\"Accepted\",\"perNodeExtensionDetails\":[{\"name\":\"gvyieztkutnjil\",\"extension\":\"kkreh\",\"typeHandlerVersion\":\"tmjoduifvu\",\"state\":\"Failed\",\"instanceView\":{\"name\":\"yrvjlgdezvjq\",\"type\":\"hoyiyaxqvjweiw\",\"typeHandlerVersion\":\"zkddnvovb\",\"status\":{}}},{\"name\":\"bmdqrxyglae\",\"extension\":\"cflwtjdtlr\",\"typeHandlerVersion\":\"fooy\",\"state\":\"Succeeded\",\"instanceView\":{\"name\":\"tzcqipsd\",\"type\":\"gcozzomehxlant\",\"typeHandlerVersion\":\"amlbiju\",\"status\":{}}},{\"name\":\"llczipvwdt\",\"extension\":\"kzdqiqdlratrkwxo\",\"typeHandlerVersion\":\"wxsuy\",\"state\":\"Deleting\",\"instanceView\":{\"name\":\"fgslglhpryjfz\",\"type\":\"uioaeocpaj\",\"typeHandlerVersion\":\"eyvk\",\"status\":{}}},{\"name\":\"dd\",\"extension\":\"hdccxb\",\"typeHandlerVersion\":\"uqutkzwtjww\",\"state\":\"Succeeded\",\"instanceView\":{\"name\":\"ijcxfno\",\"type\":\"egjdydhqkk\",\"typeHandlerVersion\":\"juck\",\"status\":{}}}],\"managedBy\":\"Azure\"},\"id\":\"bhpowcnxtpzdlys\",\"name\":\"idtoakat\",\"type\":\"rytgrhzbqfdpfawr\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); AzureStackHciManager manager = AzureStackHciManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - PagedIterable response - = manager.extensions().listByArcSetting("j", "hfjv", "ywjzebecuvlbefvw", com.azure.core.util.Context.NONE); + PagedIterable response = manager.extensions() + .listByArcSetting("roiauesugmo", "pcjycb", "elrgttwfldsiuo", com.azure.core.util.Context.NONE); - Assertions.assertEquals("ylrwoxzg", response.iterator().next().forceUpdateTag()); - Assertions.assertEquals("syxjijeyp", response.iterator().next().publisher()); - Assertions.assertEquals("rbkerdkd", response.iterator().next().typePropertiesType()); - Assertions.assertEquals("awqwjxild", response.iterator().next().typeHandlerVersion()); - Assertions.assertEquals(true, response.iterator().next().autoUpgradeMinorVersion()); - Assertions.assertEquals(true, response.iterator().next().enableAutomaticUpgrade()); + Assertions.assertEquals("edpksriwmmtmqrxr", response.iterator().next().forceUpdateTag()); + Assertions.assertEquals("vvyczy", response.iterator().next().publisher()); + Assertions.assertEquals("ubt", response.iterator().next().typePropertiesType()); + Assertions.assertEquals("bxiqahragpxmibpl", response.iterator().next().typeHandlerVersion()); + Assertions.assertTrue(response.iterator().next().autoUpgradeMinorVersion()); + Assertions.assertTrue(response.iterator().next().enableAutomaticUpgrade()); } } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/HciCollectLogJobPropertiesTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/HciCollectLogJobPropertiesTests.java new file mode 100644 index 000000000000..f414b36a0c06 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/HciCollectLogJobPropertiesTests.java @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.azurestackhci.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.azurestackhci.models.DeploymentMode; +import com.azure.resourcemanager.azurestackhci.models.HciCollectLogJobProperties; +import java.time.OffsetDateTime; +import org.junit.jupiter.api.Assertions; + +public final class HciCollectLogJobPropertiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + HciCollectLogJobProperties model = BinaryData.fromString( + "{\"jobType\":\"CollectLog\",\"fromDate\":\"2021-09-04T01:06:25Z\",\"toDate\":\"2021-12-03T01:40:51Z\",\"lastLogGenerated\":\"2021-05-06T08:51:47Z\",\"reportedProperties\":{\"percentComplete\":569330196,\"validationStatus\":{\"status\":\"wdaomdjvlpjxxkzb\",\"steps\":[{\"name\":\"eivsiykzkdnc\",\"description\":\"xonbzoggculapz\",\"fullStepIndex\":\"rpgogtqxep\",\"startTimeUtc\":\"lbfu\",\"endTimeUtc\":\"lyjt\",\"status\":\"of\",\"steps\":[{},{},{}],\"exception\":[\"cib\",\"fmo\",\"uxrkjp\",\"dwxf\"]},{\"name\":\"iivwzjbhyzsxjrka\",\"description\":\"trnegvmnvuqeqvld\",\"fullStepIndex\":\"astjbkkdmflvestm\",\"startTimeUtc\":\"xrrilozapee\",\"endTimeUtc\":\"hpxlktwkuziycs\",\"status\":\"vu\",\"steps\":[{},{}],\"exception\":[\"ktyhjt\",\"edcg\"]}]},\"deploymentStatus\":{\"status\":\"wmmrq\",\"steps\":[{\"name\":\"jvpglydzgk\",\"description\":\"qeevt\",\"fullStepIndex\":\"pryu\",\"startTimeUtc\":\"wytpzdmovz\",\"endTimeUtc\":\"va\",\"status\":\"zqadf\",\"steps\":[{}],\"exception\":[\"iglaecx\",\"dticokpvzml\"]}]},\"logCollectionSessionDetails\":[{\"startTime\":\"dgxobfircl\",\"endTime\":\"kciayzri\",\"timeCollected\":\"hya\",\"logSize\":47458099,\"status\":\"Succeeded\",\"correlationId\":\"oxqvkjlmxhomdynh\"},{\"startTime\":\"digumbnr\",\"endTime\":\"uzzptjazysdz\",\"timeCollected\":\"zwwva\",\"logSize\":129407729,\"status\":\"Running\",\"correlationId\":\"fonkphhqyikvyla\"},{\"startTime\":\"avluwmncs\",\"endTime\":\"ijf\",\"timeCollected\":\"vpo\",\"logSize\":576086700,\"status\":\"Failed\",\"correlationId\":\"gbdhuzqgnjdg\"}]},\"deploymentMode\":\"Deploy\",\"provisioningState\":\"Disconnected\",\"jobId\":\"i\",\"startTimeUtc\":\"2021-01-20T15:31:21Z\",\"endTimeUtc\":\"2021-01-28T11:51:13Z\",\"status\":\"Canceled\"}") + .toObject(HciCollectLogJobProperties.class); + Assertions.assertEquals(DeploymentMode.DEPLOY, model.deploymentMode()); + Assertions.assertEquals(OffsetDateTime.parse("2021-09-04T01:06:25Z"), model.fromDate()); + Assertions.assertEquals(OffsetDateTime.parse("2021-12-03T01:40:51Z"), model.toDate()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + HciCollectLogJobProperties model = new HciCollectLogJobProperties().withDeploymentMode(DeploymentMode.DEPLOY) + .withFromDate(OffsetDateTime.parse("2021-09-04T01:06:25Z")) + .withToDate(OffsetDateTime.parse("2021-12-03T01:40:51Z")); + model = BinaryData.fromObject(model).toObject(HciCollectLogJobProperties.class); + Assertions.assertEquals(DeploymentMode.DEPLOY, model.deploymentMode()); + Assertions.assertEquals(OffsetDateTime.parse("2021-09-04T01:06:25Z"), model.fromDate()); + Assertions.assertEquals(OffsetDateTime.parse("2021-12-03T01:40:51Z"), model.toDate()); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/HciEdgeDeviceAdapterPropertyOverridesTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/HciEdgeDeviceAdapterPropertyOverridesTests.java index 65e15309e3c3..2854d11bbc26 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/HciEdgeDeviceAdapterPropertyOverridesTests.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/HciEdgeDeviceAdapterPropertyOverridesTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.generated; @@ -10,14 +10,9 @@ public final class HciEdgeDeviceAdapterPropertyOverridesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - HciEdgeDeviceAdapterPropertyOverrides model = BinaryData.fromString( - "{\"jumboPacket\":\"etlgydlhqvlnnpx\",\"networkDirect\":\"afiqgeaarbgjekg\",\"networkDirectTechnology\":\"lbyulidwcwvmze\"}") + HciEdgeDeviceAdapterPropertyOverrides model = BinaryData + .fromString( + "{\"jumboPacket\":\"wehtaemxh\",\"networkDirect\":\"ysev\",\"networkDirectTechnology\":\"xivzrrry\"}") .toObject(HciEdgeDeviceAdapterPropertyOverrides.class); } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - HciEdgeDeviceAdapterPropertyOverrides model = new HciEdgeDeviceAdapterPropertyOverrides(); - model = BinaryData.fromObject(model).toObject(HciEdgeDeviceAdapterPropertyOverrides.class); - } } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/HciEdgeDeviceArcExtensionTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/HciEdgeDeviceArcExtensionTests.java index 958bf556bc0e..85b58153b8d0 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/HciEdgeDeviceArcExtensionTests.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/HciEdgeDeviceArcExtensionTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.generated; @@ -11,13 +11,7 @@ public final class HciEdgeDeviceArcExtensionTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { HciEdgeDeviceArcExtension model = BinaryData.fromString( - "{\"extensionName\":\"csgguxhemlw\",\"state\":\"Failed\",\"errorDetails\":[{\"exception\":\"zgfbukklelssx\"},{\"exception\":\"ycsxzu\"}],\"extensionResourceId\":\"srlsmd\",\"typeHandlerVersion\":\"qplpvmjc\",\"managedBy\":\"Azure\"}") + "{\"extensionName\":\"paugmrmfjlrxwt\",\"state\":\"Updating\",\"errorDetails\":[{\"exception\":\"kvci\"},{\"exception\":\"zmoaeds\"},{\"exception\":\"wuived\"},{\"exception\":\"gyeewxeiq\"}],\"extensionResourceId\":\"smgomguaml\",\"typeHandlerVersion\":\"l\",\"managedBy\":\"Azure\"}") .toObject(HciEdgeDeviceArcExtension.class); } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - HciEdgeDeviceArcExtension model = new HciEdgeDeviceArcExtension(); - model = BinaryData.fromObject(model).toObject(HciEdgeDeviceArcExtension.class); - } } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/HciEdgeDeviceHostNetworkTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/HciEdgeDeviceHostNetworkTests.java index a9ae16522831..6117ab8c4c92 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/HciEdgeDeviceHostNetworkTests.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/HciEdgeDeviceHostNetworkTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.generated; @@ -11,13 +11,7 @@ public final class HciEdgeDeviceHostNetworkTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { HciEdgeDeviceHostNetwork model = BinaryData.fromString( - "{\"intents\":[{\"scope\":5884898647317147170,\"intentType\":7373453807299049172,\"isComputeIntentSet\":true,\"isStorageIntentSet\":true,\"isOnlyStorage\":false,\"isManagementIntentSet\":true,\"isStretchIntentSet\":false,\"isOnlyStretch\":true,\"isNetworkIntentType\":true,\"intentName\":\"jtqpkevmyltjcrsp\",\"intentAdapters\":[\"urcclfgxannn\"],\"overrideVirtualSwitchConfiguration\":false,\"virtualSwitchConfigurationOverrides\":{\"enableIov\":\"osewxi\",\"loadBalancingAlgorithm\":\"xvkqm\"},\"overrideQosPolicy\":true,\"qosPolicyOverrides\":{\"priorityValue8021Action_Cluster\":\"pifdfaifyzyzeyu\",\"priorityValue8021Action_SMB\":\"eidszlfytoi\",\"bandwidthPercentage_SMB\":\"gygvfltgvdiho\"},\"overrideAdapterProperty\":false,\"adapterPropertyOverrides\":{\"jumboPacket\":\"wetwkdr\",\"networkDirect\":\"rucpcunnuz\",\"networkDirectTechnology\":\"umoenodnaie\"}},{\"scope\":1915335915465694724,\"intentType\":2869725107251122728,\"isComputeIntentSet\":true,\"isStorageIntentSet\":true,\"isOnlyStorage\":false,\"isManagementIntentSet\":true,\"isStretchIntentSet\":true,\"isOnlyStretch\":false,\"isNetworkIntentType\":true,\"intentName\":\"anniyopetxivcnr\",\"intentAdapters\":[\"nucaephblkwqpat\",\"bqsdtcjbctvi\",\"uzqymtuowog\",\"gitsqh\"],\"overrideVirtualSwitchConfiguration\":false,\"virtualSwitchConfigurationOverrides\":{\"enableIov\":\"cdb\",\"loadBalancingAlgorithm\":\"fzndscxmxeatkd\"},\"overrideQosPolicy\":true,\"qosPolicyOverrides\":{\"priorityValue8021Action_Cluster\":\"djyibqbnaomhjrm\",\"priorityValue8021Action_SMB\":\"hmaxljalfi\",\"bandwidthPercentage_SMB\":\"jmobca\"},\"overrideAdapterProperty\":false,\"adapterPropertyOverrides\":{\"jumboPacket\":\"xqcwgax\",\"networkDirect\":\"vaknokzwjj\",\"networkDirectTechnology\":\"ltixldzyyfytpq\"}},{\"scope\":360408231688431351,\"intentType\":450241632705489744,\"isComputeIntentSet\":true,\"isStorageIntentSet\":true,\"isOnlyStorage\":false,\"isManagementIntentSet\":false,\"isStretchIntentSet\":false,\"isOnlyStretch\":true,\"isNetworkIntentType\":true,\"intentName\":\"slzoyov\",\"intentAdapters\":[\"bpqvybefg\",\"mx\",\"okcvtlubses\"],\"overrideVirtualSwitchConfiguration\":false,\"virtualSwitchConfigurationOverrides\":{\"enableIov\":\"rtrh\",\"loadBalancingAlgorithm\":\"lpi\"},\"overrideQosPolicy\":true,\"qosPolicyOverrides\":{\"priorityValue8021Action_Cluster\":\"ndzfqivjreuyk\",\"priorityValue8021Action_SMB\":\"mnwagltbxoe\",\"bandwidthPercentage_SMB\":\"nqlnfwmyymvqd\"},\"overrideAdapterProperty\":true,\"adapterPropertyOverrides\":{\"jumboPacket\":\"ckdvez\",\"networkDirect\":\"cssbzhddu\",\"networkDirectTechnology\":\"nqfblhkalehpava\"}}],\"storageNetworks\":[{\"name\":\"qjtiogqgdm\",\"networkAdapterName\":\"i\",\"storageVlanId\":\"teajohiyg\",\"storageAdapterIPInfo\":[{\"physicalNode\":\"onhpcz\",\"ipv4Address\":\"mktp\",\"subnetMask\":\"xqcsehch\"}]},{\"name\":\"ufmpqumqyjgy\",\"networkAdapterName\":\"ulodsaeuzanhsfnh\",\"storageVlanId\":\"nwph\",\"storageAdapterIPInfo\":[{\"physicalNode\":\"gqjclidftujwj\",\"ipv4Address\":\"fwbeqrkuorh\",\"subnetMask\":\"sruqnmdvha\"}]},{\"name\":\"vjytiqswbq\",\"networkAdapterName\":\"zwxiytx\",\"storageVlanId\":\"gukvlbpkt\",\"storageAdapterIPInfo\":[{\"physicalNode\":\"youambewr\",\"ipv4Address\":\"wmowegmmute\",\"subnetMask\":\"eyguq\"},{\"physicalNode\":\"ijiitns\",\"ipv4Address\":\"lz\",\"subnetMask\":\"sygrijwa\"}]}],\"storageConnectivitySwitchless\":true,\"enableStorageAutoIp\":false}") + "{\"intents\":[{\"scope\":8621881269449227991,\"intentType\":5192971092079574246,\"isComputeIntentSet\":false,\"isStorageIntentSet\":false,\"isOnlyStorage\":false,\"isManagementIntentSet\":true,\"isStretchIntentSet\":true,\"isOnlyStretch\":true,\"isNetworkIntentType\":true,\"intentName\":\"ahmrnadzyqegxyi\",\"intentAdapters\":[\"nbm\",\"wbjijkgq\"],\"overrideVirtualSwitchConfiguration\":false,\"virtualSwitchConfigurationOverrides\":{\"enableIov\":\"keznjaujvaa\",\"loadBalancingAlgorithm\":\"ggiycwkdtaawxwf\"},\"overrideQosPolicy\":true,\"qosPolicyOverrides\":{\"priorityValue8021Action_Cluster\":\"rrqmbzmqk\",\"priorityValue8021Action_SMB\":\"tbnxwbjsid\",\"bandwidthPercentage_SMB\":\"rkfpks\"},\"overrideAdapterProperty\":false,\"adapterPropertyOverrides\":{\"jumboPacket\":\"gewi\",\"networkDirect\":\"mrhbguzozkye\",\"networkDirectTechnology\":\"f\"}},{\"scope\":8057863592167322722,\"intentType\":2174997285852681657,\"isComputeIntentSet\":true,\"isStorageIntentSet\":true,\"isOnlyStorage\":true,\"isManagementIntentSet\":false,\"isStretchIntentSet\":false,\"isOnlyStretch\":true,\"isNetworkIntentType\":true,\"intentName\":\"oohguabzoghkt\",\"intentAdapters\":[\"czhcoeocnh\",\"qr\"],\"overrideVirtualSwitchConfiguration\":true,\"virtualSwitchConfigurationOverrides\":{\"enableIov\":\"cfyjzp\",\"loadBalancingAlgorithm\":\"rl\"},\"overrideQosPolicy\":false,\"qosPolicyOverrides\":{\"priorityValue8021Action_Cluster\":\"infsz\",\"priorityValue8021Action_SMB\":\"glqdhm\",\"bandwidthPercentage_SMB\":\"zralcxpjbyyps\"},\"overrideAdapterProperty\":true,\"adapterPropertyOverrides\":{\"jumboPacket\":\"enky\",\"networkDirect\":\"qzvs\",\"networkDirectTechnology\":\"fxjelg\"}},{\"scope\":8956657423159801562,\"intentType\":7609417629680411995,\"isComputeIntentSet\":false,\"isStorageIntentSet\":false,\"isOnlyStorage\":false,\"isManagementIntentSet\":false,\"isStretchIntentSet\":true,\"isOnlyStretch\":true,\"isNetworkIntentType\":false,\"intentName\":\"vbsizusjszlbscm\",\"intentAdapters\":[\"ijiufehgmvfln\",\"yvqkxr\",\"rlniyl\"],\"overrideVirtualSwitchConfiguration\":false,\"virtualSwitchConfigurationOverrides\":{\"enableIov\":\"xzutgqztwhghmupg\",\"loadBalancingAlgorithm\":\"jtcdxabbujftaben\"},\"overrideQosPolicy\":false,\"qosPolicyOverrides\":{\"priorityValue8021Action_Cluster\":\"pxzuca\",\"priorityValue8021Action_SMB\":\"ddwwnlzafwxudgnh\",\"bandwidthPercentage_SMB\":\"okrtalvnb\"},\"overrideAdapterProperty\":false,\"adapterPropertyOverrides\":{\"jumboPacket\":\"meluclvdjj\",\"networkDirect\":\"yrdnqod\",\"networkDirectTechnology\":\"hhxhq\"}}],\"storageNetworks\":[{\"name\":\"vzoqgyipemchgavs\",\"networkAdapterName\":\"uejdtxptlg\",\"storageVlanId\":\"zhomewjjstliu\",\"storageAdapterIPInfo\":[{\"physicalNode\":\"moaiancz\",\"ipv4Address\":\"odrrslblxyd\",\"subnetMask\":\"rxvvbxi\"}]},{\"name\":\"g\",\"networkAdapterName\":\"qljnqkhychoco\",\"storageVlanId\":\"lehu\",\"storageAdapterIPInfo\":[{\"physicalNode\":\"qffawey\",\"ipv4Address\":\"kphyjdxrav\",\"subnetMask\":\"qdbrxmrgc\"},{\"physicalNode\":\"apx\",\"ipv4Address\":\"y\",\"subnetMask\":\"j\"}]},{\"name\":\"ajb\",\"networkAdapterName\":\"cgduusio\",\"storageVlanId\":\"blevpmcluj\",\"storageAdapterIPInfo\":[{\"physicalNode\":\"xlzgsjgkzzl\",\"ipv4Address\":\"fhbzffovwmbjlzq\",\"subnetMask\":\"zpgvdwnapfd\"}]},{\"name\":\"owftptnuwjtks\",\"networkAdapterName\":\"gcgqyhleseyqrhvy\",\"storageVlanId\":\"dotjvdk\",\"storageAdapterIPInfo\":[{\"physicalNode\":\"skukjtasbv\",\"ipv4Address\":\"spkxkdt\",\"subnetMask\":\"kndlqvtwknvg\"},{\"physicalNode\":\"bugtywatmqa\",\"ipv4Address\":\"ueatgroe\",\"subnetMask\":\"oygzcbyfqxkfao\"}]}],\"storageConnectivitySwitchless\":true,\"enableStorageAutoIp\":false}") .toObject(HciEdgeDeviceHostNetwork.class); } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - HciEdgeDeviceHostNetwork model = new HciEdgeDeviceHostNetwork(); - model = BinaryData.fromObject(model).toObject(HciEdgeDeviceHostNetwork.class); - } } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/HciEdgeDeviceIntentsTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/HciEdgeDeviceIntentsTests.java index b4dad8a6d8c6..d57533d00131 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/HciEdgeDeviceIntentsTests.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/HciEdgeDeviceIntentsTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.generated; @@ -11,13 +11,7 @@ public final class HciEdgeDeviceIntentsTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { HciEdgeDeviceIntents model = BinaryData.fromString( - "{\"scope\":5264572526538561832,\"intentType\":175416950845015202,\"isComputeIntentSet\":true,\"isStorageIntentSet\":false,\"isOnlyStorage\":true,\"isManagementIntentSet\":false,\"isStretchIntentSet\":false,\"isOnlyStretch\":false,\"isNetworkIntentType\":true,\"intentName\":\"ygywe\",\"intentAdapters\":[\"iecafygzmxi\",\"qv\",\"smaklixqcahy\"],\"overrideVirtualSwitchConfiguration\":true,\"virtualSwitchConfigurationOverrides\":{\"enableIov\":\"bx\",\"loadBalancingAlgorithm\":\"oij\"},\"overrideQosPolicy\":false,\"qosPolicyOverrides\":{\"priorityValue8021Action_Cluster\":\"lxp\",\"priorityValue8021Action_SMB\":\"wjdjodqhykin\",\"bandwidthPercentage_SMB\":\"rem\"},\"overrideAdapterProperty\":false,\"adapterPropertyOverrides\":{\"jumboPacket\":\"zhceumoqodk\",\"networkDirect\":\"ppyi\",\"networkDirectTechnology\":\"gqladywrxwhyd\"}}") + "{\"scope\":4905549273641226885,\"intentType\":8067959356414385637,\"isComputeIntentSet\":false,\"isStorageIntentSet\":true,\"isOnlyStorage\":true,\"isManagementIntentSet\":false,\"isStretchIntentSet\":false,\"isOnlyStretch\":true,\"isNetworkIntentType\":false,\"intentName\":\"dljdjuskb\",\"intentAdapters\":[\"qyn\"],\"overrideVirtualSwitchConfiguration\":true,\"virtualSwitchConfigurationOverrides\":{\"enableIov\":\"faqegplwryshwddk\",\"loadBalancingAlgorithm\":\"xgkqusybwp\"},\"overrideQosPolicy\":false,\"qosPolicyOverrides\":{\"priorityValue8021Action_Cluster\":\"rvv\",\"priorityValue8021Action_SMB\":\"ntymtpoiwenazero\",\"bandwidthPercentage_SMB\":\"rs\"},\"overrideAdapterProperty\":false,\"adapterPropertyOverrides\":{\"jumboPacket\":\"kdnwqapfgsdpcve\",\"networkDirect\":\"mzhhkuuipldqqc\",\"networkDirectTechnology\":\"kva\"}}") .toObject(HciEdgeDeviceIntents.class); } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - HciEdgeDeviceIntents model = new HciEdgeDeviceIntents(); - model = BinaryData.fromObject(model).toObject(HciEdgeDeviceIntents.class); - } } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/HciEdgeDeviceJobPropertiesTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/HciEdgeDeviceJobPropertiesTests.java new file mode 100644 index 000000000000..6527bd7de737 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/HciEdgeDeviceJobPropertiesTests.java @@ -0,0 +1,27 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.azurestackhci.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.azurestackhci.models.DeploymentMode; +import com.azure.resourcemanager.azurestackhci.models.HciEdgeDeviceJobProperties; +import org.junit.jupiter.api.Assertions; + +public final class HciEdgeDeviceJobPropertiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + HciEdgeDeviceJobProperties model = BinaryData.fromString( + "{\"jobType\":\"HciEdgeDeviceJobProperties\",\"deploymentMode\":\"Deploy\",\"provisioningState\":\"Updating\",\"jobId\":\"xsspuunnoxyhk\",\"startTimeUtc\":\"2021-05-10T01:50:40Z\",\"endTimeUtc\":\"2021-07-24T05:54:49Z\",\"status\":\"DeploymentInProgress\"}") + .toObject(HciEdgeDeviceJobProperties.class); + Assertions.assertEquals(DeploymentMode.DEPLOY, model.deploymentMode()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + HciEdgeDeviceJobProperties model = new HciEdgeDeviceJobProperties().withDeploymentMode(DeploymentMode.DEPLOY); + model = BinaryData.fromObject(model).toObject(HciEdgeDeviceJobProperties.class); + Assertions.assertEquals(DeploymentMode.DEPLOY, model.deploymentMode()); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/HciEdgeDeviceJobTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/HciEdgeDeviceJobTests.java new file mode 100644 index 000000000000..2e94f3f94b1b --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/HciEdgeDeviceJobTests.java @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.azurestackhci.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.azurestackhci.models.DeploymentMode; +import com.azure.resourcemanager.azurestackhci.models.HciEdgeDeviceJob; +import com.azure.resourcemanager.azurestackhci.models.HciEdgeDeviceJobProperties; +import org.junit.jupiter.api.Assertions; + +public final class HciEdgeDeviceJobTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + HciEdgeDeviceJob model = BinaryData.fromString( + "{\"kind\":\"HCI\",\"properties\":{\"jobType\":\"HciEdgeDeviceJobProperties\",\"deploymentMode\":\"Validate\",\"provisioningState\":\"DisableInProgress\",\"jobId\":\"db\",\"startTimeUtc\":\"2021-04-02T13:31:14Z\",\"endTimeUtc\":\"2021-12-04T11:59:28Z\",\"status\":\"ValidationInProgress\"},\"id\":\"fukuvsjcswsmystu\",\"name\":\"uqypfcvle\",\"type\":\"chpqbmfpjba\"}") + .toObject(HciEdgeDeviceJob.class); + Assertions.assertEquals(DeploymentMode.VALIDATE, model.properties().deploymentMode()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + HciEdgeDeviceJob model = new HciEdgeDeviceJob() + .withProperties(new HciEdgeDeviceJobProperties().withDeploymentMode(DeploymentMode.VALIDATE)); + model = BinaryData.fromObject(model).toObject(HciEdgeDeviceJob.class); + Assertions.assertEquals(DeploymentMode.VALIDATE, model.properties().deploymentMode()); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/HciEdgeDeviceStorageAdapterIpInfoTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/HciEdgeDeviceStorageAdapterIpInfoTests.java index 03be4e81d1f5..b34b3749a92d 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/HciEdgeDeviceStorageAdapterIpInfoTests.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/HciEdgeDeviceStorageAdapterIpInfoTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.generated; @@ -11,14 +11,7 @@ public final class HciEdgeDeviceStorageAdapterIpInfoTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { HciEdgeDeviceStorageAdapterIpInfo model = BinaryData - .fromString( - "{\"physicalNode\":\"fratqxmbjroumzz\",\"ipv4Address\":\"al\",\"subnetMask\":\"rhuzgfxonjtpu\"}") + .fromString("{\"physicalNode\":\"cgjokjljnhvlq\",\"ipv4Address\":\"ek\",\"subnetMask\":\"eksnbksdqhjvyk\"}") .toObject(HciEdgeDeviceStorageAdapterIpInfo.class); } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - HciEdgeDeviceStorageAdapterIpInfo model = new HciEdgeDeviceStorageAdapterIpInfo(); - model = BinaryData.fromObject(model).toObject(HciEdgeDeviceStorageAdapterIpInfo.class); - } } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/HciEdgeDeviceStorageNetworksTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/HciEdgeDeviceStorageNetworksTests.java index 153d3f59a389..a34a747e325d 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/HciEdgeDeviceStorageNetworksTests.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/HciEdgeDeviceStorageNetworksTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.generated; @@ -11,13 +11,7 @@ public final class HciEdgeDeviceStorageNetworksTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { HciEdgeDeviceStorageNetworks model = BinaryData.fromString( - "{\"name\":\"nwyrmouv\",\"networkAdapterName\":\"gmokzkltrfowt\",\"storageVlanId\":\"rfmvlihcvjdrqcrj\",\"storageAdapterIPInfo\":[{\"physicalNode\":\"tuk\",\"ipv4Address\":\"dxlwyojbfqz\",\"subnetMask\":\"fnjyix\"}]}") + "{\"name\":\"imipskdyzatvfuz\",\"networkAdapterName\":\"ftjvvruxwigsye\",\"storageVlanId\":\"qdsmjtg\",\"storageAdapterIPInfo\":[{\"physicalNode\":\"gkkileplkcsmkn\",\"ipv4Address\":\"tbbaedorvvmqf\",\"subnetMask\":\"ygbdgwumgxdgdhpa\"},{\"physicalNode\":\"dexjddvjs\",\"ipv4Address\":\"wotmmwllcolsrsxa\",\"subnetMask\":\"efh\"}]}") .toObject(HciEdgeDeviceStorageNetworks.class); } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - HciEdgeDeviceStorageNetworks model = new HciEdgeDeviceStorageNetworks(); - model = BinaryData.fromObject(model).toObject(HciEdgeDeviceStorageNetworks.class); - } } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/HciEdgeDeviceVirtualSwitchConfigurationOverridesTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/HciEdgeDeviceVirtualSwitchConfigurationOverridesTests.java index caee958afba4..a2d6bd343411 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/HciEdgeDeviceVirtualSwitchConfigurationOverridesTests.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/HciEdgeDeviceVirtualSwitchConfigurationOverridesTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.generated; @@ -11,13 +11,7 @@ public final class HciEdgeDeviceVirtualSwitchConfigurationOverridesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { HciEdgeDeviceVirtualSwitchConfigurationOverrides model - = BinaryData.fromString("{\"enableIov\":\"uvvadswzsnu\",\"loadBalancingAlgorithm\":\"mlowuowhl\"}") + = BinaryData.fromString("{\"enableIov\":\"l\",\"loadBalancingAlgorithm\":\"jqvq\"}") .toObject(HciEdgeDeviceVirtualSwitchConfigurationOverrides.class); } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - HciEdgeDeviceVirtualSwitchConfigurationOverrides model = new HciEdgeDeviceVirtualSwitchConfigurationOverrides(); - model = BinaryData.fromObject(model).toObject(HciEdgeDeviceVirtualSwitchConfigurationOverrides.class); - } } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/HciHardwareProfileTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/HciHardwareProfileTests.java new file mode 100644 index 000000000000..fca334a7d5f4 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/HciHardwareProfileTests.java @@ -0,0 +1,16 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.azurestackhci.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.azurestackhci.models.HciHardwareProfile; + +public final class HciHardwareProfileTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + HciHardwareProfile model + = BinaryData.fromString("{\"processorType\":\"jj\"}").toObject(HciHardwareProfile.class); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/HciNetworkProfileTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/HciNetworkProfileTests.java index 10ebe967b14c..b69efdb6927c 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/HciNetworkProfileTests.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/HciNetworkProfileTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.generated; @@ -11,13 +11,7 @@ public final class HciNetworkProfileTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { HciNetworkProfile model = BinaryData.fromString( - "{\"nicDetails\":[{\"adapterName\":\"a\",\"interfaceDescription\":\"d\",\"componentId\":\"owftptnuwjtks\",\"driverVersion\":\"gcgqyhleseyqrhvy\",\"ip4Address\":\"dotjvdk\",\"subnetMask\":\"swskuk\",\"defaultGateway\":\"asbvw\",\"dnsServers\":[\"kxkdtxfkndlq\",\"twknvgm\",\"bugtywatmqa\"],\"defaultIsolationId\":\"ueatgroe\",\"macAddress\":\"oygzcbyfqxkfao\",\"slot\":\"ehqpuvjmvqmt\",\"switchName\":\"ckygroejnndljdju\",\"nicType\":\"br\",\"vlanId\":\"qyn\",\"nicStatus\":\"eysfaqegplw\"},{\"adapterName\":\"shwddkvbxgk\",\"interfaceDescription\":\"sybwptdaca\",\"componentId\":\"vlf\",\"driverVersion\":\"ymtpo\",\"ip4Address\":\"enazerohzrsqals\",\"subnetMask\":\"dnwqapfg\",\"defaultGateway\":\"pcvessm\",\"dnsServers\":[\"kuui\"],\"defaultIsolationId\":\"dqq\",\"macAddress\":\"ekvalblhtjq\",\"slot\":\"yvwehtaemxh\",\"switchName\":\"ysev\",\"nicType\":\"xivzrrry\",\"vlanId\":\"imipskdyzatvfuz\",\"nicStatus\":\"ftjvvruxwigsye\"}],\"switchDetails\":[{\"switchName\":\"smjtgrqgdg\",\"switchType\":\"ileplk\",\"extensions\":[{\"switchId\":\"nhwtbbaedorvv\",\"extensionName\":\"floygbdgwumg\",\"extensionEnabled\":true},{\"switchId\":\"hpabgdexjddvjs\",\"extensionName\":\"wotmmwllcolsrsxa\",\"extensionEnabled\":false},{\"switchId\":\"hexcgjokj\",\"extensionName\":\"nhvlqjbekp\",\"extensionEnabled\":true},{\"switchId\":\"nbksd\",\"extensionName\":\"jvyklxeslkhhust\",\"extensionEnabled\":true}]},{\"switchName\":\"mavnw\",\"switchType\":\"wgoknlejjjkx\",\"extensions\":[{\"switchId\":\"dbkjbztensvkzykj\",\"extensionName\":\"kns\",\"extensionEnabled\":false}]}],\"hostNetwork\":{\"intents\":[{\"scope\":3770036618007889355,\"intentType\":1353614778272495445,\"isComputeIntentSet\":true,\"isStorageIntentSet\":true,\"isOnlyStorage\":false,\"isManagementIntentSet\":true,\"isStretchIntentSet\":true,\"isOnlyStretch\":true,\"isNetworkIntentType\":true,\"intentName\":\"iojfizfavkjzwfbc\",\"intentAdapters\":[\"kmmfzsbf\"],\"overrideVirtualSwitchConfiguration\":false,\"virtualSwitchConfigurationOverrides\":{\"enableIov\":\"mdew\",\"loadBalancingAlgorithm\":\"sxkrpl\"},\"overrideQosPolicy\":false,\"qosPolicyOverrides\":{\"priorityValue8021Action_Cluster\":\"jwwviy\",\"priorityValue8021Action_SMB\":\"ps\",\"bandwidthPercentage_SMB\":\"brnnhjxsqw\"},\"overrideAdapterProperty\":false,\"adapterPropertyOverrides\":{\"jumboPacket\":\"iwetpoz\",\"networkDirect\":\"yqiq\",\"networkDirectTechnology\":\"gfsetzlexbsfled\"}},{\"scope\":1059667213155594748,\"intentType\":2377826274208765627,\"isComputeIntentSet\":false,\"isStorageIntentSet\":false,\"isOnlyStorage\":true,\"isManagementIntentSet\":false,\"isStretchIntentSet\":false,\"isOnlyStretch\":false,\"isNetworkIntentType\":true,\"intentName\":\"ljselp\",\"intentAdapters\":[\"afvafh\",\"by\",\"ccbevxrhyzdf\",\"rsofpltdbmairrh\"],\"overrideVirtualSwitchConfiguration\":false,\"virtualSwitchConfigurationOverrides\":{\"enableIov\":\"acwn\",\"loadBalancingAlgorithm\":\"igtuu\"},\"overrideQosPolicy\":true,\"qosPolicyOverrides\":{\"priorityValue8021Action_Cluster\":\"dawsigrbjb\",\"priorityValue8021Action_SMB\":\"jybvit\",\"bandwidthPercentage_SMB\":\"kjyaznumtg\"},\"overrideAdapterProperty\":false,\"adapterPropertyOverrides\":{\"jumboPacket\":\"ch\",\"networkDirect\":\"fnkf\",\"networkDirectTechnology\":\"lv\"}},{\"scope\":573222547469009901,\"intentType\":7797656373542961673,\"isComputeIntentSet\":true,\"isStorageIntentSet\":true,\"isOnlyStorage\":false,\"isManagementIntentSet\":false,\"isStretchIntentSet\":true,\"isOnlyStretch\":true,\"isNetworkIntentType\":false,\"intentName\":\"yxl\",\"intentAdapters\":[\"phvxz\",\"wxh\"],\"overrideVirtualSwitchConfiguration\":false,\"virtualSwitchConfigurationOverrides\":{\"enableIov\":\"lkexaonwivkcqh\",\"loadBalancingAlgorithm\":\"hxknlccrmmkyupi\"},\"overrideQosPolicy\":true,\"qosPolicyOverrides\":{\"priorityValue8021Action_Cluster\":\"jfkakfqfrke\",\"priorityValue8021Action_SMB\":\"il\",\"bandwidthPercentage_SMB\":\"dxjascowvfdj\"},\"overrideAdapterProperty\":false,\"adapterPropertyOverrides\":{\"jumboPacket\":\"hlkks\",\"networkDirect\":\"gzv\",\"networkDirectTechnology\":\"ij\"}},{\"scope\":3551520708660525031,\"intentType\":8691287452802237502,\"isComputeIntentSet\":false,\"isStorageIntentSet\":false,\"isOnlyStorage\":false,\"isManagementIntentSet\":false,\"isStretchIntentSet\":false,\"isOnlyStretch\":false,\"isNetworkIntentType\":false,\"intentName\":\"qulsutrjbhxykfhy\",\"intentAdapters\":[\"vqqugdrftbcv\",\"xreuquowtlj\",\"fwhreagkhyxv\",\"qtvbczsu\"],\"overrideVirtualSwitchConfiguration\":true,\"virtualSwitchConfigurationOverrides\":{\"enableIov\":\"lmepjpf\",\"loadBalancingAlgorithm\":\"ykgsangpszng\"},\"overrideQosPolicy\":false,\"qosPolicyOverrides\":{\"priorityValue8021Action_Cluster\":\"lkvec\",\"priorityValue8021Action_SMB\":\"jcngoadyed\",\"bandwidthPercentage_SMB\":\"rgjfoknubnoi\"},\"overrideAdapterProperty\":false,\"adapterPropertyOverrides\":{\"jumboPacket\":\"trgdgxvc\",\"networkDirect\":\"raswugyxpqit\",\"networkDirectTechnology\":\"ialwv\"}}],\"storageNetworks\":[{\"name\":\"hzacaqtyltco\",\"networkAdapterName\":\"ujpdsxzak\",\"storageVlanId\":\"jkmvbi\",\"storageAdapterIPInfo\":[{\"physicalNode\":\"fqcvovj\",\"ipv4Address\":\"ycsjmlbem\",\"subnetMask\":\"jiriuxeg\"},{\"physicalNode\":\"ortudawlpjfel\",\"ipv4Address\":\"rpptcbgqnzmnhiil\",\"subnetMask\":\"lwcjgckbbcccgzpr\"},{\"physicalNode\":\"xnyuffatsgftipwc\",\"ipv4Address\":\"yubhiqdx\",\"subnetMask\":\"rnpnuhzafccnuh\"},{\"physicalNode\":\"gbylbuig\",\"ipv4Address\":\"vatvcrkd\",\"subnetMask\":\"nbqxvhcsyhzlwxae\"}]},{\"name\":\"vurex\",\"networkAdapterName\":\"d\",\"storageVlanId\":\"dwead\",\"storageAdapterIPInfo\":[{\"physicalNode\":\"wntopag\",\"ipv4Address\":\"mvmmagoaqylkjz\",\"subnetMask\":\"iua\"},{\"physicalNode\":\"cgm\",\"ipv4Address\":\"tpfinzcpdltkr\",\"subnetMask\":\"jmtbd\"},{\"physicalNode\":\"cqguef\",\"ipv4Address\":\"ompheqdur\",\"subnetMask\":\"yujlfyoumpckyecl\"}]}],\"storageConnectivitySwitchless\":true,\"enableStorageAutoIp\":true}}") + "{\"nicDetails\":[{\"adapterName\":\"xkym\",\"interfaceDescription\":\"anxrj\",\"componentId\":\"xtwbta\",\"driverVersion\":\"pnyghs\",\"ip4Address\":\"cyl\",\"subnetMask\":\"gmnsghpxy\",\"defaultGateway\":\"hdrwjjkh\",\"dnsServers\":[\"macl\",\"zvxnqmhrp\",\"pd\",\"wmkoisq\"],\"defaultIsolationId\":\"sffxui\",\"macAddress\":\"csypobkdqzrdzsyl\",\"slot\":\"lgtrczzy\",\"switchName\":\"xzji\",\"nicType\":\"vuaurk\",\"vlanId\":\"ci\",\"nicStatus\":\"defxrdc\",\"rdmaCapability\":\"Disabled\"},{\"adapterName\":\"kkjanurnnqbnqbp\",\"interfaceDescription\":\"xqltgrd\",\"componentId\":\"ypxrx\",\"driverVersion\":\"fihwu\",\"ip4Address\":\"ctafsrbxrblm\",\"subnetMask\":\"owxih\",\"defaultGateway\":\"nxw\",\"dnsServers\":[\"nepzwakls\",\"sbq\"],\"defaultIsolationId\":\"agwwrxaom\",\"macAddress\":\"sgl\",\"slot\":\"czezkhhlt\",\"switchName\":\"adhqoa\",\"nicType\":\"qoyueayfbpcmsplb\",\"vlanId\":\"rueqthwm\",\"nicStatus\":\"mbscbbx\",\"rdmaCapability\":\"Disabled\"},{\"adapterName\":\"xiidloped\",\"interfaceDescription\":\"dpyqyybxubmd\",\"componentId\":\"fcbqwremjela\",\"driverVersion\":\"cigeleohdbvqvw\",\"ip4Address\":\"jopwbeonrlkwz\",\"subnetMask\":\"ybxc\",\"defaultGateway\":\"kxcpt\",\"dnsServers\":[\"fyiaseqch\",\"rttzrazisgykiu\",\"mvanbwzo\"],\"defaultIsolationId\":\"nrxxbsojklin\",\"macAddress\":\"dptysprqs\",\"slot\":\"zxojpslsv\",\"switchName\":\"pli\",\"nicType\":\"iqwoyxqvapcoh\",\"vlanId\":\"ucqpqojxcxzrz\",\"nicStatus\":\"gdzbenr\",\"rdmaCapability\":\"Disabled\"}],\"switchDetails\":[{\"switchName\":\"tzqdd\",\"switchType\":\"wflj\",\"extensions\":[{\"switchId\":\"mtuatmzwcjjncqtj\",\"extensionName\":\"izvg\",\"extensionEnabled\":false},{\"switchId\":\"zuuvbxngrebw\",\"extensionName\":\"ahttzlswvajqfut\",\"extensionEnabled\":false},{\"switchId\":\"qzasunwqrjzfrgqh\",\"extensionName\":\"hcmbuocnjrohmbp\",\"extensionEnabled\":false}]},{\"switchName\":\"ameb\",\"switchType\":\"dyvkfkmr\",\"extensions\":[{\"switchId\":\"e\",\"extensionName\":\"sm\",\"extensionEnabled\":false}]},{\"switchName\":\"fpyapucygvoavyu\",\"switchType\":\"sxlghieegjlg\",\"extensions\":[{\"switchId\":\"seksgbux\",\"extensionName\":\"tu\",\"extensionEnabled\":false},{\"switchId\":\"gaqi\",\"extensionName\":\"rpiwrqofulo\",\"extensionEnabled\":false}]},{\"switchName\":\"lexwhcbjp\",\"switchType\":\"k\",\"extensions\":[{\"switchId\":\"uuerctatoyi\",\"extensionName\":\"qpbrlc\",\"extensionEnabled\":false}]}],\"hostNetwork\":{\"intents\":[{\"scope\":1359574886518533297,\"intentType\":3170849573195747250,\"isComputeIntentSet\":true,\"isStorageIntentSet\":false,\"isOnlyStorage\":false,\"isManagementIntentSet\":false,\"isStretchIntentSet\":true,\"isOnlyStretch\":false,\"isNetworkIntentType\":true,\"intentName\":\"st\",\"intentAdapters\":[\"aqnrmvvfkoxmlg\",\"ktuidvrm\",\"zlpdwwex\",\"mzvlazipbh\"],\"overrideVirtualSwitchConfiguration\":false,\"virtualSwitchConfigurationOverrides\":{\"enableIov\":\"gnyyuuzivens\",\"loadBalancingAlgorithm\":\"meyyvpkpatlb\"},\"overrideQosPolicy\":false,\"qosPolicyOverrides\":{\"priorityValue8021Action_Cluster\":\"sksrfhfvolmknbn\",\"priorityValue8021Action_SMB\":\"cdommpvfqaw\",\"bandwidthPercentage_SMB\":\"gbrt\"},\"overrideAdapterProperty\":false,\"adapterPropertyOverrides\":{\"jumboPacket\":\"lkiexhajlfnthiq\",\"networkDirect\":\"uttdiygbp\",\"networkDirectTechnology\":\"wswmt\"}},{\"scope\":5706511619537085465,\"intentType\":5839392965763051176,\"isComputeIntentSet\":false,\"isStorageIntentSet\":false,\"isOnlyStorage\":false,\"isManagementIntentSet\":false,\"isStretchIntentSet\":true,\"isOnlyStretch\":false,\"isNetworkIntentType\":false,\"intentName\":\"yvneeza\",\"intentAdapters\":[\"htmoqqtlffhzbkr\"],\"overrideVirtualSwitchConfiguration\":false,\"virtualSwitchConfigurationOverrides\":{\"enableIov\":\"vfqnvhnqoewdo\",\"loadBalancingAlgorithm\":\"yetesy\"},\"overrideQosPolicy\":false,\"qosPolicyOverrides\":{\"priorityValue8021Action_Cluster\":\"ztjhqtfbovnynkbw\",\"priorityValue8021Action_SMB\":\"njuhpsprkzya\",\"bandwidthPercentage_SMB\":\"ia\"},\"overrideAdapterProperty\":false,\"adapterPropertyOverrides\":{\"jumboPacket\":\"fbwqrooht\",\"networkDirect\":\"vmaonurjt\",\"networkDirectTechnology\":\"ghihpvecms\"}}],\"storageNetworks\":[{\"name\":\"lyjxltbsjus\",\"networkAdapterName\":\"sfxigctmgx\",\"storageVlanId\":\"pbezqccydrtceu\",\"storageAdapterIPInfo\":[{\"physicalNode\":\"ky\",\"ipv4Address\":\"ztgeqmgqzgwld\",\"subnetMask\":\"chillcecf\"},{\"physicalNode\":\"uwaoaguhicqlli\",\"ipv4Address\":\"tac\",\"subnetMask\":\"vhrweftkwqejpmv\"},{\"physicalNode\":\"ehaepwamcxtc\",\"ipv4Address\":\"upeuknijduyye\",\"subnetMask\":\"ydjfb\"},{\"physicalNode\":\"yv\",\"ipv4Address\":\"ulrtywikdmh\",\"subnetMask\":\"kuflgbh\"}]}],\"storageConnectivitySwitchless\":true,\"enableStorageAutoIp\":false}}") .toObject(HciNetworkProfile.class); } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - HciNetworkProfile model = new HciNetworkProfile(); - model = BinaryData.fromObject(model).toObject(HciNetworkProfile.class); - } } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/HciNicDetailTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/HciNicDetailTests.java index b751b228383f..9bb6705782ee 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/HciNicDetailTests.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/HciNicDetailTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.generated; @@ -11,13 +11,7 @@ public final class HciNicDetailTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { HciNicDetail model = BinaryData.fromString( - "{\"adapterName\":\"ajbrzmqxucy\",\"interfaceDescription\":\"joclxiutgjcyzy\",\"componentId\":\"dnrqjbtxj\",\"driverVersion\":\"oqa\",\"ip4Address\":\"z\",\"subnetMask\":\"hfw\",\"defaultGateway\":\"uatbwbqamteuliy\",\"dnsServers\":[\"kcvmwfauxxepmy\",\"bormcqmiciijqpkz\"],\"defaultIsolationId\":\"ojxjmcsmyqwix\",\"macAddress\":\"pwnkwywzwo\",\"slot\":\"lickduoi\",\"switchName\":\"amt\",\"nicType\":\"sknxrwzawnvsbcf\",\"vlanId\":\"agxnvhycvdimw\",\"nicStatus\":\"regzgyufutrwpwer\"}") + "{\"adapterName\":\"ixmxufrsryjqgdkf\",\"interfaceDescription\":\"zoeo\",\"componentId\":\"vjhvefgwbm\",\"driverVersion\":\"c\",\"ip4Address\":\"tasfaymxbulpzeal\",\"subnetMask\":\"qkyojwyvf\",\"defaultGateway\":\"btsuahxs\",\"dnsServers\":[\"cmmzrrs\",\"ubiwsdrnpxq\",\"odiffjxcjrmmua\"],\"defaultIsolationId\":\"ibvjogjonmcy\",\"macAddress\":\"oyzbamwineofvf\",\"slot\":\"kpoldtvevboc\",\"switchName\":\"hzjkn\",\"nicType\":\"xgvttxp\",\"vlanId\":\"upzaamrdixtre\",\"nicStatus\":\"dswys\",\"rdmaCapability\":\"Disabled\"}") .toObject(HciNicDetail.class); } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - HciNicDetail model = new HciNicDetail(); - model = BinaryData.fromObject(model).toObject(HciNicDetail.class); - } } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/HciOsProfileTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/HciOsProfileTests.java index 8fd0cd505b59..e171ee84d3eb 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/HciOsProfileTests.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/HciOsProfileTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.generated; @@ -10,13 +10,7 @@ public final class HciOsProfileTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - HciOsProfile model - = BinaryData.fromString("{\"bootType\":\"l\",\"assemblyVersion\":\"pvti\"}").toObject(HciOsProfile.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - HciOsProfile model = new HciOsProfile(); - model = BinaryData.fromObject(model).toObject(HciOsProfile.class); + HciOsProfile model = BinaryData.fromString("{\"bootType\":\"eslk\",\"assemblyVersion\":\"ustcpoq\"}") + .toObject(HciOsProfile.class); } } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/HciRemoteSupportJobPropertiesTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/HciRemoteSupportJobPropertiesTests.java new file mode 100644 index 000000000000..b04a7b6aff35 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/HciRemoteSupportJobPropertiesTests.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.azurestackhci.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.azurestackhci.models.DeploymentMode; +import com.azure.resourcemanager.azurestackhci.models.HciRemoteSupportJobProperties; +import com.azure.resourcemanager.azurestackhci.models.RemoteSupportAccessLevel; +import com.azure.resourcemanager.azurestackhci.models.RemoteSupportType; +import java.time.OffsetDateTime; +import org.junit.jupiter.api.Assertions; + +public final class HciRemoteSupportJobPropertiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + HciRemoteSupportJobProperties model = BinaryData.fromString( + "{\"jobType\":\"RemoteSupport\",\"accessLevel\":\"DiagnosticsAndRepair\",\"expirationTimestamp\":\"2021-05-15T15:16:26Z\",\"type\":\"Enable\",\"reportedProperties\":{\"percentComplete\":1649651263,\"validationStatus\":{\"status\":\"fvnz\",\"steps\":[{\"name\":\"otp\",\"description\":\"pvpbdbzqgqqiheds\",\"fullStepIndex\":\"wthmkyib\",\"startTimeUtc\":\"sihsgqcwdhohsd\",\"endTimeUtc\":\"cdzsu\",\"status\":\"ohdxbzlmcmu\",\"steps\":[{}],\"exception\":[\"dbevwqqxeysko\",\"qzinkfkbg\",\"z\",\"owxeqocljmy\"]},{\"name\":\"kzq\",\"description\":\"jeokbzefezrxccz\",\"fullStepIndex\":\"tleipqxbkw\",\"startTimeUtc\":\"gnzvdfbzdixzm\",\"endTimeUtc\":\"noda\",\"status\":\"pqhe\",\"steps\":[{},{},{},{}],\"exception\":[\"cgsbost\",\"eln\",\"la\",\"utmzlbiojlvfhrbb\"]},{\"name\":\"eqvcwwyyurmoch\",\"description\":\"rprsnm\",\"fullStepIndex\":\"ayzejnhlbkpbz\",\"startTimeUtc\":\"piljhahzvech\",\"endTimeUtc\":\"bnwieholew\",\"status\":\"iuubwefqsf\",\"steps\":[{},{}],\"exception\":[\"ferr\"]}]},\"deploymentStatus\":{\"status\":\"x\",\"steps\":[{\"name\":\"xap\",\"description\":\"og\",\"fullStepIndex\":\"nobpudcdabtqwpw\",\"startTimeUtc\":\"wbzasqbuclj\",\"endTimeUtc\":\"yexaoguy\",\"status\":\"p\",\"steps\":[{},{},{}],\"exception\":[\"ultxijjumfq\"]},{\"name\":\"z\",\"description\":\"qnmcjngzqdqx\",\"fullStepIndex\":\"jw\",\"startTimeUtc\":\"yfu\",\"endTimeUtc\":\"zsvtuikzhajqgl\",\"status\":\"hm\",\"steps\":[{},{}],\"exception\":[\"xynqnz\",\"dpsovwxznptgo\"]},{\"name\":\"ybbabpfhvfsl\",\"description\":\"ntjlr\",\"fullStepIndex\":\"jkskyr\",\"startTimeUtc\":\"ovzidsx\",\"endTimeUtc\":\"abzmifrygznmmaxr\",\"status\":\"kzobgopxlhsln\",\"steps\":[{},{},{}],\"exception\":[\"ixynllxecwcrojp\",\"slhcawjutifd\",\"fmvigorqjbttzh\",\"aglkafhon\"]},{\"name\":\"ujeickp\",\"description\":\"cpopmxel\",\"fullStepIndex\":\"clt\",\"startTimeUtc\":\"edexxmlfm\",\"endTimeUtc\":\"scazuawxtzxpu\",\"status\":\"wabzxrvxcushsp\",\"steps\":[{},{},{}],\"exception\":[\"xyasflvgsgzw\",\"wakoihkn\",\"mjblmljhlny\",\"zotqyryuzcb\"]}]},\"nodeSettings\":{\"state\":\"vxmvw\",\"createdAt\":\"2021-07-14T04:41:04Z\",\"updatedAt\":\"2021-10-07T06:26:08Z\",\"connectionStatus\":\"onsupeujlz\",\"connectionErrorMessage\":\"hcvsqltnzoi\"},\"sessionDetails\":[{\"sessionId\":\"gnxf\",\"sessionStartTime\":\"2021-02-25T22:29:12Z\",\"sessionEndTime\":\"2021-01-20T15:12:39Z\",\"accessLevel\":\"Diagnostics\",\"transcriptLocation\":\"xwdofdb\"},{\"sessionId\":\"qxeiiqbimhtmwwi\",\"sessionStartTime\":\"2021-05-18T05:24:37Z\",\"sessionEndTime\":\"2021-09-13T06:46:21Z\",\"accessLevel\":\"DiagnosticsAndRepair\",\"transcriptLocation\":\"fvwbcb\"}]},\"deploymentMode\":\"Validate\",\"provisioningState\":\"Updating\",\"jobId\":\"bwvqvxkdi\",\"startTimeUtc\":\"2020-12-27T09:18:38Z\",\"endTimeUtc\":\"2021-09-02T01:31:57Z\",\"status\":\"ValidationFailed\"}") + .toObject(HciRemoteSupportJobProperties.class); + Assertions.assertEquals(DeploymentMode.VALIDATE, model.deploymentMode()); + Assertions.assertEquals(RemoteSupportAccessLevel.DIAGNOSTICS_AND_REPAIR, model.accessLevel()); + Assertions.assertEquals(OffsetDateTime.parse("2021-05-15T15:16:26Z"), model.expirationTimestamp()); + Assertions.assertEquals(RemoteSupportType.ENABLE, model.type()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + HciRemoteSupportJobProperties model + = new HciRemoteSupportJobProperties().withDeploymentMode(DeploymentMode.VALIDATE) + .withAccessLevel(RemoteSupportAccessLevel.DIAGNOSTICS_AND_REPAIR) + .withExpirationTimestamp(OffsetDateTime.parse("2021-05-15T15:16:26Z")) + .withType(RemoteSupportType.ENABLE); + model = BinaryData.fromObject(model).toObject(HciRemoteSupportJobProperties.class); + Assertions.assertEquals(DeploymentMode.VALIDATE, model.deploymentMode()); + Assertions.assertEquals(RemoteSupportAccessLevel.DIAGNOSTICS_AND_REPAIR, model.accessLevel()); + Assertions.assertEquals(OffsetDateTime.parse("2021-05-15T15:16:26Z"), model.expirationTimestamp()); + Assertions.assertEquals(RemoteSupportType.ENABLE, model.type()); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/HciStorageProfileTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/HciStorageProfileTests.java new file mode 100644 index 000000000000..66dfd1377ec2 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/HciStorageProfileTests.java @@ -0,0 +1,16 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.azurestackhci.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.azurestackhci.models.HciStorageProfile; + +public final class HciStorageProfileTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + HciStorageProfile model + = BinaryData.fromString("{\"poolableDisksCount\":8841068024570630650}").toObject(HciStorageProfile.class); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/HciValidationFailureDetailTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/HciValidationFailureDetailTests.java index f78825e105a3..e2a6a8dcfb61 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/HciValidationFailureDetailTests.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/HciValidationFailureDetailTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.generated; @@ -11,12 +11,6 @@ public final class HciValidationFailureDetailTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { HciValidationFailureDetail model - = BinaryData.fromString("{\"exception\":\"ytmhdroznnhdrlkt\"}").toObject(HciValidationFailureDetail.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - HciValidationFailureDetail model = new HciValidationFailureDetail(); - model = BinaryData.fromObject(model).toObject(HciValidationFailureDetail.class); + = BinaryData.fromString("{\"exception\":\"plzgaufcshhvn\"}").toObject(HciValidationFailureDetail.class); } } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/InfrastructureNetworkTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/InfrastructureNetworkTests.java index 749bb5e567e1..170ac441211d 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/InfrastructureNetworkTests.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/InfrastructureNetworkTests.java @@ -1,10 +1,12 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.generated; import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.azurestackhci.models.DnsServerConfig; +import com.azure.resourcemanager.azurestackhci.models.DnsZones; import com.azure.resourcemanager.azurestackhci.models.InfrastructureNetwork; import com.azure.resourcemanager.azurestackhci.models.IpPools; import java.util.Arrays; @@ -14,29 +16,42 @@ public final class InfrastructureNetworkTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { InfrastructureNetwork model = BinaryData.fromString( - "{\"subnetMask\":\"tpnapnyiropuhpig\",\"gateway\":\"gylgqgitxmedjvcs\",\"ipPools\":[{\"startingAddress\":\"wwncwzzhxgk\",\"endingAddress\":\"mgucna\"}],\"dnsServers\":[\"eoellwptfdygp\"],\"useDhcp\":false}") + "{\"subnetMask\":\"n\",\"gateway\":\"ewgdrjervn\",\"ipPools\":[{\"startingAddress\":\"pehindoygm\",\"endingAddress\":\"thnzd\"},{\"startingAddress\":\"sl\",\"endingAddress\":\"ayqigynduhav\"}],\"dnsServerConfig\":\"UseDnsServer\",\"dnsZones\":[{\"dnsZoneName\":\"umaq\",\"dnsForwarder\":[\"gycdu\",\"ertgccymva\",\"l\",\"ssl\"]},{\"dnsZoneName\":\"fmmdnbbg\",\"dnsForwarder\":[\"swiydmcwyhzdx\",\"sadbz\",\"nvdfznuda\"]}],\"dnsServers\":[\"xzb\",\"cblylpstdbhhxsr\"],\"useDhcp\":true}") .toObject(InfrastructureNetwork.class); - Assertions.assertEquals("tpnapnyiropuhpig", model.subnetMask()); - Assertions.assertEquals("gylgqgitxmedjvcs", model.gateway()); - Assertions.assertEquals("wwncwzzhxgk", model.ipPools().get(0).startingAddress()); - Assertions.assertEquals("mgucna", model.ipPools().get(0).endingAddress()); - Assertions.assertEquals("eoellwptfdygp", model.dnsServers().get(0)); - Assertions.assertEquals(false, model.useDhcp()); + Assertions.assertEquals("n", model.subnetMask()); + Assertions.assertEquals("ewgdrjervn", model.gateway()); + Assertions.assertEquals("pehindoygm", model.ipPools().get(0).startingAddress()); + Assertions.assertEquals("thnzd", model.ipPools().get(0).endingAddress()); + Assertions.assertEquals(DnsServerConfig.USE_DNS_SERVER, model.dnsServerConfig()); + Assertions.assertEquals("umaq", model.dnsZones().get(0).dnsZoneName()); + Assertions.assertEquals("gycdu", model.dnsZones().get(0).dnsForwarder().get(0)); + Assertions.assertEquals("xzb", model.dnsServers().get(0)); + Assertions.assertTrue(model.useDhcp()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - InfrastructureNetwork model = new InfrastructureNetwork().withSubnetMask("tpnapnyiropuhpig") - .withGateway("gylgqgitxmedjvcs") - .withIpPools(Arrays.asList(new IpPools().withStartingAddress("wwncwzzhxgk").withEndingAddress("mgucna"))) - .withDnsServers(Arrays.asList("eoellwptfdygp")) - .withUseDhcp(false); + InfrastructureNetwork model = new InfrastructureNetwork().withSubnetMask("n") + .withGateway("ewgdrjervn") + .withIpPools(Arrays.asList(new IpPools().withStartingAddress("pehindoygm").withEndingAddress("thnzd"), + new IpPools().withStartingAddress("sl").withEndingAddress("ayqigynduhav"))) + .withDnsServerConfig(DnsServerConfig.USE_DNS_SERVER) + .withDnsZones(Arrays.asList( + new DnsZones().withDnsZoneName("umaq") + .withDnsForwarder(Arrays.asList("gycdu", "ertgccymva", "l", "ssl")), + new DnsZones().withDnsZoneName("fmmdnbbg") + .withDnsForwarder(Arrays.asList("swiydmcwyhzdx", "sadbz", "nvdfznuda")))) + .withDnsServers(Arrays.asList("xzb", "cblylpstdbhhxsr")) + .withUseDhcp(true); model = BinaryData.fromObject(model).toObject(InfrastructureNetwork.class); - Assertions.assertEquals("tpnapnyiropuhpig", model.subnetMask()); - Assertions.assertEquals("gylgqgitxmedjvcs", model.gateway()); - Assertions.assertEquals("wwncwzzhxgk", model.ipPools().get(0).startingAddress()); - Assertions.assertEquals("mgucna", model.ipPools().get(0).endingAddress()); - Assertions.assertEquals("eoellwptfdygp", model.dnsServers().get(0)); - Assertions.assertEquals(false, model.useDhcp()); + Assertions.assertEquals("n", model.subnetMask()); + Assertions.assertEquals("ewgdrjervn", model.gateway()); + Assertions.assertEquals("pehindoygm", model.ipPools().get(0).startingAddress()); + Assertions.assertEquals("thnzd", model.ipPools().get(0).endingAddress()); + Assertions.assertEquals(DnsServerConfig.USE_DNS_SERVER, model.dnsServerConfig()); + Assertions.assertEquals("umaq", model.dnsZones().get(0).dnsZoneName()); + Assertions.assertEquals("gycdu", model.dnsZones().get(0).dnsForwarder().get(0)); + Assertions.assertEquals("xzb", model.dnsServers().get(0)); + Assertions.assertTrue(model.useDhcp()); } } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/IpPoolsTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/IpPoolsTests.java index 2729cc36fb4e..ca32fe8d7d88 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/IpPoolsTests.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/IpPoolsTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.generated; @@ -11,17 +11,17 @@ public final class IpPoolsTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - IpPools model = BinaryData.fromString("{\"startingAddress\":\"ac\",\"endingAddress\":\"pzfqrhhuaoppp\"}") + IpPools model = BinaryData.fromString("{\"startingAddress\":\"cers\",\"endingAddress\":\"ntnev\"}") .toObject(IpPools.class); - Assertions.assertEquals("ac", model.startingAddress()); - Assertions.assertEquals("pzfqrhhuaoppp", model.endingAddress()); + Assertions.assertEquals("cers", model.startingAddress()); + Assertions.assertEquals("ntnev", model.endingAddress()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - IpPools model = new IpPools().withStartingAddress("ac").withEndingAddress("pzfqrhhuaoppp"); + IpPools model = new IpPools().withStartingAddress("cers").withEndingAddress("ntnev"); model = BinaryData.fromObject(model).toObject(IpPools.class); - Assertions.assertEquals("ac", model.startingAddress()); - Assertions.assertEquals("pzfqrhhuaoppp", model.endingAddress()); + Assertions.assertEquals("cers", model.startingAddress()); + Assertions.assertEquals("ntnev", model.endingAddress()); } } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/IsolatedVmAttestationConfigurationTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/IsolatedVmAttestationConfigurationTests.java index 01aa89d7d2d9..164b4f008164 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/IsolatedVmAttestationConfigurationTests.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/IsolatedVmAttestationConfigurationTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.generated; @@ -11,13 +11,7 @@ public final class IsolatedVmAttestationConfigurationTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { IsolatedVmAttestationConfiguration model = BinaryData.fromString( - "{\"attestationResourceId\":\"bjtazqugxywpmu\",\"relyingPartyServiceEndpoint\":\"fjz\",\"attestationServiceEndpoint\":\"qkqujidsu\"}") + "{\"attestationResourceId\":\"lmoyrx\",\"relyingPartyServiceEndpoint\":\"fudwpznt\",\"attestationServiceEndpoint\":\"dzhlrq\"}") .toObject(IsolatedVmAttestationConfiguration.class); } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - IsolatedVmAttestationConfiguration model = new IsolatedVmAttestationConfiguration(); - model = BinaryData.fromObject(model).toObject(IsolatedVmAttestationConfiguration.class); - } } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/LocalAvailabilityZonesTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/LocalAvailabilityZonesTests.java new file mode 100644 index 000000000000..5e1c5bfd64c8 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/LocalAvailabilityZonesTests.java @@ -0,0 +1,31 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.azurestackhci.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.azurestackhci.models.LocalAvailabilityZones; +import java.util.Arrays; +import org.junit.jupiter.api.Assertions; + +public final class LocalAvailabilityZonesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + LocalAvailabilityZones model = BinaryData + .fromString( + "{\"localAvailabilityZoneName\":\"ck\",\"nodes\":[\"hrxsbk\",\"vpycanuzbp\",\"kafkuwbcrnwbm\"]}") + .toObject(LocalAvailabilityZones.class); + Assertions.assertEquals("ck", model.localAvailabilityZoneName()); + Assertions.assertEquals("hrxsbk", model.nodes().get(0)); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + LocalAvailabilityZones model = new LocalAvailabilityZones().withLocalAvailabilityZoneName("ck") + .withNodes(Arrays.asList("hrxsbk", "vpycanuzbp", "kafkuwbcrnwbm")); + model = BinaryData.fromObject(model).toObject(LocalAvailabilityZones.class); + Assertions.assertEquals("ck", model.localAvailabilityZoneName()); + Assertions.assertEquals("hrxsbk", model.nodes().get(0)); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/LogCollectionJobSessionTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/LogCollectionJobSessionTests.java new file mode 100644 index 000000000000..78615a5d94bd --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/LogCollectionJobSessionTests.java @@ -0,0 +1,17 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.azurestackhci.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.azurestackhci.models.LogCollectionJobSession; + +public final class LogCollectionJobSessionTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + LogCollectionJobSession model = BinaryData.fromString( + "{\"startTime\":\"foudor\",\"endTime\":\"gyyprotwy\",\"timeCollected\":\"ndm\",\"logSize\":384308231,\"status\":\"Failed\",\"correlationId\":\"mjkavlgorbmft\"}") + .toObject(LogCollectionJobSession.class); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/LogCollectionReportedPropertiesTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/LogCollectionReportedPropertiesTests.java new file mode 100644 index 000000000000..c44468bb2b55 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/LogCollectionReportedPropertiesTests.java @@ -0,0 +1,17 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.azurestackhci.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.azurestackhci.models.LogCollectionReportedProperties; + +public final class LogCollectionReportedPropertiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + LogCollectionReportedProperties model = BinaryData.fromString( + "{\"percentComplete\":1549555977,\"validationStatus\":{\"status\":\"kubotppnvdxz\",\"steps\":[{\"name\":\"frbbc\",\"description\":\"qagt\",\"fullStepIndex\":\"dhlfkqojpykvgt\",\"startTimeUtc\":\"cnifm\",\"endTimeUtc\":\"sdymbrn\",\"status\":\"u\",\"steps\":[{\"name\":\"a\",\"description\":\"g\",\"fullStepIndex\":\"hocxvdfffwafqrou\",\"startTimeUtc\":\"spave\",\"endTimeUtc\":\"r\",\"status\":\"bunzozudh\",\"steps\":[{},{},{},{}],\"exception\":[\"oyxcdyuib\"]},{\"name\":\"fdn\",\"description\":\"ydvfvfcjnae\",\"fullStepIndex\":\"srvhmgorffuki\",\"startTimeUtc\":\"vwmzhwplefaxvxil\",\"endTimeUtc\":\"tg\",\"status\":\"nzeyqxtjj\",\"steps\":[{},{},{}],\"exception\":[\"hycav\",\"dggxdbeesmi\",\"knlrariaawiuagy\",\"wqfbylyrfgiagt\"]},{\"name\":\"jocqwogfnzjvusf\",\"description\":\"dmozu\",\"fullStepIndex\":\"lfsbtkadpysow\",\"startTimeUtc\":\"tgkbugrjqctojc\",\"endTimeUtc\":\"sofieypefojyqd\",\"status\":\"u\",\"steps\":[{}],\"exception\":[\"cwkhihi\",\"lhzdsqtzb\",\"rgnowcjhfgm\"]}],\"exception\":[\"actxmwoteyowc\"]},{\"name\":\"qovekqvgqou\",\"description\":\"fzmpjwyivq\",\"fullStepIndex\":\"f\",\"startTimeUtc\":\"vhrfsphuagrt\",\"endTimeUtc\":\"kteusqczk\",\"status\":\"klxubyja\",\"steps\":[{\"name\":\"fblcq\",\"description\":\"ubgq\",\"fullStepIndex\":\"rtalmet\",\"startTimeUtc\":\"wgdsl\",\"endTimeUtc\":\"ihhrmo\",\"status\":\"z\",\"steps\":[{},{},{},{}],\"exception\":[\"xiutcx\",\"pzhyr\"]},{\"name\":\"togebjoxsl\",\"description\":\"nhl\",\"fullStepIndex\":\"rqnkkzjcjbtr\",\"startTimeUtc\":\"ehvvib\",\"endTimeUtc\":\"jj\",\"status\":\"oqbeitpkxzt\",\"steps\":[{}],\"exception\":[\"lftidgfcwqmpim\"]},{\"name\":\"xzhemjyh\",\"description\":\"uj\",\"fullStepIndex\":\"t\",\"startTimeUtc\":\"ozzwculkba\",\"endTimeUtc\":\"fajnjwltlwtjjguk\",\"status\":\"lhsnvkcdmx\",\"steps\":[{},{},{},{}],\"exception\":[\"imlnwiaaomylw\",\"azul\",\"sethwwn\"]},{\"name\":\"hlf\",\"description\":\"wpchwahf\",\"fullStepIndex\":\"usnfepgfewet\",\"startTimeUtc\":\"yxgncxykxhdjhli\",\"endTimeUtc\":\"bcxf\",\"status\":\"cporxvxcjz\",\"steps\":[{},{}],\"exception\":[\"fpxtg\",\"scjavftju\",\"dqazkmtgguwpijra\"]}],\"exception\":[\"vmmghfcfiwrxgk\",\"euvyinzqodfvpgs\",\"oxgsgbpfgzdjtx\",\"zflbqvg\"]},{\"name\":\"vl\",\"description\":\"fcq\",\"fullStepIndex\":\"rdve\",\"startTimeUtc\":\"wsdtutnwl\",\"endTimeUtc\":\"ycvuzhyrmewipmv\",\"status\":\"dxukuqgsjjxundxg\",\"steps\":[{\"name\":\"zhhzjhfjmhvvmu\",\"description\":\"pmuneqsx\",\"fullStepIndex\":\"hfbuzjyihsasbhud\",\"startTimeUtc\":\"ohyuemslynsq\",\"endTimeUtc\":\"pfoobr\",\"status\":\"tyms\",\"steps\":[{},{},{}],\"exception\":[\"dnfwqzdzg\",\"ilaxhn\",\"hqlyvijo\"]},{\"name\":\"iv\",\"description\":\"oyzunbixxr\",\"fullStepIndex\":\"kvcpwpgclr\",\"startTimeUtc\":\"vtsoxf\",\"endTimeUtc\":\"enxpmyyefr\",\"status\":\"pdnqqskawaoqvmmb\",\"steps\":[{}],\"exception\":[\"tqlkz\"]},{\"name\":\"gnitgvkxlzyq\",\"description\":\"fegcea\",\"fullStepIndex\":\"xwh\",\"startTimeUtc\":\"nsymoyqhlwigd\",\"endTimeUtc\":\"bkbxgomfa\",\"status\":\"wasqvdaeyyg\",\"steps\":[{},{}],\"exception\":[\"sqzhzbezkg\",\"msidxasicddyvv\",\"skgfmocwahpq\"]},{\"name\":\"tjeaahhvjhh\",\"description\":\"kzyb\",\"fullStepIndex\":\"jid\",\"startTimeUtc\":\"syxkyxvxevblb\",\"endTimeUtc\":\"dnlj\",\"status\":\"geuaulx\",\"steps\":[{},{},{}],\"exception\":[\"bn\",\"ppxynenls\"]}],\"exception\":[\"izzgwkln\",\"rmffeyc\"]}]},\"deploymentStatus\":{\"status\":\"tpiymerteea\",\"steps\":[{\"name\":\"iekkkzddrtkgdojb\",\"description\":\"vavrefdees\",\"fullStepIndex\":\"cuijpxt\",\"startTimeUtc\":\"uwprtujwsawd\",\"endTimeUtc\":\"ibabxvititvtzeex\",\"status\":\"oxtfglecdmdqbwp\",\"steps\":[{\"name\":\"gsfjac\",\"description\":\"lhhxudbxvodhtnsi\",\"fullStepIndex\":\"dhzmmesckdlp\",\"startTimeUtc\":\"zrcxfailcfxwmdbo\",\"endTimeUtc\":\"fgsftufqob\",\"status\":\"lnacgcc\",\"steps\":[{}],\"exception\":[\"kizvytn\",\"zvulj\"]}],\"exception\":[\"eranokqgukkjqnv\",\"roylaxxu\",\"cdisd\",\"sfjbjsvg\"]},{\"name\":\"whryvycytdcl\",\"description\":\"ccknfnwmbtmvp\",\"fullStepIndex\":\"jdhttzaefedxi\",\"startTimeUtc\":\"hrphkmcrjdqn\",\"endTimeUtc\":\"fzpbgtgkyl\",\"status\":\"ghrjeuutl\",\"steps\":[{\"name\":\"w\",\"description\":\"okvbwnhhtqlgehg\",\"fullStepIndex\":\"ipifhpfeoajvg\",\"startTimeUtc\":\"txjcsheafidlt\",\"endTimeUtc\":\"sr\",\"status\":\"mks\",\"steps\":[{}],\"exception\":[\"ftxfkf\",\"egprhptil\"]}],\"exception\":[\"biqtgdq\",\"hm\",\"wsldrizetpwbr\"]},{\"name\":\"llibphbqzmizak\",\"description\":\"ankjpdnjzh\",\"fullStepIndex\":\"oylhjlmuoyxprimr\",\"startTimeUtc\":\"pteecjme\",\"endTimeUtc\":\"ls\",\"status\":\"asylwx\",\"steps\":[{\"name\":\"mweoohgu\",\"description\":\"uzboyjathw\",\"fullStepIndex\":\"olbaemwmdx\",\"startTimeUtc\":\"bwjscjpahlxveab\",\"endTimeUtc\":\"xnmwmqtibxyijddt\",\"status\":\"cttadi\",\"steps\":[{},{}],\"exception\":[\"mrsieekp\"]},{\"name\":\"zaapmudqmeqwi\",\"description\":\"ibudqwy\",\"fullStepIndex\":\"beybpmzznrtffyaq\",\"startTimeUtc\":\"mhh\",\"endTimeUtc\":\"oqaqhvseufuq\",\"status\":\"xpdlcgqlsis\",\"steps\":[{},{}],\"exception\":[\"ddgamquhiosr\",\"ju\"]},{\"name\":\"fcdis\",\"description\":\"rnxzh\",\"fullStepIndex\":\"exrxzbujrtrhq\",\"startTimeUtc\":\"revkhgnlnzo\",\"endTimeUtc\":\"lrpiqywnc\",\"status\":\"tszcofizehtdhgb\",\"steps\":[{},{}],\"exception\":[\"ljeamu\",\"vzmlovuanashcxl\",\"mjerbdk\",\"lvidizozs\"]},{\"name\":\"ccxjm\",\"description\":\"fdgnwncypuuwwlt\",\"fullStepIndex\":\"qjctzenkeif\",\"startTimeUtc\":\"hmkdasvfl\",\"endTimeUtc\":\"bxcudchx\",\"status\":\"rb\",\"steps\":[{}],\"exception\":[\"robwjlvizbfhf\"]}],\"exception\":[\"acqpbtuodxesza\",\"belawumuaslzkwr\",\"woycqucwyha\",\"nomdrkywuhpsv\"]},{\"name\":\"urut\",\"description\":\"exxwlalniexzsrz\",\"fullStepIndex\":\"epqtybb\",\"startTimeUtc\":\"pgdakchzyvli\",\"endTimeUtc\":\"nrkcxkj\",\"status\":\"nxm\",\"steps\":[{\"name\":\"swqrntvlwijp\",\"description\":\"texoqqpwc\",\"fullStepIndex\":\"ufmhrunc\",\"startTimeUtc\":\"mqspkcdqzhlctdd\",\"endTimeUtc\":\"qn\",\"status\":\"fpch\",\"steps\":[{}],\"exception\":[\"jrcg\",\"gydcw\",\"oxjumvqqo\"]},{\"name\":\"hrraiouaubrj\",\"description\":\"oq\",\"fullStepIndex\":\"uojrngiflr\",\"startTimeUtc\":\"asccbiui\",\"endTimeUtc\":\"dlyjdf\",\"status\":\"mkyoqufdvruzsl\",\"steps\":[{}],\"exception\":[\"ctfnmdxotng\"]},{\"name\":\"gugey\",\"description\":\"hgrky\",\"fullStepIndex\":\"zabs\",\"startTimeUtc\":\"fpphoj\",\"endTimeUtc\":\"vyhyhsgzfc\",\"status\":\"gomfgbeglq\",\"steps\":[{},{}],\"exception\":[\"i\",\"etnluankrrfx\",\"eebtijvacvb\",\"qzbqqxlajrnwxa\"]}],\"exception\":[\"ehjku\"]}]},\"logCollectionSessionDetails\":[{\"startTime\":\"fgaoq\",\"endTime\":\"faey\",\"timeCollected\":\"nm\",\"logSize\":876803344,\"status\":\"Failed\",\"correlationId\":\"pghriypoqeyhl\"},{\"startTime\":\"ykprlpyznu\",\"endTime\":\"qdsmexiit\",\"timeCollected\":\"uxtyasiibmi\",\"logSize\":1192000578,\"status\":\"Failed\",\"correlationId\":\"tgnljhnmgixhcmav\"}]}") + .toObject(LogCollectionReportedProperties.class); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/LogCollectionRequestPropertiesTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/LogCollectionRequestPropertiesTests.java index 67c4d70d0168..a49aa7d05629 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/LogCollectionRequestPropertiesTests.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/LogCollectionRequestPropertiesTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.generated; @@ -13,19 +13,19 @@ public final class LogCollectionRequestPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { LogCollectionRequestProperties model - = BinaryData.fromString("{\"fromDate\":\"2021-05-19T13:40:02Z\",\"toDate\":\"2021-04-27T11:03:59Z\"}") + = BinaryData.fromString("{\"fromDate\":\"2021-05-26T18:03:20Z\",\"toDate\":\"2021-03-25T11:42:18Z\"}") .toObject(LogCollectionRequestProperties.class); - Assertions.assertEquals(OffsetDateTime.parse("2021-05-19T13:40:02Z"), model.fromDate()); - Assertions.assertEquals(OffsetDateTime.parse("2021-04-27T11:03:59Z"), model.toDate()); + Assertions.assertEquals(OffsetDateTime.parse("2021-05-26T18:03:20Z"), model.fromDate()); + Assertions.assertEquals(OffsetDateTime.parse("2021-03-25T11:42:18Z"), model.toDate()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { LogCollectionRequestProperties model - = new LogCollectionRequestProperties().withFromDate(OffsetDateTime.parse("2021-05-19T13:40:02Z")) - .withToDate(OffsetDateTime.parse("2021-04-27T11:03:59Z")); + = new LogCollectionRequestProperties().withFromDate(OffsetDateTime.parse("2021-05-26T18:03:20Z")) + .withToDate(OffsetDateTime.parse("2021-03-25T11:42:18Z")); model = BinaryData.fromObject(model).toObject(LogCollectionRequestProperties.class); - Assertions.assertEquals(OffsetDateTime.parse("2021-05-19T13:40:02Z"), model.fromDate()); - Assertions.assertEquals(OffsetDateTime.parse("2021-04-27T11:03:59Z"), model.toDate()); + Assertions.assertEquals(OffsetDateTime.parse("2021-05-26T18:03:20Z"), model.fromDate()); + Assertions.assertEquals(OffsetDateTime.parse("2021-03-25T11:42:18Z"), model.toDate()); } } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/LogCollectionRequestTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/LogCollectionRequestTests.java index aa84e6423f39..64d7d1e21f7d 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/LogCollectionRequestTests.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/LogCollectionRequestTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.generated; @@ -14,19 +14,19 @@ public final class LogCollectionRequestTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { LogCollectionRequest model = BinaryData - .fromString("{\"properties\":{\"fromDate\":\"2021-03-03T22:53:05Z\",\"toDate\":\"2021-07-20T02:15:21Z\"}}") + .fromString("{\"properties\":{\"fromDate\":\"2021-01-13T17:58:58Z\",\"toDate\":\"2021-10-23T08:36:46Z\"}}") .toObject(LogCollectionRequest.class); - Assertions.assertEquals(OffsetDateTime.parse("2021-03-03T22:53:05Z"), model.properties().fromDate()); - Assertions.assertEquals(OffsetDateTime.parse("2021-07-20T02:15:21Z"), model.properties().toDate()); + Assertions.assertEquals(OffsetDateTime.parse("2021-01-13T17:58:58Z"), model.properties().fromDate()); + Assertions.assertEquals(OffsetDateTime.parse("2021-10-23T08:36:46Z"), model.properties().toDate()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { LogCollectionRequest model = new LogCollectionRequest().withProperties( - new LogCollectionRequestProperties().withFromDate(OffsetDateTime.parse("2021-03-03T22:53:05Z")) - .withToDate(OffsetDateTime.parse("2021-07-20T02:15:21Z"))); + new LogCollectionRequestProperties().withFromDate(OffsetDateTime.parse("2021-01-13T17:58:58Z")) + .withToDate(OffsetDateTime.parse("2021-10-23T08:36:46Z"))); model = BinaryData.fromObject(model).toObject(LogCollectionRequest.class); - Assertions.assertEquals(OffsetDateTime.parse("2021-03-03T22:53:05Z"), model.properties().fromDate()); - Assertions.assertEquals(OffsetDateTime.parse("2021-07-20T02:15:21Z"), model.properties().toDate()); + Assertions.assertEquals(OffsetDateTime.parse("2021-01-13T17:58:58Z"), model.properties().fromDate()); + Assertions.assertEquals(OffsetDateTime.parse("2021-10-23T08:36:46Z"), model.properties().toDate()); } } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ManagedServiceIdentityTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ManagedServiceIdentityTests.java index 7cea54365d07..170b3b8b4eba 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ManagedServiceIdentityTests.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ManagedServiceIdentityTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.generated; @@ -16,7 +16,7 @@ public final class ManagedServiceIdentityTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ManagedServiceIdentity model = BinaryData.fromString( - "{\"principalId\":\"a5c24148-2f49-4e8b-bd72-e7d180e578d2\",\"tenantId\":\"c653076d-85aa-4e3f-9132-11446b048d73\",\"type\":\"SystemAssigned, UserAssigned\",\"userAssignedIdentities\":{\"md\":{\"principalId\":\"f3592502-199f-4063-9bed-4202ad1db15c\",\"clientId\":\"6af757ec-59cd-49ec-a9af-468fce710068\"},\"g\":{\"principalId\":\"9d2a8b2a-b8e1-4321-8c8f-86e14e417a86\",\"clientId\":\"0ab61bbc-75ac-4dfb-8c29-714bed6a9bd7\"},\"buxwgip\":{\"principalId\":\"af28fd9f-5c8b-4f9f-a28f-3ccdebb25186\",\"clientId\":\"44b41844-ec92-48b9-b6da-57c813d96daf\"},\"nowkgshw\":{\"principalId\":\"f1464e31-303e-4876-b01b-cc5cbc8bf166\",\"clientId\":\"cabaec61-711c-4987-aa00-c1ad59901c29\"}}}") + "{\"principalId\":\"hseyvju\",\"tenantId\":\"tslhspkdeem\",\"type\":\"SystemAssigned,UserAssigned\",\"userAssignedIdentities\":{\"elmqk\":{\"principalId\":\"ag\",\"clientId\":\"t\"}}}") .toObject(ManagedServiceIdentity.class); Assertions.assertEquals(ManagedServiceIdentityType.SYSTEM_ASSIGNED_USER_ASSIGNED, model.type()); } @@ -25,8 +25,7 @@ public void testDeserialize() throws Exception { public void testSerialize() throws Exception { ManagedServiceIdentity model = new ManagedServiceIdentity().withType(ManagedServiceIdentityType.SYSTEM_ASSIGNED_USER_ASSIGNED) - .withUserAssignedIdentities(mapOf("md", new UserAssignedIdentity(), "g", new UserAssignedIdentity(), - "buxwgip", new UserAssignedIdentity(), "nowkgshw", new UserAssignedIdentity())); + .withUserAssignedIdentities(mapOf("elmqk", new UserAssignedIdentity())); model = BinaryData.fromObject(model).toObject(ManagedServiceIdentity.class); Assertions.assertEquals(ManagedServiceIdentityType.SYSTEM_ASSIGNED_USER_ASSIGNED, model.type()); } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/NetworkControllerTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/NetworkControllerTests.java index d01c6de8f1dc..209150f9d01a 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/NetworkControllerTests.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/NetworkControllerTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.generated; @@ -11,23 +11,22 @@ public final class NetworkControllerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - NetworkController model = BinaryData - .fromString( - "{\"macAddressPoolStart\":\"fv\",\"macAddressPoolStop\":\"fy\",\"networkVirtualizationEnabled\":false}") + NetworkController model = BinaryData.fromString( + "{\"macAddressPoolStart\":\"g\",\"macAddressPoolStop\":\"qidbqfatpxllrxcy\",\"networkVirtualizationEnabled\":false}") .toObject(NetworkController.class); - Assertions.assertEquals("fv", model.macAddressPoolStart()); - Assertions.assertEquals("fy", model.macAddressPoolStop()); - Assertions.assertEquals(false, model.networkVirtualizationEnabled()); + Assertions.assertEquals("g", model.macAddressPoolStart()); + Assertions.assertEquals("qidbqfatpxllrxcy", model.macAddressPoolStop()); + Assertions.assertFalse(model.networkVirtualizationEnabled()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - NetworkController model = new NetworkController().withMacAddressPoolStart("fv") - .withMacAddressPoolStop("fy") + NetworkController model = new NetworkController().withMacAddressPoolStart("g") + .withMacAddressPoolStop("qidbqfatpxllrxcy") .withNetworkVirtualizationEnabled(false); model = BinaryData.fromObject(model).toObject(NetworkController.class); - Assertions.assertEquals("fv", model.macAddressPoolStart()); - Assertions.assertEquals("fy", model.macAddressPoolStop()); - Assertions.assertEquals(false, model.networkVirtualizationEnabled()); + Assertions.assertEquals("g", model.macAddressPoolStart()); + Assertions.assertEquals("qidbqfatpxllrxcy", model.macAddressPoolStop()); + Assertions.assertFalse(model.networkVirtualizationEnabled()); } } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/NicDetailTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/NicDetailTests.java index 665e0c29922e..1b5826d3a2de 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/NicDetailTests.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/NicDetailTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.generated; @@ -13,39 +13,39 @@ public final class NicDetailTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { NicDetail model = BinaryData.fromString( - "{\"adapterName\":\"vqejosovy\",\"interfaceDescription\":\"leaesi\",\"componentId\":\"qtljqobbpihehc\",\"driverVersion\":\"ybmrqbrjbbmp\",\"ip4Address\":\"lvykfrex\",\"subnetMask\":\"s\",\"defaultGateway\":\"wjksghudgzhxo\",\"dnsServers\":[\"gsv\",\"u\",\"kxibdafh\",\"kmdyomkxfbvfbh\"],\"defaultIsolationId\":\"i\"}") + "{\"adapterName\":\"chl\",\"interfaceDescription\":\"ltxdwhmozu\",\"componentId\":\"zvlnsnnjz\",\"driverVersion\":\"afolpymwamxqzrag\",\"ip4Address\":\"dphtv\",\"subnetMask\":\"lajv\",\"defaultGateway\":\"jchcsrlzknmzla\",\"dnsServers\":[\"pdwvnphcn\",\"q\"],\"defaultIsolationId\":\"jhmqrhvthla\"}") .toObject(NicDetail.class); - Assertions.assertEquals("vqejosovy", model.adapterName()); - Assertions.assertEquals("leaesi", model.interfaceDescription()); - Assertions.assertEquals("qtljqobbpihehc", model.componentId()); - Assertions.assertEquals("ybmrqbrjbbmp", model.driverVersion()); - Assertions.assertEquals("lvykfrex", model.ip4Address()); - Assertions.assertEquals("s", model.subnetMask()); - Assertions.assertEquals("wjksghudgzhxo", model.defaultGateway()); - Assertions.assertEquals("gsv", model.dnsServers().get(0)); - Assertions.assertEquals("i", model.defaultIsolationId()); + Assertions.assertEquals("chl", model.adapterName()); + Assertions.assertEquals("ltxdwhmozu", model.interfaceDescription()); + Assertions.assertEquals("zvlnsnnjz", model.componentId()); + Assertions.assertEquals("afolpymwamxqzrag", model.driverVersion()); + Assertions.assertEquals("dphtv", model.ip4Address()); + Assertions.assertEquals("lajv", model.subnetMask()); + Assertions.assertEquals("jchcsrlzknmzla", model.defaultGateway()); + Assertions.assertEquals("pdwvnphcn", model.dnsServers().get(0)); + Assertions.assertEquals("jhmqrhvthla", model.defaultIsolationId()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - NicDetail model = new NicDetail().withAdapterName("vqejosovy") - .withInterfaceDescription("leaesi") - .withComponentId("qtljqobbpihehc") - .withDriverVersion("ybmrqbrjbbmp") - .withIp4Address("lvykfrex") - .withSubnetMask("s") - .withDefaultGateway("wjksghudgzhxo") - .withDnsServers(Arrays.asList("gsv", "u", "kxibdafh", "kmdyomkxfbvfbh")) - .withDefaultIsolationId("i"); + NicDetail model = new NicDetail().withAdapterName("chl") + .withInterfaceDescription("ltxdwhmozu") + .withComponentId("zvlnsnnjz") + .withDriverVersion("afolpymwamxqzrag") + .withIp4Address("dphtv") + .withSubnetMask("lajv") + .withDefaultGateway("jchcsrlzknmzla") + .withDnsServers(Arrays.asList("pdwvnphcn", "q")) + .withDefaultIsolationId("jhmqrhvthla"); model = BinaryData.fromObject(model).toObject(NicDetail.class); - Assertions.assertEquals("vqejosovy", model.adapterName()); - Assertions.assertEquals("leaesi", model.interfaceDescription()); - Assertions.assertEquals("qtljqobbpihehc", model.componentId()); - Assertions.assertEquals("ybmrqbrjbbmp", model.driverVersion()); - Assertions.assertEquals("lvykfrex", model.ip4Address()); - Assertions.assertEquals("s", model.subnetMask()); - Assertions.assertEquals("wjksghudgzhxo", model.defaultGateway()); - Assertions.assertEquals("gsv", model.dnsServers().get(0)); - Assertions.assertEquals("i", model.defaultIsolationId()); + Assertions.assertEquals("chl", model.adapterName()); + Assertions.assertEquals("ltxdwhmozu", model.interfaceDescription()); + Assertions.assertEquals("zvlnsnnjz", model.componentId()); + Assertions.assertEquals("afolpymwamxqzrag", model.driverVersion()); + Assertions.assertEquals("dphtv", model.ip4Address()); + Assertions.assertEquals("lajv", model.subnetMask()); + Assertions.assertEquals("jchcsrlzknmzla", model.defaultGateway()); + Assertions.assertEquals("pdwvnphcn", model.dnsServers().get(0)); + Assertions.assertEquals("jhmqrhvthla", model.defaultIsolationId()); } } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ObservabilityTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ObservabilityTests.java index 76605ed40c8e..31d4df7b05b0 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ObservabilityTests.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ObservabilityTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.generated; @@ -12,20 +12,20 @@ public final class ObservabilityTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { Observability model - = BinaryData.fromString("{\"streamingDataClient\":false,\"euLocation\":true,\"episodicDataUpload\":true}") + = BinaryData.fromString("{\"streamingDataClient\":false,\"euLocation\":false,\"episodicDataUpload\":true}") .toObject(Observability.class); - Assertions.assertEquals(false, model.streamingDataClient()); - Assertions.assertEquals(true, model.euLocation()); - Assertions.assertEquals(true, model.episodicDataUpload()); + Assertions.assertFalse(model.streamingDataClient()); + Assertions.assertFalse(model.euLocation()); + Assertions.assertTrue(model.episodicDataUpload()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { Observability model - = new Observability().withStreamingDataClient(false).withEuLocation(true).withEpisodicDataUpload(true); + = new Observability().withStreamingDataClient(false).withEuLocation(false).withEpisodicDataUpload(true); model = BinaryData.fromObject(model).toObject(Observability.class); - Assertions.assertEquals(false, model.streamingDataClient()); - Assertions.assertEquals(true, model.euLocation()); - Assertions.assertEquals(true, model.episodicDataUpload()); + Assertions.assertFalse(model.streamingDataClient()); + Assertions.assertFalse(model.euLocation()); + Assertions.assertTrue(model.episodicDataUpload()); } } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/OfferInnerTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/OfferInnerTests.java index ba5be3e40205..2f74e8126321 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/OfferInnerTests.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/OfferInnerTests.java @@ -1,50 +1,24 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.generated; import com.azure.core.util.BinaryData; import com.azure.resourcemanager.azurestackhci.fluent.models.OfferInner; -import com.azure.resourcemanager.azurestackhci.models.SkuMappings; -import java.util.Arrays; import org.junit.jupiter.api.Assertions; public final class OfferInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { OfferInner model = BinaryData.fromString( - "{\"properties\":{\"provisioningState\":\"yavluwmncstt\",\"publisherId\":\"fybvpoek\",\"content\":\"gsgbdhuzq\",\"contentVersion\":\"j\",\"skuMappings\":[{\"catalogPlanId\":\"nscliqhzvhxnk\",\"marketplaceSkuId\":\"tkubotppn\",\"marketplaceSkuVersions\":[\"zxhi\"]},{\"catalogPlanId\":\"rbbcevq\",\"marketplaceSkuId\":\"tltdhlfkqojpy\",\"marketplaceSkuVersions\":[\"trdcnifmzzs\"]},{\"catalogPlanId\":\"m\",\"marketplaceSkuId\":\"nysuxmprafwgckh\",\"marketplaceSkuVersions\":[\"vdff\"]}]},\"id\":\"afqr\",\"name\":\"udaspavehh\",\"type\":\"vkbunzozudh\"}") + "{\"properties\":{\"provisioningState\":\"bngui\",\"publisherId\":\"wu\",\"content\":\"gazxuf\",\"contentVersion\":\"uckyf\",\"skuMappings\":[{\"catalogPlanId\":\"idf\",\"marketplaceSkuId\":\"wdzuhtymwisd\",\"marketplaceSkuVersions\":[\"hwxmnteiwa\",\"pvkmijcmmxdcuf\",\"fsrpymzidnse\",\"cxtbzsg\"]},{\"catalogPlanId\":\"c\",\"marketplaceSkuId\":\"newmdwzjeiachbo\",\"marketplaceSkuVersions\":[\"lnrosfqp\",\"eeh\",\"zvypyqrimzinp\",\"swjdkirso\"]},{\"catalogPlanId\":\"qxhcrmn\",\"marketplaceSkuId\":\"jtckwhdso\",\"marketplaceSkuVersions\":[\"yip\"]}]},\"id\":\"sqwpgrjb\",\"name\":\"norcjxvsnbyxqab\",\"type\":\"mocpc\"}") .toObject(OfferInner.class); - Assertions.assertEquals("fybvpoek", model.publisherId()); - Assertions.assertEquals("gsgbdhuzq", model.content()); - Assertions.assertEquals("j", model.contentVersion()); - Assertions.assertEquals("nscliqhzvhxnk", model.skuMappings().get(0).catalogPlanId()); - Assertions.assertEquals("tkubotppn", model.skuMappings().get(0).marketplaceSkuId()); - Assertions.assertEquals("zxhi", model.skuMappings().get(0).marketplaceSkuVersions().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - OfferInner model = new OfferInner().withPublisherId("fybvpoek") - .withContent("gsgbdhuzq") - .withContentVersion("j") - .withSkuMappings(Arrays.asList( - new SkuMappings().withCatalogPlanId("nscliqhzvhxnk") - .withMarketplaceSkuId("tkubotppn") - .withMarketplaceSkuVersions(Arrays.asList("zxhi")), - new SkuMappings().withCatalogPlanId("rbbcevq") - .withMarketplaceSkuId("tltdhlfkqojpy") - .withMarketplaceSkuVersions(Arrays.asList("trdcnifmzzs")), - new SkuMappings().withCatalogPlanId("m") - .withMarketplaceSkuId("nysuxmprafwgckh") - .withMarketplaceSkuVersions(Arrays.asList("vdff")))); - model = BinaryData.fromObject(model).toObject(OfferInner.class); - Assertions.assertEquals("fybvpoek", model.publisherId()); - Assertions.assertEquals("gsgbdhuzq", model.content()); - Assertions.assertEquals("j", model.contentVersion()); - Assertions.assertEquals("nscliqhzvhxnk", model.skuMappings().get(0).catalogPlanId()); - Assertions.assertEquals("tkubotppn", model.skuMappings().get(0).marketplaceSkuId()); - Assertions.assertEquals("zxhi", model.skuMappings().get(0).marketplaceSkuVersions().get(0)); + Assertions.assertEquals("wu", model.publisherId()); + Assertions.assertEquals("gazxuf", model.content()); + Assertions.assertEquals("uckyf", model.contentVersion()); + Assertions.assertEquals("idf", model.skuMappings().get(0).catalogPlanId()); + Assertions.assertEquals("wdzuhtymwisd", model.skuMappings().get(0).marketplaceSkuId()); + Assertions.assertEquals("hwxmnteiwa", model.skuMappings().get(0).marketplaceSkuVersions().get(0)); } } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/OfferListTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/OfferListTests.java index f07e15ef2f51..4eaf0cca4f01 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/OfferListTests.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/OfferListTests.java @@ -1,23 +1,26 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.generated; import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.azurestackhci.models.OfferList; +import com.azure.resourcemanager.azurestackhci.implementation.models.OfferList; +import org.junit.jupiter.api.Assertions; public final class OfferListTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { OfferList model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"provisioningState\":\"oxyhkxgqddrihpf\",\"publisherId\":\"qcaaewdaomdjvl\",\"content\":\"x\",\"contentVersion\":\"zb\",\"skuMappings\":[{\"catalogPlanId\":\"eivsiykzkdnc\",\"marketplaceSkuId\":\"xonbzoggculapz\",\"marketplaceSkuVersions\":[\"pgogtqxepny\",\"b\",\"uajlyj\"]},{\"catalogPlanId\":\"vofqzhvfc\",\"marketplaceSkuId\":\"yfm\",\"marketplaceSkuVersions\":[\"xrkjpvdw\",\"fzwiivwzjbhyz\"]}]},\"id\":\"jrkambtrnegvmnv\",\"name\":\"q\",\"type\":\"qvldspastjbkkd\"},{\"properties\":{\"provisioningState\":\"vestmjl\",\"publisherId\":\"ril\",\"content\":\"apeewchpxlkt\",\"contentVersion\":\"uziycsl\",\"skuMappings\":[{\"catalogPlanId\":\"uztcktyhjtqed\",\"marketplaceSkuId\":\"zulwmmrqzzrrj\",\"marketplaceSkuVersions\":[\"lydzgk\"]},{\"catalogPlanId\":\"qeevt\",\"marketplaceSkuId\":\"pryu\",\"marketplaceSkuVersions\":[\"ytp\",\"dmovzvfva\",\"wzqa\"]},{\"catalogPlanId\":\"lgzurig\",\"marketplaceSkuId\":\"ecxn\",\"marketplaceSkuVersions\":[\"cokpv\",\"mlqtmldgxob\"]},{\"catalogPlanId\":\"rclnpkc\",\"marketplaceSkuId\":\"yzriykhy\",\"marketplaceSkuVersions\":[\"vjlboxqvk\",\"lmxhomdyn\",\"dwdigumb\",\"raauzzpt\"]}]},\"id\":\"zysdzh\",\"name\":\"zwwva\",\"type\":\"qyuvvfonkp\"}],\"nextLink\":\"qyikvy\"}") + "{\"value\":[{\"properties\":{\"provisioningState\":\"mcl\",\"publisherId\":\"ijcoejctb\",\"content\":\"qsqsy\",\"contentVersion\":\"kbfkg\",\"skuMappings\":[{\"catalogPlanId\":\"exxppofmxaxcfjp\",\"marketplaceSkuId\":\"dtocj\",\"marketplaceSkuVersions\":[\"vpmouexhdzxib\",\"eojnxqbzvddn\"]},{\"catalogPlanId\":\"ndei\",\"marketplaceSkuId\":\"twnpzaoqvuhrhcf\",\"marketplaceSkuVersions\":[\"ddglm\"]},{\"catalogPlanId\":\"hjq\",\"marketplaceSkuId\":\"pyeicxm\",\"marketplaceSkuVersions\":[\"wqvhkhixuigdt\",\"pbobjo\"]}]},\"id\":\"m\",\"name\":\"w\",\"type\":\"a\"},{\"properties\":{\"provisioningState\":\"hrzayvvtpgvdf\",\"publisherId\":\"otkftutqxlngx\",\"content\":\"fgugnxkrxdqmid\",\"contentVersion\":\"hzrvqd\",\"skuMappings\":[{\"catalogPlanId\":\"jybige\",\"marketplaceSkuId\":\"qfbow\",\"marketplaceSkuVersions\":[\"nyktzlcuiy\",\"gqywgndrv\",\"nhzgpphrcgyn\",\"ocpecfvmmco\"]}]},\"id\":\"sxlzevgbmqj\",\"name\":\"abcypmivk\",\"type\":\"lzu\"},{\"properties\":{\"provisioningState\":\"fwnfnb\",\"publisherId\":\"fionl\",\"content\":\"x\",\"contentVersion\":\"qgtz\",\"skuMappings\":[{\"catalogPlanId\":\"qbqqwxr\",\"marketplaceSkuId\":\"eallnwsubisnj\",\"marketplaceSkuVersions\":[\"mngnzscxaqw\"]},{\"catalogPlanId\":\"chcbonqvpkvlrxnj\",\"marketplaceSkuId\":\"seiphe\",\"marketplaceSkuVersions\":[\"okeyyienj\",\"dlwtgrhpdj\"]},{\"catalogPlanId\":\"umasxazjpq\",\"marketplaceSkuId\":\"gual\",\"marketplaceSkuVersions\":[\"xhejjzzvdud\",\"wdslfhotwmcy\",\"pwlbjnpg\"]}]},\"id\":\"ftadehxnltyfs\",\"name\":\"ppusuesnzwdejba\",\"type\":\"orxzdmohctbqvud\"},{\"properties\":{\"provisioningState\":\"ndnvo\",\"publisherId\":\"ujjugwdkcglh\",\"content\":\"azjdyggd\",\"contentVersion\":\"ixhbkuofqweykhm\",\"skuMappings\":[{\"catalogPlanId\":\"fyexfwhy\",\"marketplaceSkuId\":\"i\",\"marketplaceSkuVersions\":[\"vdcsitynn\",\"amdecte\",\"f\"]},{\"catalogPlanId\":\"scjeypv\",\"marketplaceSkuId\":\"zrkgqhcjrefovg\",\"marketplaceSkuVersions\":[\"sle\"]},{\"catalogPlanId\":\"vxyqjpkcattpngjc\",\"marketplaceSkuId\":\"czsqpjhvm\",\"marketplaceSkuVersions\":[\"v\",\"ysou\",\"q\"]},{\"catalogPlanId\":\"a\",\"marketplaceSkuId\":\"ae\",\"marketplaceSkuVersions\":[\"hy\",\"ltrpmopj\",\"cma\",\"u\"]}]},\"id\":\"thfuiuaodsfcpkvx\",\"name\":\"dpuozmyz\",\"type\":\"dagfuaxbezyiuok\"}],\"nextLink\":\"whrdxwzywqsmbsu\"}") .toObject(OfferList.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - OfferList model = new OfferList(); - model = BinaryData.fromObject(model).toObject(OfferList.class); + Assertions.assertEquals("ijcoejctb", model.value().get(0).publisherId()); + Assertions.assertEquals("qsqsy", model.value().get(0).content()); + Assertions.assertEquals("kbfkg", model.value().get(0).contentVersion()); + Assertions.assertEquals("exxppofmxaxcfjp", model.value().get(0).skuMappings().get(0).catalogPlanId()); + Assertions.assertEquals("dtocj", model.value().get(0).skuMappings().get(0).marketplaceSkuId()); + Assertions.assertEquals("vpmouexhdzxib", + model.value().get(0).skuMappings().get(0).marketplaceSkuVersions().get(0)); + Assertions.assertEquals("whrdxwzywqsmbsu", model.nextLink()); } } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/OfferPropertiesTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/OfferPropertiesTests.java index 7d383cd7e65b..745c8f31f0c0 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/OfferPropertiesTests.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/OfferPropertiesTests.java @@ -1,51 +1,24 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.generated; import com.azure.core.util.BinaryData; import com.azure.resourcemanager.azurestackhci.fluent.models.OfferProperties; -import com.azure.resourcemanager.azurestackhci.models.SkuMappings; -import java.util.Arrays; import org.junit.jupiter.api.Assertions; public final class OfferPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { OfferProperties model = BinaryData.fromString( - "{\"provisioningState\":\"gkmoyxcdyuibhmfd\",\"publisherId\":\"zydvfvf\",\"content\":\"naeo\",\"contentVersion\":\"rvhmgor\",\"skuMappings\":[{\"catalogPlanId\":\"is\",\"marketplaceSkuId\":\"w\",\"marketplaceSkuVersions\":[\"wplefaxvxil\",\"btgn\",\"nzeyqxtjj\"]},{\"catalogPlanId\":\"qlqhycavodg\",\"marketplaceSkuId\":\"dbeesmie\",\"marketplaceSkuVersions\":[\"ra\",\"iaa\",\"iuagydwqfbylyrfg\"]},{\"catalogPlanId\":\"gtcojocqwo\",\"marketplaceSkuId\":\"nzjvusfzldm\",\"marketplaceSkuVersions\":[\"xylfsb\",\"kadpysown\",\"tgkbugrjqctojc\",\"isofieypefojyqd\"]}]}") + "{\"provisioningState\":\"hurzafblj\",\"publisherId\":\"pbtoqcjmkl\",\"content\":\"vbqid\",\"contentVersion\":\"ajzyul\",\"skuMappings\":[{\"catalogPlanId\":\"jkrlkhbzhfepg\",\"marketplaceSkuId\":\"qex\",\"marketplaceSkuVersions\":[\"c\",\"scpai\",\"rhhbcs\",\"l\"]}]}") .toObject(OfferProperties.class); - Assertions.assertEquals("zydvfvf", model.publisherId()); - Assertions.assertEquals("naeo", model.content()); - Assertions.assertEquals("rvhmgor", model.contentVersion()); - Assertions.assertEquals("is", model.skuMappings().get(0).catalogPlanId()); - Assertions.assertEquals("w", model.skuMappings().get(0).marketplaceSkuId()); - Assertions.assertEquals("wplefaxvxil", model.skuMappings().get(0).marketplaceSkuVersions().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - OfferProperties model = new OfferProperties().withPublisherId("zydvfvf") - .withContent("naeo") - .withContentVersion("rvhmgor") - .withSkuMappings(Arrays.asList( - new SkuMappings().withCatalogPlanId("is") - .withMarketplaceSkuId("w") - .withMarketplaceSkuVersions(Arrays.asList("wplefaxvxil", "btgn", "nzeyqxtjj")), - new SkuMappings().withCatalogPlanId("qlqhycavodg") - .withMarketplaceSkuId("dbeesmie") - .withMarketplaceSkuVersions(Arrays.asList("ra", "iaa", "iuagydwqfbylyrfg")), - new SkuMappings().withCatalogPlanId("gtcojocqwo") - .withMarketplaceSkuId("nzjvusfzldm") - .withMarketplaceSkuVersions( - Arrays.asList("xylfsb", "kadpysown", "tgkbugrjqctojc", "isofieypefojyqd")))); - model = BinaryData.fromObject(model).toObject(OfferProperties.class); - Assertions.assertEquals("zydvfvf", model.publisherId()); - Assertions.assertEquals("naeo", model.content()); - Assertions.assertEquals("rvhmgor", model.contentVersion()); - Assertions.assertEquals("is", model.skuMappings().get(0).catalogPlanId()); - Assertions.assertEquals("w", model.skuMappings().get(0).marketplaceSkuId()); - Assertions.assertEquals("wplefaxvxil", model.skuMappings().get(0).marketplaceSkuVersions().get(0)); + Assertions.assertEquals("pbtoqcjmkl", model.publisherId()); + Assertions.assertEquals("vbqid", model.content()); + Assertions.assertEquals("ajzyul", model.contentVersion()); + Assertions.assertEquals("jkrlkhbzhfepg", model.skuMappings().get(0).catalogPlanId()); + Assertions.assertEquals("qex", model.skuMappings().get(0).marketplaceSkuId()); + Assertions.assertEquals("c", model.skuMappings().get(0).marketplaceSkuVersions().get(0)); } } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/OffersGetWithResponseMockTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/OffersGetWithResponseMockTests.java index c1cb5baf8745..27fb22fc5d43 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/OffersGetWithResponseMockTests.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/OffersGetWithResponseMockTests.java @@ -1,13 +1,13 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.generated; import com.azure.core.credential.AccessToken; import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.azurestackhci.AzureStackHciManager; import com.azure.resourcemanager.azurestackhci.models.Offer; @@ -21,25 +21,25 @@ public final class OffersGetWithResponseMockTests { @Test public void testGetWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"provisioningState\":\"muqohh\",\"publisherId\":\"raxq\",\"content\":\"drwjcljbrhlh\",\"contentVersion\":\"zadbwe\",\"skuMappings\":[{\"catalogPlanId\":\"afhxrzfrmvztiuc\",\"marketplaceSkuId\":\"iql\",\"marketplaceSkuVersions\":[\"hkrcqx\",\"cbvzarmqcb\"]},{\"catalogPlanId\":\"kst\",\"marketplaceSkuId\":\"nvago\",\"marketplaceSkuVersions\":[\"hdrx\",\"rdvcehqwhit\"]},{\"catalogPlanId\":\"mxgnmguzbuwv\",\"marketplaceSkuId\":\"balkjnbkbdhl\",\"marketplaceSkuVersions\":[\"stqkqsygxiyn\"]}]},\"id\":\"ovagzkheuban\",\"name\":\"xunpqcckqiawzlz\",\"type\":\"laslgacizux\"}"; + = "{\"properties\":{\"provisioningState\":\"myc\",\"publisherId\":\"r\",\"content\":\"cxzznnuife\",\"contentVersion\":\"ejeg\",\"skuMappings\":[{\"catalogPlanId\":\"guwrjm\",\"marketplaceSkuId\":\"vbtuqkxximwg\",\"marketplaceSkuVersions\":[\"dekotjgxieqfkyf\",\"iwvjaqupbyyn\"]},{\"catalogPlanId\":\"kpajbmgeume\",\"marketplaceSkuId\":\"jbxcbccwkqmtxa\",\"marketplaceSkuVersions\":[\"iscr\"]},{\"catalogPlanId\":\"lgftrqrejdaa\",\"marketplaceSkuId\":\"qimlda\",\"marketplaceSkuVersions\":[\"xlm\"]},{\"catalogPlanId\":\"fmuad\",\"marketplaceSkuId\":\"fsn\",\"marketplaceSkuVersions\":[\"iioshjgcz\",\"tybnxgztlcgctj\"]}]},\"id\":\"fjvmy\",\"name\":\"j\",\"type\":\"ebecuvlbefv\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); AzureStackHciManager manager = AzureStackHciManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); Offer response = manager.offers() - .getWithResponse("kakvlbishjvpza", "tuoska", "izjixwfgcd", "y", "kcxwnujvqynvavi", + .getWithResponse("pcqzg", "hotjec", "hmxvvl", "rskapbxwieexu", "aderltfokyk", com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("raxq", response.publisherId()); - Assertions.assertEquals("drwjcljbrhlh", response.content()); - Assertions.assertEquals("zadbwe", response.contentVersion()); - Assertions.assertEquals("afhxrzfrmvztiuc", response.skuMappings().get(0).catalogPlanId()); - Assertions.assertEquals("iql", response.skuMappings().get(0).marketplaceSkuId()); - Assertions.assertEquals("hkrcqx", response.skuMappings().get(0).marketplaceSkuVersions().get(0)); + Assertions.assertEquals("r", response.publisherId()); + Assertions.assertEquals("cxzznnuife", response.content()); + Assertions.assertEquals("ejeg", response.contentVersion()); + Assertions.assertEquals("guwrjm", response.skuMappings().get(0).catalogPlanId()); + Assertions.assertEquals("vbtuqkxximwg", response.skuMappings().get(0).marketplaceSkuId()); + Assertions.assertEquals("dekotjgxieqfkyf", response.skuMappings().get(0).marketplaceSkuVersions().get(0)); } } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/OffersListByClusterMockTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/OffersListByClusterMockTests.java index 82f5cffc2fdf..5c1aaecc7c56 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/OffersListByClusterMockTests.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/OffersListByClusterMockTests.java @@ -1,14 +1,14 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.generated; import com.azure.core.credential.AccessToken; import com.azure.core.http.HttpClient; import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.azurestackhci.AzureStackHciManager; import com.azure.resourcemanager.azurestackhci.models.Offer; @@ -22,24 +22,24 @@ public final class OffersListByClusterMockTests { @Test public void testListByCluster() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"provisioningState\":\"pdjtaqh\",\"publisherId\":\"q\",\"content\":\"pdgonjhxs\",\"contentVersion\":\"hmgpczqulpt\",\"skuMappings\":[{\"catalogPlanId\":\"pxtzhigqqbtimpk\",\"marketplaceSkuId\":\"lornsihqh\",\"marketplaceSkuVersions\":[\"musuaawja\",\"xwjnfcz\",\"nniixyxvqba\"]},{\"catalogPlanId\":\"sjtgirnbgmgmddo\",\"marketplaceSkuId\":\"mynltwmpftmfoeaj\",\"marketplaceSkuVersions\":[\"yxwe\",\"amfdd\",\"vlkpzwb\"]},{\"catalogPlanId\":\"recchdidrmu\",\"marketplaceSkuId\":\"ahmjedbiu\",\"marketplaceSkuVersions\":[\"hhwmjpjbweunxcq\",\"rihufoihppiybxv\"]},{\"catalogPlanId\":\"zuzpbgkzcs\",\"marketplaceSkuId\":\"iuzvkunhdimju\",\"marketplaceSkuVersions\":[\"r\",\"kaugpucdocfqplwg\",\"f\"]}]},\"id\":\"xwr\",\"name\":\"lvzkl\",\"type\":\"vbgikyj\"}]}"; + = "{\"value\":[{\"properties\":{\"provisioningState\":\"jb\",\"publisherId\":\"jlcyizy\",\"content\":\"cvxodkrvfsxxby\",\"contentVersion\":\"sqlv\",\"skuMappings\":[{\"catalogPlanId\":\"wgoljtzx\",\"marketplaceSkuId\":\"xsdobygoogxqapjx\",\"marketplaceSkuVersions\":[\"yjfucsaod\",\"nosdkvi\"]},{\"catalogPlanId\":\"asgmatrnzpd\",\"marketplaceSkuId\":\"daaktuj\",\"marketplaceSkuVersions\":[\"bo\",\"myfp\",\"dowkppnwyytfv\"]},{\"catalogPlanId\":\"tfjikffffgkuh\",\"marketplaceSkuId\":\"whvuldbkk\",\"marketplaceSkuVersions\":[\"kj\",\"gawgazmxjqi\",\"h\"]},{\"catalogPlanId\":\"jsbcml\",\"marketplaceSkuId\":\"ahz\",\"marketplaceSkuVersions\":[\"roolkolir\",\"hmojusuzg\",\"jzc\",\"aaxoialahfxwcc\"]}]},\"id\":\"dxku\",\"name\":\"mkczynuhhoqe\",\"type\":\"shavljqkx\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); AzureStackHciManager manager = AzureStackHciManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - PagedIterable response - = manager.offers().listByCluster("xi", "mlnfyz", "vfrbypic", com.azure.core.util.Context.NONE); + PagedIterable response = manager.offers() + .listByCluster("ymjzpwdlvwtiws", "osaonhqnamppu", "tassaekewna", com.azure.core.util.Context.NONE); - Assertions.assertEquals("q", response.iterator().next().publisherId()); - Assertions.assertEquals("pdgonjhxs", response.iterator().next().content()); - Assertions.assertEquals("hmgpczqulpt", response.iterator().next().contentVersion()); - Assertions.assertEquals("pxtzhigqqbtimpk", response.iterator().next().skuMappings().get(0).catalogPlanId()); - Assertions.assertEquals("lornsihqh", response.iterator().next().skuMappings().get(0).marketplaceSkuId()); - Assertions.assertEquals("musuaawja", + Assertions.assertEquals("jlcyizy", response.iterator().next().publisherId()); + Assertions.assertEquals("cvxodkrvfsxxby", response.iterator().next().content()); + Assertions.assertEquals("sqlv", response.iterator().next().contentVersion()); + Assertions.assertEquals("wgoljtzx", response.iterator().next().skuMappings().get(0).catalogPlanId()); + Assertions.assertEquals("xsdobygoogxqapjx", response.iterator().next().skuMappings().get(0).marketplaceSkuId()); + Assertions.assertEquals("yjfucsaod", response.iterator().next().skuMappings().get(0).marketplaceSkuVersions().get(0)); } } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/OffersListByPublisherMockTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/OffersListByPublisherMockTests.java index 70fe4833cfad..b6b337ee6d71 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/OffersListByPublisherMockTests.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/OffersListByPublisherMockTests.java @@ -1,14 +1,14 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.generated; import com.azure.core.credential.AccessToken; import com.azure.core.http.HttpClient; import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.azurestackhci.AzureStackHciManager; import com.azure.resourcemanager.azurestackhci.models.Offer; @@ -22,24 +22,23 @@ public final class OffersListByPublisherMockTests { @Test public void testListByPublisher() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"provisioningState\":\"db\",\"publisherId\":\"kszanmhwgpte\",\"content\":\"iuwkirkskwzts\",\"contentVersion\":\"tjygowifc\",\"skuMappings\":[{\"catalogPlanId\":\"zkgysdgzyybzoxlv\",\"marketplaceSkuId\":\"ptvdxxheigm\",\"marketplaceSkuVersions\":[\"wzghjhjv\",\"abzzbwaybfmdafb\"]},{\"catalogPlanId\":\"mqtnap\",\"marketplaceSkuId\":\"ojxrjnbsconxavi\",\"marketplaceSkuVersions\":[\"yc\",\"bjizqfsgn\"]}]},\"id\":\"xz\",\"name\":\"dpq\",\"type\":\"rfbo\"}]}"; + = "{\"value\":[{\"properties\":{\"provisioningState\":\"xildfkcefey\",\"publisherId\":\"q\",\"content\":\"oisfmnaybdjn\",\"contentVersion\":\"mentqo\",\"skuMappings\":[{\"catalogPlanId\":\"ymxymu\",\"marketplaceSkuId\":\"i\",\"marketplaceSkuVersions\":[\"o\",\"lhl\",\"ycoybajasqubf\"]}]},\"id\":\"cywhj\",\"name\":\"wmchqo\",\"type\":\"tfxcpupuk\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); AzureStackHciManager manager = AzureStackHciManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PagedIterable response = manager.offers() - .listByPublisher("lfdxaglz", "ytlbtlqhopxouvm", "siflikyypzkgxf", "fmy", com.azure.core.util.Context.NONE); + .listByPublisher("cljkxpyl", "woxzgwpsyxji", "eypdvrbk", "rdkdkgaw", com.azure.core.util.Context.NONE); - Assertions.assertEquals("kszanmhwgpte", response.iterator().next().publisherId()); - Assertions.assertEquals("iuwkirkskwzts", response.iterator().next().content()); - Assertions.assertEquals("tjygowifc", response.iterator().next().contentVersion()); - Assertions.assertEquals("zkgysdgzyybzoxlv", response.iterator().next().skuMappings().get(0).catalogPlanId()); - Assertions.assertEquals("ptvdxxheigm", response.iterator().next().skuMappings().get(0).marketplaceSkuId()); - Assertions.assertEquals("wzghjhjv", - response.iterator().next().skuMappings().get(0).marketplaceSkuVersions().get(0)); + Assertions.assertEquals("q", response.iterator().next().publisherId()); + Assertions.assertEquals("oisfmnaybdjn", response.iterator().next().content()); + Assertions.assertEquals("mentqo", response.iterator().next().contentVersion()); + Assertions.assertEquals("ymxymu", response.iterator().next().skuMappings().get(0).catalogPlanId()); + Assertions.assertEquals("i", response.iterator().next().skuMappings().get(0).marketplaceSkuId()); + Assertions.assertEquals("o", response.iterator().next().skuMappings().get(0).marketplaceSkuVersions().get(0)); } } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/OperationDisplayTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/OperationDisplayTests.java index a8650098e7ff..6053508f7d54 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/OperationDisplayTests.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/OperationDisplayTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.generated; @@ -11,13 +11,7 @@ public final class OperationDisplayTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { OperationDisplay model = BinaryData.fromString( - "{\"provider\":\"vkcdmxzr\",\"resource\":\"aimlnwiaaom\",\"operation\":\"weazul\",\"description\":\"ethwwnpjhlfz\"}") + "{\"provider\":\"cdm\",\"resource\":\"rcryuanzwuxzdxta\",\"operation\":\"lhmwhfpmrqobm\",\"description\":\"kknryrtihf\"}") .toObject(OperationDisplay.class); } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - OperationDisplay model = new OperationDisplay(); - model = BinaryData.fromObject(model).toObject(OperationDisplay.class); - } } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/OperationInnerTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/OperationInnerTests.java new file mode 100644 index 000000000000..e03da23ccb4f --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/OperationInnerTests.java @@ -0,0 +1,17 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.azurestackhci.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.azurestackhci.fluent.models.OperationInner; + +public final class OperationInnerTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + OperationInner model = BinaryData.fromString( + "{\"name\":\"nygj\",\"isDataAction\":true,\"display\":{\"provider\":\"eqsrdeupewnwreit\",\"resource\":\"yflusarhmofc\",\"operation\":\"smy\",\"description\":\"kdtmlxhekuk\"},\"origin\":\"user,system\",\"actionType\":\"Internal\"}") + .toObject(OperationInner.class); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/OperationListResultInnerTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/OperationListResultInnerTests.java deleted file mode 100644 index d90327c353c6..000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/OperationListResultInnerTests.java +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.azurestackhci.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.azurestackhci.fluent.models.OperationListResultInner; - -public final class OperationListResultInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - OperationListResultInner model = BinaryData.fromString( - "{\"value\":[{\"name\":\"qvgqouw\",\"isDataAction\":false,\"display\":{\"provider\":\"j\",\"resource\":\"ivqikfxcvhr\",\"operation\":\"phuagrttikteusq\",\"description\":\"kvyklxubyjaffmm\"},\"origin\":\"user\",\"actionType\":\"Internal\"},{\"name\":\"u\",\"isDataAction\":true,\"display\":{\"provider\":\"brta\",\"resource\":\"etttwgdslqxihhr\",\"operation\":\"oi\",\"description\":\"seypxiutcxapz\"},\"origin\":\"system\",\"actionType\":\"Internal\"},{\"name\":\"o\",\"isDataAction\":false,\"display\":{\"provider\":\"xslhvnhlabrqnkk\",\"resource\":\"cjbtrgaehvvib\",\"operation\":\"jj\",\"description\":\"oqbeitpkxzt\"},\"origin\":\"user\",\"actionType\":\"Internal\"}],\"nextLink\":\"ft\"}") - .toObject(OperationListResultInner.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - OperationListResultInner model = new OperationListResultInner(); - model = BinaryData.fromObject(model).toObject(OperationListResultInner.class); - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/OperationListResultTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/OperationListResultTests.java new file mode 100644 index 000000000000..fd66c85ae5f5 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/OperationListResultTests.java @@ -0,0 +1,19 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.azurestackhci.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.azurestackhci.implementation.models.OperationListResult; +import org.junit.jupiter.api.Assertions; + +public final class OperationListResultTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + OperationListResult model = BinaryData.fromString( + "{\"value\":[{\"name\":\"hq\",\"isDataAction\":true,\"display\":{\"provider\":\"pybczmehmtzopb\",\"resource\":\"h\",\"operation\":\"pidgsybbejhphoyc\",\"description\":\"xaobhdxbmtqioqjz\"},\"origin\":\"system\",\"actionType\":\"Internal\"},{\"name\":\"fpownoizhwlr\",\"isDataAction\":false,\"display\":{\"provider\":\"oqijgkdmbpaz\",\"resource\":\"bc\",\"operation\":\"pdznrbtcqqjnqgl\",\"description\":\"gnufoooj\"},\"origin\":\"system\",\"actionType\":\"Internal\"},{\"name\":\"esaagdfm\",\"isDataAction\":true,\"display\":{\"provider\":\"j\",\"resource\":\"ifkwmrvktsizntoc\",\"operation\":\"a\",\"description\":\"ajpsquc\"},\"origin\":\"system\",\"actionType\":\"Internal\"}],\"nextLink\":\"kfo\"}") + .toObject(OperationListResult.class); + Assertions.assertEquals("kfo", model.nextLink()); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/OperationTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/OperationTests.java deleted file mode 100644 index 44ebb587326f..000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/OperationTests.java +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.azurestackhci.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.azurestackhci.models.Operation; -import com.azure.resourcemanager.azurestackhci.models.OperationDisplay; - -public final class OperationTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - Operation model = BinaryData.fromString( - "{\"name\":\"gfcwqmpimaqxzhem\",\"isDataAction\":false,\"display\":{\"provider\":\"uj\",\"resource\":\"t\",\"operation\":\"ozzwculkba\",\"description\":\"fajnjwltlwtjjguk\"},\"origin\":\"user\",\"actionType\":\"Internal\"}") - .toObject(Operation.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - Operation model = new Operation().withDisplay(new OperationDisplay()); - model = BinaryData.fromObject(model).toObject(Operation.class); - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/OperationsListWithResponseMockTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/OperationsListMockTests.java similarity index 55% rename from sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/OperationsListWithResponseMockTests.java rename to sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/OperationsListMockTests.java index d81214e5d119..7bb867a32064 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/OperationsListWithResponseMockTests.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/OperationsListMockTests.java @@ -1,36 +1,36 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.generated; import com.azure.core.credential.AccessToken; import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; +import com.azure.core.http.rest.PagedIterable; import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.azurestackhci.AzureStackHciManager; -import com.azure.resourcemanager.azurestackhci.models.OperationListResult; +import com.azure.resourcemanager.azurestackhci.models.Operation; import java.nio.charset.StandardCharsets; import java.time.OffsetDateTime; import org.junit.jupiter.api.Test; import reactor.core.publisher.Mono; -public final class OperationsListWithResponseMockTests { +public final class OperationsListMockTests { @Test - public void testListWithResponse() throws Exception { + public void testList() throws Exception { String responseStr - = "{\"value\":[{\"name\":\"wp\",\"isDataAction\":true,\"display\":{\"provider\":\"doejtighsxjpyt\",\"resource\":\"qbalahovuuwxhme\",\"operation\":\"nhjiotiffb\",\"description\":\"ngkegxcypxbbfe\"},\"origin\":\"system\",\"actionType\":\"Internal\"}],\"nextLink\":\"zox\"}"; + = "{\"value\":[{\"name\":\"hgz\",\"isDataAction\":false,\"display\":{\"provider\":\"yrgkoekv\",\"resource\":\"xxyxhighctxbxm\",\"operation\":\"pcqydeykvsk\",\"description\":\"zdfrjeizikgq\"},\"origin\":\"user\",\"actionType\":\"Internal\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); AzureStackHciManager manager = AzureStackHciManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - OperationListResult response - = manager.operations().listWithResponse(com.azure.core.util.Context.NONE).getValue(); + PagedIterable response = manager.operations().list(com.azure.core.util.Context.NONE); } } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/OptionalServicesTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/OptionalServicesTests.java index 2750fa905b3f..84052b4a599d 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/OptionalServicesTests.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/OptionalServicesTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.generated; @@ -12,14 +12,14 @@ public final class OptionalServicesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { OptionalServices model - = BinaryData.fromString("{\"customLocation\":\"fouyf\"}").toObject(OptionalServices.class); - Assertions.assertEquals("fouyf", model.customLocation()); + = BinaryData.fromString("{\"customLocation\":\"hyxxrwlycoduhpk\"}").toObject(OptionalServices.class); + Assertions.assertEquals("hyxxrwlycoduhpk", model.customLocation()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - OptionalServices model = new OptionalServices().withCustomLocation("fouyf"); + OptionalServices model = new OptionalServices().withCustomLocation("hyxxrwlycoduhpk"); model = BinaryData.fromObject(model).toObject(OptionalServices.class); - Assertions.assertEquals("fouyf", model.customLocation()); + Assertions.assertEquals("hyxxrwlycoduhpk", model.customLocation()); } } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/PackageVersionInfoTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/PackageVersionInfoTests.java index 2366524f43af..e30800607db5 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/PackageVersionInfoTests.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/PackageVersionInfoTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.generated; @@ -13,22 +13,21 @@ public final class PackageVersionInfoTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { PackageVersionInfo model = BinaryData - .fromString( - "{\"packageType\":\"dfzantkwcegy\",\"version\":\"lbnseqac\",\"lastUpdated\":\"2021-04-09T20:59:15Z\"}") + .fromString("{\"packageType\":\"lbcnndt\",\"version\":\"xawqy\",\"lastUpdated\":\"2021-04-02T07:53:39Z\"}") .toObject(PackageVersionInfo.class); - Assertions.assertEquals("dfzantkwcegy", model.packageType()); - Assertions.assertEquals("lbnseqac", model.version()); - Assertions.assertEquals(OffsetDateTime.parse("2021-04-09T20:59:15Z"), model.lastUpdated()); + Assertions.assertEquals("lbcnndt", model.packageType()); + Assertions.assertEquals("xawqy", model.version()); + Assertions.assertEquals(OffsetDateTime.parse("2021-04-02T07:53:39Z"), model.lastUpdated()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - PackageVersionInfo model = new PackageVersionInfo().withPackageType("dfzantkwcegy") - .withVersion("lbnseqac") - .withLastUpdated(OffsetDateTime.parse("2021-04-09T20:59:15Z")); + PackageVersionInfo model = new PackageVersionInfo().withPackageType("lbcnndt") + .withVersion("xawqy") + .withLastUpdated(OffsetDateTime.parse("2021-04-02T07:53:39Z")); model = BinaryData.fromObject(model).toObject(PackageVersionInfo.class); - Assertions.assertEquals("dfzantkwcegy", model.packageType()); - Assertions.assertEquals("lbnseqac", model.version()); - Assertions.assertEquals(OffsetDateTime.parse("2021-04-09T20:59:15Z"), model.lastUpdated()); + Assertions.assertEquals("lbcnndt", model.packageType()); + Assertions.assertEquals("xawqy", model.version()); + Assertions.assertEquals(OffsetDateTime.parse("2021-04-02T07:53:39Z"), model.lastUpdated()); } } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/PerNodeRemoteSupportSessionTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/PerNodeRemoteSupportSessionTests.java index 14754b3e3280..b464eb49b672 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/PerNodeRemoteSupportSessionTests.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/PerNodeRemoteSupportSessionTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.generated; @@ -11,13 +11,7 @@ public final class PerNodeRemoteSupportSessionTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { PerNodeRemoteSupportSession model = BinaryData.fromString( - "{\"sessionStartTime\":\"2021-06-21T03:22:31Z\",\"sessionEndTime\":\"2021-02-04T14:03:28Z\",\"nodeName\":\"axibxujw\",\"duration\":6825122128576329936,\"accessLevel\":\"Diagnostics\"}") + "{\"sessionStartTime\":\"2021-10-07T08:50:26Z\",\"sessionEndTime\":\"2021-09-06T12:14:51Z\",\"nodeName\":\"gg\",\"duration\":2998919491642974354,\"accessLevel\":\"DiagnosticsAndRepair\"}") .toObject(PerNodeRemoteSupportSession.class); } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - PerNodeRemoteSupportSession model = new PerNodeRemoteSupportSession(); - model = BinaryData.fromObject(model).toObject(PerNodeRemoteSupportSession.class); - } } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/PerNodeStateTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/PerNodeStateTests.java index e0f1b5e483ef..5fed50546674 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/PerNodeStateTests.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/PerNodeStateTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.generated; @@ -11,13 +11,7 @@ public final class PerNodeStateTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { PerNodeState model = BinaryData.fromString( - "{\"name\":\"hurokftyxoln\",\"arcInstance\":\"pwcukjfkgiawxk\",\"arcNodeServicePrincipalObjectId\":\"ypl\",\"state\":\"Succeeded\"}") + "{\"name\":\"theotusiv\",\"arcInstance\":\"v\",\"arcNodeServicePrincipalObjectId\":\"iqihn\",\"state\":\"Creating\"}") .toObject(PerNodeState.class); } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - PerNodeState model = new PerNodeState(); - model = BinaryData.fromObject(model).toObject(PerNodeState.class); - } } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/PhysicalNodesTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/PhysicalNodesTests.java index 688f0c7d8cfc..b0274367cac5 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/PhysicalNodesTests.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/PhysicalNodesTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.generated; @@ -12,16 +12,16 @@ public final class PhysicalNodesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { PhysicalNodes model - = BinaryData.fromString("{\"name\":\"eqx\",\"ipv4Address\":\"z\"}").toObject(PhysicalNodes.class); - Assertions.assertEquals("eqx", model.name()); - Assertions.assertEquals("z", model.ipv4Address()); + = BinaryData.fromString("{\"name\":\"wab\",\"ipv4Address\":\"tshhszhedp\"}").toObject(PhysicalNodes.class); + Assertions.assertEquals("wab", model.name()); + Assertions.assertEquals("tshhszhedp", model.ipv4Address()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - PhysicalNodes model = new PhysicalNodes().withName("eqx").withIpv4Address("z"); + PhysicalNodes model = new PhysicalNodes().withName("wab").withIpv4Address("tshhszhedp"); model = BinaryData.fromObject(model).toObject(PhysicalNodes.class); - Assertions.assertEquals("eqx", model.name()); - Assertions.assertEquals("z", model.ipv4Address()); + Assertions.assertEquals("wab", model.name()); + Assertions.assertEquals("tshhszhedp", model.ipv4Address()); } } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/PublisherInnerTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/PublisherInnerTests.java deleted file mode 100644 index 43f7932806a9..000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/PublisherInnerTests.java +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.azurestackhci.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.azurestackhci.fluent.models.PublisherInner; - -public final class PublisherInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - PublisherInner model = BinaryData.fromString( - "{\"properties\":{\"provisioningState\":\"ijr\"},\"id\":\"civmmg\",\"name\":\"f\",\"type\":\"fiwrxgkn\"}") - .toObject(PublisherInner.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - PublisherInner model = new PublisherInner(); - model = BinaryData.fromObject(model).toObject(PublisherInner.class); - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/PublisherListTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/PublisherListTests.java deleted file mode 100644 index 77c4e3fdb0ac..000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/PublisherListTests.java +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.azurestackhci.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.azurestackhci.models.PublisherList; - -public final class PublisherListTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - PublisherList model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"provisioningState\":\"wahfbousnfepgfew\"},\"id\":\"wlyxgncxyk\",\"name\":\"hdjhlimmbcx\",\"type\":\"h\"},{\"properties\":{\"provisioningState\":\"orxvxcjzhqiz\"},\"id\":\"pxtgqscjav\",\"name\":\"t\",\"type\":\"uhdqazk\"}],\"nextLink\":\"gg\"}") - .toObject(PublisherList.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - PublisherList model = new PublisherList(); - model = BinaryData.fromObject(model).toObject(PublisherList.class); - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/PublisherPropertiesTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/PublisherPropertiesTests.java deleted file mode 100644 index 59549ca25729..000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/PublisherPropertiesTests.java +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.azurestackhci.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.azurestackhci.fluent.models.PublisherProperties; - -public final class PublisherPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - PublisherProperties model - = BinaryData.fromString("{\"provisioningState\":\"vyi\"}").toObject(PublisherProperties.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - PublisherProperties model = new PublisherProperties(); - model = BinaryData.fromObject(model).toObject(PublisherProperties.class); - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/QosPolicyOverridesTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/QosPolicyOverridesTests.java index ff6597890dfc..cd2728dcba0d 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/QosPolicyOverridesTests.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/QosPolicyOverridesTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.generated; @@ -12,21 +12,21 @@ public final class QosPolicyOverridesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { QosPolicyOverrides model = BinaryData.fromString( - "{\"priorityValue8021Action_Cluster\":\"ohdneuel\",\"priorityValue8021Action_SMB\":\"hsd\",\"bandwidthPercentage_SMB\":\"t\"}") + "{\"priorityValue8021Action_Cluster\":\"xkalla\",\"priorityValue8021Action_SMB\":\"elwuipi\",\"bandwidthPercentage_SMB\":\"jzkzi\"}") .toObject(QosPolicyOverrides.class); - Assertions.assertEquals("ohdneuel", model.priorityValue8021ActionCluster()); - Assertions.assertEquals("hsd", model.priorityValue8021ActionSmb()); - Assertions.assertEquals("t", model.bandwidthPercentageSmb()); + Assertions.assertEquals("xkalla", model.priorityValue8021ActionCluster()); + Assertions.assertEquals("elwuipi", model.priorityValue8021ActionSmb()); + Assertions.assertEquals("jzkzi", model.bandwidthPercentageSmb()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - QosPolicyOverrides model = new QosPolicyOverrides().withPriorityValue8021ActionCluster("ohdneuel") - .withPriorityValue8021ActionSmb("hsd") - .withBandwidthPercentageSmb("t"); + QosPolicyOverrides model = new QosPolicyOverrides().withPriorityValue8021ActionCluster("xkalla") + .withPriorityValue8021ActionSmb("elwuipi") + .withBandwidthPercentageSmb("jzkzi"); model = BinaryData.fromObject(model).toObject(QosPolicyOverrides.class); - Assertions.assertEquals("ohdneuel", model.priorityValue8021ActionCluster()); - Assertions.assertEquals("hsd", model.priorityValue8021ActionSmb()); - Assertions.assertEquals("t", model.bandwidthPercentageSmb()); + Assertions.assertEquals("xkalla", model.priorityValue8021ActionCluster()); + Assertions.assertEquals("elwuipi", model.priorityValue8021ActionSmb()); + Assertions.assertEquals("jzkzi", model.bandwidthPercentageSmb()); } } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/RawCertificateDataTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/RawCertificateDataTests.java index 1029247a84af..5f7718a637dd 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/RawCertificateDataTests.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/RawCertificateDataTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.generated; @@ -12,16 +12,17 @@ public final class RawCertificateDataTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - RawCertificateData model = BinaryData.fromString("{\"certificates\":[\"qhakauhashsf\",\"xosow\",\"xcug\"]}") - .toObject(RawCertificateData.class); - Assertions.assertEquals("qhakauhashsf", model.certificates().get(0)); + RawCertificateData model + = BinaryData.fromString("{\"certificates\":[\"pkii\",\"zyexzn\",\"lixhnrztfol\",\"bnxknalaulppg\"]}") + .toObject(RawCertificateData.class); + Assertions.assertEquals("pkii", model.certificates().get(0)); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - RawCertificateData model - = new RawCertificateData().withCertificates(Arrays.asList("qhakauhashsf", "xosow", "xcug")); + RawCertificateData model = new RawCertificateData() + .withCertificates(Arrays.asList("pkii", "zyexzn", "lixhnrztfol", "bnxknalaulppg")); model = BinaryData.fromObject(model).toObject(RawCertificateData.class); - Assertions.assertEquals("qhakauhashsf", model.certificates().get(0)); + Assertions.assertEquals("pkii", model.certificates().get(0)); } } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ReconcileArcSettingsRequestPropertiesTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ReconcileArcSettingsRequestPropertiesTests.java new file mode 100644 index 000000000000..d434b8186acd --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ReconcileArcSettingsRequestPropertiesTests.java @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.azurestackhci.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.azurestackhci.models.ReconcileArcSettingsRequestProperties; +import java.util.Arrays; +import org.junit.jupiter.api.Assertions; + +public final class ReconcileArcSettingsRequestPropertiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ReconcileArcSettingsRequestProperties model + = BinaryData.fromString("{\"clusterNodes\":[\"yxwjkcp\",\"bnwbxgjvtbvpyssz\",\"nruj\",\"guhmuouqfpr\"]}") + .toObject(ReconcileArcSettingsRequestProperties.class); + Assertions.assertEquals("yxwjkcp", model.clusterNodes().get(0)); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + ReconcileArcSettingsRequestProperties model = new ReconcileArcSettingsRequestProperties() + .withClusterNodes(Arrays.asList("yxwjkcp", "bnwbxgjvtbvpyssz", "nruj", "guhmuouqfpr")); + model = BinaryData.fromObject(model).toObject(ReconcileArcSettingsRequestProperties.class); + Assertions.assertEquals("yxwjkcp", model.clusterNodes().get(0)); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ReconcileArcSettingsRequestTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ReconcileArcSettingsRequestTests.java new file mode 100644 index 000000000000..be3e6ef4d55c --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ReconcileArcSettingsRequestTests.java @@ -0,0 +1,31 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.azurestackhci.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.azurestackhci.models.ReconcileArcSettingsRequest; +import com.azure.resourcemanager.azurestackhci.models.ReconcileArcSettingsRequestProperties; +import java.util.Arrays; +import org.junit.jupiter.api.Assertions; + +public final class ReconcileArcSettingsRequestTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ReconcileArcSettingsRequest model = BinaryData + .fromString( + "{\"properties\":{\"clusterNodes\":[\"lgbquxig\",\"yjgzjaoyfhrtxiln\",\"rkujy\",\"vlejuvfqa\"]}}") + .toObject(ReconcileArcSettingsRequest.class); + Assertions.assertEquals("lgbquxig", model.properties().clusterNodes().get(0)); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + ReconcileArcSettingsRequest model + = new ReconcileArcSettingsRequest().withProperties(new ReconcileArcSettingsRequestProperties() + .withClusterNodes(Arrays.asList("lgbquxig", "yjgzjaoyfhrtxiln", "rkujy", "vlejuvfqa"))); + model = BinaryData.fromObject(model).toObject(ReconcileArcSettingsRequest.class); + Assertions.assertEquals("lgbquxig", model.properties().clusterNodes().get(0)); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/RemoteSupportJobNodeSettingsTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/RemoteSupportJobNodeSettingsTests.java new file mode 100644 index 000000000000..aaf161da3f8e --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/RemoteSupportJobNodeSettingsTests.java @@ -0,0 +1,17 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.azurestackhci.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.azurestackhci.models.RemoteSupportJobNodeSettings; + +public final class RemoteSupportJobNodeSettingsTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + RemoteSupportJobNodeSettings model = BinaryData.fromString( + "{\"state\":\"efchn\",\"createdAt\":\"2021-09-28T11:12:27Z\",\"updatedAt\":\"2021-11-04T17:27:29Z\",\"connectionStatus\":\"xhk\",\"connectionErrorMessage\":\"qirwrweoox\"}") + .toObject(RemoteSupportJobNodeSettings.class); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/RemoteSupportJobReportedPropertiesTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/RemoteSupportJobReportedPropertiesTests.java new file mode 100644 index 000000000000..c76c418ed1d8 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/RemoteSupportJobReportedPropertiesTests.java @@ -0,0 +1,17 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.azurestackhci.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.azurestackhci.models.RemoteSupportJobReportedProperties; + +public final class RemoteSupportJobReportedPropertiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + RemoteSupportJobReportedProperties model = BinaryData.fromString( + "{\"percentComplete\":1610520770,\"validationStatus\":{\"status\":\"zuwfmdur\",\"steps\":[{\"name\":\"izvcjfe\",\"description\":\"sdjubggbqigkxkbs\",\"fullStepIndex\":\"gak\",\"startTimeUtc\":\"cyrcmjdmspo\",\"endTimeUtc\":\"pv\",\"status\":\"rylniofrzg\",\"steps\":[{\"name\":\"dmstk\",\"description\":\"l\",\"fullStepIndex\":\"bcuiiz\",\"startTimeUtc\":\"twfans\",\"endTimeUtc\":\"pdibmikostbzbki\",\"status\":\"uqn\",\"steps\":[{},{},{}],\"exception\":[\"fy\",\"sgcrpfbcunezzce\"]}],\"exception\":[\"fwyfwlwxjwet\",\"psihcla\",\"zvaylptrsqqw\",\"tcmwqkchc\"]},{\"name\":\"axfe\",\"description\":\"jkjexf\",\"fullStepIndex\":\"qvhpsylkkshkbff\",\"startTimeUtc\":\"mxzjrgywwpgjx\",\"endTimeUtc\":\"ptfujgicgaaoept\",\"status\":\"qutdewemxs\",\"steps\":[{\"name\":\"unzzjgehk\",\"description\":\"imrt\",\"fullStepIndex\":\"okffqyinljqepqwh\",\"startTimeUtc\":\"monstshiyxgve\",\"endTimeUtc\":\"clduc\",\"status\":\"irdsvuwcob\",\"steps\":[{},{},{},{}],\"exception\":[\"mninwjizcilng\",\"gshejjtbxqmulux\"]},{\"name\":\"qzvnersbycucr\",\"description\":\"amikzebrqbsm\",\"fullStepIndex\":\"ziqgfuh\",\"startTimeUtc\":\"zruswh\",\"endTimeUtc\":\"czznvfbycjsxj\",\"status\":\"i\",\"steps\":[{},{}],\"exception\":[\"wmxqhndvnoamlds\",\"haohdjhhflzokxc\",\"xpelnjetagltsx\",\"atftgzpnpbsw\"]},{\"name\":\"floccsrmozih\",\"description\":\"pgawtxxpkyjcxcjx\",\"fullStepIndex\":\"ytfmpc\",\"startTimeUtc\":\"ilrmcaykggnox\",\"endTimeUtc\":\"t\",\"status\":\"sxwpndfcpfnznthj\",\"steps\":[{},{},{}],\"exception\":[\"osrxuzvoa\",\"ktcqio\"]}],\"exception\":[\"bzahgxqd\",\"yrtltlaprltzkat\",\"hjm\"]}]},\"deploymentStatus\":{\"status\":\"bsoqeqala\",\"steps\":[{\"name\":\"gunbtgfebwlnbm\",\"description\":\"reeudzqavb\",\"fullStepIndex\":\"qmjxlyyzglgouwtl\",\"startTimeUtc\":\"jyuojqtobaxkjeyt\",\"endTimeUtc\":\"lbfjkwr\",\"status\":\"nkqbhsyrq\",\"steps\":[{\"name\":\"hdenxaulk\",\"description\":\"kdk\",\"fullStepIndex\":\"mjnnawtq\",\"startTimeUtc\":\"pxuckpggq\",\"endTimeUtc\":\"eyirdhlisngw\",\"status\":\"qqmpizruwnpqx\",\"steps\":[{},{},{}],\"exception\":[\"cng\",\"saasiixtmkzj\"]},{\"name\":\"viirhgfgrws\",\"description\":\"gratzvzbglbyvict\",\"fullStepIndex\":\"brxkjzwr\",\"startTimeUtc\":\"ffm\",\"endTimeUtc\":\"kwfbkgo\",\"status\":\"wopdbydpiz\",\"steps\":[{},{},{},{}],\"exception\":[\"apxbi\",\"gn\",\"gjkn\"]}],\"exception\":[\"fcttuxuuyilfl\",\"oiquvrehmrnjhvs\"]},{\"name\":\"ztczytq\",\"description\":\"w\",\"fullStepIndex\":\"uunfprnjletlxsm\",\"startTimeUtc\":\"ddoui\",\"endTimeUtc\":\"mowaziynknlqwzdv\",\"status\":\"w\",\"steps\":[{\"name\":\"zdtmaajquhuxylrj\",\"description\":\"ty\",\"fullStepIndex\":\"bmzyospsps\",\"startTimeUtc\":\"kfkyjp\",\"endTimeUtc\":\"pbpssdfpp\",\"status\":\"gt\",\"steps\":[{},{},{}],\"exception\":[\"tvczkcnyxr\",\"munjdxvglnkvx\",\"xpaglqivbgkc\",\"khpzvuqdflv\"]},{\"name\":\"iypfp\",\"description\":\"cpzgpxtiv\",\"fullStepIndex\":\"knidib\",\"startTimeUtc\":\"jxgpnrhgovfg\",\"endTimeUtc\":\"kqmhhaowjr\",\"status\":\"vuporqzdfuydzv\",\"steps\":[{},{},{}],\"exception\":[\"nq\",\"xqpswok\",\"vkhlggdhbemz\"]},{\"name\":\"zszuwiwtglxx\",\"description\":\"jfpgpicrmn\",\"fullStepIndex\":\"rgmqgjs\",\"startTimeUtc\":\"pqcbfrmbodthsq\",\"endTimeUtc\":\"vriibakclacjfr\",\"status\":\"ousxauzlwvsgmw\",\"steps\":[{}],\"exception\":[\"izvu\",\"mmkjsvthnwpztek\",\"vmribiat\"]},{\"name\":\"plucfotangcfhnyk\",\"description\":\"ugswvx\",\"fullStepIndex\":\"mzqwmvtxnjmxmcu\",\"startTimeUtc\":\"dtcvcl\",\"endTimeUtc\":\"npdkv\",\"status\":\"abuiy\",\"steps\":[{},{},{}],\"exception\":[\"phdu\",\"neiknpg\",\"xgjiuqh\"]}],\"exception\":[\"ozipqwjedmurrxx\",\"ewpktvqy\"]}]},\"nodeSettings\":{\"state\":\"qpzoyhlfbcgwgcl\",\"createdAt\":\"2021-03-01T11:00:51Z\",\"updatedAt\":\"2021-01-15T05:22:42Z\",\"connectionStatus\":\"injipnwjf\",\"connectionErrorMessage\":\"qlafcbahhpzpofoi\"},\"sessionDetails\":[{\"sessionId\":\"filkmkkholv\",\"sessionStartTime\":\"2021-09-12T02:19:35Z\",\"sessionEndTime\":\"2021-08-23T00:24:23Z\",\"accessLevel\":\"None\",\"transcriptLocation\":\"gphuartvtiu\"}]}") + .toObject(RemoteSupportJobReportedProperties.class); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/RemoteSupportNodeSettingsTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/RemoteSupportNodeSettingsTests.java index 1c7db17a91aa..9f08aab257c2 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/RemoteSupportNodeSettingsTests.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/RemoteSupportNodeSettingsTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.generated; @@ -11,13 +11,7 @@ public final class RemoteSupportNodeSettingsTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { RemoteSupportNodeSettings model = BinaryData.fromString( - "{\"arcResourceId\":\"xdbabphlwr\",\"state\":\"fkts\",\"createdAt\":\"2021-03-16T19:30:33Z\",\"updatedAt\":\"2021-11-18T02:17:24Z\",\"connectionStatus\":\"cmnyyazttb\",\"connectionErrorMessage\":\"wrqpue\",\"transcriptLocation\":\"kzywbiex\"}") + "{\"arcResourceId\":\"nehmpvecx\",\"state\":\"debfqkkrbmpukgri\",\"createdAt\":\"2021-03-19T11:37:29Z\",\"updatedAt\":\"2021-11-24T09:56:45Z\",\"connectionStatus\":\"bxzpuzycisp\",\"connectionErrorMessage\":\"zahmgkbrpyydhibn\",\"transcriptLocation\":\"qkpikadrgvtqagnb\"}") .toObject(RemoteSupportNodeSettings.class); } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - RemoteSupportNodeSettings model = new RemoteSupportNodeSettings(); - model = BinaryData.fromObject(model).toObject(RemoteSupportNodeSettings.class); - } } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/RemoteSupportPropertiesTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/RemoteSupportPropertiesTests.java index 953be0e12f30..89f9ca222ff2 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/RemoteSupportPropertiesTests.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/RemoteSupportPropertiesTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.generated; @@ -11,7 +11,7 @@ public final class RemoteSupportPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { RemoteSupportProperties model = BinaryData.fromString( - "{\"accessLevel\":\"Diagnostics\",\"expirationTimeStamp\":\"2021-06-19T07:11:27Z\",\"remoteSupportType\":\"Revoke\",\"remoteSupportNodeSettings\":[{\"arcResourceId\":\"xbf\",\"state\":\"xnehmpvec\",\"createdAt\":\"2021-06-15T22:18:20Z\",\"updatedAt\":\"2020-12-30T00:43:07Z\",\"connectionStatus\":\"fqkkr\",\"connectionErrorMessage\":\"pukgriwflzlfb\",\"transcriptLocation\":\"puz\"},{\"arcResourceId\":\"ispnqzahmgkbrp\",\"state\":\"dhibnuq\",\"createdAt\":\"2021-03-15T23:25:16Z\",\"updatedAt\":\"2021-01-19T19:26:18Z\",\"connectionStatus\":\"drgvtqagn\",\"connectionErrorMessage\":\"ynhijggme\",\"transcriptLocation\":\"siarbutrcvpn\"}],\"remoteSupportSessionDetails\":[{\"sessionStartTime\":\"2021-07-19T14:05:18Z\",\"sessionEndTime\":\"2021-10-18T23:40:33Z\",\"nodeName\":\"nmpxttdb\",\"duration\":5309093572451246570,\"accessLevel\":\"DiagnosticsAndRepair\"},{\"sessionStartTime\":\"2020-12-22T00:49:35Z\",\"sessionEndTime\":\"2021-12-08T10:55:15Z\",\"nodeName\":\"skpbhenbtkcxywn\",\"duration\":3361050620024364671,\"accessLevel\":\"Diagnostics\"},{\"sessionStartTime\":\"2021-08-18T06:48:11Z\",\"sessionEndTime\":\"2021-11-13T00:34:54Z\",\"nodeName\":\"ybyxc\",\"duration\":3688624800948339893,\"accessLevel\":\"DiagnosticsAndRepair\"}]}") + "{\"accessLevel\":\"DiagnosticsAndRepair\",\"expirationTimeStamp\":\"2021-11-25T14:54:19Z\",\"remoteSupportType\":\"Enable\",\"remoteSupportNodeSettings\":[{\"arcResourceId\":\"fyhxde\",\"state\":\"jzicwifsjt\",\"createdAt\":\"2021-05-15T05:25:36Z\",\"updatedAt\":\"2021-01-09T20:44:17Z\",\"connectionStatus\":\"shcbkhajdeyeamdp\",\"connectionErrorMessage\":\"g\",\"transcriptLocation\":\"pbuxwgipwhon\"},{\"arcResourceId\":\"kgshwa\",\"state\":\"ixzbinjeputtmryw\",\"createdAt\":\"2021-04-17T17:28:27Z\",\"updatedAt\":\"2021-04-28T10:57:32Z\",\"connectionStatus\":\"iyqzrnk\",\"connectionErrorMessage\":\"vyxlwhzlsicohoqq\",\"transcriptLocation\":\"vlryavwhheunmmq\"},{\"arcResourceId\":\"yxzk\",\"state\":\"ocukoklyax\",\"createdAt\":\"2021-06-15T16:54:54Z\",\"updatedAt\":\"2021-08-29T22:44:57Z\",\"connectionStatus\":\"szfkbe\",\"connectionErrorMessage\":\"ewrmjmwvvjektc\",\"transcriptLocation\":\"enhwlrs\"},{\"arcResourceId\":\"rzpwvlqdqgbiq\",\"state\":\"ihkaetcktvfc\",\"createdAt\":\"2021-07-13T01:18:13Z\",\"updatedAt\":\"2021-09-20T06:05:50Z\",\"connectionStatus\":\"ymuctqhjfbebrj\",\"connectionErrorMessage\":\"erfuwuttt\",\"transcriptLocation\":\"vjrbirphxepcyvah\"}],\"remoteSupportSessionDetails\":[{\"sessionStartTime\":\"2021-05-16T05:23:49Z\",\"sessionEndTime\":\"2021-01-31T22:23:26Z\",\"nodeName\":\"j\",\"duration\":8484849300760600701,\"accessLevel\":\"DiagnosticsAndRepair\"},{\"sessionStartTime\":\"2021-11-04T11:41Z\",\"sessionEndTime\":\"2021-12-02T09:39:42Z\",\"nodeName\":\"jljyoxgv\",\"duration\":1652014854559913634,\"accessLevel\":\"DiagnosticsAndRepair\"},{\"sessionStartTime\":\"2021-04-14T10:54:43Z\",\"sessionEndTime\":\"2021-09-18T15:38:18Z\",\"nodeName\":\"jeszzhbijhtxfv\",\"duration\":2868735092861177566,\"accessLevel\":\"Diagnostics\"}]}") .toObject(RemoteSupportProperties.class); } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/RemoteSupportRequestPropertiesTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/RemoteSupportRequestPropertiesTests.java index a07e7bc02370..4ba695d7e85f 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/RemoteSupportRequestPropertiesTests.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/RemoteSupportRequestPropertiesTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.generated; @@ -14,19 +14,19 @@ public final class RemoteSupportRequestPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { RemoteSupportRequestProperties model = BinaryData.fromString( - "{\"accessLevel\":\"DiagnosticsAndRepair\",\"expirationTimeStamp\":\"2021-09-05T17:35:53Z\",\"remoteSupportType\":\"Enable\"}") + "{\"accessLevel\":\"Diagnostics\",\"expirationTimeStamp\":\"2021-06-29T01:50:53Z\",\"remoteSupportType\":\"Enable\"}") .toObject(RemoteSupportRequestProperties.class); - Assertions.assertEquals(OffsetDateTime.parse("2021-09-05T17:35:53Z"), model.expirationTimestamp()); + Assertions.assertEquals(OffsetDateTime.parse("2021-06-29T01:50:53Z"), model.expirationTimestamp()); Assertions.assertEquals(RemoteSupportType.ENABLE, model.remoteSupportType()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { RemoteSupportRequestProperties model - = new RemoteSupportRequestProperties().withExpirationTimestamp(OffsetDateTime.parse("2021-09-05T17:35:53Z")) + = new RemoteSupportRequestProperties().withExpirationTimestamp(OffsetDateTime.parse("2021-06-29T01:50:53Z")) .withRemoteSupportType(RemoteSupportType.ENABLE); model = BinaryData.fromObject(model).toObject(RemoteSupportRequestProperties.class); - Assertions.assertEquals(OffsetDateTime.parse("2021-09-05T17:35:53Z"), model.expirationTimestamp()); + Assertions.assertEquals(OffsetDateTime.parse("2021-06-29T01:50:53Z"), model.expirationTimestamp()); Assertions.assertEquals(RemoteSupportType.ENABLE, model.remoteSupportType()); } } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/RemoteSupportRequestTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/RemoteSupportRequestTests.java index 5c9bb76ed90d..f0ba78c59339 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/RemoteSupportRequestTests.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/RemoteSupportRequestTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.generated; @@ -15,19 +15,19 @@ public final class RemoteSupportRequestTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { RemoteSupportRequest model = BinaryData.fromString( - "{\"properties\":{\"accessLevel\":\"DiagnosticsAndRepair\",\"expirationTimeStamp\":\"2021-03-18T15:51:25Z\",\"remoteSupportType\":\"Enable\"}}") + "{\"properties\":{\"accessLevel\":\"Diagnostics\",\"expirationTimeStamp\":\"2021-10-11T15:02:03Z\",\"remoteSupportType\":\"Revoke\"}}") .toObject(RemoteSupportRequest.class); - Assertions.assertEquals(OffsetDateTime.parse("2021-03-18T15:51:25Z"), model.properties().expirationTimestamp()); - Assertions.assertEquals(RemoteSupportType.ENABLE, model.properties().remoteSupportType()); + Assertions.assertEquals(OffsetDateTime.parse("2021-10-11T15:02:03Z"), model.properties().expirationTimestamp()); + Assertions.assertEquals(RemoteSupportType.REVOKE, model.properties().remoteSupportType()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { RemoteSupportRequest model = new RemoteSupportRequest().withProperties( - new RemoteSupportRequestProperties().withExpirationTimestamp(OffsetDateTime.parse("2021-03-18T15:51:25Z")) - .withRemoteSupportType(RemoteSupportType.ENABLE)); + new RemoteSupportRequestProperties().withExpirationTimestamp(OffsetDateTime.parse("2021-10-11T15:02:03Z")) + .withRemoteSupportType(RemoteSupportType.REVOKE)); model = BinaryData.fromObject(model).toObject(RemoteSupportRequest.class); - Assertions.assertEquals(OffsetDateTime.parse("2021-03-18T15:51:25Z"), model.properties().expirationTimestamp()); - Assertions.assertEquals(RemoteSupportType.ENABLE, model.properties().remoteSupportType()); + Assertions.assertEquals(OffsetDateTime.parse("2021-10-11T15:02:03Z"), model.properties().expirationTimestamp()); + Assertions.assertEquals(RemoteSupportType.REVOKE, model.properties().remoteSupportType()); } } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/RemoteSupportSessionTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/RemoteSupportSessionTests.java new file mode 100644 index 000000000000..2e4ed38a7b3a --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/RemoteSupportSessionTests.java @@ -0,0 +1,17 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.azurestackhci.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.azurestackhci.models.RemoteSupportSession; + +public final class RemoteSupportSessionTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + RemoteSupportSession model = BinaryData.fromString( + "{\"sessionId\":\"i\",\"sessionStartTime\":\"2021-05-19T03:14:53Z\",\"sessionEndTime\":\"2021-06-11T14:56:28Z\",\"accessLevel\":\"Diagnostics\",\"transcriptLocation\":\"wmozqvbub\"}") + .toObject(RemoteSupportSession.class); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ReportedPropertiesTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ReportedPropertiesTests.java index 46db0d0bc1ad..d3030d3870f7 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ReportedPropertiesTests.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ReportedPropertiesTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.generated; @@ -11,13 +11,7 @@ public final class ReportedPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ReportedProperties model = BinaryData.fromString( - "{\"deviceState\":\"InMaintenance\",\"extensionProfile\":{\"extensions\":[{\"extensionName\":\"iuas\",\"state\":\"Updating\",\"errorDetails\":[{\"exception\":\"ocnequygdjboqgrm\"},{\"exception\":\"jkqev\"},{\"exception\":\"rmmwiuawvcmj\"},{\"exception\":\"xiid\"}],\"extensionResourceId\":\"czskoswoqiqazu\",\"typeHandlerVersion\":\"mxzkr\",\"managedBy\":\"Azure\"}]}}") + "{\"deviceState\":\"Connected\",\"extensionProfile\":{\"extensions\":[{\"extensionName\":\"xhikkflrmymyin\",\"state\":\"Updating\",\"errorDetails\":[{\"exception\":\"s\"},{\"exception\":\"lmiiiovg\"},{\"exception\":\"gxuugqkctotio\"}],\"extensionResourceId\":\"xteqdptjgwdtg\",\"typeHandlerVersion\":\"ranblwphqlkccu\",\"managedBy\":\"Azure\"},{\"extensionName\":\"qwahoi\",\"state\":\"Creating\",\"errorDetails\":[{\"exception\":\"iprglvawu\"},{\"exception\":\"d\"},{\"exception\":\"ypivlsbb\"}],\"extensionResourceId\":\"mcub\",\"typeHandlerVersion\":\"ifoxxkubvphav\",\"managedBy\":\"User\"},{\"extensionName\":\"rbqgvgov\",\"state\":\"Canceled\",\"errorDetails\":[{\"exception\":\"fjoknss\"},{\"exception\":\"zqedikdfrdbi\"},{\"exception\":\"rjgeih\"},{\"exception\":\"lg\"}],\"extensionResourceId\":\"fiwzcxmjpbyep\",\"typeHandlerVersion\":\"gt\",\"managedBy\":\"User\"}]}}") .toObject(ReportedProperties.class); } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ReportedProperties model = new ReportedProperties(); - model = BinaryData.fromObject(model).toObject(ReportedProperties.class); - } } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/SbeDeploymentInfoTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/SbeDeploymentInfoTests.java index f6cf1f78f33c..eb8e4daae6c1 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/SbeDeploymentInfoTests.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/SbeDeploymentInfoTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.generated; @@ -13,27 +13,27 @@ public final class SbeDeploymentInfoTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { SbeDeploymentInfo model = BinaryData.fromString( - "{\"version\":\"bcuejrjxgci\",\"family\":\"brh\",\"publisher\":\"xsdqrhzoymibmrqy\",\"sbeManifestSource\":\"ahwfluszdtmhrk\",\"sbeManifestCreationDate\":\"2021-06-28T13:04:58Z\"}") + "{\"version\":\"jhemms\",\"family\":\"dkcrodt\",\"publisher\":\"nfwjlfltkacjvefk\",\"sbeManifestSource\":\"foakgg\",\"sbeManifestCreationDate\":\"2021-01-22T11:21:37Z\"}") .toObject(SbeDeploymentInfo.class); - Assertions.assertEquals("bcuejrjxgci", model.version()); - Assertions.assertEquals("brh", model.family()); - Assertions.assertEquals("xsdqrhzoymibmrqy", model.publisher()); - Assertions.assertEquals("ahwfluszdtmhrk", model.sbeManifestSource()); - Assertions.assertEquals(OffsetDateTime.parse("2021-06-28T13:04:58Z"), model.sbeManifestCreationDate()); + Assertions.assertEquals("jhemms", model.version()); + Assertions.assertEquals("dkcrodt", model.family()); + Assertions.assertEquals("nfwjlfltkacjvefk", model.publisher()); + Assertions.assertEquals("foakgg", model.sbeManifestSource()); + Assertions.assertEquals(OffsetDateTime.parse("2021-01-22T11:21:37Z"), model.sbeManifestCreationDate()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - SbeDeploymentInfo model = new SbeDeploymentInfo().withVersion("bcuejrjxgci") - .withFamily("brh") - .withPublisher("xsdqrhzoymibmrqy") - .withSbeManifestSource("ahwfluszdtmhrk") - .withSbeManifestCreationDate(OffsetDateTime.parse("2021-06-28T13:04:58Z")); + SbeDeploymentInfo model = new SbeDeploymentInfo().withVersion("jhemms") + .withFamily("dkcrodt") + .withPublisher("nfwjlfltkacjvefk") + .withSbeManifestSource("foakgg") + .withSbeManifestCreationDate(OffsetDateTime.parse("2021-01-22T11:21:37Z")); model = BinaryData.fromObject(model).toObject(SbeDeploymentInfo.class); - Assertions.assertEquals("bcuejrjxgci", model.version()); - Assertions.assertEquals("brh", model.family()); - Assertions.assertEquals("xsdqrhzoymibmrqy", model.publisher()); - Assertions.assertEquals("ahwfluszdtmhrk", model.sbeManifestSource()); - Assertions.assertEquals(OffsetDateTime.parse("2021-06-28T13:04:58Z"), model.sbeManifestCreationDate()); + Assertions.assertEquals("jhemms", model.version()); + Assertions.assertEquals("dkcrodt", model.family()); + Assertions.assertEquals("nfwjlfltkacjvefk", model.publisher()); + Assertions.assertEquals("foakgg", model.sbeManifestSource()); + Assertions.assertEquals(OffsetDateTime.parse("2021-01-22T11:21:37Z"), model.sbeManifestCreationDate()); } } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/SbePartnerPropertiesTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/SbePartnerPropertiesTests.java index 2842b0fb2f9b..1087bb9c74ad 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/SbePartnerPropertiesTests.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/SbePartnerPropertiesTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.generated; @@ -11,17 +11,19 @@ public final class SbePartnerPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - SbePartnerProperties model = BinaryData.fromString("{\"name\":\"yvoqa\",\"value\":\"iexpbtgiwbwo\"}") - .toObject(SbePartnerProperties.class); - Assertions.assertEquals("yvoqa", model.name()); - Assertions.assertEquals("iexpbtgiwbwo", model.value()); + SbePartnerProperties model + = BinaryData.fromString("{\"name\":\"gaowpulpqblylsyx\",\"value\":\"jnsjervtiagxsd\"}") + .toObject(SbePartnerProperties.class); + Assertions.assertEquals("gaowpulpqblylsyx", model.name()); + Assertions.assertEquals("jnsjervtiagxsd", model.value()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - SbePartnerProperties model = new SbePartnerProperties().withName("yvoqa").withValue("iexpbtgiwbwo"); + SbePartnerProperties model + = new SbePartnerProperties().withName("gaowpulpqblylsyx").withValue("jnsjervtiagxsd"); model = BinaryData.fromObject(model).toObject(SbePartnerProperties.class); - Assertions.assertEquals("yvoqa", model.name()); - Assertions.assertEquals("iexpbtgiwbwo", model.value()); + Assertions.assertEquals("gaowpulpqblylsyx", model.name()); + Assertions.assertEquals("jnsjervtiagxsd", model.value()); } } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/SdnIntegrationTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/SdnIntegrationTests.java index 287d109e4289..cbe2d80be362 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/SdnIntegrationTests.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/SdnIntegrationTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.generated; @@ -13,22 +13,22 @@ public final class SdnIntegrationTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { SdnIntegration model = BinaryData.fromString( - "{\"networkController\":{\"macAddressPoolStart\":\"hjwniyqsluic\",\"macAddressPoolStop\":\"ggkzzlvmbmpa\",\"networkVirtualizationEnabled\":true}}") + "{\"networkController\":{\"macAddressPoolStart\":\"khly\",\"macAddressPoolStop\":\"hdgqggeb\",\"networkVirtualizationEnabled\":false}}") .toObject(SdnIntegration.class); - Assertions.assertEquals("hjwniyqsluic", model.networkController().macAddressPoolStart()); - Assertions.assertEquals("ggkzzlvmbmpa", model.networkController().macAddressPoolStop()); - Assertions.assertEquals(true, model.networkController().networkVirtualizationEnabled()); + Assertions.assertEquals("khly", model.networkController().macAddressPoolStart()); + Assertions.assertEquals("hdgqggeb", model.networkController().macAddressPoolStop()); + Assertions.assertFalse(model.networkController().networkVirtualizationEnabled()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { SdnIntegration model - = new SdnIntegration().withNetworkController(new NetworkController().withMacAddressPoolStart("hjwniyqsluic") - .withMacAddressPoolStop("ggkzzlvmbmpa") - .withNetworkVirtualizationEnabled(true)); + = new SdnIntegration().withNetworkController(new NetworkController().withMacAddressPoolStart("khly") + .withMacAddressPoolStop("hdgqggeb") + .withNetworkVirtualizationEnabled(false)); model = BinaryData.fromObject(model).toObject(SdnIntegration.class); - Assertions.assertEquals("hjwniyqsluic", model.networkController().macAddressPoolStart()); - Assertions.assertEquals("ggkzzlvmbmpa", model.networkController().macAddressPoolStop()); - Assertions.assertEquals(true, model.networkController().networkVirtualizationEnabled()); + Assertions.assertEquals("khly", model.networkController().macAddressPoolStart()); + Assertions.assertEquals("hdgqggeb", model.networkController().macAddressPoolStop()); + Assertions.assertFalse(model.networkController().networkVirtualizationEnabled()); } } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/SecurityComplianceStatusTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/SecurityComplianceStatusTests.java index 5b2a60dea0f6..c29988bee1dd 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/SecurityComplianceStatusTests.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/SecurityComplianceStatusTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.generated; @@ -11,13 +11,7 @@ public final class SecurityComplianceStatusTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { SecurityComplianceStatus model = BinaryData.fromString( - "{\"securedCoreCompliance\":\"Compliant\",\"wdacCompliance\":\"Pending\",\"dataAtRestEncrypted\":\"Pending\",\"dataInTransitProtected\":\"Compliant\",\"lastUpdated\":\"2021-03-28T22:38:24Z\"}") + "{\"securedCoreCompliance\":\"Compliant\",\"wdacCompliance\":\"NonCompliant\",\"dataAtRestEncrypted\":\"NonCompliant\",\"dataInTransitProtected\":\"Compliant\",\"lastUpdated\":\"2021-03-09T12:27:11Z\"}") .toObject(SecurityComplianceStatus.class); } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - SecurityComplianceStatus model = new SecurityComplianceStatus(); - model = BinaryData.fromObject(model).toObject(SecurityComplianceStatus.class); - } } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/SecurityPropertiesTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/SecurityPropertiesTests.java index bcf15b19ee59..175b482dd85d 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/SecurityPropertiesTests.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/SecurityPropertiesTests.java @@ -1,40 +1,39 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.generated; import com.azure.core.util.BinaryData; import com.azure.resourcemanager.azurestackhci.fluent.models.SecurityProperties; import com.azure.resourcemanager.azurestackhci.models.ComplianceAssignmentType; -import com.azure.resourcemanager.azurestackhci.models.ProvisioningState; import org.junit.jupiter.api.Assertions; public final class SecurityPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { SecurityProperties model = BinaryData.fromString( - "{\"securedCoreComplianceAssignment\":\"Audit\",\"wdacComplianceAssignment\":\"ApplyAndAutoCorrect\",\"smbEncryptionForIntraClusterTrafficComplianceAssignment\":\"Audit\",\"securityComplianceStatus\":{\"securedCoreCompliance\":\"NonCompliant\",\"wdacCompliance\":\"NonCompliant\",\"dataAtRestEncrypted\":\"NonCompliant\",\"dataInTransitProtected\":\"NonCompliant\",\"lastUpdated\":\"2021-03-24T12:08Z\"},\"provisioningState\":\"PartiallyConnected\"}") + "{\"securedCoreComplianceAssignment\":\"ApplyAndAutoCorrect\",\"wdacComplianceAssignment\":\"ApplyAndAutoCorrect\",\"smbEncryptionForIntraClusterTrafficComplianceAssignment\":\"ApplyAndAutoCorrect\",\"securityComplianceStatus\":{\"securedCoreCompliance\":\"Compliant\",\"wdacCompliance\":\"NonCompliant\",\"dataAtRestEncrypted\":\"Pending\",\"dataInTransitProtected\":\"Compliant\",\"lastUpdated\":\"2021-08-02T07:49:48Z\"},\"provisioningState\":\"Provisioning\"}") .toObject(SecurityProperties.class); - Assertions.assertEquals(ComplianceAssignmentType.AUDIT, model.securedCoreComplianceAssignment()); + Assertions.assertEquals(ComplianceAssignmentType.APPLY_AND_AUTO_CORRECT, + model.securedCoreComplianceAssignment()); Assertions.assertEquals(ComplianceAssignmentType.APPLY_AND_AUTO_CORRECT, model.wdacComplianceAssignment()); - Assertions.assertEquals(ComplianceAssignmentType.AUDIT, + Assertions.assertEquals(ComplianceAssignmentType.APPLY_AND_AUTO_CORRECT, model.smbEncryptionForIntraClusterTrafficComplianceAssignment()); - Assertions.assertEquals(ProvisioningState.PARTIALLY_CONNECTED, model.provisioningState()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - SecurityProperties model - = new SecurityProperties().withSecuredCoreComplianceAssignment(ComplianceAssignmentType.AUDIT) - .withWdacComplianceAssignment(ComplianceAssignmentType.APPLY_AND_AUTO_CORRECT) - .withSmbEncryptionForIntraClusterTrafficComplianceAssignment(ComplianceAssignmentType.AUDIT) - .withProvisioningState(ProvisioningState.PARTIALLY_CONNECTED); + SecurityProperties model = new SecurityProperties() + .withSecuredCoreComplianceAssignment(ComplianceAssignmentType.APPLY_AND_AUTO_CORRECT) + .withWdacComplianceAssignment(ComplianceAssignmentType.APPLY_AND_AUTO_CORRECT) + .withSmbEncryptionForIntraClusterTrafficComplianceAssignment( + ComplianceAssignmentType.APPLY_AND_AUTO_CORRECT); model = BinaryData.fromObject(model).toObject(SecurityProperties.class); - Assertions.assertEquals(ComplianceAssignmentType.AUDIT, model.securedCoreComplianceAssignment()); + Assertions.assertEquals(ComplianceAssignmentType.APPLY_AND_AUTO_CORRECT, + model.securedCoreComplianceAssignment()); Assertions.assertEquals(ComplianceAssignmentType.APPLY_AND_AUTO_CORRECT, model.wdacComplianceAssignment()); - Assertions.assertEquals(ComplianceAssignmentType.AUDIT, + Assertions.assertEquals(ComplianceAssignmentType.APPLY_AND_AUTO_CORRECT, model.smbEncryptionForIntraClusterTrafficComplianceAssignment()); - Assertions.assertEquals(ProvisioningState.PARTIALLY_CONNECTED, model.provisioningState()); } } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/SecuritySettingInnerTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/SecuritySettingInnerTests.java index 9f7508e1878a..9d23e111e641 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/SecuritySettingInnerTests.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/SecuritySettingInnerTests.java @@ -1,26 +1,24 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.generated; import com.azure.core.util.BinaryData; import com.azure.resourcemanager.azurestackhci.fluent.models.SecuritySettingInner; import com.azure.resourcemanager.azurestackhci.models.ComplianceAssignmentType; -import com.azure.resourcemanager.azurestackhci.models.ProvisioningState; import org.junit.jupiter.api.Assertions; public final class SecuritySettingInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { SecuritySettingInner model = BinaryData.fromString( - "{\"properties\":{\"securedCoreComplianceAssignment\":\"Audit\",\"wdacComplianceAssignment\":\"ApplyAndAutoCorrect\",\"smbEncryptionForIntraClusterTrafficComplianceAssignment\":\"Audit\",\"securityComplianceStatus\":{\"securedCoreCompliance\":\"NonCompliant\",\"wdacCompliance\":\"Pending\",\"dataAtRestEncrypted\":\"NonCompliant\",\"dataInTransitProtected\":\"NonCompliant\",\"lastUpdated\":\"2021-05-17T11:48:43Z\"},\"provisioningState\":\"Accepted\"},\"id\":\"zdzgtilaxhnfhqly\",\"name\":\"ijouwivkxoyzunb\",\"type\":\"xxrtikvc\"}") + "{\"properties\":{\"securedCoreComplianceAssignment\":\"Audit\",\"wdacComplianceAssignment\":\"ApplyAndAutoCorrect\",\"smbEncryptionForIntraClusterTrafficComplianceAssignment\":\"Audit\",\"securityComplianceStatus\":{\"securedCoreCompliance\":\"Pending\",\"wdacCompliance\":\"Pending\",\"dataAtRestEncrypted\":\"Compliant\",\"dataInTransitProtected\":\"NonCompliant\",\"lastUpdated\":\"2021-08-18T22:01:18Z\"},\"provisioningState\":\"Succeeded\"},\"id\":\"pkzfbojxj\",\"name\":\"cs\",\"type\":\"yqwixvcpwnkwywzw\"}") .toObject(SecuritySettingInner.class); Assertions.assertEquals(ComplianceAssignmentType.AUDIT, model.securedCoreComplianceAssignment()); Assertions.assertEquals(ComplianceAssignmentType.APPLY_AND_AUTO_CORRECT, model.wdacComplianceAssignment()); Assertions.assertEquals(ComplianceAssignmentType.AUDIT, model.smbEncryptionForIntraClusterTrafficComplianceAssignment()); - Assertions.assertEquals(ProvisioningState.ACCEPTED, model.provisioningState()); } @org.junit.jupiter.api.Test @@ -28,13 +26,11 @@ public void testSerialize() throws Exception { SecuritySettingInner model = new SecuritySettingInner().withSecuredCoreComplianceAssignment(ComplianceAssignmentType.AUDIT) .withWdacComplianceAssignment(ComplianceAssignmentType.APPLY_AND_AUTO_CORRECT) - .withSmbEncryptionForIntraClusterTrafficComplianceAssignment(ComplianceAssignmentType.AUDIT) - .withProvisioningState(ProvisioningState.ACCEPTED); + .withSmbEncryptionForIntraClusterTrafficComplianceAssignment(ComplianceAssignmentType.AUDIT); model = BinaryData.fromObject(model).toObject(SecuritySettingInner.class); Assertions.assertEquals(ComplianceAssignmentType.AUDIT, model.securedCoreComplianceAssignment()); Assertions.assertEquals(ComplianceAssignmentType.APPLY_AND_AUTO_CORRECT, model.wdacComplianceAssignment()); Assertions.assertEquals(ComplianceAssignmentType.AUDIT, model.smbEncryptionForIntraClusterTrafficComplianceAssignment()); - Assertions.assertEquals(ProvisioningState.ACCEPTED, model.provisioningState()); } } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/SecuritySettingListResultTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/SecuritySettingListResultTests.java index b75f3e4ce4df..674be049a925 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/SecuritySettingListResultTests.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/SecuritySettingListResultTests.java @@ -1,58 +1,26 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.generated; import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.azurestackhci.fluent.models.SecuritySettingInner; +import com.azure.resourcemanager.azurestackhci.implementation.models.SecuritySettingListResult; import com.azure.resourcemanager.azurestackhci.models.ComplianceAssignmentType; -import com.azure.resourcemanager.azurestackhci.models.ProvisioningState; -import com.azure.resourcemanager.azurestackhci.models.SecuritySettingListResult; -import java.util.Arrays; import org.junit.jupiter.api.Assertions; public final class SecuritySettingListResultTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { SecuritySettingListResult model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"securedCoreComplianceAssignment\":\"Audit\",\"wdacComplianceAssignment\":\"ApplyAndAutoCorrect\",\"smbEncryptionForIntraClusterTrafficComplianceAssignment\":\"Audit\",\"securityComplianceStatus\":{\"securedCoreCompliance\":\"NonCompliant\",\"wdacCompliance\":\"Pending\",\"dataAtRestEncrypted\":\"Pending\",\"dataInTransitProtected\":\"Compliant\",\"lastUpdated\":\"2021-08-21T03:33:37Z\"},\"provisioningState\":\"Updating\"},\"id\":\"tx\",\"name\":\"zflbqvg\",\"type\":\"qvlgafcqusrdvetn\"},{\"properties\":{\"securedCoreComplianceAssignment\":\"ApplyAndAutoCorrect\",\"wdacComplianceAssignment\":\"ApplyAndAutoCorrect\",\"smbEncryptionForIntraClusterTrafficComplianceAssignment\":\"Audit\",\"securityComplianceStatus\":{\"securedCoreCompliance\":\"NonCompliant\",\"wdacCompliance\":\"Pending\",\"dataAtRestEncrypted\":\"Compliant\",\"dataInTransitProtected\":\"Pending\",\"lastUpdated\":\"2021-11-09T16:30:30Z\"},\"provisioningState\":\"Canceled\"},\"id\":\"ipmve\",\"name\":\"dxukuqgsjjxundxg\",\"type\":\"etw\"},{\"properties\":{\"securedCoreComplianceAssignment\":\"ApplyAndAutoCorrect\",\"wdacComplianceAssignment\":\"Audit\",\"smbEncryptionForIntraClusterTrafficComplianceAssignment\":\"ApplyAndAutoCorrect\",\"securityComplianceStatus\":{\"securedCoreCompliance\":\"NonCompliant\",\"wdacCompliance\":\"Compliant\",\"dataAtRestEncrypted\":\"Compliant\",\"dataInTransitProtected\":\"NonCompliant\",\"lastUpdated\":\"2021-08-10T07:35:10Z\"},\"provisioningState\":\"Deleted\"},\"id\":\"sx\",\"name\":\"mhfbuzjy\",\"type\":\"hsasbhu\"}],\"nextLink\":\"pohyuemslynsqyr\"}") + "{\"value\":[{\"properties\":{\"securedCoreComplianceAssignment\":\"ApplyAndAutoCorrect\",\"wdacComplianceAssignment\":\"ApplyAndAutoCorrect\",\"smbEncryptionForIntraClusterTrafficComplianceAssignment\":\"Audit\",\"securityComplianceStatus\":{\"securedCoreCompliance\":\"Pending\",\"wdacCompliance\":\"Pending\",\"dataAtRestEncrypted\":\"NonCompliant\",\"dataInTransitProtected\":\"Compliant\",\"lastUpdated\":\"2021-08-25T01:43:42Z\"},\"provisioningState\":\"Moving\"},\"id\":\"gzgy\",\"name\":\"futrwpweryekzkd\",\"type\":\"meottawj\"},{\"properties\":{\"securedCoreComplianceAssignment\":\"Audit\",\"wdacComplianceAssignment\":\"Audit\",\"smbEncryptionForIntraClusterTrafficComplianceAssignment\":\"Audit\",\"securityComplianceStatus\":{\"securedCoreCompliance\":\"Compliant\",\"wdacCompliance\":\"NonCompliant\",\"dataAtRestEncrypted\":\"NonCompliant\",\"dataInTransitProtected\":\"NonCompliant\",\"lastUpdated\":\"2021-03-12T23:13:14Z\"},\"provisioningState\":\"Updating\"},\"id\":\"nwynudq\",\"name\":\"l\",\"type\":\"sauzpjlx\"},{\"properties\":{\"securedCoreComplianceAssignment\":\"ApplyAndAutoCorrect\",\"wdacComplianceAssignment\":\"Audit\",\"smbEncryptionForIntraClusterTrafficComplianceAssignment\":\"ApplyAndAutoCorrect\",\"securityComplianceStatus\":{\"securedCoreCompliance\":\"Compliant\",\"wdacCompliance\":\"Pending\",\"dataAtRestEncrypted\":\"Compliant\",\"dataInTransitProtected\":\"Compliant\",\"lastUpdated\":\"2021-06-28T07:28:45Z\"},\"provisioningState\":\"Creating\"},\"id\":\"mxrfdsa\",\"name\":\"rednw\",\"type\":\"yshtuwgmev\"}],\"nextLink\":\"fpwzyifrkgwltx\"}") .toObject(SecuritySettingListResult.class); - Assertions.assertEquals(ComplianceAssignmentType.AUDIT, model.value().get(0).securedCoreComplianceAssignment()); Assertions.assertEquals(ComplianceAssignmentType.APPLY_AND_AUTO_CORRECT, - model.value().get(0).wdacComplianceAssignment()); - Assertions.assertEquals(ComplianceAssignmentType.AUDIT, - model.value().get(0).smbEncryptionForIntraClusterTrafficComplianceAssignment()); - Assertions.assertEquals(ProvisioningState.UPDATING, model.value().get(0).provisioningState()); - Assertions.assertEquals("pohyuemslynsqyr", model.nextLink()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - SecuritySettingListResult model = new SecuritySettingListResult().withValue(Arrays.asList( - new SecuritySettingInner().withSecuredCoreComplianceAssignment(ComplianceAssignmentType.AUDIT) - .withWdacComplianceAssignment(ComplianceAssignmentType.APPLY_AND_AUTO_CORRECT) - .withSmbEncryptionForIntraClusterTrafficComplianceAssignment(ComplianceAssignmentType.AUDIT) - .withProvisioningState(ProvisioningState.UPDATING), - new SecuritySettingInner() - .withSecuredCoreComplianceAssignment(ComplianceAssignmentType.APPLY_AND_AUTO_CORRECT) - .withWdacComplianceAssignment(ComplianceAssignmentType.APPLY_AND_AUTO_CORRECT) - .withSmbEncryptionForIntraClusterTrafficComplianceAssignment(ComplianceAssignmentType.AUDIT) - .withProvisioningState(ProvisioningState.CANCELED), - new SecuritySettingInner() - .withSecuredCoreComplianceAssignment(ComplianceAssignmentType.APPLY_AND_AUTO_CORRECT) - .withWdacComplianceAssignment(ComplianceAssignmentType.AUDIT) - .withSmbEncryptionForIntraClusterTrafficComplianceAssignment( - ComplianceAssignmentType.APPLY_AND_AUTO_CORRECT) - .withProvisioningState(ProvisioningState.DELETED))) - .withNextLink("pohyuemslynsqyr"); - model = BinaryData.fromObject(model).toObject(SecuritySettingListResult.class); - Assertions.assertEquals(ComplianceAssignmentType.AUDIT, model.value().get(0).securedCoreComplianceAssignment()); + model.value().get(0).securedCoreComplianceAssignment()); Assertions.assertEquals(ComplianceAssignmentType.APPLY_AND_AUTO_CORRECT, model.value().get(0).wdacComplianceAssignment()); Assertions.assertEquals(ComplianceAssignmentType.AUDIT, model.value().get(0).smbEncryptionForIntraClusterTrafficComplianceAssignment()); - Assertions.assertEquals(ProvisioningState.UPDATING, model.value().get(0).provisioningState()); - Assertions.assertEquals("pohyuemslynsqyr", model.nextLink()); + Assertions.assertEquals("fpwzyifrkgwltx", model.nextLink()); } } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/SecuritySettingsCreateOrUpdateMockTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/SecuritySettingsCreateOrUpdateMockTests.java index 3a7e9d26412e..cc204bdbb527 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/SecuritySettingsCreateOrUpdateMockTests.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/SecuritySettingsCreateOrUpdateMockTests.java @@ -1,17 +1,16 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.generated; import com.azure.core.credential.AccessToken; import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.azurestackhci.AzureStackHciManager; import com.azure.resourcemanager.azurestackhci.models.ComplianceAssignmentType; -import com.azure.resourcemanager.azurestackhci.models.ProvisioningState; import com.azure.resourcemanager.azurestackhci.models.SecuritySetting; import java.nio.charset.StandardCharsets; import java.time.OffsetDateTime; @@ -23,23 +22,22 @@ public final class SecuritySettingsCreateOrUpdateMockTests { @Test public void testCreateOrUpdate() throws Exception { String responseStr - = "{\"properties\":{\"securedCoreComplianceAssignment\":\"ApplyAndAutoCorrect\",\"wdacComplianceAssignment\":\"Audit\",\"smbEncryptionForIntraClusterTrafficComplianceAssignment\":\"ApplyAndAutoCorrect\",\"securityComplianceStatus\":{\"securedCoreCompliance\":\"Pending\",\"wdacCompliance\":\"NonCompliant\",\"dataAtRestEncrypted\":\"NonCompliant\",\"dataInTransitProtected\":\"Compliant\",\"lastUpdated\":\"2021-09-13T11:22:28Z\"},\"provisioningState\":\"Succeeded\"},\"id\":\"cwlisolntfxxcrqm\",\"name\":\"pfjwfo\",\"type\":\"gizmshxxbaizabu\"}"; + = "{\"properties\":{\"securedCoreComplianceAssignment\":\"ApplyAndAutoCorrect\",\"wdacComplianceAssignment\":\"Audit\",\"smbEncryptionForIntraClusterTrafficComplianceAssignment\":\"ApplyAndAutoCorrect\",\"securityComplianceStatus\":{\"securedCoreCompliance\":\"NonCompliant\",\"wdacCompliance\":\"Pending\",\"dataAtRestEncrypted\":\"Pending\",\"dataInTransitProtected\":\"NonCompliant\",\"lastUpdated\":\"2021-07-12T10:13:54Z\"},\"provisioningState\":\"Succeeded\"},\"id\":\"mvjanx\",\"name\":\"zfffhtjnwo\",\"type\":\"stfjxtvl\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); AzureStackHciManager manager = AzureStackHciManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); SecuritySetting response = manager.securitySettings() - .define("ihezomucmq") - .withExistingCluster("k", "kzkdtzxsoednlwg") - .withSecuredCoreComplianceAssignment(ComplianceAssignmentType.AUDIT) + .define("gpmillxgjs") + .withExistingCluster("idzlvssqywjopa", "kyhydvikmf") + .withSecuredCoreComplianceAssignment(ComplianceAssignmentType.APPLY_AND_AUTO_CORRECT) .withWdacComplianceAssignment(ComplianceAssignmentType.APPLY_AND_AUTO_CORRECT) .withSmbEncryptionForIntraClusterTrafficComplianceAssignment( ComplianceAssignmentType.APPLY_AND_AUTO_CORRECT) - .withProvisioningState(ProvisioningState.CREATING) .create(); Assertions.assertEquals(ComplianceAssignmentType.APPLY_AND_AUTO_CORRECT, @@ -47,6 +45,5 @@ public void testCreateOrUpdate() throws Exception { Assertions.assertEquals(ComplianceAssignmentType.AUDIT, response.wdacComplianceAssignment()); Assertions.assertEquals(ComplianceAssignmentType.APPLY_AND_AUTO_CORRECT, response.smbEncryptionForIntraClusterTrafficComplianceAssignment()); - Assertions.assertEquals(ProvisioningState.SUCCEEDED, response.provisioningState()); } } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/SecuritySettingsGetWithResponseMockTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/SecuritySettingsGetWithResponseMockTests.java index 41e233c7b453..ca723396d59c 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/SecuritySettingsGetWithResponseMockTests.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/SecuritySettingsGetWithResponseMockTests.java @@ -1,17 +1,16 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.generated; import com.azure.core.credential.AccessToken; import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.azurestackhci.AzureStackHciManager; import com.azure.resourcemanager.azurestackhci.models.ComplianceAssignmentType; -import com.azure.resourcemanager.azurestackhci.models.ProvisioningState; import com.azure.resourcemanager.azurestackhci.models.SecuritySetting; import java.nio.charset.StandardCharsets; import java.time.OffsetDateTime; @@ -23,17 +22,17 @@ public final class SecuritySettingsGetWithResponseMockTests { @Test public void testGetWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"securedCoreComplianceAssignment\":\"ApplyAndAutoCorrect\",\"wdacComplianceAssignment\":\"Audit\",\"smbEncryptionForIntraClusterTrafficComplianceAssignment\":\"Audit\",\"securityComplianceStatus\":{\"securedCoreCompliance\":\"NonCompliant\",\"wdacCompliance\":\"Pending\",\"dataAtRestEncrypted\":\"NonCompliant\",\"dataInTransitProtected\":\"NonCompliant\",\"lastUpdated\":\"2021-02-09T04:05:24Z\"},\"provisioningState\":\"Deleting\"},\"id\":\"hcxnwjtpfdzxco\",\"name\":\"z\",\"type\":\"wofw\"}"; + = "{\"properties\":{\"securedCoreComplianceAssignment\":\"ApplyAndAutoCorrect\",\"wdacComplianceAssignment\":\"Audit\",\"smbEncryptionForIntraClusterTrafficComplianceAssignment\":\"Audit\",\"securityComplianceStatus\":{\"securedCoreCompliance\":\"Compliant\",\"wdacCompliance\":\"Compliant\",\"dataAtRestEncrypted\":\"Pending\",\"dataInTransitProtected\":\"Compliant\",\"lastUpdated\":\"2021-04-12T20:37:27Z\"},\"provisioningState\":\"Connected\"},\"id\":\"wjwdsdlzmkxer\",\"name\":\"xx\",\"type\":\"teehk\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); AzureStackHciManager manager = AzureStackHciManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); SecuritySetting response = manager.securitySettings() - .getWithResponse("n", "ynts", "jmfmeftvhkm", com.azure.core.util.Context.NONE) + .getWithResponse("gtnse", "ouxly", "s", com.azure.core.util.Context.NONE) .getValue(); Assertions.assertEquals(ComplianceAssignmentType.APPLY_AND_AUTO_CORRECT, @@ -41,6 +40,5 @@ public void testGetWithResponse() throws Exception { Assertions.assertEquals(ComplianceAssignmentType.AUDIT, response.wdacComplianceAssignment()); Assertions.assertEquals(ComplianceAssignmentType.AUDIT, response.smbEncryptionForIntraClusterTrafficComplianceAssignment()); - Assertions.assertEquals(ProvisioningState.DELETING, response.provisioningState()); } } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/SecuritySettingsListByClustersMockTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/SecuritySettingsListByClustersMockTests.java index 21adae0f5c22..aa43f9295128 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/SecuritySettingsListByClustersMockTests.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/SecuritySettingsListByClustersMockTests.java @@ -1,18 +1,17 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.generated; import com.azure.core.credential.AccessToken; import com.azure.core.http.HttpClient; import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.azurestackhci.AzureStackHciManager; import com.azure.resourcemanager.azurestackhci.models.ComplianceAssignmentType; -import com.azure.resourcemanager.azurestackhci.models.ProvisioningState; import com.azure.resourcemanager.azurestackhci.models.SecuritySetting; import java.nio.charset.StandardCharsets; import java.time.OffsetDateTime; @@ -24,23 +23,23 @@ public final class SecuritySettingsListByClustersMockTests { @Test public void testListByClusters() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"securedCoreComplianceAssignment\":\"ApplyAndAutoCorrect\",\"wdacComplianceAssignment\":\"Audit\",\"smbEncryptionForIntraClusterTrafficComplianceAssignment\":\"Audit\",\"securityComplianceStatus\":{\"securedCoreCompliance\":\"NonCompliant\",\"wdacCompliance\":\"Pending\",\"dataAtRestEncrypted\":\"Compliant\",\"dataInTransitProtected\":\"NonCompliant\",\"lastUpdated\":\"2021-01-07T16:23:40Z\"},\"provisioningState\":\"Deleting\"},\"id\":\"hqodv\",\"name\":\"gcnbhcbmjk\",\"type\":\"ti\"}]}"; + = "{\"value\":[{\"properties\":{\"securedCoreComplianceAssignment\":\"Audit\",\"wdacComplianceAssignment\":\"ApplyAndAutoCorrect\",\"smbEncryptionForIntraClusterTrafficComplianceAssignment\":\"ApplyAndAutoCorrect\",\"securityComplianceStatus\":{\"securedCoreCompliance\":\"NonCompliant\",\"wdacCompliance\":\"NonCompliant\",\"dataAtRestEncrypted\":\"Compliant\",\"dataInTransitProtected\":\"NonCompliant\",\"lastUpdated\":\"2021-05-30T23:09:04Z\"},\"provisioningState\":\"InProgress\"},\"id\":\"vujex\",\"name\":\"yglxrkgjnm\",\"type\":\"paslavxjfiuofpi\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); AzureStackHciManager manager = AzureStackHciManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - PagedIterable response = manager.securitySettings() - .listByClusters("fwzlgzawkgyepeya", "nnidmdiawpzxk", com.azure.core.util.Context.NONE); + PagedIterable response + = manager.securitySettings().listByClusters("owgomvvhxowp", "bap", com.azure.core.util.Context.NONE); - Assertions.assertEquals(ComplianceAssignmentType.APPLY_AND_AUTO_CORRECT, - response.iterator().next().securedCoreComplianceAssignment()); - Assertions.assertEquals(ComplianceAssignmentType.AUDIT, response.iterator().next().wdacComplianceAssignment()); Assertions.assertEquals(ComplianceAssignmentType.AUDIT, + response.iterator().next().securedCoreComplianceAssignment()); + Assertions.assertEquals(ComplianceAssignmentType.APPLY_AND_AUTO_CORRECT, + response.iterator().next().wdacComplianceAssignment()); + Assertions.assertEquals(ComplianceAssignmentType.APPLY_AND_AUTO_CORRECT, response.iterator().next().smbEncryptionForIntraClusterTrafficComplianceAssignment()); - Assertions.assertEquals(ProvisioningState.DELETING, response.iterator().next().provisioningState()); } } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ServiceConfigurationTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ServiceConfigurationTests.java new file mode 100644 index 000000000000..bd7982780a32 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ServiceConfigurationTests.java @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.azurestackhci.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.azurestackhci.models.ServiceConfiguration; +import com.azure.resourcemanager.azurestackhci.models.ServiceName; +import org.junit.jupiter.api.Assertions; + +public final class ServiceConfigurationTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ServiceConfiguration model = BinaryData.fromString("{\"serviceName\":\"WAC\",\"port\":9010569490634453588}") + .toObject(ServiceConfiguration.class); + Assertions.assertEquals(ServiceName.WAC, model.serviceName()); + Assertions.assertEquals(9010569490634453588L, model.port()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + ServiceConfiguration model + = new ServiceConfiguration().withServiceName(ServiceName.WAC).withPort(9010569490634453588L); + model = BinaryData.fromObject(model).toObject(ServiceConfiguration.class); + Assertions.assertEquals(ServiceName.WAC, model.serviceName()); + Assertions.assertEquals(9010569490634453588L, model.port()); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/SkuInnerTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/SkuInnerTests.java index ba1dc122d5b4..206173fdb63e 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/SkuInnerTests.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/SkuInnerTests.java @@ -1,56 +1,25 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.generated; import com.azure.core.util.BinaryData; import com.azure.resourcemanager.azurestackhci.fluent.models.SkuInner; -import com.azure.resourcemanager.azurestackhci.models.SkuMappings; -import java.util.Arrays; import org.junit.jupiter.api.Assertions; public final class SkuInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { SkuInner model = BinaryData.fromString( - "{\"properties\":{\"provisioningState\":\"age\",\"publisherId\":\"ulxunsmjbnkpp\",\"offerId\":\"nenlsvxeizzg\",\"content\":\"lnsrmffe\",\"contentVersion\":\"xcktpiymerteeamm\",\"skuMappings\":[{\"catalogPlanId\":\"kk\",\"marketplaceSkuId\":\"ddrtkgdojb\",\"marketplaceSkuVersions\":[\"a\",\"refdee\",\"vecuijpx\"]},{\"catalogPlanId\":\"s\",\"marketplaceSkuId\":\"prtujwsawdd\",\"marketplaceSkuVersions\":[\"abxvi\",\"itvtzeexavo\",\"tfgle\"]},{\"catalogPlanId\":\"m\",\"marketplaceSkuId\":\"bwpypqtgsfjacb\",\"marketplaceSkuVersions\":[\"hxudbxvodht\",\"sirudhzmmesckdlp\"]},{\"catalogPlanId\":\"zrcxfailcfxwmdbo\",\"marketplaceSkuId\":\"fgsftufqob\",\"marketplaceSkuVersions\":[\"nac\",\"cc\"]}]},\"id\":\"nhxk\",\"name\":\"zvytnrzvuljraaer\",\"type\":\"nok\"}") + "{\"properties\":{\"provisioningState\":\"pxgzdyimsfayor\",\"publisherId\":\"avkjog\",\"offerId\":\"labnsmjkwynq\",\"content\":\"ekqsykvwjtqpkev\",\"contentVersion\":\"ltjcrspxk\",\"skuMappings\":[{\"catalogPlanId\":\"clf\",\"marketplaceSkuId\":\"annnoytzposewx\",\"marketplaceSkuVersions\":[\"xvkqm\",\"upxvpifd\"]}]},\"id\":\"ify\",\"name\":\"yzeyuubeid\",\"type\":\"zlfytoit\"}") .toObject(SkuInner.class); - Assertions.assertEquals("ulxunsmjbnkpp", model.publisherId()); - Assertions.assertEquals("nenlsvxeizzg", model.offerId()); - Assertions.assertEquals("lnsrmffe", model.content()); - Assertions.assertEquals("xcktpiymerteeamm", model.contentVersion()); - Assertions.assertEquals("kk", model.skuMappings().get(0).catalogPlanId()); - Assertions.assertEquals("ddrtkgdojb", model.skuMappings().get(0).marketplaceSkuId()); - Assertions.assertEquals("a", model.skuMappings().get(0).marketplaceSkuVersions().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - SkuInner model = new SkuInner().withPublisherId("ulxunsmjbnkpp") - .withOfferId("nenlsvxeizzg") - .withContent("lnsrmffe") - .withContentVersion("xcktpiymerteeamm") - .withSkuMappings(Arrays.asList( - new SkuMappings().withCatalogPlanId("kk") - .withMarketplaceSkuId("ddrtkgdojb") - .withMarketplaceSkuVersions(Arrays.asList("a", "refdee", "vecuijpx")), - new SkuMappings().withCatalogPlanId("s") - .withMarketplaceSkuId("prtujwsawdd") - .withMarketplaceSkuVersions(Arrays.asList("abxvi", "itvtzeexavo", "tfgle")), - new SkuMappings().withCatalogPlanId("m") - .withMarketplaceSkuId("bwpypqtgsfjacb") - .withMarketplaceSkuVersions(Arrays.asList("hxudbxvodht", "sirudhzmmesckdlp")), - new SkuMappings().withCatalogPlanId("zrcxfailcfxwmdbo") - .withMarketplaceSkuId("fgsftufqob") - .withMarketplaceSkuVersions(Arrays.asList("nac", "cc")))); - model = BinaryData.fromObject(model).toObject(SkuInner.class); - Assertions.assertEquals("ulxunsmjbnkpp", model.publisherId()); - Assertions.assertEquals("nenlsvxeizzg", model.offerId()); - Assertions.assertEquals("lnsrmffe", model.content()); - Assertions.assertEquals("xcktpiymerteeamm", model.contentVersion()); - Assertions.assertEquals("kk", model.skuMappings().get(0).catalogPlanId()); - Assertions.assertEquals("ddrtkgdojb", model.skuMappings().get(0).marketplaceSkuId()); - Assertions.assertEquals("a", model.skuMappings().get(0).marketplaceSkuVersions().get(0)); + Assertions.assertEquals("avkjog", model.publisherId()); + Assertions.assertEquals("labnsmjkwynq", model.offerId()); + Assertions.assertEquals("ekqsykvwjtqpkev", model.content()); + Assertions.assertEquals("ltjcrspxk", model.contentVersion()); + Assertions.assertEquals("clf", model.skuMappings().get(0).catalogPlanId()); + Assertions.assertEquals("annnoytzposewx", model.skuMappings().get(0).marketplaceSkuId()); + Assertions.assertEquals("xvkqm", model.skuMappings().get(0).marketplaceSkuVersions().get(0)); } } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/SkuListTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/SkuListTests.java index b3003a689cbd..49df15745a4d 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/SkuListTests.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/SkuListTests.java @@ -1,23 +1,26 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.generated; import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.azurestackhci.models.SkuList; +import com.azure.resourcemanager.azurestackhci.implementation.models.SkuList; +import org.junit.jupiter.api.Assertions; public final class SkuListTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { SkuList model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"provisioningState\":\"skawaoqvmmb\",\"publisherId\":\"qfr\",\"offerId\":\"lkzmegnitgvkxl\",\"content\":\"qdrfegcealzxwhc\",\"contentVersion\":\"symoyq\",\"skuMappings\":[{\"catalogPlanId\":\"gdivbkbxg\",\"marketplaceSkuId\":\"fajuwas\",\"marketplaceSkuVersions\":[\"aeyyg\",\"xakjsqzhzb\"]},{\"catalogPlanId\":\"kgimsidxasic\",\"marketplaceSkuId\":\"yvvjskgfmo\",\"marketplaceSkuVersions\":[\"hpqgatjeaahhvj\"]}]},\"id\":\"na\",\"name\":\"zybbj\",\"type\":\"idjks\"}],\"nextLink\":\"kyxvxevblbjedn\"}") + "{\"value\":[{\"properties\":{\"provisioningState\":\"yqlkju\",\"publisherId\":\"mbmslzoyov\",\"offerId\":\"dbpqvybefgvm\",\"content\":\"okcvtlubses\",\"contentVersion\":\"cua\",\"skuMappings\":[{\"catalogPlanId\":\"unlpirykycndz\",\"marketplaceSkuId\":\"ivjreuyk\",\"marketplaceSkuVersions\":[\"nwagl\",\"bxoeeonql\",\"fwmyymv\"]},{\"catalogPlanId\":\"bpbhfckdvezcrcss\",\"marketplaceSkuId\":\"hddubbnqfbl\",\"marketplaceSkuVersions\":[\"lehpavawu\",\"iqjtiogqgdmin\"]}]},\"id\":\"tteajohiygs\",\"name\":\"n\",\"type\":\"onhpcz\"},{\"properties\":{\"provisioningState\":\"ktpv\",\"publisherId\":\"qcs\",\"offerId\":\"chkhufm\",\"content\":\"umqy\",\"contentVersion\":\"ydzulodsaeuzan\",\"skuMappings\":[{\"catalogPlanId\":\"hse\",\"marketplaceSkuId\":\"phpzfngqjcl\",\"marketplaceSkuVersions\":[\"tujwjju\",\"wbeqrkuor\",\"tssruqnmdvhazc\"]},{\"catalogPlanId\":\"ytiq\",\"marketplaceSkuId\":\"bqerzwx\",\"marketplaceSkuVersions\":[\"x\"]},{\"catalogPlanId\":\"gukvlbpkt\",\"marketplaceSkuId\":\"styoua\",\"marketplaceSkuVersions\":[\"wreswmowegm\",\"uteyxeyguq\"]}]},\"id\":\"ijiitns\",\"name\":\"xlzdesygrijwa\",\"type\":\"ufanray\"},{\"properties\":{\"provisioningState\":\"eqfrojs\",\"publisherId\":\"grhydk\",\"offerId\":\"ywezskiecafyg\",\"content\":\"xieqv\",\"contentVersion\":\"makli\",\"skuMappings\":[{\"catalogPlanId\":\"hyhxa\",\"marketplaceSkuId\":\"bx\",\"marketplaceSkuVersions\":[\"ijpodtblxpkkwj\"]},{\"catalogPlanId\":\"odqhyk\",\"marketplaceSkuId\":\"cnre\",\"marketplaceSkuVersions\":[\"llizhce\",\"moqodka\",\"ppyi\"]}]},\"id\":\"gqladywrxwhyd\",\"name\":\"luvvad\",\"type\":\"wzsnuy\"}],\"nextLink\":\"lowuowhlxlnwyr\"}") .toObject(SkuList.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - SkuList model = new SkuList(); - model = BinaryData.fromObject(model).toObject(SkuList.class); + Assertions.assertEquals("mbmslzoyov", model.value().get(0).publisherId()); + Assertions.assertEquals("dbpqvybefgvm", model.value().get(0).offerId()); + Assertions.assertEquals("okcvtlubses", model.value().get(0).content()); + Assertions.assertEquals("cua", model.value().get(0).contentVersion()); + Assertions.assertEquals("unlpirykycndz", model.value().get(0).skuMappings().get(0).catalogPlanId()); + Assertions.assertEquals("ivjreuyk", model.value().get(0).skuMappings().get(0).marketplaceSkuId()); + Assertions.assertEquals("nwagl", model.value().get(0).skuMappings().get(0).marketplaceSkuVersions().get(0)); + Assertions.assertEquals("lowuowhlxlnwyr", model.nextLink()); } } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/SkuMappingsTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/SkuMappingsTests.java index 5b738e5cd419..e1af34937cf2 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/SkuMappingsTests.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/SkuMappingsTests.java @@ -1,33 +1,21 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.generated; import com.azure.core.util.BinaryData; import com.azure.resourcemanager.azurestackhci.models.SkuMappings; -import java.util.Arrays; import org.junit.jupiter.api.Assertions; public final class SkuMappingsTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { SkuMappings model = BinaryData.fromString( - "{\"catalogPlanId\":\"u\",\"marketplaceSkuId\":\"cp\",\"marketplaceSkuVersions\":[\"khihihlhzds\",\"tzbsrgnowcjhf\",\"mvec\",\"ctxmwoteyowcluq\"]}") + "{\"catalogPlanId\":\"majtjaod\",\"marketplaceSkuId\":\"bnbdxkqpxokajion\",\"marketplaceSkuVersions\":[\"ex\",\"stxgc\",\"odgmaajrmvdjwz\"]}") .toObject(SkuMappings.class); - Assertions.assertEquals("u", model.catalogPlanId()); - Assertions.assertEquals("cp", model.marketplaceSkuId()); - Assertions.assertEquals("khihihlhzds", model.marketplaceSkuVersions().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - SkuMappings model = new SkuMappings().withCatalogPlanId("u") - .withMarketplaceSkuId("cp") - .withMarketplaceSkuVersions(Arrays.asList("khihihlhzds", "tzbsrgnowcjhf", "mvec", "ctxmwoteyowcluq")); - model = BinaryData.fromObject(model).toObject(SkuMappings.class); - Assertions.assertEquals("u", model.catalogPlanId()); - Assertions.assertEquals("cp", model.marketplaceSkuId()); - Assertions.assertEquals("khihihlhzds", model.marketplaceSkuVersions().get(0)); + Assertions.assertEquals("majtjaod", model.catalogPlanId()); + Assertions.assertEquals("bnbdxkqpxokajion", model.marketplaceSkuId()); + Assertions.assertEquals("ex", model.marketplaceSkuVersions().get(0)); } } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/SkuPropertiesTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/SkuPropertiesTests.java index ebf9f225e80c..1c1d79f19ebe 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/SkuPropertiesTests.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/SkuPropertiesTests.java @@ -1,56 +1,25 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.generated; import com.azure.core.util.BinaryData; import com.azure.resourcemanager.azurestackhci.fluent.models.SkuProperties; -import com.azure.resourcemanager.azurestackhci.models.SkuMappings; -import java.util.Arrays; import org.junit.jupiter.api.Assertions; public final class SkuPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { SkuProperties model = BinaryData.fromString( - "{\"provisioningState\":\"ukkjqnvbroyla\",\"publisherId\":\"ulcdisdosf\",\"offerId\":\"jsvg\",\"content\":\"whryvycytdcl\",\"contentVersion\":\"ccknfnwmbtmvp\",\"skuMappings\":[{\"catalogPlanId\":\"httz\",\"marketplaceSkuId\":\"fedxihchrphkm\",\"marketplaceSkuVersions\":[\"dqns\",\"fzpbgtgkyl\",\"dgh\"]},{\"catalogPlanId\":\"euutlwxezwzh\",\"marketplaceSkuId\":\"vbwnhhtq\",\"marketplaceSkuVersions\":[\"hgppipifhpfeoa\",\"vgcxtx\"]},{\"catalogPlanId\":\"sheafid\",\"marketplaceSkuId\":\"ugsresmkssjhoi\",\"marketplaceSkuVersions\":[\"f\",\"fwegprhptillu\",\"biqtgdq\",\"hm\"]},{\"catalogPlanId\":\"sldrizetpwbral\",\"marketplaceSkuId\":\"ibph\",\"marketplaceSkuVersions\":[\"mizak\",\"kan\",\"jpdn\"]}]}") + "{\"provisioningState\":\"ygvfltgvdihoyn\",\"publisherId\":\"xwetwkdrcyrucpc\",\"offerId\":\"nuzdqumo\",\"content\":\"odnaienhqhskndn\",\"contentVersion\":\"qkaadlknw\",\"skuMappings\":[{\"catalogPlanId\":\"n\",\"marketplaceSkuId\":\"op\",\"marketplaceSkuVersions\":[\"i\",\"cnrly\",\"nucaephblkwqpat\"]},{\"catalogPlanId\":\"qsdtcjbctvivuzq\",\"marketplaceSkuId\":\"tuowogtgitsqh\",\"marketplaceSkuVersions\":[\"rzcdbanf\"]},{\"catalogPlanId\":\"ds\",\"marketplaceSkuId\":\"mxeatkdbmwnrdjy\",\"marketplaceSkuVersions\":[\"bnaomhjrmkuhmax\"]},{\"catalogPlanId\":\"alfihcjmobcancd\",\"marketplaceSkuId\":\"xqcwgax\",\"marketplaceSkuVersions\":[\"aknokzwjjzrl\",\"ixldzyyfy\",\"pqsixymmp\"]}]}") .toObject(SkuProperties.class); - Assertions.assertEquals("ulcdisdosf", model.publisherId()); - Assertions.assertEquals("jsvg", model.offerId()); - Assertions.assertEquals("whryvycytdcl", model.content()); - Assertions.assertEquals("ccknfnwmbtmvp", model.contentVersion()); - Assertions.assertEquals("httz", model.skuMappings().get(0).catalogPlanId()); - Assertions.assertEquals("fedxihchrphkm", model.skuMappings().get(0).marketplaceSkuId()); - Assertions.assertEquals("dqns", model.skuMappings().get(0).marketplaceSkuVersions().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - SkuProperties model = new SkuProperties().withPublisherId("ulcdisdosf") - .withOfferId("jsvg") - .withContent("whryvycytdcl") - .withContentVersion("ccknfnwmbtmvp") - .withSkuMappings(Arrays.asList( - new SkuMappings().withCatalogPlanId("httz") - .withMarketplaceSkuId("fedxihchrphkm") - .withMarketplaceSkuVersions(Arrays.asList("dqns", "fzpbgtgkyl", "dgh")), - new SkuMappings().withCatalogPlanId("euutlwxezwzh") - .withMarketplaceSkuId("vbwnhhtq") - .withMarketplaceSkuVersions(Arrays.asList("hgppipifhpfeoa", "vgcxtx")), - new SkuMappings().withCatalogPlanId("sheafid") - .withMarketplaceSkuId("ugsresmkssjhoi") - .withMarketplaceSkuVersions(Arrays.asList("f", "fwegprhptillu", "biqtgdq", "hm")), - new SkuMappings().withCatalogPlanId("sldrizetpwbral") - .withMarketplaceSkuId("ibph") - .withMarketplaceSkuVersions(Arrays.asList("mizak", "kan", "jpdn")))); - model = BinaryData.fromObject(model).toObject(SkuProperties.class); - Assertions.assertEquals("ulcdisdosf", model.publisherId()); - Assertions.assertEquals("jsvg", model.offerId()); - Assertions.assertEquals("whryvycytdcl", model.content()); - Assertions.assertEquals("ccknfnwmbtmvp", model.contentVersion()); - Assertions.assertEquals("httz", model.skuMappings().get(0).catalogPlanId()); - Assertions.assertEquals("fedxihchrphkm", model.skuMappings().get(0).marketplaceSkuId()); - Assertions.assertEquals("dqns", model.skuMappings().get(0).marketplaceSkuVersions().get(0)); + Assertions.assertEquals("xwetwkdrcyrucpc", model.publisherId()); + Assertions.assertEquals("nuzdqumo", model.offerId()); + Assertions.assertEquals("odnaienhqhskndn", model.content()); + Assertions.assertEquals("qkaadlknw", model.contentVersion()); + Assertions.assertEquals("n", model.skuMappings().get(0).catalogPlanId()); + Assertions.assertEquals("op", model.skuMappings().get(0).marketplaceSkuId()); + Assertions.assertEquals("i", model.skuMappings().get(0).marketplaceSkuVersions().get(0)); } } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/SkusGetWithResponseMockTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/SkusGetWithResponseMockTests.java index c6e81a4c2e36..06fd24a698de 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/SkusGetWithResponseMockTests.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/SkusGetWithResponseMockTests.java @@ -1,13 +1,13 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.generated; import com.azure.core.credential.AccessToken; import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.azurestackhci.AzureStackHciManager; import com.azure.resourcemanager.azurestackhci.models.Sku; @@ -21,26 +21,26 @@ public final class SkusGetWithResponseMockTests { @Test public void testGetWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"provisioningState\":\"upnamglroui\",\"publisherId\":\"mfivjqterd\",\"offerId\":\"igdyd\",\"content\":\"hpcvr\",\"contentVersion\":\"irvt\",\"skuMappings\":[{\"catalogPlanId\":\"hmvfxlapjajodm\",\"marketplaceSkuId\":\"rw\",\"marketplaceSkuVersions\":[\"qvqokql\",\"jqgir\",\"bwlyvxc\"]},{\"catalogPlanId\":\"qvctsfa\",\"marketplaceSkuId\":\"hwwskn\",\"marketplaceSkuVersions\":[\"zuzhasup\",\"lppdpgz\",\"zqazvb\",\"arkptgongruatsyi\"]}]},\"id\":\"jqhenigb\",\"name\":\"qnguba\",\"type\":\"yjdeayscseyd\"}"; + = "{\"properties\":{\"provisioningState\":\"nzbjekwuycky\",\"publisherId\":\"ensmuffiwjbct\",\"offerId\":\"p\",\"content\":\"jqjtotd\",\"contentVersion\":\"osc\",\"skuMappings\":[{\"catalogPlanId\":\"uusiecktybh\",\"marketplaceSkuId\":\"xidhhxomil\",\"marketplaceSkuVersions\":[\"jxdugxwj\"]},{\"catalogPlanId\":\"l\",\"marketplaceSkuId\":\"rslaatep\",\"marketplaceSkuVersions\":[\"jjzgxqgqw\",\"xr\"]},{\"catalogPlanId\":\"tvhvtqqy\",\"marketplaceSkuId\":\"kkt\",\"marketplaceSkuVersions\":[\"ejogmkor\",\"vmvm\",\"ofnqhlbs\",\"osnqliwkmzojfe\"]},{\"catalogPlanId\":\"alhtgmknaz\",\"marketplaceSkuId\":\"jbhrpgiqsttcu\",\"marketplaceSkuVersions\":[\"mmaixpqji\",\"ifhb\",\"sld\"]}]},\"id\":\"ohqcl\",\"name\":\"aihtgsiqikvllrh\",\"type\":\"p\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); AzureStackHciManager manager = AzureStackHciManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); Sku response = manager.skus() - .getWithResponse("nckidbjpg", "hzqpxzbawkikcdgf", "bssdpjeyoqxd", "decfiwhagxsure", "qrshzzbgullcxiq", - "zjk", com.azure.core.util.Context.NONE) + .getWithResponse("xzqfcwr", "iomxeezw", "hjmbji", "egmxdbsohc", "hpyvdkgdet", "z", + com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("mfivjqterd", response.publisherId()); - Assertions.assertEquals("igdyd", response.offerId()); - Assertions.assertEquals("hpcvr", response.content()); - Assertions.assertEquals("irvt", response.contentVersion()); - Assertions.assertEquals("hmvfxlapjajodm", response.skuMappings().get(0).catalogPlanId()); - Assertions.assertEquals("rw", response.skuMappings().get(0).marketplaceSkuId()); - Assertions.assertEquals("qvqokql", response.skuMappings().get(0).marketplaceSkuVersions().get(0)); + Assertions.assertEquals("ensmuffiwjbct", response.publisherId()); + Assertions.assertEquals("p", response.offerId()); + Assertions.assertEquals("jqjtotd", response.content()); + Assertions.assertEquals("osc", response.contentVersion()); + Assertions.assertEquals("uusiecktybh", response.skuMappings().get(0).catalogPlanId()); + Assertions.assertEquals("xidhhxomil", response.skuMappings().get(0).marketplaceSkuId()); + Assertions.assertEquals("jxdugxwj", response.skuMappings().get(0).marketplaceSkuVersions().get(0)); } } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/SkusListByOfferMockTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/SkusListByOfferMockTests.java index 130a3b463545..c703aaaf7232 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/SkusListByOfferMockTests.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/SkusListByOfferMockTests.java @@ -1,14 +1,14 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.generated; import com.azure.core.credential.AccessToken; import com.azure.core.http.HttpClient; import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.azurestackhci.AzureStackHciManager; import com.azure.resourcemanager.azurestackhci.models.Sku; @@ -22,25 +22,26 @@ public final class SkusListByOfferMockTests { @Test public void testListByOffer() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"provisioningState\":\"c\",\"publisherId\":\"tfshksnyzm\",\"offerId\":\"amwbwmbnlslcef\",\"content\":\"d\",\"contentVersion\":\"wtkvi\",\"skuMappings\":[{\"catalogPlanId\":\"liwoyngu\",\"marketplaceSkuId\":\"hwvladpc\",\"marketplaceSkuVersions\":[\"hausybkekymffzts\"]},{\"catalogPlanId\":\"sc\",\"marketplaceSkuId\":\"syeiih\",\"marketplaceSkuVersions\":[\"kouihyeseuugcig\",\"hogsmgbvmtd\",\"rqbebjnfveglab\",\"vkbiw\"]}]},\"id\":\"htfgficudyhizpac\",\"name\":\"muhbcakznho\",\"type\":\"hoitwhrjsdmmaz\"}]}"; + = "{\"value\":[{\"properties\":{\"provisioningState\":\"rdjomlnwsb\",\"publisherId\":\"dls\",\"offerId\":\"x\",\"content\":\"esdfedsb\",\"contentVersion\":\"ancoinmphymcqid\",\"skuMappings\":[{\"catalogPlanId\":\"dhqnufbxweiib\",\"marketplaceSkuId\":\"ojovfnybydh\",\"marketplaceSkuVersions\":[\"aouwudh\",\"aorhjkehwvumo\",\"qircamqprlob\",\"ugejcvjkjyczcmt\"]},{\"catalogPlanId\":\"elajdyol\",\"marketplaceSkuId\":\"qy\",\"marketplaceSkuVersions\":[\"mzsizzhravrcjk\",\"ymgqbgcx\",\"nqxgz\"]},{\"catalogPlanId\":\"er\",\"marketplaceSkuId\":\"merghski\",\"marketplaceSkuVersions\":[\"pupkcbkfukd\",\"jqnvtsdyd\",\"hkpafyaloowwzizz\"]}]},\"id\":\"uf\",\"name\":\"qz\",\"type\":\"ti\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); AzureStackHciManager manager = AzureStackHciManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PagedIterable response = manager.skus() - .listByOffer("nvgskjtoxjd", "jsjznv", "xqqm", "i", "aydhf", com.azure.core.util.Context.NONE); + .listByOffer("glxkoikmtrawrqk", "awbunmpaklw", "lweeprne", "zltkaszfj", "xscbduxapgrcqe", + com.azure.core.util.Context.NONE); - Assertions.assertEquals("tfshksnyzm", response.iterator().next().publisherId()); - Assertions.assertEquals("amwbwmbnlslcef", response.iterator().next().offerId()); - Assertions.assertEquals("d", response.iterator().next().content()); - Assertions.assertEquals("wtkvi", response.iterator().next().contentVersion()); - Assertions.assertEquals("liwoyngu", response.iterator().next().skuMappings().get(0).catalogPlanId()); - Assertions.assertEquals("hwvladpc", response.iterator().next().skuMappings().get(0).marketplaceSkuId()); - Assertions.assertEquals("hausybkekymffzts", + Assertions.assertEquals("dls", response.iterator().next().publisherId()); + Assertions.assertEquals("x", response.iterator().next().offerId()); + Assertions.assertEquals("esdfedsb", response.iterator().next().content()); + Assertions.assertEquals("ancoinmphymcqid", response.iterator().next().contentVersion()); + Assertions.assertEquals("dhqnufbxweiib", response.iterator().next().skuMappings().get(0).catalogPlanId()); + Assertions.assertEquals("ojovfnybydh", response.iterator().next().skuMappings().get(0).marketplaceSkuId()); + Assertions.assertEquals("aouwudh", response.iterator().next().skuMappings().get(0).marketplaceSkuVersions().get(0)); } } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/SoftwareAssuranceChangeRequestPropertiesTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/SoftwareAssuranceChangeRequestPropertiesTests.java index 9d6c3a0cdf13..edc3c287a8e0 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/SoftwareAssuranceChangeRequestPropertiesTests.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/SoftwareAssuranceChangeRequestPropertiesTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.generated; @@ -13,16 +13,16 @@ public final class SoftwareAssuranceChangeRequestPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { SoftwareAssuranceChangeRequestProperties model - = BinaryData.fromString("{\"softwareAssuranceIntent\":\"Enable\"}") + = BinaryData.fromString("{\"softwareAssuranceIntent\":\"Disable\"}") .toObject(SoftwareAssuranceChangeRequestProperties.class); - Assertions.assertEquals(SoftwareAssuranceIntent.ENABLE, model.softwareAssuranceIntent()); + Assertions.assertEquals(SoftwareAssuranceIntent.DISABLE, model.softwareAssuranceIntent()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { SoftwareAssuranceChangeRequestProperties model = new SoftwareAssuranceChangeRequestProperties() - .withSoftwareAssuranceIntent(SoftwareAssuranceIntent.ENABLE); + .withSoftwareAssuranceIntent(SoftwareAssuranceIntent.DISABLE); model = BinaryData.fromObject(model).toObject(SoftwareAssuranceChangeRequestProperties.class); - Assertions.assertEquals(SoftwareAssuranceIntent.ENABLE, model.softwareAssuranceIntent()); + Assertions.assertEquals(SoftwareAssuranceIntent.DISABLE, model.softwareAssuranceIntent()); } } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/SoftwareAssuranceChangeRequestTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/SoftwareAssuranceChangeRequestTests.java index 9425352e2697..b6de25f4bf78 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/SoftwareAssuranceChangeRequestTests.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/SoftwareAssuranceChangeRequestTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.generated; diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/SoftwareAssurancePropertiesTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/SoftwareAssurancePropertiesTests.java index 905c07c54060..6405f414bd56 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/SoftwareAssurancePropertiesTests.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/SoftwareAssurancePropertiesTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.generated; @@ -13,7 +13,7 @@ public final class SoftwareAssurancePropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { SoftwareAssuranceProperties model = BinaryData.fromString( - "{\"softwareAssuranceStatus\":\"Disabled\",\"softwareAssuranceIntent\":\"Disable\",\"lastUpdated\":\"2021-02-19T02:27:03Z\"}") + "{\"softwareAssuranceStatus\":\"Disabled\",\"softwareAssuranceIntent\":\"Disable\",\"lastUpdated\":\"2021-05-01T06:56:52Z\"}") .toObject(SoftwareAssuranceProperties.class); Assertions.assertEquals(SoftwareAssuranceIntent.DISABLE, model.softwareAssuranceIntent()); } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/StepTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/StepTests.java index 32662face5b5..1746dcfe892e 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/StepTests.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/StepTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.generated; @@ -14,218 +14,121 @@ public final class StepTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { Step model = BinaryData.fromString( - "{\"name\":\"kzq\",\"description\":\"jeokbzefezrxccz\",\"errorMessage\":\"tleipqxbkw\",\"status\":\"gnzvdfbzdixzm\",\"startTimeUtc\":\"2021-04-08T06:17:43Z\",\"endTimeUtc\":\"2021-06-28T09:56:46Z\",\"lastUpdatedTimeUtc\":\"2021-11-07T11:06:58Z\",\"expectedExecutionTime\":\"pqhe\",\"steps\":[{\"name\":\"mcgsbostzelnd\",\"description\":\"tutmzl\",\"errorMessage\":\"ojlvfhrbbpneqvc\",\"status\":\"yyurmochpprprsnm\",\"startTimeUtc\":\"2021-07-18T02:05:58Z\",\"endTimeUtc\":\"2021-03-23T11:52:12Z\",\"lastUpdatedTimeUtc\":\"2021-06-08T20:35:44Z\",\"expectedExecutionTime\":\"hlb\",\"steps\":[{\"name\":\"pcpil\",\"description\":\"a\",\"errorMessage\":\"vechndbnwiehole\",\"status\":\"wiuub\",\"startTimeUtc\":\"2021-02-20T13:36:52Z\",\"endTimeUtc\":\"2021-11-19T16:29:04Z\",\"lastUpdatedTimeUtc\":\"2021-04-15T16:55:23Z\",\"expectedExecutionTime\":\"aqtferr\",\"steps\":[{}]},{\"name\":\"jkmfxapjwo\",\"description\":\"qnobp\",\"errorMessage\":\"cdabtqwpwya\",\"status\":\"zasqbucljgkyexao\",\"startTimeUtc\":\"2021-10-16T00:16:04Z\",\"endTimeUtc\":\"2021-04-03T20:50:10Z\",\"lastUpdatedTimeUtc\":\"2021-11-04T08:52:55Z\",\"expectedExecutionTime\":\"sdaultxij\",\"steps\":[{},{}]},{\"name\":\"qwazlnqnmcjngzq\",\"description\":\"xtbjwgnyfusfzsv\",\"errorMessage\":\"ikzhajqglcfhmlrq\",\"status\":\"xynqnz\",\"startTimeUtc\":\"2021-02-04T14:35:25Z\",\"endTimeUtc\":\"2021-03-13T11:56:36Z\",\"lastUpdatedTimeUtc\":\"2021-07-07T00:29:31Z\",\"expectedExecutionTime\":\"zn\",\"steps\":[{},{},{},{}]},{\"name\":\"eiybbabpfhvfsl\",\"description\":\"ntjlr\",\"errorMessage\":\"jkskyr\",\"status\":\"ovzidsx\",\"startTimeUtc\":\"2021-01-26T00:33:40Z\",\"endTimeUtc\":\"2021-08-27T23:16:23Z\",\"lastUpdatedTimeUtc\":\"2021-10-01T04:14:32Z\",\"expectedExecutionTime\":\"ygznmmaxrizk\",\"steps\":[{},{},{}]}]},{\"name\":\"opxlhslnelxieixy\",\"description\":\"lxecwcrojphslh\",\"errorMessage\":\"wjutifdwfmv\",\"status\":\"orq\",\"startTimeUtc\":\"2021-08-10T05:28:35Z\",\"endTimeUtc\":\"2021-05-19T07:51:13Z\",\"lastUpdatedTimeUtc\":\"2021-01-25T09:16:29Z\",\"expectedExecutionTime\":\"glka\",\"steps\":[{\"name\":\"qjujeickpzvcp\",\"description\":\"mxelnwcltyjed\",\"errorMessage\":\"xm\",\"status\":\"mkqscaz\",\"startTimeUtc\":\"2021-02-06T07:38:24Z\",\"endTimeUtc\":\"2021-01-07T08:40:37Z\",\"lastUpdatedTimeUtc\":\"2021-03-23T10:08:45Z\",\"expectedExecutionTime\":\"uamwabzxrvxc\",\"steps\":[{},{},{}]},{\"name\":\"phai\",\"description\":\"xyasflvgsgzw\",\"errorMessage\":\"akoi\",\"status\":\"nsmjbl\",\"startTimeUtc\":\"2021-02-08T01:15:15Z\",\"endTimeUtc\":\"2021-03-04T19:37:05Z\",\"lastUpdatedTimeUtc\":\"2021-08-20T09:09:27Z\",\"expectedExecutionTime\":\"zotqyryuzcb\",\"steps\":[{}]},{\"name\":\"xmvwfg\",\"description\":\"yxonsupe\",\"errorMessage\":\"lzqnhcvs\",\"status\":\"tnzoibgsxgnxfy\",\"startTimeUtc\":\"2021-03-20T13:56:14Z\",\"endTimeUtc\":\"2021-09-28T20:14:38Z\",\"lastUpdatedTimeUtc\":\"2021-06-02T20:10:16Z\",\"expectedExecutionTime\":\"wdofdbxiqx\",\"steps\":[{}]},{\"name\":\"bimhtmwwinhe\",\"description\":\"qpofvwbc\",\"errorMessage\":\"embnkbw\",\"status\":\"vxkdivqihebwtswb\",\"startTimeUtc\":\"2021-01-18T05:52:32Z\",\"endTimeUtc\":\"2021-12-01T16:14:23Z\",\"lastUpdatedTimeUtc\":\"2021-01-09T08:38:51Z\",\"expectedExecutionTime\":\"agegiz\",\"steps\":[{},{},{},{}]}]},{\"name\":\"elisdjub\",\"description\":\"bqigkx\",\"errorMessage\":\"sazgakgacyrcmj\",\"status\":\"spofapvuhry\",\"startTimeUtc\":\"2021-10-23T00:02:47Z\",\"endTimeUtc\":\"2021-02-25T11:36:52Z\",\"lastUpdatedTimeUtc\":\"2021-10-19T06:40:17Z\",\"expectedExecutionTime\":\"bzjedmstk\",\"steps\":[{\"name\":\"xbcuiiznkt\",\"description\":\"ansnvp\",\"errorMessage\":\"bmikost\",\"status\":\"bkiw\",\"startTimeUtc\":\"2021-11-09T06:36:44Z\",\"endTimeUtc\":\"2021-09-12T08:53:09Z\",\"lastUpdatedTimeUtc\":\"2021-11-18T18:14:42Z\",\"expectedExecutionTime\":\"zfylsg\",\"steps\":[{},{},{}]}]},{\"name\":\"bcunezzceze\",\"description\":\"w\",\"errorMessage\":\"wl\",\"status\":\"jwetnpsihcla\",\"startTimeUtc\":\"2021-08-22T14:03:47Z\",\"endTimeUtc\":\"2021-07-30T14:29:46Z\",\"lastUpdatedTimeUtc\":\"2021-01-01T06:51:19Z\",\"expectedExecutionTime\":\"rsqqwztcm\",\"steps\":[{\"name\":\"hcxwaxfewzjk\",\"description\":\"xfdeqvhpsyl\",\"errorMessage\":\"shk\",\"status\":\"f\",\"startTimeUtc\":\"2021-11-21T16:37:11Z\",\"endTimeUtc\":\"2021-04-10T03:24:01Z\",\"lastUpdatedTimeUtc\":\"2021-06-13T14:19:09Z\",\"expectedExecutionTime\":\"ywwpgjxsnptfuj\",\"steps\":[{}]},{\"name\":\"aaoepttaqut\",\"description\":\"wemxswvruunzz\",\"errorMessage\":\"ehkfkimrtixok\",\"status\":\"qyinl\",\"startTimeUtc\":\"2021-11-21T16:22:48Z\",\"endTimeUtc\":\"2021-02-16T03:43:05Z\",\"lastUpdatedTimeUtc\":\"2021-06-20T19:43:14Z\",\"expectedExecutionTime\":\"xmonstshi\",\"steps\":[{},{}]}]}]}") + "{\"name\":\"xcpwzvmdok\",\"description\":\"dt\",\"errorMessage\":\"lwxlboncqbazq\",\"status\":\"qchygtv\",\"startTimeUtc\":\"2021-02-22T07:43:33Z\",\"endTimeUtc\":\"2021-03-04T10:40:35Z\",\"lastUpdatedTimeUtc\":\"2021-08-29T03:11:39Z\",\"expectedExecutionTime\":\"ubdpkxyqvgxi\",\"steps\":[{\"name\":\"tvo\",\"description\":\"xdxuwsaifmc\",\"errorMessage\":\"osbz\",\"status\":\"hg\",\"startTimeUtc\":\"2021-01-16T23:40:19Z\",\"endTimeUtc\":\"2021-03-25T14:43:25Z\",\"lastUpdatedTimeUtc\":\"2021-05-15T07:45:46Z\",\"expectedExecutionTime\":\"olg\",\"steps\":[{\"name\":\"pvelszerqze\",\"description\":\"o\",\"errorMessage\":\"intxwa\",\"status\":\"glzoblqwa\",\"startTimeUtc\":\"2021-06-14T23:06:53Z\",\"endTimeUtc\":\"2021-11-27T10:55:46Z\",\"lastUpdatedTimeUtc\":\"2021-08-19T06:04:53Z\",\"expectedExecutionTime\":\"zyqbhd\",\"steps\":[{},{},{}]},{\"name\":\"rqpjiy\",\"description\":\"jc\",\"errorMessage\":\"a\",\"status\":\"mzwdfk\",\"startTimeUtc\":\"2021-08-10T18:12:13Z\",\"endTimeUtc\":\"2021-09-06T18:52:33Z\",\"lastUpdatedTimeUtc\":\"2021-08-17T05:48:49Z\",\"expectedExecutionTime\":\"ltbqctqjfgxxsaet\",\"steps\":[{},{}]},{\"name\":\"vpyigdaqq\",\"description\":\"zdcduwjoedxng\",\"errorMessage\":\"aifpaurwwgil\",\"status\":\"qqa\",\"startTimeUtc\":\"2021-09-23T01:12:13Z\",\"endTimeUtc\":\"2021-05-30T22:07:48Z\",\"lastUpdatedTimeUtc\":\"2021-09-28T16:45:06Z\",\"expectedExecutionTime\":\"cvjwcyzia\",\"steps\":[{},{},{}]},{\"name\":\"qchxrtuic\",\"description\":\"iw\",\"errorMessage\":\"m\",\"status\":\"zhzzwvywrg\",\"startTimeUtc\":\"2021-04-29T05:02:11Z\",\"endTimeUtc\":\"2021-05-11T05:41:26Z\",\"lastUpdatedTimeUtc\":\"2021-07-19T00:52:24Z\",\"expectedExecutionTime\":\"x\",\"steps\":[{},{}]}]}]}") .toObject(Step.class); - Assertions.assertEquals("kzq", model.name()); - Assertions.assertEquals("jeokbzefezrxccz", model.description()); - Assertions.assertEquals("tleipqxbkw", model.errorMessage()); - Assertions.assertEquals("gnzvdfbzdixzm", model.status()); - Assertions.assertEquals(OffsetDateTime.parse("2021-04-08T06:17:43Z"), model.startTimeUtc()); - Assertions.assertEquals(OffsetDateTime.parse("2021-06-28T09:56:46Z"), model.endTimeUtc()); - Assertions.assertEquals(OffsetDateTime.parse("2021-11-07T11:06:58Z"), model.lastUpdatedTimeUtc()); - Assertions.assertEquals("pqhe", model.expectedExecutionTime()); - Assertions.assertEquals("mcgsbostzelnd", model.steps().get(0).name()); - Assertions.assertEquals("tutmzl", model.steps().get(0).description()); - Assertions.assertEquals("ojlvfhrbbpneqvc", model.steps().get(0).errorMessage()); - Assertions.assertEquals("yyurmochpprprsnm", model.steps().get(0).status()); - Assertions.assertEquals(OffsetDateTime.parse("2021-07-18T02:05:58Z"), model.steps().get(0).startTimeUtc()); - Assertions.assertEquals(OffsetDateTime.parse("2021-03-23T11:52:12Z"), model.steps().get(0).endTimeUtc()); - Assertions.assertEquals(OffsetDateTime.parse("2021-06-08T20:35:44Z"), + Assertions.assertEquals("xcpwzvmdok", model.name()); + Assertions.assertEquals("dt", model.description()); + Assertions.assertEquals("lwxlboncqbazq", model.errorMessage()); + Assertions.assertEquals("qchygtv", model.status()); + Assertions.assertEquals(OffsetDateTime.parse("2021-02-22T07:43:33Z"), model.startTimeUtc()); + Assertions.assertEquals(OffsetDateTime.parse("2021-03-04T10:40:35Z"), model.endTimeUtc()); + Assertions.assertEquals(OffsetDateTime.parse("2021-08-29T03:11:39Z"), model.lastUpdatedTimeUtc()); + Assertions.assertEquals("ubdpkxyqvgxi", model.expectedExecutionTime()); + Assertions.assertEquals("tvo", model.steps().get(0).name()); + Assertions.assertEquals("xdxuwsaifmc", model.steps().get(0).description()); + Assertions.assertEquals("osbz", model.steps().get(0).errorMessage()); + Assertions.assertEquals("hg", model.steps().get(0).status()); + Assertions.assertEquals(OffsetDateTime.parse("2021-01-16T23:40:19Z"), model.steps().get(0).startTimeUtc()); + Assertions.assertEquals(OffsetDateTime.parse("2021-03-25T14:43:25Z"), model.steps().get(0).endTimeUtc()); + Assertions.assertEquals(OffsetDateTime.parse("2021-05-15T07:45:46Z"), model.steps().get(0).lastUpdatedTimeUtc()); - Assertions.assertEquals("hlb", model.steps().get(0).expectedExecutionTime()); - Assertions.assertEquals("pcpil", model.steps().get(0).steps().get(0).name()); - Assertions.assertEquals("a", model.steps().get(0).steps().get(0).description()); - Assertions.assertEquals("vechndbnwiehole", model.steps().get(0).steps().get(0).errorMessage()); - Assertions.assertEquals("wiuub", model.steps().get(0).steps().get(0).status()); - Assertions.assertEquals(OffsetDateTime.parse("2021-02-20T13:36:52Z"), + Assertions.assertEquals("olg", model.steps().get(0).expectedExecutionTime()); + Assertions.assertEquals("pvelszerqze", model.steps().get(0).steps().get(0).name()); + Assertions.assertEquals("o", model.steps().get(0).steps().get(0).description()); + Assertions.assertEquals("intxwa", model.steps().get(0).steps().get(0).errorMessage()); + Assertions.assertEquals("glzoblqwa", model.steps().get(0).steps().get(0).status()); + Assertions.assertEquals(OffsetDateTime.parse("2021-06-14T23:06:53Z"), model.steps().get(0).steps().get(0).startTimeUtc()); - Assertions.assertEquals(OffsetDateTime.parse("2021-11-19T16:29:04Z"), + Assertions.assertEquals(OffsetDateTime.parse("2021-11-27T10:55:46Z"), model.steps().get(0).steps().get(0).endTimeUtc()); - Assertions.assertEquals(OffsetDateTime.parse("2021-04-15T16:55:23Z"), + Assertions.assertEquals(OffsetDateTime.parse("2021-08-19T06:04:53Z"), model.steps().get(0).steps().get(0).lastUpdatedTimeUtc()); - Assertions.assertEquals("aqtferr", model.steps().get(0).steps().get(0).expectedExecutionTime()); + Assertions.assertEquals("zyqbhd", model.steps().get(0).steps().get(0).expectedExecutionTime()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - Step model - = new Step().withName("kzq") - .withDescription("jeokbzefezrxccz") - .withErrorMessage("tleipqxbkw") - .withStatus("gnzvdfbzdixzm") - .withStartTimeUtc(OffsetDateTime.parse("2021-04-08T06:17:43Z")) - .withEndTimeUtc(OffsetDateTime.parse("2021-06-28T09:56:46Z")) - .withLastUpdatedTimeUtc(OffsetDateTime.parse("2021-11-07T11:06:58Z")) - .withExpectedExecutionTime("pqhe") + Step model = new Step().withName("xcpwzvmdok") + .withDescription("dt") + .withErrorMessage("lwxlboncqbazq") + .withStatus("qchygtv") + .withStartTimeUtc(OffsetDateTime.parse("2021-02-22T07:43:33Z")) + .withEndTimeUtc(OffsetDateTime.parse("2021-03-04T10:40:35Z")) + .withLastUpdatedTimeUtc(OffsetDateTime.parse("2021-08-29T03:11:39Z")) + .withExpectedExecutionTime("ubdpkxyqvgxi") + .withSteps(Arrays.asList(new Step().withName("tvo") + .withDescription("xdxuwsaifmc") + .withErrorMessage("osbz") + .withStatus("hg") + .withStartTimeUtc(OffsetDateTime.parse("2021-01-16T23:40:19Z")) + .withEndTimeUtc(OffsetDateTime.parse("2021-03-25T14:43:25Z")) + .withLastUpdatedTimeUtc(OffsetDateTime.parse("2021-05-15T07:45:46Z")) + .withExpectedExecutionTime("olg") .withSteps(Arrays.asList( - new Step().withName("mcgsbostzelnd") - .withDescription("tutmzl") - .withErrorMessage("ojlvfhrbbpneqvc") - .withStatus("yyurmochpprprsnm") - .withStartTimeUtc(OffsetDateTime.parse("2021-07-18T02:05:58Z")) - .withEndTimeUtc(OffsetDateTime.parse("2021-03-23T11:52:12Z")) - .withLastUpdatedTimeUtc(OffsetDateTime.parse("2021-06-08T20:35:44Z")) - .withExpectedExecutionTime("hlb") - .withSteps( - Arrays - .asList( - new Step().withName("pcpil") - .withDescription("a") - .withErrorMessage("vechndbnwiehole") - .withStatus("wiuub") - .withStartTimeUtc(OffsetDateTime.parse("2021-02-20T13:36:52Z")) - .withEndTimeUtc(OffsetDateTime.parse("2021-11-19T16:29:04Z")) - .withLastUpdatedTimeUtc(OffsetDateTime.parse("2021-04-15T16:55:23Z")) - .withExpectedExecutionTime("aqtferr") - .withSteps(Arrays.asList(new Step())), - new Step().withName("jkmfxapjwo") - .withDescription("qnobp") - .withErrorMessage("cdabtqwpwya") - .withStatus("zasqbucljgkyexao") - .withStartTimeUtc(OffsetDateTime.parse("2021-10-16T00:16:04Z")) - .withEndTimeUtc(OffsetDateTime.parse("2021-04-03T20:50:10Z")) - .withLastUpdatedTimeUtc(OffsetDateTime.parse("2021-11-04T08:52:55Z")) - .withExpectedExecutionTime("sdaultxij") - .withSteps(Arrays.asList(new Step(), new Step())), - new Step().withName("qwazlnqnmcjngzq") - .withDescription("xtbjwgnyfusfzsv") - .withErrorMessage("ikzhajqglcfhmlrq") - .withStatus("xynqnz") - .withStartTimeUtc(OffsetDateTime.parse("2021-02-04T14:35:25Z")) - .withEndTimeUtc(OffsetDateTime.parse("2021-03-13T11:56:36Z")) - .withLastUpdatedTimeUtc(OffsetDateTime.parse("2021-07-07T00:29:31Z")) - .withExpectedExecutionTime("zn") - .withSteps(Arrays.asList(new Step(), new Step(), new Step(), new Step())), - new Step() - .withName("eiybbabpfhvfsl") - .withDescription("ntjlr") - .withErrorMessage("jkskyr") - .withStatus("ovzidsx") - .withStartTimeUtc(OffsetDateTime.parse("2021-01-26T00:33:40Z")) - .withEndTimeUtc(OffsetDateTime.parse("2021-08-27T23:16:23Z")) - .withLastUpdatedTimeUtc(OffsetDateTime.parse("2021-10-01T04:14:32Z")) - .withExpectedExecutionTime("ygznmmaxrizk") - .withSteps(Arrays.asList(new Step(), new Step(), new Step())))), - new Step().withName("opxlhslnelxieixy") - .withDescription("lxecwcrojphslh") - .withErrorMessage("wjutifdwfmv") - .withStatus("orq") - .withStartTimeUtc(OffsetDateTime.parse("2021-08-10T05:28:35Z")) - .withEndTimeUtc(OffsetDateTime.parse("2021-05-19T07:51:13Z")) - .withLastUpdatedTimeUtc(OffsetDateTime.parse("2021-01-25T09:16:29Z")) - .withExpectedExecutionTime("glka") - .withSteps(Arrays.asList( - new Step().withName("qjujeickpzvcp") - .withDescription("mxelnwcltyjed") - .withErrorMessage("xm") - .withStatus("mkqscaz") - .withStartTimeUtc(OffsetDateTime.parse("2021-02-06T07:38:24Z")) - .withEndTimeUtc(OffsetDateTime.parse("2021-01-07T08:40:37Z")) - .withLastUpdatedTimeUtc(OffsetDateTime.parse("2021-03-23T10:08:45Z")) - .withExpectedExecutionTime("uamwabzxrvxc") - .withSteps(Arrays.asList(new Step(), new Step(), new Step())), - new Step().withName("phai") - .withDescription("xyasflvgsgzw") - .withErrorMessage("akoi") - .withStatus("nsmjbl") - .withStartTimeUtc(OffsetDateTime.parse("2021-02-08T01:15:15Z")) - .withEndTimeUtc(OffsetDateTime.parse("2021-03-04T19:37:05Z")) - .withLastUpdatedTimeUtc(OffsetDateTime.parse("2021-08-20T09:09:27Z")) - .withExpectedExecutionTime("zotqyryuzcb") - .withSteps(Arrays.asList(new Step())), - new Step().withName("xmvwfg") - .withDescription("yxonsupe") - .withErrorMessage("lzqnhcvs") - .withStatus("tnzoibgsxgnxfy") - .withStartTimeUtc(OffsetDateTime.parse("2021-03-20T13:56:14Z")) - .withEndTimeUtc(OffsetDateTime.parse("2021-09-28T20:14:38Z")) - .withLastUpdatedTimeUtc(OffsetDateTime.parse("2021-06-02T20:10:16Z")) - .withExpectedExecutionTime("wdofdbxiqx") - .withSteps(Arrays.asList(new Step())), - new Step().withName("bimhtmwwinhe") - .withDescription("qpofvwbc") - .withErrorMessage("embnkbw") - .withStatus("vxkdivqihebwtswb") - .withStartTimeUtc(OffsetDateTime.parse("2021-01-18T05:52:32Z")) - .withEndTimeUtc(OffsetDateTime.parse("2021-12-01T16:14:23Z")) - .withLastUpdatedTimeUtc(OffsetDateTime.parse("2021-01-09T08:38:51Z")) - .withExpectedExecutionTime("agegiz") - .withSteps(Arrays.asList(new Step(), new Step(), new Step(), new Step())))), - new Step().withName("elisdjub") - .withDescription("bqigkx") - .withErrorMessage("sazgakgacyrcmj") - .withStatus("spofapvuhry") - .withStartTimeUtc(OffsetDateTime.parse("2021-10-23T00:02:47Z")) - .withEndTimeUtc(OffsetDateTime.parse("2021-02-25T11:36:52Z")) - .withLastUpdatedTimeUtc(OffsetDateTime.parse("2021-10-19T06:40:17Z")) - .withExpectedExecutionTime("bzjedmstk") - .withSteps( - Arrays - .asList( - new Step().withName("xbcuiiznkt") - .withDescription("ansnvp") - .withErrorMessage("bmikost") - .withStatus("bkiw") - .withStartTimeUtc(OffsetDateTime.parse("2021-11-09T06:36:44Z")) - .withEndTimeUtc(OffsetDateTime.parse("2021-09-12T08:53:09Z")) - .withLastUpdatedTimeUtc(OffsetDateTime.parse("2021-11-18T18:14:42Z")) - .withExpectedExecutionTime("zfylsg") - .withSteps(Arrays.asList(new Step(), new Step(), new Step())))), - new Step().withName("bcunezzceze") - .withDescription("w") - .withErrorMessage("wl") - .withStatus("jwetnpsihcla") - .withStartTimeUtc(OffsetDateTime.parse("2021-08-22T14:03:47Z")) - .withEndTimeUtc(OffsetDateTime.parse("2021-07-30T14:29:46Z")) - .withLastUpdatedTimeUtc(OffsetDateTime.parse("2021-01-01T06:51:19Z")) - .withExpectedExecutionTime("rsqqwztcm") - .withSteps(Arrays.asList( - new Step().withName("hcxwaxfewzjk") - .withDescription("xfdeqvhpsyl") - .withErrorMessage("shk") - .withStatus("f") - .withStartTimeUtc(OffsetDateTime.parse("2021-11-21T16:37:11Z")) - .withEndTimeUtc(OffsetDateTime.parse("2021-04-10T03:24:01Z")) - .withLastUpdatedTimeUtc(OffsetDateTime.parse("2021-06-13T14:19:09Z")) - .withExpectedExecutionTime("ywwpgjxsnptfuj") - .withSteps(Arrays.asList(new Step())), - new Step().withName("aaoepttaqut") - .withDescription("wemxswvruunzz") - .withErrorMessage("ehkfkimrtixok") - .withStatus("qyinl") - .withStartTimeUtc(OffsetDateTime.parse("2021-11-21T16:22:48Z")) - .withEndTimeUtc(OffsetDateTime.parse("2021-02-16T03:43:05Z")) - .withLastUpdatedTimeUtc(OffsetDateTime.parse("2021-06-20T19:43:14Z")) - .withExpectedExecutionTime("xmonstshi") - .withSteps(Arrays.asList(new Step(), new Step())))))); + new Step().withName("pvelszerqze") + .withDescription("o") + .withErrorMessage("intxwa") + .withStatus("glzoblqwa") + .withStartTimeUtc(OffsetDateTime.parse("2021-06-14T23:06:53Z")) + .withEndTimeUtc(OffsetDateTime.parse("2021-11-27T10:55:46Z")) + .withLastUpdatedTimeUtc(OffsetDateTime.parse("2021-08-19T06:04:53Z")) + .withExpectedExecutionTime("zyqbhd") + .withSteps(Arrays.asList(new Step(), new Step(), new Step())), + new Step().withName("rqpjiy") + .withDescription("jc") + .withErrorMessage("a") + .withStatus("mzwdfk") + .withStartTimeUtc(OffsetDateTime.parse("2021-08-10T18:12:13Z")) + .withEndTimeUtc(OffsetDateTime.parse("2021-09-06T18:52:33Z")) + .withLastUpdatedTimeUtc(OffsetDateTime.parse("2021-08-17T05:48:49Z")) + .withExpectedExecutionTime("ltbqctqjfgxxsaet") + .withSteps(Arrays.asList(new Step(), new Step())), + new Step().withName("vpyigdaqq") + .withDescription("zdcduwjoedxng") + .withErrorMessage("aifpaurwwgil") + .withStatus("qqa") + .withStartTimeUtc(OffsetDateTime.parse("2021-09-23T01:12:13Z")) + .withEndTimeUtc(OffsetDateTime.parse("2021-05-30T22:07:48Z")) + .withLastUpdatedTimeUtc(OffsetDateTime.parse("2021-09-28T16:45:06Z")) + .withExpectedExecutionTime("cvjwcyzia") + .withSteps(Arrays.asList(new Step(), new Step(), new Step())), + new Step().withName("qchxrtuic") + .withDescription("iw") + .withErrorMessage("m") + .withStatus("zhzzwvywrg") + .withStartTimeUtc(OffsetDateTime.parse("2021-04-29T05:02:11Z")) + .withEndTimeUtc(OffsetDateTime.parse("2021-05-11T05:41:26Z")) + .withLastUpdatedTimeUtc(OffsetDateTime.parse("2021-07-19T00:52:24Z")) + .withExpectedExecutionTime("x") + .withSteps(Arrays.asList(new Step(), new Step())))))); model = BinaryData.fromObject(model).toObject(Step.class); - Assertions.assertEquals("kzq", model.name()); - Assertions.assertEquals("jeokbzefezrxccz", model.description()); - Assertions.assertEquals("tleipqxbkw", model.errorMessage()); - Assertions.assertEquals("gnzvdfbzdixzm", model.status()); - Assertions.assertEquals(OffsetDateTime.parse("2021-04-08T06:17:43Z"), model.startTimeUtc()); - Assertions.assertEquals(OffsetDateTime.parse("2021-06-28T09:56:46Z"), model.endTimeUtc()); - Assertions.assertEquals(OffsetDateTime.parse("2021-11-07T11:06:58Z"), model.lastUpdatedTimeUtc()); - Assertions.assertEquals("pqhe", model.expectedExecutionTime()); - Assertions.assertEquals("mcgsbostzelnd", model.steps().get(0).name()); - Assertions.assertEquals("tutmzl", model.steps().get(0).description()); - Assertions.assertEquals("ojlvfhrbbpneqvc", model.steps().get(0).errorMessage()); - Assertions.assertEquals("yyurmochpprprsnm", model.steps().get(0).status()); - Assertions.assertEquals(OffsetDateTime.parse("2021-07-18T02:05:58Z"), model.steps().get(0).startTimeUtc()); - Assertions.assertEquals(OffsetDateTime.parse("2021-03-23T11:52:12Z"), model.steps().get(0).endTimeUtc()); - Assertions.assertEquals(OffsetDateTime.parse("2021-06-08T20:35:44Z"), + Assertions.assertEquals("xcpwzvmdok", model.name()); + Assertions.assertEquals("dt", model.description()); + Assertions.assertEquals("lwxlboncqbazq", model.errorMessage()); + Assertions.assertEquals("qchygtv", model.status()); + Assertions.assertEquals(OffsetDateTime.parse("2021-02-22T07:43:33Z"), model.startTimeUtc()); + Assertions.assertEquals(OffsetDateTime.parse("2021-03-04T10:40:35Z"), model.endTimeUtc()); + Assertions.assertEquals(OffsetDateTime.parse("2021-08-29T03:11:39Z"), model.lastUpdatedTimeUtc()); + Assertions.assertEquals("ubdpkxyqvgxi", model.expectedExecutionTime()); + Assertions.assertEquals("tvo", model.steps().get(0).name()); + Assertions.assertEquals("xdxuwsaifmc", model.steps().get(0).description()); + Assertions.assertEquals("osbz", model.steps().get(0).errorMessage()); + Assertions.assertEquals("hg", model.steps().get(0).status()); + Assertions.assertEquals(OffsetDateTime.parse("2021-01-16T23:40:19Z"), model.steps().get(0).startTimeUtc()); + Assertions.assertEquals(OffsetDateTime.parse("2021-03-25T14:43:25Z"), model.steps().get(0).endTimeUtc()); + Assertions.assertEquals(OffsetDateTime.parse("2021-05-15T07:45:46Z"), model.steps().get(0).lastUpdatedTimeUtc()); - Assertions.assertEquals("hlb", model.steps().get(0).expectedExecutionTime()); - Assertions.assertEquals("pcpil", model.steps().get(0).steps().get(0).name()); - Assertions.assertEquals("a", model.steps().get(0).steps().get(0).description()); - Assertions.assertEquals("vechndbnwiehole", model.steps().get(0).steps().get(0).errorMessage()); - Assertions.assertEquals("wiuub", model.steps().get(0).steps().get(0).status()); - Assertions.assertEquals(OffsetDateTime.parse("2021-02-20T13:36:52Z"), + Assertions.assertEquals("olg", model.steps().get(0).expectedExecutionTime()); + Assertions.assertEquals("pvelszerqze", model.steps().get(0).steps().get(0).name()); + Assertions.assertEquals("o", model.steps().get(0).steps().get(0).description()); + Assertions.assertEquals("intxwa", model.steps().get(0).steps().get(0).errorMessage()); + Assertions.assertEquals("glzoblqwa", model.steps().get(0).steps().get(0).status()); + Assertions.assertEquals(OffsetDateTime.parse("2021-06-14T23:06:53Z"), model.steps().get(0).steps().get(0).startTimeUtc()); - Assertions.assertEquals(OffsetDateTime.parse("2021-11-19T16:29:04Z"), + Assertions.assertEquals(OffsetDateTime.parse("2021-11-27T10:55:46Z"), model.steps().get(0).steps().get(0).endTimeUtc()); - Assertions.assertEquals(OffsetDateTime.parse("2021-04-15T16:55:23Z"), + Assertions.assertEquals(OffsetDateTime.parse("2021-08-19T06:04:53Z"), model.steps().get(0).steps().get(0).lastUpdatedTimeUtc()); - Assertions.assertEquals("aqtferr", model.steps().get(0).steps().get(0).expectedExecutionTime()); + Assertions.assertEquals("zyqbhd", model.steps().get(0).steps().get(0).expectedExecutionTime()); } } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/StorageTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/StorageTests.java index 10264e4c41f7..125ddde9ed92 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/StorageTests.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/StorageTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.generated; @@ -11,14 +11,14 @@ public final class StorageTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - Storage model = BinaryData.fromString("{\"configurationMode\":\"laulppg\"}").toObject(Storage.class); - Assertions.assertEquals("laulppg", model.configurationMode()); + Storage model = BinaryData.fromString("{\"configurationMode\":\"r\"}").toObject(Storage.class); + Assertions.assertEquals("r", model.configurationMode()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - Storage model = new Storage().withConfigurationMode("laulppg"); + Storage model = new Storage().withConfigurationMode("r"); model = BinaryData.fromObject(model).toObject(Storage.class); - Assertions.assertEquals("laulppg", model.configurationMode()); + Assertions.assertEquals("r", model.configurationMode()); } } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/SwitchDetailTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/SwitchDetailTests.java index 0f610e24d52e..0281aef648de 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/SwitchDetailTests.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/SwitchDetailTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.generated; @@ -11,13 +11,7 @@ public final class SwitchDetailTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { SwitchDetail model = BinaryData.fromString( - "{\"switchName\":\"kzkdhmeott\",\"switchType\":\"jyosxwwh\",\"extensions\":[{\"switchId\":\"fv\",\"extensionName\":\"dpmiljpn\",\"extensionEnabled\":false},{\"switchId\":\"dqllzsauzpjlxeeh\",\"extensionName\":\"iqhzlr\",\"extensionEnabled\":false},{\"switchId\":\"zxlskihmxr\",\"extensionName\":\"sajrednwyysht\",\"extensionEnabled\":true},{\"switchId\":\"evuafpwzyifrk\",\"extensionName\":\"ltxeqip\",\"extensionEnabled\":false}]}") + "{\"switchName\":\"ffg\",\"switchType\":\"ukkutvl\",\"extensions\":[{\"switchId\":\"qhvmblcouqe\",\"extensionName\":\"hbcdsziry\",\"extensionEnabled\":false}]}") .toObject(SwitchDetail.class); } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - SwitchDetail model = new SwitchDetail(); - model = BinaryData.fromObject(model).toObject(SwitchDetail.class); - } } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/SwitchExtensionTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/SwitchExtensionTests.java index 300c3bd7870a..fc2be7a2a121 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/SwitchExtensionTests.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/SwitchExtensionTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.generated; @@ -10,14 +10,8 @@ public final class SwitchExtensionTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - SwitchExtension model - = BinaryData.fromString("{\"switchId\":\"yimsfayorpr\",\"extensionName\":\"kj\",\"extensionEnabled\":true}") - .toObject(SwitchExtension.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - SwitchExtension model = new SwitchExtension(); - model = BinaryData.fromObject(model).toObject(SwitchExtension.class); + SwitchExtension model = BinaryData + .fromString("{\"switchId\":\"oypmbltoorm\",\"extensionName\":\"qlwxldyka\",\"extensionEnabled\":true}") + .toObject(SwitchExtension.class); } } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/UpdateListTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/UpdateListTests.java index 8f330e86c91e..a045729658a3 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/UpdateListTests.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/UpdateListTests.java @@ -1,252 +1,67 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.generated; import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.azurestackhci.fluent.models.HciUpdateInner; +import com.azure.resourcemanager.azurestackhci.implementation.models.UpdateList; import com.azure.resourcemanager.azurestackhci.models.AvailabilityType; import com.azure.resourcemanager.azurestackhci.models.HealthState; -import com.azure.resourcemanager.azurestackhci.models.PackageVersionInfo; -import com.azure.resourcemanager.azurestackhci.models.PrecheckResult; -import com.azure.resourcemanager.azurestackhci.models.PrecheckResultTags; import com.azure.resourcemanager.azurestackhci.models.RebootRequirement; import com.azure.resourcemanager.azurestackhci.models.Severity; import com.azure.resourcemanager.azurestackhci.models.State; import com.azure.resourcemanager.azurestackhci.models.Status; -import com.azure.resourcemanager.azurestackhci.models.UpdateList; -import com.azure.resourcemanager.azurestackhci.models.UpdatePrerequisite; import java.time.OffsetDateTime; -import java.util.Arrays; import org.junit.jupiter.api.Assertions; public final class UpdateListTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { UpdateList model = BinaryData.fromString( - "{\"value\":[{\"location\":\"razftxejwabmdujt\",\"properties\":{\"provisioningState\":\"Disconnected\",\"installedDate\":\"2021-11-13T23:19:59Z\",\"description\":\"c\",\"minSbeVersionRequired\":\"urbuhhlkyqltq\",\"state\":\"AdditionalContentRequired\",\"prerequisites\":[{\"updateType\":\"wkffdjkt\",\"version\":\"sidfv\",\"packageName\":\"g\"},{\"updateType\":\"n\",\"version\":\"ijtk\",\"packageName\":\"sqo\"}],\"componentVersions\":[{\"packageType\":\"kayi\",\"version\":\"sharujtj\",\"lastUpdated\":\"2021-07-10T17:52:36Z\"},{\"packageType\":\"zyjq\",\"version\":\"vwkpqh\",\"lastUpdated\":\"2021-07-09T12:00:41Z\"},{\"packageType\":\"uygb\",\"version\":\"qqekewvnqvcdlgu\",\"lastUpdated\":\"2021-11-05T12:42:34Z\"},{\"packageType\":\"f\",\"version\":\"wnlaxpu\",\"lastUpdated\":\"2021-08-11T07:22:41Z\"}],\"rebootRequired\":\"Unknown\",\"healthState\":\"Failure\",\"healthCheckResult\":[{\"name\":\"tacgxmfc\",\"displayName\":\"er\",\"tags\":{},\"healthCheckTags\":\"datavs\",\"title\":\"hlwntsjgq\",\"status\":\"Failed\",\"severity\":\"Critical\",\"description\":\"uuuybnchrsziz\",\"remediation\":\"uelyetndn\",\"targetResourceID\":\"qyggagfl\",\"targetResourceName\":\"gm\",\"targetResourceType\":\"wahzjmucftbyr\",\"timestamp\":\"2021-04-22T08:33:43Z\",\"additionalData\":\"hkpigqfusuckzmkw\",\"healthCheckSource\":\"snoxaxmqeqa\"},{\"name\":\"hjnhgwydyynfsvk\",\"displayName\":\"bvqt\",\"tags\":{},\"healthCheckTags\":\"datarfdl\",\"title\":\"kh\",\"status\":\"NotYetRegistered\",\"severity\":\"Hidden\",\"description\":\"zjcpeogk\",\"remediation\":\"mgbro\",\"targetResourceID\":\"ddbhf\",\"targetResourceName\":\"fpazjzoywjxhpd\",\"targetResourceType\":\"ontacnpq\",\"timestamp\":\"2020-12-27T20:17:23Z\",\"additionalData\":\"tuevrh\",\"healthCheckSource\":\"jyoogwxh\"}],\"healthCheckDate\":\"2021-05-24T18:00:52Z\",\"packagePath\":\"ugwbsreurfqkf\",\"packageSizeInMb\":98.716385,\"displayName\":\"nlvhhtklnvnafvv\",\"version\":\"f\",\"publisher\":\"ev\",\"releaseLink\":\"oslc\",\"availabilityType\":\"Online\",\"packageType\":\"okkhminq\",\"additionalProperties\":\"mczngn\",\"updateStateProperties\":{\"progressPercentage\":4.8717856,\"notifyMessage\":\"wuninv\"}},\"id\":\"bchaqd\",\"name\":\"vqecr\",\"type\":\"ct\"},{\"location\":\"xdtddmflhuytxzv\",\"properties\":{\"provisioningState\":\"DisableInProgress\",\"installedDate\":\"2021-03-01T11:01:37Z\",\"description\":\"annovvoxczytpr\",\"minSbeVersionRequired\":\"wvroevytlyokrrr\",\"state\":\"PreparationFailed\",\"prerequisites\":[{\"updateType\":\"sasbcrymodizrx\",\"version\":\"obdxnazpmkmlm\",\"packageName\":\"vfxzopjh\"},{\"updateType\":\"xliohrdddt\",\"version\":\"xqbawpc\",\"packageName\":\"nzqcy\"},{\"updateType\":\"apqofyuicdhz\",\"version\":\"ybww\",\"packageName\":\"d\"},{\"updateType\":\"bid\",\"version\":\"m\",\"packageName\":\"f\"}],\"componentVersions\":[{\"packageType\":\"u\",\"version\":\"pckc\",\"lastUpdated\":\"2021-12-09T01:38:35Z\"},{\"packageType\":\"weyoxoy\",\"version\":\"k\",\"lastUpdated\":\"2021-09-08T11:55:35Z\"},{\"packageType\":\"mmoiroqboshbra\",\"version\":\"pyyrmfs\",\"lastUpdated\":\"2021-03-28T08:56:43Z\"}],\"rebootRequired\":\"Unknown\",\"healthState\":\"InProgress\",\"healthCheckResult\":[{\"name\":\"pdbwnupgahxkum\",\"displayName\":\"jcaacfdmmcpugm\",\"tags\":{},\"healthCheckTags\":\"dataepvufhbzehew\",\"title\":\"qhnlbqnbld\",\"status\":\"NotSpecified\",\"severity\":\"Critical\",\"description\":\"schori\",\"remediation\":\"rsrrmoucsofldp\",\"targetResourceID\":\"iyfc\",\"targetResourceName\":\"beolh\",\"targetResourceType\":\"lvbmxuqibsxtkcu\",\"timestamp\":\"2021-03-04T11:35:39Z\",\"additionalData\":\"farfs\",\"healthCheckSource\":\"wlkjxn\"},{\"name\":\"vwgf\",\"displayName\":\"mhqykizmdksa\",\"tags\":{},\"healthCheckTags\":\"datacluqvo\",\"title\":\"ycjimryvwgcwwpbm\",\"status\":\"ValidationFailed\",\"severity\":\"Informational\",\"description\":\"dsxwefoh\",\"remediation\":\"bvopwndyqle\",\"targetResourceID\":\"lklmtkhlo\",\"targetResourceName\":\"x\",\"targetResourceType\":\"vbrdfjmzsyzfho\",\"timestamp\":\"2021-03-23T11:42:29Z\",\"additionalData\":\"k\",\"healthCheckSource\":\"ychunsjlpjrtwszh\"}],\"healthCheckDate\":\"2021-11-19T08:14:33Z\",\"packagePath\":\"c\",\"packageSizeInMb\":95.381325,\"displayName\":\"rrmhwrbfdp\",\"version\":\"lubhvjg\",\"publisher\":\"ocu\",\"releaseLink\":\"lw\",\"availabilityType\":\"Notify\",\"packageType\":\"mhoocl\",\"additionalProperties\":\"n\",\"updateStateProperties\":{\"progressPercentage\":16.419632,\"notifyMessage\":\"czj\"}},\"id\":\"mykyujxsglhs\",\"name\":\"rryejylmbkzudnig\",\"type\":\"fihotj\"}],\"nextLink\":\"lpxuzzjgnrefq\"}") + "{\"value\":[{\"properties\":{\"provisioningState\":\"Disconnected\",\"installedDate\":\"2021-05-30T22:19:10Z\",\"description\":\"s\",\"minSbeVersionRequired\":\"h\",\"state\":\"Recalled\",\"prerequisites\":[{\"updateType\":\"bcbgydlqidywmhm\",\"version\":\"yrilkfb\",\"packageName\":\"qqxvztpbn\"},{\"updateType\":\"qtxjtomalswbnfdd\",\"version\":\"ldwq\",\"packageName\":\"sfzygleexahv\"}],\"componentVersions\":[{\"packageType\":\"sbrcary\",\"version\":\"jjzyvoaqajuve\",\"lastUpdated\":\"2021-09-23T00:13:25Z\"},{\"packageType\":\"dmkrrb\",\"version\":\"pfulube\",\"lastUpdated\":\"2021-10-15T00:12:06Z\"},{\"packageType\":\"pmfbfununmpzkr\",\"version\":\"yifkdschlzvf\",\"lastUpdated\":\"2021-03-30T02:21:42Z\"}],\"rebootRequired\":\"Unknown\",\"healthState\":\"Warning\",\"healthCheckResult\":[{\"name\":\"wnphbkgfyrto\",\"displayName\":\"hmjpjscdfpdqwtyg\",\"tags\":{},\"healthCheckTags\":\"datawmseharxifvqn\",\"title\":\"tmbpjp\",\"status\":\"ValidationSuccess\",\"severity\":\"Informational\",\"description\":\"rsidqpxlbtpakf\",\"remediation\":\"gatwmykyu\",\"targetResourceID\":\"ym\",\"targetResourceName\":\"mfjhpycvjqdvdwkq\",\"targetResourceType\":\"drlefgnaavuag\",\"timestamp\":\"2021-10-24T22:34:59Z\",\"additionalData\":\"aou\",\"healthCheckSource\":\"pdctuhspfefyi\"}],\"healthCheckDate\":\"2021-08-11T23:31:29Z\",\"packagePath\":\"euyldphmt\",\"packageSizeInMb\":52.83156571027593,\"displayName\":\"suthhllnmwynefx\",\"version\":\"lf\",\"publisher\":\"atxtjrrlkmdskjhh\",\"releaseLink\":\"lajfoxcxscvslxlh\",\"availabilityType\":\"Online\",\"packageType\":\"rmukmyjmkxett\",\"additionalProperties\":\"lojfkqidnqto\",\"updateStateProperties\":{\"progressPercentage\":24.515046051678745,\"notifyMessage\":\"csqhtkbtnqlrng\"}},\"location\":\"mbiipsnawwlqk\",\"id\":\"xhhllxricct\",\"name\":\"wmuqqoajxeiygle\",\"type\":\"rwvaexhdc\"},{\"properties\":{\"provisioningState\":\"Creating\",\"installedDate\":\"2021-07-12T18:01:58Z\",\"description\":\"brupobehdmljza\",\"minSbeVersionRequired\":\"umepjpbibn\",\"state\":\"HasPrerequisite\",\"prerequisites\":[{\"updateType\":\"ifexleqirccjcly\",\"version\":\"gxvrpjl\",\"packageName\":\"zuodacpun\"},{\"updateType\":\"tepdjxqes\",\"version\":\"ynu\",\"packageName\":\"lpckaewsedves\"},{\"updateType\":\"xegqphr\",\"version\":\"nzhctmjtsgh\",\"packageName\":\"c\"},{\"updateType\":\"pzarpzeqacdld\",\"version\":\"mpypefcpczshnuq\",\"packageName\":\"aizu\"}],\"componentVersions\":[{\"packageType\":\"uytuszxhmtvtv\",\"version\":\"w\",\"lastUpdated\":\"2021-06-29T01:50:08Z\"}],\"rebootRequired\":\"True\",\"healthState\":\"InProgress\",\"healthCheckResult\":[{\"name\":\"tthaokgkskj\",\"displayName\":\"bs\",\"tags\":{},\"healthCheckTags\":\"datajqf\",\"title\":\"peexpgeumilhwuit\",\"status\":\"DeploymentInProgress\",\"severity\":\"Critical\",\"description\":\"onofninbdbzsxcw\",\"remediation\":\"rsmpcbbprtuga\",\"targetResourceID\":\"zbcyksiv\",\"targetResourceName\":\"ogd\",\"targetResourceType\":\"bfcmkrfts\",\"timestamp\":\"2021-11-13T16:28:12Z\",\"additionalData\":\"jxsgmbawvifdxke\",\"healthCheckSource\":\"fho\"},{\"name\":\"xwklooz\",\"displayName\":\"txvcm\",\"tags\":{},\"healthCheckTags\":\"datanlcpxxviry\",\"title\":\"ngjgvrquvpyg\",\"status\":\"DeploymentInProgress\",\"severity\":\"Informational\",\"description\":\"dcueljtiahxmfq\",\"remediation\":\"arvsx\",\"targetResourceID\":\"bglcjkayspthzodu\",\"targetResourceName\":\"lmjtg\",\"targetResourceType\":\"ioskkfmkmfdjxyxg\",\"timestamp\":\"2021-01-26T00:09:50Z\",\"additionalData\":\"vjcteoedlrslsk\",\"healthCheckSource\":\"pxvjnzd\"}],\"healthCheckDate\":\"2021-10-21T12:59:13Z\",\"packagePath\":\"ojhpcnabxzfsn\",\"packageSizeInMb\":81.53434955273116,\"displayName\":\"xv\",\"version\":\"lmhivzkwwwnc\",\"publisher\":\"rzd\",\"releaseLink\":\"lskzptjxul\",\"availabilityType\":\"Local\",\"packageType\":\"yrth\",\"additionalProperties\":\"lehmcgcjeinueho\",\"updateStateProperties\":{\"progressPercentage\":84.20124554736532,\"notifyMessage\":\"jvqntt\"}},\"location\":\"q\",\"id\":\"bzfivfok\",\"name\":\"ysthhza\",\"type\":\"jfwyyrlhgenuze\"},{\"properties\":{\"provisioningState\":\"Connected\",\"installedDate\":\"2021-11-07T19:43:15Z\",\"description\":\"aqszllrzl\",\"minSbeVersionRequired\":\"mdqgmihzpimcqr\",\"state\":\"Installing\",\"prerequisites\":[{\"updateType\":\"nklogxsvtzarhzv\",\"version\":\"sqktcmbjwz\",\"packageName\":\"slpkybtg\"},{\"updateType\":\"kzpgaj\",\"version\":\"jcemqbmfuvqar\",\"packageName\":\"xuqreblu\"}],\"componentVersions\":[{\"packageType\":\"wxs\",\"version\":\"td\",\"lastUpdated\":\"2021-09-26T12:41:41Z\"},{\"packageType\":\"ekraokqkbudbt\",\"version\":\"okbavlyttaak\",\"lastUpdated\":\"2021-01-28T02:18:48Z\"}],\"rebootRequired\":\"False\",\"healthState\":\"Failure\",\"healthCheckResult\":[{\"name\":\"p\",\"displayName\":\"jdigatole\",\"tags\":{},\"healthCheckTags\":\"datab\",\"title\":\"nanqimwbzxpdcldp\",\"status\":\"ValidationFailed\",\"severity\":\"Informational\",\"description\":\"laimouxwk\",\"remediation\":\"mud\",\"targetResourceID\":\"coibicziuswswjrk\",\"targetResourceName\":\"sjhbtq\",\"targetResourceType\":\"yfscyrfwbivqvo\",\"timestamp\":\"2021-10-19T19:08:33Z\",\"additionalData\":\"zwvbhlimbyqecro\",\"healthCheckSource\":\"likcdrd\"},{\"name\":\"saxxob\",\"displayName\":\"fkwiyjv\",\"tags\":{},\"healthCheckTags\":\"dataosrnawnvzmlnkoy\",\"title\":\"xvjabjq\",\"status\":\"DeploymentFailed\",\"severity\":\"Informational\",\"description\":\"y\",\"remediation\":\"nudn\",\"targetResourceID\":\"abhjx\",\"targetResourceName\":\"qweuip\",\"targetResourceType\":\"vk\",\"timestamp\":\"2021-05-14T14:13:22Z\",\"additionalData\":\"nsqxtltc\",\"healthCheckSource\":\"rdpqgfhy\"}],\"healthCheckDate\":\"2021-09-03T10:13:51Z\",\"packagePath\":\"kkld\",\"packageSizeInMb\":2.136849592118417,\"displayName\":\"cmfcnrjajq\",\"version\":\"txjtielnzqgx\",\"publisher\":\"fbbmtlp\",\"releaseLink\":\"gynoiprnzcali\",\"availabilityType\":\"Notify\",\"packageType\":\"qxzxaqz\",\"additionalProperties\":\"mqimiymqru\",\"updateStateProperties\":{\"progressPercentage\":95.15041338803708,\"notifyMessage\":\"petasvvoqsb\"}},\"location\":\"flanfkgxsyao\",\"id\":\"zowpuohdkcprgukx\",\"name\":\"ztiochluti\",\"type\":\"mqrud\"}],\"nextLink\":\"zcbf\"}") .toObject(UpdateList.class); - Assertions.assertEquals("razftxejwabmdujt", model.value().get(0).location()); - Assertions.assertEquals(OffsetDateTime.parse("2021-11-13T23:19:59Z"), model.value().get(0).installedDate()); - Assertions.assertEquals("c", model.value().get(0).description()); - Assertions.assertEquals("urbuhhlkyqltq", model.value().get(0).minSbeVersionRequired()); - Assertions.assertEquals(State.ADDITIONAL_CONTENT_REQUIRED, model.value().get(0).state()); - Assertions.assertEquals("wkffdjkt", model.value().get(0).prerequisites().get(0).updateType()); - Assertions.assertEquals("sidfv", model.value().get(0).prerequisites().get(0).version()); - Assertions.assertEquals("g", model.value().get(0).prerequisites().get(0).packageName()); - Assertions.assertEquals("kayi", model.value().get(0).componentVersions().get(0).packageType()); - Assertions.assertEquals("sharujtj", model.value().get(0).componentVersions().get(0).version()); - Assertions.assertEquals(OffsetDateTime.parse("2021-07-10T17:52:36Z"), + Assertions.assertEquals("mbiipsnawwlqk", model.value().get(0).location()); + Assertions.assertEquals(OffsetDateTime.parse("2021-05-30T22:19:10Z"), model.value().get(0).installedDate()); + Assertions.assertEquals("s", model.value().get(0).description()); + Assertions.assertEquals("h", model.value().get(0).minSbeVersionRequired()); + Assertions.assertEquals(State.RECALLED, model.value().get(0).state()); + Assertions.assertEquals("bcbgydlqidywmhm", model.value().get(0).prerequisites().get(0).updateType()); + Assertions.assertEquals("yrilkfb", model.value().get(0).prerequisites().get(0).version()); + Assertions.assertEquals("qqxvztpbn", model.value().get(0).prerequisites().get(0).packageName()); + Assertions.assertEquals("sbrcary", model.value().get(0).componentVersions().get(0).packageType()); + Assertions.assertEquals("jjzyvoaqajuve", model.value().get(0).componentVersions().get(0).version()); + Assertions.assertEquals(OffsetDateTime.parse("2021-09-23T00:13:25Z"), model.value().get(0).componentVersions().get(0).lastUpdated()); Assertions.assertEquals(RebootRequirement.UNKNOWN, model.value().get(0).rebootRequired()); - Assertions.assertEquals(HealthState.FAILURE, model.value().get(0).healthState()); - Assertions.assertEquals("tacgxmfc", model.value().get(0).healthCheckResult().get(0).name()); - Assertions.assertEquals("er", model.value().get(0).healthCheckResult().get(0).displayName()); - Assertions.assertEquals("hlwntsjgq", model.value().get(0).healthCheckResult().get(0).title()); - Assertions.assertEquals(Status.FAILED, model.value().get(0).healthCheckResult().get(0).status()); - Assertions.assertEquals(Severity.CRITICAL, model.value().get(0).healthCheckResult().get(0).severity()); - Assertions.assertEquals("uuuybnchrsziz", model.value().get(0).healthCheckResult().get(0).description()); - Assertions.assertEquals("uelyetndn", model.value().get(0).healthCheckResult().get(0).remediation()); - Assertions.assertEquals("qyggagfl", model.value().get(0).healthCheckResult().get(0).targetResourceId()); - Assertions.assertEquals("gm", model.value().get(0).healthCheckResult().get(0).targetResourceName()); - Assertions.assertEquals("wahzjmucftbyr", model.value().get(0).healthCheckResult().get(0).targetResourceType()); - Assertions.assertEquals(OffsetDateTime.parse("2021-04-22T08:33:43Z"), + Assertions.assertEquals(HealthState.WARNING, model.value().get(0).healthState()); + Assertions.assertEquals("wnphbkgfyrto", model.value().get(0).healthCheckResult().get(0).name()); + Assertions.assertEquals("hmjpjscdfpdqwtyg", model.value().get(0).healthCheckResult().get(0).displayName()); + Assertions.assertEquals("tmbpjp", model.value().get(0).healthCheckResult().get(0).title()); + Assertions.assertEquals(Status.VALIDATION_SUCCESS, model.value().get(0).healthCheckResult().get(0).status()); + Assertions.assertEquals(Severity.INFORMATIONAL, model.value().get(0).healthCheckResult().get(0).severity()); + Assertions.assertEquals("rsidqpxlbtpakf", model.value().get(0).healthCheckResult().get(0).description()); + Assertions.assertEquals("gatwmykyu", model.value().get(0).healthCheckResult().get(0).remediation()); + Assertions.assertEquals("ym", model.value().get(0).healthCheckResult().get(0).targetResourceId()); + Assertions.assertEquals("mfjhpycvjqdvdwkq", + model.value().get(0).healthCheckResult().get(0).targetResourceName()); + Assertions.assertEquals("drlefgnaavuag", model.value().get(0).healthCheckResult().get(0).targetResourceType()); + Assertions.assertEquals(OffsetDateTime.parse("2021-10-24T22:34:59Z"), model.value().get(0).healthCheckResult().get(0).timestamp()); - Assertions.assertEquals("hkpigqfusuckzmkw", model.value().get(0).healthCheckResult().get(0).additionalData()); - Assertions.assertEquals("snoxaxmqeqa", model.value().get(0).healthCheckResult().get(0).healthCheckSource()); - Assertions.assertEquals(OffsetDateTime.parse("2021-05-24T18:00:52Z"), model.value().get(0).healthCheckDate()); - Assertions.assertEquals("ugwbsreurfqkf", model.value().get(0).packagePath()); - Assertions.assertEquals(98.716385F, model.value().get(0).packageSizeInMb()); - Assertions.assertEquals("nlvhhtklnvnafvv", model.value().get(0).displayName()); - Assertions.assertEquals("f", model.value().get(0).version()); - Assertions.assertEquals("ev", model.value().get(0).publisher()); - Assertions.assertEquals("oslc", model.value().get(0).releaseLink()); + Assertions.assertEquals("aou", model.value().get(0).healthCheckResult().get(0).additionalData()); + Assertions.assertEquals("pdctuhspfefyi", model.value().get(0).healthCheckResult().get(0).healthCheckSource()); + Assertions.assertEquals(OffsetDateTime.parse("2021-08-11T23:31:29Z"), model.value().get(0).healthCheckDate()); + Assertions.assertEquals("euyldphmt", model.value().get(0).packagePath()); + Assertions.assertEquals(52.83156571027593D, model.value().get(0).packageSizeInMb()); + Assertions.assertEquals("suthhllnmwynefx", model.value().get(0).displayName()); + Assertions.assertEquals("lf", model.value().get(0).version()); + Assertions.assertEquals("atxtjrrlkmdskjhh", model.value().get(0).publisher()); + Assertions.assertEquals("lajfoxcxscvslxlh", model.value().get(0).releaseLink()); Assertions.assertEquals(AvailabilityType.ONLINE, model.value().get(0).availabilityType()); - Assertions.assertEquals("okkhminq", model.value().get(0).packageType()); - Assertions.assertEquals("mczngn", model.value().get(0).additionalProperties()); - Assertions.assertEquals(4.8717856F, model.value().get(0).progressPercentage()); - Assertions.assertEquals("wuninv", model.value().get(0).notifyMessage()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - UpdateList model = new UpdateList().withValue(Arrays.asList( - new HciUpdateInner().withLocation("razftxejwabmdujt") - .withInstalledDate(OffsetDateTime.parse("2021-11-13T23:19:59Z")) - .withDescription("c") - .withMinSbeVersionRequired("urbuhhlkyqltq") - .withState(State.ADDITIONAL_CONTENT_REQUIRED) - .withPrerequisites(Arrays.asList( - new UpdatePrerequisite().withUpdateType("wkffdjkt").withVersion("sidfv").withPackageName("g"), - new UpdatePrerequisite().withUpdateType("n").withVersion("ijtk").withPackageName("sqo"))) - .withComponentVersions(Arrays.asList( - new PackageVersionInfo().withPackageType("kayi") - .withVersion("sharujtj") - .withLastUpdated(OffsetDateTime.parse("2021-07-10T17:52:36Z")), - new PackageVersionInfo().withPackageType("zyjq") - .withVersion("vwkpqh") - .withLastUpdated(OffsetDateTime.parse("2021-07-09T12:00:41Z")), - new PackageVersionInfo().withPackageType("uygb") - .withVersion("qqekewvnqvcdlgu") - .withLastUpdated(OffsetDateTime.parse("2021-11-05T12:42:34Z")), - new PackageVersionInfo().withPackageType("f") - .withVersion("wnlaxpu") - .withLastUpdated(OffsetDateTime.parse("2021-08-11T07:22:41Z")))) - .withRebootRequired(RebootRequirement.UNKNOWN) - .withHealthState(HealthState.FAILURE) - .withHealthCheckResult(Arrays.asList( - new PrecheckResult().withName("tacgxmfc") - .withDisplayName("er") - .withTags(new PrecheckResultTags()) - .withHealthCheckTags("datavs") - .withTitle("hlwntsjgq") - .withStatus(Status.FAILED) - .withSeverity(Severity.CRITICAL) - .withDescription("uuuybnchrsziz") - .withRemediation("uelyetndn") - .withTargetResourceId("qyggagfl") - .withTargetResourceName("gm") - .withTargetResourceType("wahzjmucftbyr") - .withTimestamp(OffsetDateTime.parse("2021-04-22T08:33:43Z")) - .withAdditionalData("hkpigqfusuckzmkw") - .withHealthCheckSource("snoxaxmqeqa"), - new PrecheckResult().withName("hjnhgwydyynfsvk") - .withDisplayName("bvqt") - .withTags(new PrecheckResultTags()) - .withHealthCheckTags("datarfdl") - .withTitle("kh") - .withStatus(Status.NOT_YET_REGISTERED) - .withSeverity(Severity.HIDDEN) - .withDescription("zjcpeogk") - .withRemediation("mgbro") - .withTargetResourceId("ddbhf") - .withTargetResourceName("fpazjzoywjxhpd") - .withTargetResourceType("ontacnpq") - .withTimestamp(OffsetDateTime.parse("2020-12-27T20:17:23Z")) - .withAdditionalData("tuevrh") - .withHealthCheckSource("jyoogwxh"))) - .withHealthCheckDate(OffsetDateTime.parse("2021-05-24T18:00:52Z")) - .withPackagePath("ugwbsreurfqkf") - .withPackageSizeInMb(98.716385F) - .withDisplayName("nlvhhtklnvnafvv") - .withVersion("f") - .withPublisher("ev") - .withReleaseLink("oslc") - .withAvailabilityType(AvailabilityType.ONLINE) - .withPackageType("okkhminq") - .withAdditionalProperties("mczngn") - .withProgressPercentage(4.8717856F) - .withNotifyMessage("wuninv"), - new HciUpdateInner().withLocation("xdtddmflhuytxzv") - .withInstalledDate(OffsetDateTime.parse("2021-03-01T11:01:37Z")) - .withDescription("annovvoxczytpr") - .withMinSbeVersionRequired("wvroevytlyokrrr") - .withState(State.PREPARATION_FAILED) - .withPrerequisites(Arrays.asList( - new UpdatePrerequisite().withUpdateType("sasbcrymodizrx") - .withVersion("obdxnazpmkmlm") - .withPackageName("vfxzopjh"), - new UpdatePrerequisite().withUpdateType("xliohrdddt") - .withVersion("xqbawpc") - .withPackageName("nzqcy"), - new UpdatePrerequisite().withUpdateType("apqofyuicdhz").withVersion("ybww").withPackageName("d"), - new UpdatePrerequisite().withUpdateType("bid").withVersion("m").withPackageName("f"))) - .withComponentVersions(Arrays.asList( - new PackageVersionInfo().withPackageType("u") - .withVersion("pckc") - .withLastUpdated(OffsetDateTime.parse("2021-12-09T01:38:35Z")), - new PackageVersionInfo().withPackageType("weyoxoy") - .withVersion("k") - .withLastUpdated(OffsetDateTime.parse("2021-09-08T11:55:35Z")), - new PackageVersionInfo().withPackageType("mmoiroqboshbra") - .withVersion("pyyrmfs") - .withLastUpdated(OffsetDateTime.parse("2021-03-28T08:56:43Z")))) - .withRebootRequired(RebootRequirement.UNKNOWN) - .withHealthState(HealthState.IN_PROGRESS) - .withHealthCheckResult(Arrays.asList( - new PrecheckResult().withName("pdbwnupgahxkum") - .withDisplayName("jcaacfdmmcpugm") - .withTags(new PrecheckResultTags()) - .withHealthCheckTags("dataepvufhbzehew") - .withTitle("qhnlbqnbld") - .withStatus(Status.NOT_SPECIFIED) - .withSeverity(Severity.CRITICAL) - .withDescription("schori") - .withRemediation("rsrrmoucsofldp") - .withTargetResourceId("iyfc") - .withTargetResourceName("beolh") - .withTargetResourceType("lvbmxuqibsxtkcu") - .withTimestamp(OffsetDateTime.parse("2021-03-04T11:35:39Z")) - .withAdditionalData("farfs") - .withHealthCheckSource("wlkjxn"), - new PrecheckResult().withName("vwgf") - .withDisplayName("mhqykizmdksa") - .withTags(new PrecheckResultTags()) - .withHealthCheckTags("datacluqvo") - .withTitle("ycjimryvwgcwwpbm") - .withStatus(Status.VALIDATION_FAILED) - .withSeverity(Severity.INFORMATIONAL) - .withDescription("dsxwefoh") - .withRemediation("bvopwndyqle") - .withTargetResourceId("lklmtkhlo") - .withTargetResourceName("x") - .withTargetResourceType("vbrdfjmzsyzfho") - .withTimestamp(OffsetDateTime.parse("2021-03-23T11:42:29Z")) - .withAdditionalData("k") - .withHealthCheckSource("ychunsjlpjrtwszh"))) - .withHealthCheckDate(OffsetDateTime.parse("2021-11-19T08:14:33Z")) - .withPackagePath("c") - .withPackageSizeInMb(95.381325F) - .withDisplayName("rrmhwrbfdp") - .withVersion("lubhvjg") - .withPublisher("ocu") - .withReleaseLink("lw") - .withAvailabilityType(AvailabilityType.NOTIFY) - .withPackageType("mhoocl") - .withAdditionalProperties("n") - .withProgressPercentage(16.419632F) - .withNotifyMessage("czj"))); - model = BinaryData.fromObject(model).toObject(UpdateList.class); - Assertions.assertEquals("razftxejwabmdujt", model.value().get(0).location()); - Assertions.assertEquals(OffsetDateTime.parse("2021-11-13T23:19:59Z"), model.value().get(0).installedDate()); - Assertions.assertEquals("c", model.value().get(0).description()); - Assertions.assertEquals("urbuhhlkyqltq", model.value().get(0).minSbeVersionRequired()); - Assertions.assertEquals(State.ADDITIONAL_CONTENT_REQUIRED, model.value().get(0).state()); - Assertions.assertEquals("wkffdjkt", model.value().get(0).prerequisites().get(0).updateType()); - Assertions.assertEquals("sidfv", model.value().get(0).prerequisites().get(0).version()); - Assertions.assertEquals("g", model.value().get(0).prerequisites().get(0).packageName()); - Assertions.assertEquals("kayi", model.value().get(0).componentVersions().get(0).packageType()); - Assertions.assertEquals("sharujtj", model.value().get(0).componentVersions().get(0).version()); - Assertions.assertEquals(OffsetDateTime.parse("2021-07-10T17:52:36Z"), - model.value().get(0).componentVersions().get(0).lastUpdated()); - Assertions.assertEquals(RebootRequirement.UNKNOWN, model.value().get(0).rebootRequired()); - Assertions.assertEquals(HealthState.FAILURE, model.value().get(0).healthState()); - Assertions.assertEquals("tacgxmfc", model.value().get(0).healthCheckResult().get(0).name()); - Assertions.assertEquals("er", model.value().get(0).healthCheckResult().get(0).displayName()); - Assertions.assertEquals("hlwntsjgq", model.value().get(0).healthCheckResult().get(0).title()); - Assertions.assertEquals(Status.FAILED, model.value().get(0).healthCheckResult().get(0).status()); - Assertions.assertEquals(Severity.CRITICAL, model.value().get(0).healthCheckResult().get(0).severity()); - Assertions.assertEquals("uuuybnchrsziz", model.value().get(0).healthCheckResult().get(0).description()); - Assertions.assertEquals("uelyetndn", model.value().get(0).healthCheckResult().get(0).remediation()); - Assertions.assertEquals("qyggagfl", model.value().get(0).healthCheckResult().get(0).targetResourceId()); - Assertions.assertEquals("gm", model.value().get(0).healthCheckResult().get(0).targetResourceName()); - Assertions.assertEquals("wahzjmucftbyr", model.value().get(0).healthCheckResult().get(0).targetResourceType()); - Assertions.assertEquals(OffsetDateTime.parse("2021-04-22T08:33:43Z"), - model.value().get(0).healthCheckResult().get(0).timestamp()); - Assertions.assertEquals("hkpigqfusuckzmkw", model.value().get(0).healthCheckResult().get(0).additionalData()); - Assertions.assertEquals("snoxaxmqeqa", model.value().get(0).healthCheckResult().get(0).healthCheckSource()); - Assertions.assertEquals(OffsetDateTime.parse("2021-05-24T18:00:52Z"), model.value().get(0).healthCheckDate()); - Assertions.assertEquals("ugwbsreurfqkf", model.value().get(0).packagePath()); - Assertions.assertEquals(98.716385F, model.value().get(0).packageSizeInMb()); - Assertions.assertEquals("nlvhhtklnvnafvv", model.value().get(0).displayName()); - Assertions.assertEquals("f", model.value().get(0).version()); - Assertions.assertEquals("ev", model.value().get(0).publisher()); - Assertions.assertEquals("oslc", model.value().get(0).releaseLink()); - Assertions.assertEquals(AvailabilityType.ONLINE, model.value().get(0).availabilityType()); - Assertions.assertEquals("okkhminq", model.value().get(0).packageType()); - Assertions.assertEquals("mczngn", model.value().get(0).additionalProperties()); - Assertions.assertEquals(4.8717856F, model.value().get(0).progressPercentage()); - Assertions.assertEquals("wuninv", model.value().get(0).notifyMessage()); + Assertions.assertEquals("rmukmyjmkxett", model.value().get(0).packageType()); + Assertions.assertEquals("lojfkqidnqto", model.value().get(0).additionalProperties()); + Assertions.assertEquals(24.515046051678745D, model.value().get(0).progressPercentage()); + Assertions.assertEquals("csqhtkbtnqlrng", model.value().get(0).notifyMessage()); + Assertions.assertEquals("zcbf", model.nextLink()); } } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/UpdatePrerequisiteTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/UpdatePrerequisiteTests.java index 94b783dcd664..5000c125a442 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/UpdatePrerequisiteTests.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/UpdatePrerequisiteTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.generated; @@ -11,21 +11,21 @@ public final class UpdatePrerequisiteTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - UpdatePrerequisite model - = BinaryData.fromString("{\"updateType\":\"wvnph\",\"version\":\"zqtpjhmq\",\"packageName\":\"v\"}") - .toObject(UpdatePrerequisite.class); - Assertions.assertEquals("wvnph", model.updateType()); - Assertions.assertEquals("zqtpjhmq", model.version()); - Assertions.assertEquals("v", model.packageName()); + UpdatePrerequisite model = BinaryData + .fromString("{\"updateType\":\"gn\",\"version\":\"xsjxtelexhvuqboz\",\"packageName\":\"lzqocark\"}") + .toObject(UpdatePrerequisite.class); + Assertions.assertEquals("gn", model.updateType()); + Assertions.assertEquals("xsjxtelexhvuqboz", model.version()); + Assertions.assertEquals("lzqocark", model.packageName()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { UpdatePrerequisite model - = new UpdatePrerequisite().withUpdateType("wvnph").withVersion("zqtpjhmq").withPackageName("v"); + = new UpdatePrerequisite().withUpdateType("gn").withVersion("xsjxtelexhvuqboz").withPackageName("lzqocark"); model = BinaryData.fromObject(model).toObject(UpdatePrerequisite.class); - Assertions.assertEquals("wvnph", model.updateType()); - Assertions.assertEquals("zqtpjhmq", model.version()); - Assertions.assertEquals("v", model.packageName()); + Assertions.assertEquals("gn", model.updateType()); + Assertions.assertEquals("xsjxtelexhvuqboz", model.version()); + Assertions.assertEquals("lzqocark", model.packageName()); } } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/UpdateRunInnerTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/UpdateRunInnerTests.java index 618289632f8d..e638898d29f9 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/UpdateRunInnerTests.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/UpdateRunInnerTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.generated; @@ -16,106 +16,78 @@ public final class UpdateRunInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { UpdateRunInner model = BinaryData.fromString( - "{\"location\":\"qmeqwigpibudqwyx\",\"properties\":{\"provisioningState\":\"InProgress\",\"timeStarted\":\"2021-06-11T15:08:27Z\",\"lastUpdatedTime\":\"2021-03-14T02:43:50Z\",\"duration\":\"nrtffyaqi\",\"state\":\"Failed\",\"progress\":{\"name\":\"ioqaqhvs\",\"description\":\"fuqyrxpdlcgqlsi\",\"errorMessage\":\"jqfrddgamquh\",\"status\":\"srsjuivfc\",\"startTimeUtc\":\"2021-02-02T15:06:24Z\",\"endTimeUtc\":\"2021-08-07T02:17:36Z\",\"lastUpdatedTimeUtc\":\"2021-01-27T18:11:59Z\",\"expectedExecutionTime\":\"zhczexrxzbujrtrh\",\"steps\":[{\"name\":\"evkh\",\"description\":\"lnzonzlrpiqywn\",\"errorMessage\":\"jtszcof\",\"status\":\"e\",\"startTimeUtc\":\"2021-11-08T03:11:49Z\",\"endTimeUtc\":\"2021-07-02T17:33:01Z\",\"lastUpdatedTimeUtc\":\"2021-11-22T18:06:29Z\",\"expectedExecutionTime\":\"vreljea\",\"steps\":[{},{},{}]},{\"name\":\"zmlovuanash\",\"description\":\"lpmjerb\",\"errorMessage\":\"elvidizozsdbccx\",\"status\":\"on\",\"startTimeUtc\":\"2021-06-26T18:58:09Z\",\"endTimeUtc\":\"2021-08-14T04:15:27Z\",\"lastUpdatedTimeUtc\":\"2021-05-09T18:26:05Z\",\"expectedExecutionTime\":\"puuw\",\"steps\":[{},{},{},{}]},{\"name\":\"uqj\",\"description\":\"zenkeifzzhmkd\",\"errorMessage\":\"vflyhbxcu\",\"status\":\"hxgsrboldfor\",\"startTimeUtc\":\"2020-12-20T04:35:15Z\",\"endTimeUtc\":\"2021-06-11T04:52:49Z\",\"lastUpdatedTimeUtc\":\"2021-02-10T16:46:43Z\",\"expectedExecutionTime\":\"bfhfovvacqp\",\"steps\":[{},{}]},{\"name\":\"dxe\",\"description\":\"abbelawumuaslzk\",\"errorMessage\":\"rwoycqucwyh\",\"status\":\"nomdrkywuhpsv\",\"startTimeUtc\":\"2021-05-26T05:35:58Z\",\"endTimeUtc\":\"2021-01-31T05:51:43Z\",\"lastUpdatedTimeUtc\":\"2021-08-15T09:05:35Z\",\"expectedExecutionTime\":\"exxwlalniexzsrz\",\"steps\":[{},{}]}]}},\"id\":\"q\",\"name\":\"yb\",\"type\":\"wwpgdakchzyvlixq\"}") + "{\"properties\":{\"provisioningState\":\"Disconnected\",\"timeStarted\":\"2021-04-01T06:48:09Z\",\"lastUpdatedTime\":\"2021-06-01T00:16:38Z\",\"duration\":\"kzkltrfowt\",\"state\":\"Failed\",\"progress\":{\"name\":\"vlihcvjd\",\"description\":\"crjidhftukv\",\"errorMessage\":\"xlwyoj\",\"status\":\"qzdkfn\",\"startTimeUtc\":\"2021-09-04T12:57:04Z\",\"endTimeUtc\":\"2021-06-24T07:21:17Z\",\"lastUpdatedTimeUtc\":\"2021-05-23T15:43:46Z\",\"expectedExecutionTime\":\"atqxmbjroumzzn\",\"steps\":[{\"name\":\"jrhuzgf\",\"description\":\"njt\",\"errorMessage\":\"sllywpvtio\",\"status\":\"bpdbollgr\",\"startTimeUtc\":\"2021-12-04T08:15:35Z\",\"endTimeUtc\":\"2021-05-23T21:22:30Z\",\"lastUpdatedTimeUtc\":\"2021-01-18T17:52:58Z\",\"expectedExecutionTime\":\"rowsocnequy\",\"steps\":[{}]}]}},\"location\":\"oqgrmtqjkqevadr\",\"id\":\"wiu\",\"name\":\"wvcmj\",\"type\":\"kxiidisczskoswo\"}") .toObject(UpdateRunInner.class); - Assertions.assertEquals("qmeqwigpibudqwyx", model.location()); - Assertions.assertEquals(OffsetDateTime.parse("2021-06-11T15:08:27Z"), model.timeStarted()); - Assertions.assertEquals(OffsetDateTime.parse("2021-03-14T02:43:50Z"), model.lastUpdatedTime()); - Assertions.assertEquals("nrtffyaqi", model.duration()); + Assertions.assertEquals("oqgrmtqjkqevadr", model.location()); + Assertions.assertEquals(OffsetDateTime.parse("2021-04-01T06:48:09Z"), model.timeStarted()); + Assertions.assertEquals(OffsetDateTime.parse("2021-06-01T00:16:38Z"), model.lastUpdatedTime()); + Assertions.assertEquals("kzkltrfowt", model.duration()); Assertions.assertEquals(UpdateRunPropertiesState.FAILED, model.state()); - Assertions.assertEquals("ioqaqhvs", model.namePropertiesName()); - Assertions.assertEquals("fuqyrxpdlcgqlsi", model.description()); - Assertions.assertEquals("jqfrddgamquh", model.errorMessage()); - Assertions.assertEquals("srsjuivfc", model.status()); - Assertions.assertEquals(OffsetDateTime.parse("2021-02-02T15:06:24Z"), model.startTimeUtc()); - Assertions.assertEquals(OffsetDateTime.parse("2021-08-07T02:17:36Z"), model.endTimeUtc()); - Assertions.assertEquals(OffsetDateTime.parse("2021-01-27T18:11:59Z"), model.lastUpdatedTimeUtc()); - Assertions.assertEquals("zhczexrxzbujrtrh", model.expectedExecutionTime()); - Assertions.assertEquals("evkh", model.steps().get(0).name()); - Assertions.assertEquals("lnzonzlrpiqywn", model.steps().get(0).description()); - Assertions.assertEquals("jtszcof", model.steps().get(0).errorMessage()); - Assertions.assertEquals("e", model.steps().get(0).status()); - Assertions.assertEquals(OffsetDateTime.parse("2021-11-08T03:11:49Z"), model.steps().get(0).startTimeUtc()); - Assertions.assertEquals(OffsetDateTime.parse("2021-07-02T17:33:01Z"), model.steps().get(0).endTimeUtc()); - Assertions.assertEquals(OffsetDateTime.parse("2021-11-22T18:06:29Z"), + Assertions.assertEquals("vlihcvjd", model.namePropertiesName()); + Assertions.assertEquals("crjidhftukv", model.description()); + Assertions.assertEquals("xlwyoj", model.errorMessage()); + Assertions.assertEquals("qzdkfn", model.status()); + Assertions.assertEquals(OffsetDateTime.parse("2021-09-04T12:57:04Z"), model.startTimeUtc()); + Assertions.assertEquals(OffsetDateTime.parse("2021-06-24T07:21:17Z"), model.endTimeUtc()); + Assertions.assertEquals(OffsetDateTime.parse("2021-05-23T15:43:46Z"), model.lastUpdatedTimeUtc()); + Assertions.assertEquals("atqxmbjroumzzn", model.expectedExecutionTime()); + Assertions.assertEquals("jrhuzgf", model.steps().get(0).name()); + Assertions.assertEquals("njt", model.steps().get(0).description()); + Assertions.assertEquals("sllywpvtio", model.steps().get(0).errorMessage()); + Assertions.assertEquals("bpdbollgr", model.steps().get(0).status()); + Assertions.assertEquals(OffsetDateTime.parse("2021-12-04T08:15:35Z"), model.steps().get(0).startTimeUtc()); + Assertions.assertEquals(OffsetDateTime.parse("2021-05-23T21:22:30Z"), model.steps().get(0).endTimeUtc()); + Assertions.assertEquals(OffsetDateTime.parse("2021-01-18T17:52:58Z"), model.steps().get(0).lastUpdatedTimeUtc()); - Assertions.assertEquals("vreljea", model.steps().get(0).expectedExecutionTime()); + Assertions.assertEquals("rowsocnequy", model.steps().get(0).expectedExecutionTime()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - UpdateRunInner model = new UpdateRunInner().withLocation("qmeqwigpibudqwyx") - .withTimeStarted(OffsetDateTime.parse("2021-06-11T15:08:27Z")) - .withLastUpdatedTime(OffsetDateTime.parse("2021-03-14T02:43:50Z")) - .withDuration("nrtffyaqi") + UpdateRunInner model = new UpdateRunInner().withLocation("oqgrmtqjkqevadr") + .withTimeStarted(OffsetDateTime.parse("2021-04-01T06:48:09Z")) + .withLastUpdatedTime(OffsetDateTime.parse("2021-06-01T00:16:38Z")) + .withDuration("kzkltrfowt") .withState(UpdateRunPropertiesState.FAILED) - .withNamePropertiesName("ioqaqhvs") - .withDescription("fuqyrxpdlcgqlsi") - .withErrorMessage("jqfrddgamquh") - .withStatus("srsjuivfc") - .withStartTimeUtc(OffsetDateTime.parse("2021-02-02T15:06:24Z")) - .withEndTimeUtc(OffsetDateTime.parse("2021-08-07T02:17:36Z")) - .withLastUpdatedTimeUtc(OffsetDateTime.parse("2021-01-27T18:11:59Z")) - .withExpectedExecutionTime("zhczexrxzbujrtrh") - .withSteps(Arrays.asList( - new Step().withName("evkh") - .withDescription("lnzonzlrpiqywn") - .withErrorMessage("jtszcof") - .withStatus("e") - .withStartTimeUtc(OffsetDateTime.parse("2021-11-08T03:11:49Z")) - .withEndTimeUtc(OffsetDateTime.parse("2021-07-02T17:33:01Z")) - .withLastUpdatedTimeUtc(OffsetDateTime.parse("2021-11-22T18:06:29Z")) - .withExpectedExecutionTime("vreljea") - .withSteps(Arrays.asList(new Step(), new Step(), new Step())), - new Step().withName("zmlovuanash") - .withDescription("lpmjerb") - .withErrorMessage("elvidizozsdbccx") - .withStatus("on") - .withStartTimeUtc(OffsetDateTime.parse("2021-06-26T18:58:09Z")) - .withEndTimeUtc(OffsetDateTime.parse("2021-08-14T04:15:27Z")) - .withLastUpdatedTimeUtc(OffsetDateTime.parse("2021-05-09T18:26:05Z")) - .withExpectedExecutionTime("puuw") - .withSteps(Arrays.asList(new Step(), new Step(), new Step(), new Step())), - new Step().withName("uqj") - .withDescription("zenkeifzzhmkd") - .withErrorMessage("vflyhbxcu") - .withStatus("hxgsrboldfor") - .withStartTimeUtc(OffsetDateTime.parse("2020-12-20T04:35:15Z")) - .withEndTimeUtc(OffsetDateTime.parse("2021-06-11T04:52:49Z")) - .withLastUpdatedTimeUtc(OffsetDateTime.parse("2021-02-10T16:46:43Z")) - .withExpectedExecutionTime("bfhfovvacqp") - .withSteps(Arrays.asList(new Step(), new Step())), - new Step().withName("dxe") - .withDescription("abbelawumuaslzk") - .withErrorMessage("rwoycqucwyh") - .withStatus("nomdrkywuhpsv") - .withStartTimeUtc(OffsetDateTime.parse("2021-05-26T05:35:58Z")) - .withEndTimeUtc(OffsetDateTime.parse("2021-01-31T05:51:43Z")) - .withLastUpdatedTimeUtc(OffsetDateTime.parse("2021-08-15T09:05:35Z")) - .withExpectedExecutionTime("exxwlalniexzsrz") - .withSteps(Arrays.asList(new Step(), new Step())))); + .withNamePropertiesName("vlihcvjd") + .withDescription("crjidhftukv") + .withErrorMessage("xlwyoj") + .withStatus("qzdkfn") + .withStartTimeUtc(OffsetDateTime.parse("2021-09-04T12:57:04Z")) + .withEndTimeUtc(OffsetDateTime.parse("2021-06-24T07:21:17Z")) + .withLastUpdatedTimeUtc(OffsetDateTime.parse("2021-05-23T15:43:46Z")) + .withExpectedExecutionTime("atqxmbjroumzzn") + .withSteps(Arrays.asList(new Step().withName("jrhuzgf") + .withDescription("njt") + .withErrorMessage("sllywpvtio") + .withStatus("bpdbollgr") + .withStartTimeUtc(OffsetDateTime.parse("2021-12-04T08:15:35Z")) + .withEndTimeUtc(OffsetDateTime.parse("2021-05-23T21:22:30Z")) + .withLastUpdatedTimeUtc(OffsetDateTime.parse("2021-01-18T17:52:58Z")) + .withExpectedExecutionTime("rowsocnequy") + .withSteps(Arrays.asList(new Step())))); model = BinaryData.fromObject(model).toObject(UpdateRunInner.class); - Assertions.assertEquals("qmeqwigpibudqwyx", model.location()); - Assertions.assertEquals(OffsetDateTime.parse("2021-06-11T15:08:27Z"), model.timeStarted()); - Assertions.assertEquals(OffsetDateTime.parse("2021-03-14T02:43:50Z"), model.lastUpdatedTime()); - Assertions.assertEquals("nrtffyaqi", model.duration()); + Assertions.assertEquals("oqgrmtqjkqevadr", model.location()); + Assertions.assertEquals(OffsetDateTime.parse("2021-04-01T06:48:09Z"), model.timeStarted()); + Assertions.assertEquals(OffsetDateTime.parse("2021-06-01T00:16:38Z"), model.lastUpdatedTime()); + Assertions.assertEquals("kzkltrfowt", model.duration()); Assertions.assertEquals(UpdateRunPropertiesState.FAILED, model.state()); - Assertions.assertEquals("ioqaqhvs", model.namePropertiesName()); - Assertions.assertEquals("fuqyrxpdlcgqlsi", model.description()); - Assertions.assertEquals("jqfrddgamquh", model.errorMessage()); - Assertions.assertEquals("srsjuivfc", model.status()); - Assertions.assertEquals(OffsetDateTime.parse("2021-02-02T15:06:24Z"), model.startTimeUtc()); - Assertions.assertEquals(OffsetDateTime.parse("2021-08-07T02:17:36Z"), model.endTimeUtc()); - Assertions.assertEquals(OffsetDateTime.parse("2021-01-27T18:11:59Z"), model.lastUpdatedTimeUtc()); - Assertions.assertEquals("zhczexrxzbujrtrh", model.expectedExecutionTime()); - Assertions.assertEquals("evkh", model.steps().get(0).name()); - Assertions.assertEquals("lnzonzlrpiqywn", model.steps().get(0).description()); - Assertions.assertEquals("jtszcof", model.steps().get(0).errorMessage()); - Assertions.assertEquals("e", model.steps().get(0).status()); - Assertions.assertEquals(OffsetDateTime.parse("2021-11-08T03:11:49Z"), model.steps().get(0).startTimeUtc()); - Assertions.assertEquals(OffsetDateTime.parse("2021-07-02T17:33:01Z"), model.steps().get(0).endTimeUtc()); - Assertions.assertEquals(OffsetDateTime.parse("2021-11-22T18:06:29Z"), + Assertions.assertEquals("vlihcvjd", model.namePropertiesName()); + Assertions.assertEquals("crjidhftukv", model.description()); + Assertions.assertEquals("xlwyoj", model.errorMessage()); + Assertions.assertEquals("qzdkfn", model.status()); + Assertions.assertEquals(OffsetDateTime.parse("2021-09-04T12:57:04Z"), model.startTimeUtc()); + Assertions.assertEquals(OffsetDateTime.parse("2021-06-24T07:21:17Z"), model.endTimeUtc()); + Assertions.assertEquals(OffsetDateTime.parse("2021-05-23T15:43:46Z"), model.lastUpdatedTimeUtc()); + Assertions.assertEquals("atqxmbjroumzzn", model.expectedExecutionTime()); + Assertions.assertEquals("jrhuzgf", model.steps().get(0).name()); + Assertions.assertEquals("njt", model.steps().get(0).description()); + Assertions.assertEquals("sllywpvtio", model.steps().get(0).errorMessage()); + Assertions.assertEquals("bpdbollgr", model.steps().get(0).status()); + Assertions.assertEquals(OffsetDateTime.parse("2021-12-04T08:15:35Z"), model.steps().get(0).startTimeUtc()); + Assertions.assertEquals(OffsetDateTime.parse("2021-05-23T21:22:30Z"), model.steps().get(0).endTimeUtc()); + Assertions.assertEquals(OffsetDateTime.parse("2021-01-18T17:52:58Z"), model.steps().get(0).lastUpdatedTimeUtc()); - Assertions.assertEquals("vreljea", model.steps().get(0).expectedExecutionTime()); + Assertions.assertEquals("rowsocnequy", model.steps().get(0).expectedExecutionTime()); } } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/UpdateRunListTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/UpdateRunListTests.java index c50c9b2854e1..95352153f572 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/UpdateRunListTests.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/UpdateRunListTests.java @@ -1,70 +1,35 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.generated; import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.azurestackhci.fluent.models.Step; -import com.azure.resourcemanager.azurestackhci.fluent.models.UpdateRunInner; -import com.azure.resourcemanager.azurestackhci.models.UpdateRunList; +import com.azure.resourcemanager.azurestackhci.implementation.models.UpdateRunList; import com.azure.resourcemanager.azurestackhci.models.UpdateRunPropertiesState; import java.time.OffsetDateTime; -import java.util.Arrays; import org.junit.jupiter.api.Assertions; public final class UpdateRunListTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { UpdateRunList model = BinaryData.fromString( - "{\"value\":[{\"location\":\"joylh\",\"properties\":{\"provisioningState\":\"PartiallySucceeded\",\"timeStarted\":\"2021-01-16T20:29:46Z\",\"lastUpdatedTime\":\"2021-08-30T04:34:11Z\",\"duration\":\"imrsopteecjmei\",\"state\":\"Failed\",\"progress\":{\"name\":\"asylwx\",\"description\":\"aumweoohguufu\",\"errorMessage\":\"oyjathwtzol\",\"status\":\"emwmdxmebwjs\",\"startTimeUtc\":\"2021-09-18T07:25:35Z\",\"endTimeUtc\":\"2021-04-09T17:42:24Z\",\"lastUpdatedTimeUtc\":\"2021-10-23T16:03:49Z\",\"expectedExecutionTime\":\"eabfqxnm\",\"steps\":[{},{},{}]}},\"id\":\"ibxyijddtvqc\",\"name\":\"tad\",\"type\":\"jaeukmrsieekpn\"}],\"nextLink\":\"aapm\"}") + "{\"value\":[{\"properties\":{\"provisioningState\":\"PartiallySucceeded\",\"timeStarted\":\"2021-08-05T18:53:14Z\",\"lastUpdatedTime\":\"2021-07-24T16:36:07Z\",\"duration\":\"kclamgglvlmf\",\"state\":\"Succeeded\",\"progress\":{\"name\":\"eyk\",\"description\":\"tygxhqfgq\",\"errorMessage\":\"yejsxtlg\",\"status\":\"wf\",\"startTimeUtc\":\"2021-06-28T03:32:37Z\",\"endTimeUtc\":\"2021-02-15T16:06:18Z\",\"lastUpdatedTimeUtc\":\"2021-08-10T00:17:54Z\",\"expectedExecutionTime\":\"jceatlijjjrtva\",\"steps\":[{}]}},\"location\":\"zknxkv\",\"id\":\"xetyvku\",\"name\":\"mignohikkg\",\"type\":\"ogjwpindedvabbxb\"},{\"properties\":{\"provisioningState\":\"Provisioning\",\"timeStarted\":\"2021-09-16T23:32:34Z\",\"lastUpdatedTime\":\"2021-04-13T15:12:17Z\",\"duration\":\"ywfcfxzi\",\"state\":\"Unknown\",\"progress\":{\"name\":\"vwypusuvjsl\",\"description\":\"wci\",\"errorMessage\":\"jsllfryvd\",\"status\":\"x\",\"startTimeUtc\":\"2021-09-06T06:02:35Z\",\"endTimeUtc\":\"2021-02-10T05:48:12Z\",\"lastUpdatedTimeUtc\":\"2021-07-22T03:43:17Z\",\"expectedExecutionTime\":\"naw\",\"steps\":[{},{}]}},\"location\":\"fbktyjmfczlf\",\"id\":\"qkfrbzgowoxqmj\",\"name\":\"ajcxnyqgxhl\",\"type\":\"srv\"},{\"properties\":{\"provisioningState\":\"Creating\",\"timeStarted\":\"2021-10-26T03:58:40Z\",\"lastUpdatedTime\":\"2021-05-23T01:49:20Z\",\"duration\":\"gbjqvlsumywzas\",\"state\":\"Unknown\",\"progress\":{\"name\":\"oyjfqipu\",\"description\":\"znclkfkeebgv\",\"errorMessage\":\"e\",\"status\":\"uoqujlyeg\",\"startTimeUtc\":\"2021-09-27T20:24:06Z\",\"endTimeUtc\":\"2021-07-21T11:20:17Z\",\"lastUpdatedTimeUtc\":\"2021-07-31T00:26:04Z\",\"expectedExecutionTime\":\"qqbtny\",\"steps\":[{}]}},\"location\":\"xdb\",\"id\":\"abmvmsxbaevwjc\",\"name\":\"kottlwuhvajmailf\",\"type\":\"mjjz\"}],\"nextLink\":\"zwjiqullq\"}") .toObject(UpdateRunList.class); - Assertions.assertEquals("joylh", model.value().get(0).location()); - Assertions.assertEquals(OffsetDateTime.parse("2021-01-16T20:29:46Z"), model.value().get(0).timeStarted()); - Assertions.assertEquals(OffsetDateTime.parse("2021-08-30T04:34:11Z"), model.value().get(0).lastUpdatedTime()); - Assertions.assertEquals("imrsopteecjmei", model.value().get(0).duration()); - Assertions.assertEquals(UpdateRunPropertiesState.FAILED, model.value().get(0).state()); - Assertions.assertEquals("asylwx", model.value().get(0).namePropertiesName()); - Assertions.assertEquals("aumweoohguufu", model.value().get(0).description()); - Assertions.assertEquals("oyjathwtzol", model.value().get(0).errorMessage()); - Assertions.assertEquals("emwmdxmebwjs", model.value().get(0).status()); - Assertions.assertEquals(OffsetDateTime.parse("2021-09-18T07:25:35Z"), model.value().get(0).startTimeUtc()); - Assertions.assertEquals(OffsetDateTime.parse("2021-04-09T17:42:24Z"), model.value().get(0).endTimeUtc()); - Assertions.assertEquals(OffsetDateTime.parse("2021-10-23T16:03:49Z"), + Assertions.assertEquals("zknxkv", model.value().get(0).location()); + Assertions.assertEquals(OffsetDateTime.parse("2021-08-05T18:53:14Z"), model.value().get(0).timeStarted()); + Assertions.assertEquals(OffsetDateTime.parse("2021-07-24T16:36:07Z"), model.value().get(0).lastUpdatedTime()); + Assertions.assertEquals("kclamgglvlmf", model.value().get(0).duration()); + Assertions.assertEquals(UpdateRunPropertiesState.SUCCEEDED, model.value().get(0).state()); + Assertions.assertEquals("eyk", model.value().get(0).namePropertiesName()); + Assertions.assertEquals("tygxhqfgq", model.value().get(0).description()); + Assertions.assertEquals("yejsxtlg", model.value().get(0).errorMessage()); + Assertions.assertEquals("wf", model.value().get(0).status()); + Assertions.assertEquals(OffsetDateTime.parse("2021-06-28T03:32:37Z"), model.value().get(0).startTimeUtc()); + Assertions.assertEquals(OffsetDateTime.parse("2021-02-15T16:06:18Z"), model.value().get(0).endTimeUtc()); + Assertions.assertEquals(OffsetDateTime.parse("2021-08-10T00:17:54Z"), model.value().get(0).lastUpdatedTimeUtc()); - Assertions.assertEquals("eabfqxnm", model.value().get(0).expectedExecutionTime()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - UpdateRunList model = new UpdateRunList().withValue(Arrays.asList(new UpdateRunInner().withLocation("joylh") - .withTimeStarted(OffsetDateTime.parse("2021-01-16T20:29:46Z")) - .withLastUpdatedTime(OffsetDateTime.parse("2021-08-30T04:34:11Z")) - .withDuration("imrsopteecjmei") - .withState(UpdateRunPropertiesState.FAILED) - .withNamePropertiesName("asylwx") - .withDescription("aumweoohguufu") - .withErrorMessage("oyjathwtzol") - .withStatus("emwmdxmebwjs") - .withStartTimeUtc(OffsetDateTime.parse("2021-09-18T07:25:35Z")) - .withEndTimeUtc(OffsetDateTime.parse("2021-04-09T17:42:24Z")) - .withLastUpdatedTimeUtc(OffsetDateTime.parse("2021-10-23T16:03:49Z")) - .withExpectedExecutionTime("eabfqxnm") - .withSteps(Arrays.asList(new Step(), new Step(), new Step())))); - model = BinaryData.fromObject(model).toObject(UpdateRunList.class); - Assertions.assertEquals("joylh", model.value().get(0).location()); - Assertions.assertEquals(OffsetDateTime.parse("2021-01-16T20:29:46Z"), model.value().get(0).timeStarted()); - Assertions.assertEquals(OffsetDateTime.parse("2021-08-30T04:34:11Z"), model.value().get(0).lastUpdatedTime()); - Assertions.assertEquals("imrsopteecjmei", model.value().get(0).duration()); - Assertions.assertEquals(UpdateRunPropertiesState.FAILED, model.value().get(0).state()); - Assertions.assertEquals("asylwx", model.value().get(0).namePropertiesName()); - Assertions.assertEquals("aumweoohguufu", model.value().get(0).description()); - Assertions.assertEquals("oyjathwtzol", model.value().get(0).errorMessage()); - Assertions.assertEquals("emwmdxmebwjs", model.value().get(0).status()); - Assertions.assertEquals(OffsetDateTime.parse("2021-09-18T07:25:35Z"), model.value().get(0).startTimeUtc()); - Assertions.assertEquals(OffsetDateTime.parse("2021-04-09T17:42:24Z"), model.value().get(0).endTimeUtc()); - Assertions.assertEquals(OffsetDateTime.parse("2021-10-23T16:03:49Z"), - model.value().get(0).lastUpdatedTimeUtc()); - Assertions.assertEquals("eabfqxnm", model.value().get(0).expectedExecutionTime()); + Assertions.assertEquals("jceatlijjjrtva", model.value().get(0).expectedExecutionTime()); + Assertions.assertEquals("zwjiqullq", model.nextLink()); } } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/UpdateRunPropertiesTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/UpdateRunPropertiesTests.java index 05abfd385863..849e18ecf1fb 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/UpdateRunPropertiesTests.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/UpdateRunPropertiesTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.generated; @@ -16,165 +16,134 @@ public final class UpdateRunPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { UpdateRunProperties model = BinaryData.fromString( - "{\"provisioningState\":\"Updating\",\"timeStarted\":\"2021-03-05T11:05:18Z\",\"lastUpdatedTime\":\"2021-02-01T08:02:04Z\",\"duration\":\"bn\",\"state\":\"Unknown\",\"progress\":{\"name\":\"xs\",\"description\":\"rntvlwijp\",\"errorMessage\":\"texoqqpwc\",\"status\":\"ufmhrunc\",\"startTimeUtc\":\"2021-09-21T16:25:56Z\",\"endTimeUtc\":\"2021-09-21T10:04:50Z\",\"lastUpdatedTimeUtc\":\"2021-08-20T13:44:39Z\",\"expectedExecutionTime\":\"dqzh\",\"steps\":[{\"name\":\"dunqnd\",\"description\":\"pchrqbn\",\"errorMessage\":\"rcgegydcwboxjum\",\"status\":\"qoli\",\"startTimeUtc\":\"2021-06-22T06:33:09Z\",\"endTimeUtc\":\"2021-05-10T13:24:14Z\",\"lastUpdatedTimeUtc\":\"2021-05-20T12:59:42Z\",\"expectedExecutionTime\":\"ubrjtl\",\"steps\":[{\"name\":\"uojrngiflr\",\"description\":\"asccbiui\",\"errorMessage\":\"dlyjdf\",\"status\":\"mkyoqufdvruzsl\",\"startTimeUtc\":\"2021-03-20T10:33:48Z\",\"endTimeUtc\":\"2021-04-15T06:18:59Z\",\"lastUpdatedTimeUtc\":\"2021-07-08T06:56:22Z\",\"expectedExecutionTime\":\"nmdxotngfd\",\"steps\":[{},{},{},{}]},{\"name\":\"yzihgrkyuizabsn\",\"description\":\"pphoj\",\"errorMessage\":\"vyhyhsgzfc\",\"status\":\"gomfgbeglq\",\"startTimeUtc\":\"2021-11-28T19:12:57Z\",\"endTimeUtc\":\"2021-06-10T19:13:40Z\",\"lastUpdatedTimeUtc\":\"2021-11-28T14:13:42Z\",\"expectedExecutionTime\":\"tnluankrr\",\"steps\":[{},{},{}]}]},{\"name\":\"ebtijvacvbmqzbqq\",\"description\":\"aj\",\"errorMessage\":\"wxacevehj\",\"status\":\"yxoaf\",\"startTimeUtc\":\"2021-03-08T11:58:40Z\",\"endTimeUtc\":\"2021-05-13T08:39:20Z\",\"lastUpdatedTimeUtc\":\"2021-06-28T21:13:43Z\",\"expectedExecutionTime\":\"eyl\",\"steps\":[{\"name\":\"gv\",\"description\":\"r\",\"errorMessage\":\"hriypoqeyhlqhy\",\"status\":\"rlpyznuciqdsmexi\",\"startTimeUtc\":\"2021-11-16T11:22:07Z\",\"endTimeUtc\":\"2021-08-01T15:36:59Z\",\"lastUpdatedTimeUtc\":\"2021-02-09T12:29:35Z\",\"expectedExecutionTime\":\"asiibmiybnnust\",\"steps\":[{},{},{},{}]},{\"name\":\"hnmgixhcm\",\"description\":\"mqfoudorh\",\"errorMessage\":\"yyprotwyp\",\"status\":\"d\",\"startTimeUtc\":\"2021-09-21T05:34:17Z\",\"endTimeUtc\":\"2021-09-26T18:20:07Z\",\"lastUpdatedTimeUtc\":\"2021-05-18T07:53:38Z\",\"expectedExecutionTime\":\"jkavl\",\"steps\":[{}]},{\"name\":\"mftpmdtz\",\"description\":\"ltfvnz\",\"errorMessage\":\"jtotpvopvpbd\",\"status\":\"qgqqihedsvqwthmk\",\"startTimeUtc\":\"2021-10-27T11:08:26Z\",\"endTimeUtc\":\"2021-10-29T01:22:50Z\",\"lastUpdatedTimeUtc\":\"2021-10-11T18:19:24Z\",\"expectedExecutionTime\":\"sgqcwdho\",\"steps\":[{},{}]},{\"name\":\"mcdzsufcohdxbz\",\"description\":\"cmuapcvhd\",\"errorMessage\":\"v\",\"status\":\"qxeysko\",\"startTimeUtc\":\"2020-12-31T09:10:56Z\",\"endTimeUtc\":\"2021-04-16T10:18:40Z\",\"lastUpdatedTimeUtc\":\"2021-02-01T01:33:34Z\",\"expectedExecutionTime\":\"bgbzbowxeqoclj\",\"steps\":[{},{},{},{}]}]}]}}") + "{\"provisioningState\":\"Creating\",\"timeStarted\":\"2021-09-12T02:55:54Z\",\"lastUpdatedTime\":\"2021-10-09T22:06:54Z\",\"duration\":\"mxzkr\",\"state\":\"Failed\",\"progress\":{\"name\":\"sbamnppcc\",\"description\":\"u\",\"errorMessage\":\"dsbezaxyfu\",\"status\":\"xuizhyhnepkpet\",\"startTimeUtc\":\"2021-09-10T01:05:20Z\",\"endTimeUtc\":\"2021-02-25T21:45:23Z\",\"lastUpdatedTimeUtc\":\"2021-11-06T16:28:06Z\",\"expectedExecutionTime\":\"xdukecpxd\",\"steps\":[{\"name\":\"hctmmkosz\",\"description\":\"blnsntrpcaqk\",\"errorMessage\":\"f\",\"status\":\"tfmhklbnldpvcb\",\"startTimeUtc\":\"2021-05-24T15:33:53Z\",\"endTimeUtc\":\"2021-05-23T14:44:21Z\",\"lastUpdatedTimeUtc\":\"2021-12-06T04:25:02Z\",\"expectedExecutionTime\":\"usqxutrpbrr\",\"steps\":[{\"name\":\"atvlmbjwcolbm\",\"description\":\"b\",\"errorMessage\":\"tpc\",\"status\":\"hprzrvxhmtfho\",\"startTimeUtc\":\"2021-04-09T06:00:35Z\",\"endTimeUtc\":\"2021-11-27T20:51:03Z\",\"lastUpdatedTimeUtc\":\"2021-06-10T03:56:34Z\",\"expectedExecutionTime\":\"ngxno\",\"steps\":[{},{},{}]},{\"name\":\"disnj\",\"description\":\"hdlmydidwhe\",\"errorMessage\":\"wwtjfdoesxxhmwc\",\"status\":\"ck\",\"startTimeUtc\":\"2021-09-11T01:19:42Z\",\"endTimeUtc\":\"2021-07-19T18:13:18Z\",\"lastUpdatedTimeUtc\":\"2021-07-07T08:43:18Z\",\"expectedExecutionTime\":\"negknjzrb\",\"steps\":[{}]},{\"name\":\"plvukaobrlbpg\",\"description\":\"bagn\",\"errorMessage\":\"jhgem\",\"status\":\"wakywalhjymxcgq\",\"startTimeUtc\":\"2021-01-19T00:26:08Z\",\"endTimeUtc\":\"2021-02-11T18:34:59Z\",\"lastUpdatedTimeUtc\":\"2021-09-08T11:13:10Z\",\"expectedExecutionTime\":\"soljome\",\"steps\":[{},{}]},{\"name\":\"cnlbv\",\"description\":\"codkkgj\",\"errorMessage\":\"ytssikiz\",\"status\":\"ufqbvntnr\",\"startTimeUtc\":\"2021-11-07T19:33:32Z\",\"endTimeUtc\":\"2021-03-01T05:15:34Z\",\"lastUpdatedTimeUtc\":\"2021-09-10T05:06:17Z\",\"expectedExecutionTime\":\"ekxgn\",\"steps\":[{}]}]}]}}") .toObject(UpdateRunProperties.class); - Assertions.assertEquals(OffsetDateTime.parse("2021-03-05T11:05:18Z"), model.timeStarted()); - Assertions.assertEquals(OffsetDateTime.parse("2021-02-01T08:02:04Z"), model.lastUpdatedTime()); - Assertions.assertEquals("bn", model.duration()); - Assertions.assertEquals(UpdateRunPropertiesState.UNKNOWN, model.state()); - Assertions.assertEquals("xs", model.name()); - Assertions.assertEquals("rntvlwijp", model.description()); - Assertions.assertEquals("texoqqpwc", model.errorMessage()); - Assertions.assertEquals("ufmhrunc", model.status()); - Assertions.assertEquals(OffsetDateTime.parse("2021-09-21T16:25:56Z"), model.startTimeUtc()); - Assertions.assertEquals(OffsetDateTime.parse("2021-09-21T10:04:50Z"), model.endTimeUtc()); - Assertions.assertEquals(OffsetDateTime.parse("2021-08-20T13:44:39Z"), model.lastUpdatedTimeUtc()); - Assertions.assertEquals("dqzh", model.expectedExecutionTime()); - Assertions.assertEquals("dunqnd", model.steps().get(0).name()); - Assertions.assertEquals("pchrqbn", model.steps().get(0).description()); - Assertions.assertEquals("rcgegydcwboxjum", model.steps().get(0).errorMessage()); - Assertions.assertEquals("qoli", model.steps().get(0).status()); - Assertions.assertEquals(OffsetDateTime.parse("2021-06-22T06:33:09Z"), model.steps().get(0).startTimeUtc()); - Assertions.assertEquals(OffsetDateTime.parse("2021-05-10T13:24:14Z"), model.steps().get(0).endTimeUtc()); - Assertions.assertEquals(OffsetDateTime.parse("2021-05-20T12:59:42Z"), + Assertions.assertEquals(OffsetDateTime.parse("2021-09-12T02:55:54Z"), model.timeStarted()); + Assertions.assertEquals(OffsetDateTime.parse("2021-10-09T22:06:54Z"), model.lastUpdatedTime()); + Assertions.assertEquals("mxzkr", model.duration()); + Assertions.assertEquals(UpdateRunPropertiesState.FAILED, model.state()); + Assertions.assertEquals("sbamnppcc", model.name()); + Assertions.assertEquals("u", model.description()); + Assertions.assertEquals("dsbezaxyfu", model.errorMessage()); + Assertions.assertEquals("xuizhyhnepkpet", model.status()); + Assertions.assertEquals(OffsetDateTime.parse("2021-09-10T01:05:20Z"), model.startTimeUtc()); + Assertions.assertEquals(OffsetDateTime.parse("2021-02-25T21:45:23Z"), model.endTimeUtc()); + Assertions.assertEquals(OffsetDateTime.parse("2021-11-06T16:28:06Z"), model.lastUpdatedTimeUtc()); + Assertions.assertEquals("xdukecpxd", model.expectedExecutionTime()); + Assertions.assertEquals("hctmmkosz", model.steps().get(0).name()); + Assertions.assertEquals("blnsntrpcaqk", model.steps().get(0).description()); + Assertions.assertEquals("f", model.steps().get(0).errorMessage()); + Assertions.assertEquals("tfmhklbnldpvcb", model.steps().get(0).status()); + Assertions.assertEquals(OffsetDateTime.parse("2021-05-24T15:33:53Z"), model.steps().get(0).startTimeUtc()); + Assertions.assertEquals(OffsetDateTime.parse("2021-05-23T14:44:21Z"), model.steps().get(0).endTimeUtc()); + Assertions.assertEquals(OffsetDateTime.parse("2021-12-06T04:25:02Z"), model.steps().get(0).lastUpdatedTimeUtc()); - Assertions.assertEquals("ubrjtl", model.steps().get(0).expectedExecutionTime()); - Assertions.assertEquals("uojrngiflr", model.steps().get(0).steps().get(0).name()); - Assertions.assertEquals("asccbiui", model.steps().get(0).steps().get(0).description()); - Assertions.assertEquals("dlyjdf", model.steps().get(0).steps().get(0).errorMessage()); - Assertions.assertEquals("mkyoqufdvruzsl", model.steps().get(0).steps().get(0).status()); - Assertions.assertEquals(OffsetDateTime.parse("2021-03-20T10:33:48Z"), + Assertions.assertEquals("usqxutrpbrr", model.steps().get(0).expectedExecutionTime()); + Assertions.assertEquals("atvlmbjwcolbm", model.steps().get(0).steps().get(0).name()); + Assertions.assertEquals("b", model.steps().get(0).steps().get(0).description()); + Assertions.assertEquals("tpc", model.steps().get(0).steps().get(0).errorMessage()); + Assertions.assertEquals("hprzrvxhmtfho", model.steps().get(0).steps().get(0).status()); + Assertions.assertEquals(OffsetDateTime.parse("2021-04-09T06:00:35Z"), model.steps().get(0).steps().get(0).startTimeUtc()); - Assertions.assertEquals(OffsetDateTime.parse("2021-04-15T06:18:59Z"), + Assertions.assertEquals(OffsetDateTime.parse("2021-11-27T20:51:03Z"), model.steps().get(0).steps().get(0).endTimeUtc()); - Assertions.assertEquals(OffsetDateTime.parse("2021-07-08T06:56:22Z"), + Assertions.assertEquals(OffsetDateTime.parse("2021-06-10T03:56:34Z"), model.steps().get(0).steps().get(0).lastUpdatedTimeUtc()); - Assertions.assertEquals("nmdxotngfd", model.steps().get(0).steps().get(0).expectedExecutionTime()); + Assertions.assertEquals("ngxno", model.steps().get(0).steps().get(0).expectedExecutionTime()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { UpdateRunProperties model - = new UpdateRunProperties().withTimeStarted(OffsetDateTime.parse("2021-03-05T11:05:18Z")) - .withLastUpdatedTime(OffsetDateTime.parse("2021-02-01T08:02:04Z")) - .withDuration("bn") - .withState(UpdateRunPropertiesState.UNKNOWN) - .withName("xs") - .withDescription("rntvlwijp") - .withErrorMessage("texoqqpwc") - .withStatus("ufmhrunc") - .withStartTimeUtc(OffsetDateTime.parse("2021-09-21T16:25:56Z")) - .withEndTimeUtc(OffsetDateTime.parse("2021-09-21T10:04:50Z")) - .withLastUpdatedTimeUtc(OffsetDateTime.parse("2021-08-20T13:44:39Z")) - .withExpectedExecutionTime("dqzh") - .withSteps( - Arrays - .asList( - new Step().withName("dunqnd") - .withDescription("pchrqbn") - .withErrorMessage("rcgegydcwboxjum") - .withStatus("qoli") - .withStartTimeUtc(OffsetDateTime.parse("2021-06-22T06:33:09Z")) - .withEndTimeUtc(OffsetDateTime.parse("2021-05-10T13:24:14Z")) - .withLastUpdatedTimeUtc(OffsetDateTime.parse("2021-05-20T12:59:42Z")) - .withExpectedExecutionTime("ubrjtl") - .withSteps( - Arrays.asList( - new Step().withName("uojrngiflr") - .withDescription("asccbiui") - .withErrorMessage("dlyjdf") - .withStatus("mkyoqufdvruzsl") - .withStartTimeUtc(OffsetDateTime.parse("2021-03-20T10:33:48Z")) - .withEndTimeUtc(OffsetDateTime.parse("2021-04-15T06:18:59Z")) - .withLastUpdatedTimeUtc(OffsetDateTime.parse("2021-07-08T06:56:22Z")) - .withExpectedExecutionTime("nmdxotngfd") - .withSteps(Arrays.asList(new Step(), new Step(), new Step(), new Step())), - new Step().withName("yzihgrkyuizabsn") - .withDescription("pphoj") - .withErrorMessage("vyhyhsgzfc") - .withStatus("gomfgbeglq") - .withStartTimeUtc(OffsetDateTime.parse("2021-11-28T19:12:57Z")) - .withEndTimeUtc(OffsetDateTime.parse("2021-06-10T19:13:40Z")) - .withLastUpdatedTimeUtc(OffsetDateTime.parse("2021-11-28T14:13:42Z")) - .withExpectedExecutionTime("tnluankrr") - .withSteps(Arrays.asList(new Step(), new Step(), new Step())))), - new Step().withName("ebtijvacvbmqzbqq") - .withDescription("aj") - .withErrorMessage("wxacevehj") - .withStatus("yxoaf") - .withStartTimeUtc(OffsetDateTime.parse("2021-03-08T11:58:40Z")) - .withEndTimeUtc(OffsetDateTime.parse("2021-05-13T08:39:20Z")) - .withLastUpdatedTimeUtc(OffsetDateTime.parse("2021-06-28T21:13:43Z")) - .withExpectedExecutionTime("eyl") - .withSteps(Arrays.asList( - new Step().withName("gv") - .withDescription("r") - .withErrorMessage("hriypoqeyhlqhy") - .withStatus("rlpyznuciqdsmexi") - .withStartTimeUtc(OffsetDateTime.parse("2021-11-16T11:22:07Z")) - .withEndTimeUtc(OffsetDateTime.parse("2021-08-01T15:36:59Z")) - .withLastUpdatedTimeUtc(OffsetDateTime.parse("2021-02-09T12:29:35Z")) - .withExpectedExecutionTime("asiibmiybnnust") - .withSteps(Arrays.asList(new Step(), new Step(), new Step(), new Step())), - new Step().withName("hnmgixhcm") - .withDescription("mqfoudorh") - .withErrorMessage("yyprotwyp") - .withStatus("d") - .withStartTimeUtc(OffsetDateTime.parse("2021-09-21T05:34:17Z")) - .withEndTimeUtc(OffsetDateTime.parse("2021-09-26T18:20:07Z")) - .withLastUpdatedTimeUtc(OffsetDateTime.parse("2021-05-18T07:53:38Z")) - .withExpectedExecutionTime("jkavl") - .withSteps(Arrays.asList(new Step())), - new Step().withName("mftpmdtz") - .withDescription("ltfvnz") - .withErrorMessage("jtotpvopvpbd") - .withStatus("qgqqihedsvqwthmk") - .withStartTimeUtc(OffsetDateTime.parse("2021-10-27T11:08:26Z")) - .withEndTimeUtc(OffsetDateTime.parse("2021-10-29T01:22:50Z")) - .withLastUpdatedTimeUtc(OffsetDateTime.parse("2021-10-11T18:19:24Z")) - .withExpectedExecutionTime("sgqcwdho") - .withSteps(Arrays.asList(new Step(), new Step())), - new Step().withName("mcdzsufcohdxbz") - .withDescription("cmuapcvhd") - .withErrorMessage("v") - .withStatus("qxeysko") - .withStartTimeUtc(OffsetDateTime.parse("2020-12-31T09:10:56Z")) - .withEndTimeUtc(OffsetDateTime.parse("2021-04-16T10:18:40Z")) - .withLastUpdatedTimeUtc(OffsetDateTime.parse("2021-02-01T01:33:34Z")) - .withExpectedExecutionTime("bgbzbowxeqoclj") - .withSteps(Arrays.asList(new Step(), new Step(), new Step(), new Step())))))); + = new UpdateRunProperties().withTimeStarted(OffsetDateTime.parse("2021-09-12T02:55:54Z")) + .withLastUpdatedTime(OffsetDateTime.parse("2021-10-09T22:06:54Z")) + .withDuration("mxzkr") + .withState(UpdateRunPropertiesState.FAILED) + .withName("sbamnppcc") + .withDescription("u") + .withErrorMessage("dsbezaxyfu") + .withStatus("xuizhyhnepkpet") + .withStartTimeUtc(OffsetDateTime.parse("2021-09-10T01:05:20Z")) + .withEndTimeUtc(OffsetDateTime.parse("2021-02-25T21:45:23Z")) + .withLastUpdatedTimeUtc(OffsetDateTime.parse("2021-11-06T16:28:06Z")) + .withExpectedExecutionTime("xdukecpxd") + .withSteps(Arrays.asList(new Step().withName("hctmmkosz") + .withDescription("blnsntrpcaqk") + .withErrorMessage("f") + .withStatus("tfmhklbnldpvcb") + .withStartTimeUtc(OffsetDateTime.parse("2021-05-24T15:33:53Z")) + .withEndTimeUtc(OffsetDateTime.parse("2021-05-23T14:44:21Z")) + .withLastUpdatedTimeUtc(OffsetDateTime.parse("2021-12-06T04:25:02Z")) + .withExpectedExecutionTime("usqxutrpbrr") + .withSteps(Arrays.asList( + new Step().withName("atvlmbjwcolbm") + .withDescription("b") + .withErrorMessage("tpc") + .withStatus("hprzrvxhmtfho") + .withStartTimeUtc(OffsetDateTime.parse("2021-04-09T06:00:35Z")) + .withEndTimeUtc(OffsetDateTime.parse("2021-11-27T20:51:03Z")) + .withLastUpdatedTimeUtc(OffsetDateTime.parse("2021-06-10T03:56:34Z")) + .withExpectedExecutionTime("ngxno") + .withSteps(Arrays.asList(new Step(), new Step(), new Step())), + new Step().withName("disnj") + .withDescription("hdlmydidwhe") + .withErrorMessage("wwtjfdoesxxhmwc") + .withStatus("ck") + .withStartTimeUtc(OffsetDateTime.parse("2021-09-11T01:19:42Z")) + .withEndTimeUtc(OffsetDateTime.parse("2021-07-19T18:13:18Z")) + .withLastUpdatedTimeUtc(OffsetDateTime.parse("2021-07-07T08:43:18Z")) + .withExpectedExecutionTime("negknjzrb") + .withSteps(Arrays.asList(new Step())), + new Step().withName("plvukaobrlbpg") + .withDescription("bagn") + .withErrorMessage("jhgem") + .withStatus("wakywalhjymxcgq") + .withStartTimeUtc(OffsetDateTime.parse("2021-01-19T00:26:08Z")) + .withEndTimeUtc(OffsetDateTime.parse("2021-02-11T18:34:59Z")) + .withLastUpdatedTimeUtc(OffsetDateTime.parse("2021-09-08T11:13:10Z")) + .withExpectedExecutionTime("soljome") + .withSteps(Arrays.asList(new Step(), new Step())), + new Step().withName("cnlbv") + .withDescription("codkkgj") + .withErrorMessage("ytssikiz") + .withStatus("ufqbvntnr") + .withStartTimeUtc(OffsetDateTime.parse("2021-11-07T19:33:32Z")) + .withEndTimeUtc(OffsetDateTime.parse("2021-03-01T05:15:34Z")) + .withLastUpdatedTimeUtc(OffsetDateTime.parse("2021-09-10T05:06:17Z")) + .withExpectedExecutionTime("ekxgn") + .withSteps(Arrays.asList(new Step())))))); model = BinaryData.fromObject(model).toObject(UpdateRunProperties.class); - Assertions.assertEquals(OffsetDateTime.parse("2021-03-05T11:05:18Z"), model.timeStarted()); - Assertions.assertEquals(OffsetDateTime.parse("2021-02-01T08:02:04Z"), model.lastUpdatedTime()); - Assertions.assertEquals("bn", model.duration()); - Assertions.assertEquals(UpdateRunPropertiesState.UNKNOWN, model.state()); - Assertions.assertEquals("xs", model.name()); - Assertions.assertEquals("rntvlwijp", model.description()); - Assertions.assertEquals("texoqqpwc", model.errorMessage()); - Assertions.assertEquals("ufmhrunc", model.status()); - Assertions.assertEquals(OffsetDateTime.parse("2021-09-21T16:25:56Z"), model.startTimeUtc()); - Assertions.assertEquals(OffsetDateTime.parse("2021-09-21T10:04:50Z"), model.endTimeUtc()); - Assertions.assertEquals(OffsetDateTime.parse("2021-08-20T13:44:39Z"), model.lastUpdatedTimeUtc()); - Assertions.assertEquals("dqzh", model.expectedExecutionTime()); - Assertions.assertEquals("dunqnd", model.steps().get(0).name()); - Assertions.assertEquals("pchrqbn", model.steps().get(0).description()); - Assertions.assertEquals("rcgegydcwboxjum", model.steps().get(0).errorMessage()); - Assertions.assertEquals("qoli", model.steps().get(0).status()); - Assertions.assertEquals(OffsetDateTime.parse("2021-06-22T06:33:09Z"), model.steps().get(0).startTimeUtc()); - Assertions.assertEquals(OffsetDateTime.parse("2021-05-10T13:24:14Z"), model.steps().get(0).endTimeUtc()); - Assertions.assertEquals(OffsetDateTime.parse("2021-05-20T12:59:42Z"), + Assertions.assertEquals(OffsetDateTime.parse("2021-09-12T02:55:54Z"), model.timeStarted()); + Assertions.assertEquals(OffsetDateTime.parse("2021-10-09T22:06:54Z"), model.lastUpdatedTime()); + Assertions.assertEquals("mxzkr", model.duration()); + Assertions.assertEquals(UpdateRunPropertiesState.FAILED, model.state()); + Assertions.assertEquals("sbamnppcc", model.name()); + Assertions.assertEquals("u", model.description()); + Assertions.assertEquals("dsbezaxyfu", model.errorMessage()); + Assertions.assertEquals("xuizhyhnepkpet", model.status()); + Assertions.assertEquals(OffsetDateTime.parse("2021-09-10T01:05:20Z"), model.startTimeUtc()); + Assertions.assertEquals(OffsetDateTime.parse("2021-02-25T21:45:23Z"), model.endTimeUtc()); + Assertions.assertEquals(OffsetDateTime.parse("2021-11-06T16:28:06Z"), model.lastUpdatedTimeUtc()); + Assertions.assertEquals("xdukecpxd", model.expectedExecutionTime()); + Assertions.assertEquals("hctmmkosz", model.steps().get(0).name()); + Assertions.assertEquals("blnsntrpcaqk", model.steps().get(0).description()); + Assertions.assertEquals("f", model.steps().get(0).errorMessage()); + Assertions.assertEquals("tfmhklbnldpvcb", model.steps().get(0).status()); + Assertions.assertEquals(OffsetDateTime.parse("2021-05-24T15:33:53Z"), model.steps().get(0).startTimeUtc()); + Assertions.assertEquals(OffsetDateTime.parse("2021-05-23T14:44:21Z"), model.steps().get(0).endTimeUtc()); + Assertions.assertEquals(OffsetDateTime.parse("2021-12-06T04:25:02Z"), model.steps().get(0).lastUpdatedTimeUtc()); - Assertions.assertEquals("ubrjtl", model.steps().get(0).expectedExecutionTime()); - Assertions.assertEquals("uojrngiflr", model.steps().get(0).steps().get(0).name()); - Assertions.assertEquals("asccbiui", model.steps().get(0).steps().get(0).description()); - Assertions.assertEquals("dlyjdf", model.steps().get(0).steps().get(0).errorMessage()); - Assertions.assertEquals("mkyoqufdvruzsl", model.steps().get(0).steps().get(0).status()); - Assertions.assertEquals(OffsetDateTime.parse("2021-03-20T10:33:48Z"), + Assertions.assertEquals("usqxutrpbrr", model.steps().get(0).expectedExecutionTime()); + Assertions.assertEquals("atvlmbjwcolbm", model.steps().get(0).steps().get(0).name()); + Assertions.assertEquals("b", model.steps().get(0).steps().get(0).description()); + Assertions.assertEquals("tpc", model.steps().get(0).steps().get(0).errorMessage()); + Assertions.assertEquals("hprzrvxhmtfho", model.steps().get(0).steps().get(0).status()); + Assertions.assertEquals(OffsetDateTime.parse("2021-04-09T06:00:35Z"), model.steps().get(0).steps().get(0).startTimeUtc()); - Assertions.assertEquals(OffsetDateTime.parse("2021-04-15T06:18:59Z"), + Assertions.assertEquals(OffsetDateTime.parse("2021-11-27T20:51:03Z"), model.steps().get(0).steps().get(0).endTimeUtc()); - Assertions.assertEquals(OffsetDateTime.parse("2021-07-08T06:56:22Z"), + Assertions.assertEquals(OffsetDateTime.parse("2021-06-10T03:56:34Z"), model.steps().get(0).steps().get(0).lastUpdatedTimeUtc()); - Assertions.assertEquals("nmdxotngfd", model.steps().get(0).steps().get(0).expectedExecutionTime()); + Assertions.assertEquals("ngxno", model.steps().get(0).steps().get(0).expectedExecutionTime()); } } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/UpdateRunsDeleteMockTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/UpdateRunsDeleteMockTests.java index 71abdd71d324..1676e5db5efd 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/UpdateRunsDeleteMockTests.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/UpdateRunsDeleteMockTests.java @@ -1,13 +1,13 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.generated; import com.azure.core.credential.AccessToken; import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.azurestackhci.AzureStackHciManager; import java.nio.charset.StandardCharsets; @@ -25,9 +25,9 @@ public void testDelete() throws Exception { AzureStackHciManager manager = AzureStackHciManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - manager.updateRuns().delete("ptqmawzjdrpiz", "ulgyctsdbtqgku", "dsooxr", "w", com.azure.core.util.Context.NONE); + manager.updateRuns().delete("gyedzfzqi", "uqhtdereuno", "a", "zwhpjlwyxedz", com.azure.core.util.Context.NONE); } } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/UpdateRunsGetWithResponseMockTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/UpdateRunsGetWithResponseMockTests.java index 45bff0ef8090..7148b0b3fca4 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/UpdateRunsGetWithResponseMockTests.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/UpdateRunsGetWithResponseMockTests.java @@ -1,13 +1,13 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.generated; import com.azure.core.credential.AccessToken; import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.azurestackhci.AzureStackHciManager; import com.azure.resourcemanager.azurestackhci.models.UpdateRun; @@ -22,41 +22,40 @@ public final class UpdateRunsGetWithResponseMockTests { @Test public void testGetWithResponse() throws Exception { String responseStr - = "{\"location\":\"okpoyuoh\",\"properties\":{\"provisioningState\":\"Error\",\"timeStarted\":\"2021-11-30T03:35:25Z\",\"lastUpdatedTime\":\"2021-01-12T07:26:14Z\",\"duration\":\"hmpoe\",\"state\":\"Succeeded\",\"progress\":{\"name\":\"wsadaxjsumxpezc\",\"description\":\"oyj\",\"errorMessage\":\"fqzwqdnxkeed\",\"status\":\"wmywxfqzkvemy\",\"startTimeUtc\":\"2021-01-19T15:19:47Z\",\"endTimeUtc\":\"2021-08-16T22:35:08Z\",\"lastUpdatedTimeUtc\":\"2021-08-31T21:01Z\",\"expectedExecutionTime\":\"qifdbmptrwtxz\",\"steps\":[{\"name\":\"monatnizexroq\",\"description\":\"jghrmthsplwst\",\"errorMessage\":\"srgxfq\",\"status\":\"niceovxgzwh\",\"startTimeUtc\":\"2021-04-10T18:22:57Z\",\"endTimeUtc\":\"2021-10-08T22:52:41Z\",\"lastUpdatedTimeUtc\":\"2021-07-29T17:09:57Z\",\"expectedExecutionTime\":\"i\",\"steps\":[{}]},{\"name\":\"ik\",\"description\":\"hzixyqhfnkvy\",\"errorMessage\":\"qqdseipnquwzxhrp\",\"status\":\"odlhkfktl\",\"startTimeUtc\":\"2021-05-16T09:50:55Z\",\"endTimeUtc\":\"2021-01-31T17:06:28Z\",\"lastUpdatedTimeUtc\":\"2021-04-12T08:52:01Z\",\"expectedExecutionTime\":\"pnouhbqezkqx\",\"steps\":[{}]}]}},\"id\":\"zyigfcvc\",\"name\":\"wb\",\"type\":\"qhdgsjsatmrn\"}"; + = "{\"properties\":{\"provisioningState\":\"Failed\",\"timeStarted\":\"2021-05-08T11:55:38Z\",\"lastUpdatedTime\":\"2021-07-09T12:40:55Z\",\"duration\":\"xluea\",\"state\":\"Unknown\",\"progress\":{\"name\":\"gsimwe\",\"description\":\"wbkbpjzobdwb\",\"errorMessage\":\"ra\",\"status\":\"kuhydtnaczkfwfat\",\"startTimeUtc\":\"2021-10-07T13:25:20Z\",\"endTimeUtc\":\"2021-08-29T20:06:23Z\",\"lastUpdatedTimeUtc\":\"2021-01-16T22:55:43Z\",\"expectedExecutionTime\":\"ivdwgtqc\",\"steps\":[{\"name\":\"saaqgoq\",\"description\":\"iuycsbskowk\",\"errorMessage\":\"hzhrbkhtm\",\"status\":\"wiuasfg\",\"startTimeUtc\":\"2021-08-04T06:23:44Z\",\"endTimeUtc\":\"2021-10-22T15:42:28Z\",\"lastUpdatedTimeUtc\":\"2021-07-23T07:28:01Z\",\"expectedExecutionTime\":\"imqvdruoz\",\"steps\":[{},{},{},{}]},{\"name\":\"peoehg\",\"description\":\"qmskkixv\",\"errorMessage\":\"jxplh\",\"status\":\"vasyntv\",\"startTimeUtc\":\"2021-06-01T03:16:25Z\",\"endTimeUtc\":\"2021-10-18T04:19:50Z\",\"lastUpdatedTimeUtc\":\"2021-09-26T05:26:39Z\",\"expectedExecutionTime\":\"rvvbqvknmpecqxg\",\"steps\":[{}]},{\"name\":\"ifubnsnstlpwqp\",\"description\":\"xjkhtupsv\",\"errorMessage\":\"uweuiy\",\"status\":\"wkztsmsfbevyl\",\"startTimeUtc\":\"2021-09-12T13:45:39Z\",\"endTimeUtc\":\"2021-03-19T19:57:21Z\",\"lastUpdatedTimeUtc\":\"2021-03-27T20:53:42Z\",\"expectedExecutionTime\":\"tkztadopgfzdgj\",\"steps\":[{}]},{\"name\":\"rsvloy\",\"description\":\"igqkzjuqwqa\",\"errorMessage\":\"uzxp\",\"status\":\"hyoipnfdbgso\",\"startTimeUtc\":\"2021-06-23T06:34:56Z\",\"endTimeUtc\":\"2021-07-08T00:51:12Z\",\"lastUpdatedTimeUtc\":\"2021-02-22T00:55:50Z\",\"expectedExecutionTime\":\"vbennmfkbpjnrt\",\"steps\":[{}]}]}},\"location\":\"nthropmdudsyiu\",\"id\":\"tvktjhffecqko\",\"name\":\"youergaghp\",\"type\":\"zxkpyehhfdyld\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); AzureStackHciManager manager = AzureStackHciManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); UpdateRun response = manager.updateRuns() - .getWithResponse("eurbtigapdyarik", "ejdpdfhtwm", "kfqbriqulwwt", "jmeqkvy", - com.azure.core.util.Context.NONE) + .getWithResponse("gufy", "fdk", "iyvndjokgwes", "mzqhrqp", com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("okpoyuoh", response.location()); - Assertions.assertEquals(OffsetDateTime.parse("2021-11-30T03:35:25Z"), response.timeStarted()); - Assertions.assertEquals(OffsetDateTime.parse("2021-01-12T07:26:14Z"), response.lastUpdatedTime()); - Assertions.assertEquals("hmpoe", response.duration()); - Assertions.assertEquals(UpdateRunPropertiesState.SUCCEEDED, response.state()); - Assertions.assertEquals("wsadaxjsumxpezc", response.namePropertiesName()); - Assertions.assertEquals("oyj", response.description()); - Assertions.assertEquals("fqzwqdnxkeed", response.errorMessage()); - Assertions.assertEquals("wmywxfqzkvemy", response.status()); - Assertions.assertEquals(OffsetDateTime.parse("2021-01-19T15:19:47Z"), response.startTimeUtc()); - Assertions.assertEquals(OffsetDateTime.parse("2021-08-16T22:35:08Z"), response.endTimeUtc()); - Assertions.assertEquals(OffsetDateTime.parse("2021-08-31T21:01Z"), response.lastUpdatedTimeUtc()); - Assertions.assertEquals("qifdbmptrwtxz", response.expectedExecutionTime()); - Assertions.assertEquals("monatnizexroq", response.steps().get(0).name()); - Assertions.assertEquals("jghrmthsplwst", response.steps().get(0).description()); - Assertions.assertEquals("srgxfq", response.steps().get(0).errorMessage()); - Assertions.assertEquals("niceovxgzwh", response.steps().get(0).status()); - Assertions.assertEquals(OffsetDateTime.parse("2021-04-10T18:22:57Z"), response.steps().get(0).startTimeUtc()); - Assertions.assertEquals(OffsetDateTime.parse("2021-10-08T22:52:41Z"), response.steps().get(0).endTimeUtc()); - Assertions.assertEquals(OffsetDateTime.parse("2021-07-29T17:09:57Z"), + Assertions.assertEquals("nthropmdudsyiu", response.location()); + Assertions.assertEquals(OffsetDateTime.parse("2021-05-08T11:55:38Z"), response.timeStarted()); + Assertions.assertEquals(OffsetDateTime.parse("2021-07-09T12:40:55Z"), response.lastUpdatedTime()); + Assertions.assertEquals("xluea", response.duration()); + Assertions.assertEquals(UpdateRunPropertiesState.UNKNOWN, response.state()); + Assertions.assertEquals("gsimwe", response.namePropertiesName()); + Assertions.assertEquals("wbkbpjzobdwb", response.description()); + Assertions.assertEquals("ra", response.errorMessage()); + Assertions.assertEquals("kuhydtnaczkfwfat", response.status()); + Assertions.assertEquals(OffsetDateTime.parse("2021-10-07T13:25:20Z"), response.startTimeUtc()); + Assertions.assertEquals(OffsetDateTime.parse("2021-08-29T20:06:23Z"), response.endTimeUtc()); + Assertions.assertEquals(OffsetDateTime.parse("2021-01-16T22:55:43Z"), response.lastUpdatedTimeUtc()); + Assertions.assertEquals("ivdwgtqc", response.expectedExecutionTime()); + Assertions.assertEquals("saaqgoq", response.steps().get(0).name()); + Assertions.assertEquals("iuycsbskowk", response.steps().get(0).description()); + Assertions.assertEquals("hzhrbkhtm", response.steps().get(0).errorMessage()); + Assertions.assertEquals("wiuasfg", response.steps().get(0).status()); + Assertions.assertEquals(OffsetDateTime.parse("2021-08-04T06:23:44Z"), response.steps().get(0).startTimeUtc()); + Assertions.assertEquals(OffsetDateTime.parse("2021-10-22T15:42:28Z"), response.steps().get(0).endTimeUtc()); + Assertions.assertEquals(OffsetDateTime.parse("2021-07-23T07:28:01Z"), response.steps().get(0).lastUpdatedTimeUtc()); - Assertions.assertEquals("i", response.steps().get(0).expectedExecutionTime()); + Assertions.assertEquals("imqvdruoz", response.steps().get(0).expectedExecutionTime()); } } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/UpdateRunsListMockTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/UpdateRunsListMockTests.java index 448f36b19dae..2c6f01b381b5 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/UpdateRunsListMockTests.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/UpdateRunsListMockTests.java @@ -1,14 +1,14 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.generated; import com.azure.core.credential.AccessToken; import com.azure.core.http.HttpClient; import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.azurestackhci.AzureStackHciManager; import com.azure.resourcemanager.azurestackhci.models.UpdateRun; @@ -23,43 +23,44 @@ public final class UpdateRunsListMockTests { @Test public void testList() throws Exception { String responseStr - = "{\"value\":[{\"location\":\"dlhvdv\",\"properties\":{\"provisioningState\":\"Deleted\",\"timeStarted\":\"2021-06-13T17:39:59Z\",\"lastUpdatedTime\":\"2021-07-22T20:38:54Z\",\"duration\":\"jzmhkdclacroczfm\",\"state\":\"InProgress\",\"progress\":{\"name\":\"eluxzshxzez\",\"description\":\"uzudlevzskejcg\",\"errorMessage\":\"sgqk\",\"status\":\"yecup\",\"startTimeUtc\":\"2021-09-29T13:22Z\",\"endTimeUtc\":\"2021-06-13T17:59:49Z\",\"lastUpdatedTimeUtc\":\"2021-08-11T03:52:04Z\",\"expectedExecutionTime\":\"avsjcfmazpzdq\",\"steps\":[{\"name\":\"cmcokxizekuv\",\"description\":\"jwucaonzva\",\"errorMessage\":\"vbnkrdemdidac\",\"status\":\"idgzwdydamis\",\"startTimeUtc\":\"2021-10-30T03:52:39Z\",\"endTimeUtc\":\"2021-03-26T14:45:23Z\",\"lastUpdatedTimeUtc\":\"2021-07-23T09:45:28Z\",\"expectedExecutionTime\":\"kpxkqejtpjfoj\",\"steps\":[{},{}]},{\"name\":\"lshxuknsykdto\",\"description\":\"oancdrco\",\"errorMessage\":\"vx\",\"status\":\"dxonckbn\",\"startTimeUtc\":\"2021-10-26T15:30:27Z\",\"endTimeUtc\":\"2021-04-15T17:53:27Z\",\"lastUpdatedTimeUtc\":\"2021-01-31T13:56:51Z\",\"expectedExecutionTime\":\"ibaqzi\",\"steps\":[{},{}]},{\"name\":\"zweghlwwbogvg\",\"description\":\"lqiy\",\"errorMessage\":\"veqelsbfvds\",\"status\":\"kzx\",\"startTimeUtc\":\"2021-08-12T08:15:32Z\",\"endTimeUtc\":\"2021-12-06T08:09:21Z\",\"lastUpdatedTimeUtc\":\"2021-09-24T03:50:20Z\",\"expectedExecutionTime\":\"rds\",\"steps\":[{},{},{}]}]}},\"id\":\"im\",\"name\":\"ndnoxaxnrqaq\",\"type\":\"tnndxolousdvr\"}]}"; + = "{\"value\":[{\"properties\":{\"provisioningState\":\"Deleted\",\"timeStarted\":\"2021-09-05T10:35:35Z\",\"lastUpdatedTime\":\"2021-01-16T22:21:13Z\",\"duration\":\"txfp\",\"state\":\"InProgress\",\"progress\":{\"name\":\"nuywe\",\"description\":\"gvad\",\"errorMessage\":\"aqwvkgjpytpmpvdn\",\"status\":\"e\",\"startTimeUtc\":\"2021-08-27T18:17:27Z\",\"endTimeUtc\":\"2021-07-29T11:44:05Z\",\"lastUpdatedTimeUtc\":\"2020-12-21T07:39:50Z\",\"expectedExecutionTime\":\"bnukkfax\",\"steps\":[{\"name\":\"xxyjisskobqoclfl\",\"description\":\"ewyhxessm\",\"errorMessage\":\"kdpsqeqfbd\",\"status\":\"dsesbrujb\",\"startTimeUtc\":\"2021-06-18T15:04:11Z\",\"endTimeUtc\":\"2021-10-06T09:53:51Z\",\"lastUpdatedTimeUtc\":\"2021-06-15T19:42:09Z\",\"expectedExecutionTime\":\"dibfmthi\",\"steps\":[{},{},{}]},{\"name\":\"ejrnmi\",\"description\":\"qplgtkihonikz\",\"errorMessage\":\"zfffjilzfbpnt\",\"status\":\"kensckh\",\"startTimeUtc\":\"2021-10-30T08:31:04Z\",\"endTimeUtc\":\"2021-04-02T22:44:26Z\",\"lastUpdatedTimeUtc\":\"2021-10-14T07:58:58Z\",\"expectedExecutionTime\":\"fxxkwykuqdndxl\",\"steps\":[{}]},{\"name\":\"gga\",\"description\":\"dgtfpeersc\",\"errorMessage\":\"rnrnjrcufmbgacnr\",\"status\":\"dtncmsps\",\"startTimeUtc\":\"2021-01-19T20:25:27Z\",\"endTimeUtc\":\"2021-06-28T05:12:36Z\",\"lastUpdatedTimeUtc\":\"2021-12-03T23:39:40Z\",\"expectedExecutionTime\":\"kqiq\",\"steps\":[{}]},{\"name\":\"hlq\",\"description\":\"kkqjmxptueipuug\",\"errorMessage\":\"drqmrp\",\"status\":\"uuonjkkxukguehvv\",\"startTimeUtc\":\"2021-02-23T21:43:03Z\",\"endTimeUtc\":\"2021-02-14T08:52:08Z\",\"lastUpdatedTimeUtc\":\"2021-06-13T08:56:58Z\",\"expectedExecutionTime\":\"ojlleu\",\"steps\":[{},{},{}]}]}},\"location\":\"tonvhgnhtmeplhb\",\"id\":\"bap\",\"name\":\"ummmkvavucgji\",\"type\":\"aiq\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); AzureStackHciManager manager = AzureStackHciManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PagedIterable response - = manager.updateRuns().list("jemexmnv", "vmuw", "xlniwmcpm", com.azure.core.util.Context.NONE); + = manager.updateRuns().list("mxrfomckew", "my", "fopxf", com.azure.core.util.Context.NONE); - Assertions.assertEquals("dlhvdv", response.iterator().next().location()); - Assertions.assertEquals(OffsetDateTime.parse("2021-06-13T17:39:59Z"), response.iterator().next().timeStarted()); - Assertions.assertEquals(OffsetDateTime.parse("2021-07-22T20:38:54Z"), + Assertions.assertEquals("tonvhgnhtmeplhb", response.iterator().next().location()); + Assertions.assertEquals(OffsetDateTime.parse("2021-09-05T10:35:35Z"), response.iterator().next().timeStarted()); + Assertions.assertEquals(OffsetDateTime.parse("2021-01-16T22:21:13Z"), response.iterator().next().lastUpdatedTime()); - Assertions.assertEquals("jzmhkdclacroczfm", response.iterator().next().duration()); + Assertions.assertEquals("txfp", response.iterator().next().duration()); Assertions.assertEquals(UpdateRunPropertiesState.IN_PROGRESS, response.iterator().next().state()); - Assertions.assertEquals("eluxzshxzez", response.iterator().next().namePropertiesName()); - Assertions.assertEquals("uzudlevzskejcg", response.iterator().next().description()); - Assertions.assertEquals("sgqk", response.iterator().next().errorMessage()); - Assertions.assertEquals("yecup", response.iterator().next().status()); - Assertions.assertEquals(OffsetDateTime.parse("2021-09-29T13:22Z"), response.iterator().next().startTimeUtc()); - Assertions.assertEquals(OffsetDateTime.parse("2021-06-13T17:59:49Z"), response.iterator().next().endTimeUtc()); - Assertions.assertEquals(OffsetDateTime.parse("2021-08-11T03:52:04Z"), + Assertions.assertEquals("nuywe", response.iterator().next().namePropertiesName()); + Assertions.assertEquals("gvad", response.iterator().next().description()); + Assertions.assertEquals("aqwvkgjpytpmpvdn", response.iterator().next().errorMessage()); + Assertions.assertEquals("e", response.iterator().next().status()); + Assertions.assertEquals(OffsetDateTime.parse("2021-08-27T18:17:27Z"), + response.iterator().next().startTimeUtc()); + Assertions.assertEquals(OffsetDateTime.parse("2021-07-29T11:44:05Z"), response.iterator().next().endTimeUtc()); + Assertions.assertEquals(OffsetDateTime.parse("2020-12-21T07:39:50Z"), response.iterator().next().lastUpdatedTimeUtc()); - Assertions.assertEquals("avsjcfmazpzdq", response.iterator().next().expectedExecutionTime()); - Assertions.assertEquals("cmcokxizekuv", response.iterator().next().steps().get(0).name()); - Assertions.assertEquals("jwucaonzva", response.iterator().next().steps().get(0).description()); - Assertions.assertEquals("vbnkrdemdidac", response.iterator().next().steps().get(0).errorMessage()); - Assertions.assertEquals("idgzwdydamis", response.iterator().next().steps().get(0).status()); - Assertions.assertEquals(OffsetDateTime.parse("2021-10-30T03:52:39Z"), + Assertions.assertEquals("bnukkfax", response.iterator().next().expectedExecutionTime()); + Assertions.assertEquals("xxyjisskobqoclfl", response.iterator().next().steps().get(0).name()); + Assertions.assertEquals("ewyhxessm", response.iterator().next().steps().get(0).description()); + Assertions.assertEquals("kdpsqeqfbd", response.iterator().next().steps().get(0).errorMessage()); + Assertions.assertEquals("dsesbrujb", response.iterator().next().steps().get(0).status()); + Assertions.assertEquals(OffsetDateTime.parse("2021-06-18T15:04:11Z"), response.iterator().next().steps().get(0).startTimeUtc()); - Assertions.assertEquals(OffsetDateTime.parse("2021-03-26T14:45:23Z"), + Assertions.assertEquals(OffsetDateTime.parse("2021-10-06T09:53:51Z"), response.iterator().next().steps().get(0).endTimeUtc()); - Assertions.assertEquals(OffsetDateTime.parse("2021-07-23T09:45:28Z"), + Assertions.assertEquals(OffsetDateTime.parse("2021-06-15T19:42:09Z"), response.iterator().next().steps().get(0).lastUpdatedTimeUtc()); - Assertions.assertEquals("kpxkqejtpjfoj", response.iterator().next().steps().get(0).expectedExecutionTime()); + Assertions.assertEquals("dibfmthi", response.iterator().next().steps().get(0).expectedExecutionTime()); } } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/UpdateRunsPutWithResponseMockTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/UpdateRunsPutWithResponseMockTests.java index d1d289e49b5f..1a7ed7db5c38 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/UpdateRunsPutWithResponseMockTests.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/UpdateRunsPutWithResponseMockTests.java @@ -1,13 +1,13 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.generated; import com.azure.core.credential.AccessToken; import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.azurestackhci.AzureStackHciManager; import com.azure.resourcemanager.azurestackhci.fluent.models.Step; @@ -24,91 +24,63 @@ public final class UpdateRunsPutWithResponseMockTests { @Test public void testPutWithResponse() throws Exception { String responseStr - = "{\"location\":\"yyjshcybwfuppo\",\"properties\":{\"provisioningState\":\"Deleted\",\"timeStarted\":\"2021-07-04T04:46:54Z\",\"lastUpdatedTime\":\"2021-06-03T21:36:28Z\",\"duration\":\"jxdiikmoxrezsv\",\"state\":\"Succeeded\",\"progress\":{\"name\":\"ikj\",\"description\":\"ywlunpipcwybs\",\"errorMessage\":\"ncnpat\",\"status\":\"tsaebwfwhxorpwa\",\"startTimeUtc\":\"2021-06-16T08:15:31Z\",\"endTimeUtc\":\"2021-02-06T18:53Z\",\"lastUpdatedTimeUtc\":\"2021-06-24T13:27:14Z\",\"expectedExecutionTime\":\"ojfccylhtrht\",\"steps\":[{\"name\":\"jpwexcdrz\",\"description\":\"o\",\"errorMessage\":\"zxezmnr\",\"status\":\"gpjeuxsphlokfp\",\"startTimeUtc\":\"2021-04-01T17:54:10Z\",\"endTimeUtc\":\"2021-07-25T23:33:25Z\",\"lastUpdatedTimeUtc\":\"2021-09-27T10:36:11Z\",\"expectedExecutionTime\":\"fbhwbdqufvc\",\"steps\":[{}]},{\"name\":\"laqrwyam\",\"description\":\"bafeb\",\"errorMessage\":\"fk\",\"status\":\"utibhlen\",\"startTimeUtc\":\"2021-04-04T14:20:23Z\",\"endTimeUtc\":\"2021-02-01T02:39:45Z\",\"lastUpdatedTimeUtc\":\"2021-03-04T14:33:22Z\",\"expectedExecutionTime\":\"abdu\",\"steps\":[{},{}]},{\"name\":\"lghnysvlp\",\"description\":\"uukppdixqb\",\"errorMessage\":\"xvhhyqq\",\"status\":\"at\",\"startTimeUtc\":\"2021-12-07T11:56:56Z\",\"endTimeUtc\":\"2021-10-19T10:58:27Z\",\"lastUpdatedTimeUtc\":\"2021-09-24T13:47:14Z\",\"expectedExecutionTime\":\"nmtsdixc\",\"steps\":[{},{},{}]},{\"name\":\"bmgjymncjc\",\"description\":\"airwcqzoofj\",\"errorMessage\":\"jsvepfbhtleberp\",\"status\":\"jeknfqnw\",\"startTimeUtc\":\"2021-06-22T21:22:25Z\",\"endTimeUtc\":\"2021-12-06T21:58:15Z\",\"lastUpdatedTimeUtc\":\"2021-07-31T14:46:40Z\",\"expectedExecutionTime\":\"njrxgkrhwie\",\"steps\":[{},{}]}]}},\"id\":\"nowawonoehrguqlh\",\"name\":\"wafbjzmp\",\"type\":\"rguyfa\"}"; + = "{\"properties\":{\"provisioningState\":\"Deleting\",\"timeStarted\":\"2021-04-14T07:48:17Z\",\"lastUpdatedTime\":\"2021-04-09T06:18:41Z\",\"duration\":\"xvb\",\"state\":\"Unknown\",\"progress\":{\"name\":\"egbthm\",\"description\":\"i\",\"errorMessage\":\"buiggrunozf\",\"status\":\"aljthoivsdwsn\",\"startTimeUtc\":\"2021-09-16T05:29:10Z\",\"endTimeUtc\":\"2020-12-31T04:40:29Z\",\"lastUpdatedTimeUtc\":\"2021-09-27T12:47:25Z\",\"expectedExecutionTime\":\"jvakmhzbhwahfbw\",\"steps\":[{\"name\":\"nx\",\"description\":\"vynuqqkotauratn\",\"errorMessage\":\"ppfzsclef\",\"status\":\"letnd\",\"startTimeUtc\":\"2021-10-18T10:14:21Z\",\"endTimeUtc\":\"2021-11-07T05:56:17Z\",\"lastUpdatedTimeUtc\":\"2021-06-04T02:17:04Z\",\"expectedExecutionTime\":\"bbuypwovvvsflee\",\"steps\":[{},{},{}]},{\"name\":\"ayrehj\",\"description\":\"wvap\",\"errorMessage\":\"lzhpzihacenq\",\"status\":\"lxnqzubfonfdbgmk\",\"startTimeUtc\":\"2021-10-16T04:59:14Z\",\"endTimeUtc\":\"2021-02-12T14:37:36Z\",\"lastUpdatedTimeUtc\":\"2021-10-02T23:18:51Z\",\"expectedExecutionTime\":\"fhxwyr\",\"steps\":[{},{},{},{}]}]}},\"location\":\"hzlrynjpchamkae\",\"id\":\"rajubowuywevt\",\"name\":\"rieikmwlaoklfnis\",\"type\":\"xgucbmtredscnn\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); AzureStackHciManager manager = AzureStackHciManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); UpdateRun response = manager.updateRuns() - .define("rcwgzwllxzlhhf") - .withExistingUpdate("mazdfsqxh", "qmr", "jparnpvgrszrbwt") - .withRegion("acfculzjrmhpf") - .withTimeStarted(OffsetDateTime.parse("2021-11-22T19:55:27Z")) - .withLastUpdatedTime(OffsetDateTime.parse("2021-02-20T02:04:38Z")) - .withDuration("fzxsoxinunjlzkd") - .withState(UpdateRunPropertiesState.FAILED) - .withNamePropertiesName("xytqq") - .withDescription("miwdwisvnme") - .withErrorMessage("ajamc") - .withStatus("yh") - .withStartTimeUtc(OffsetDateTime.parse("2021-02-08T06:18:05Z")) - .withEndTimeUtc(OffsetDateTime.parse("2021-04-13T15:26:33Z")) - .withLastUpdatedTimeUtc(OffsetDateTime.parse("2021-12-01T11:59:37Z")) - .withExpectedExecutionTime("kll") - .withSteps(Arrays.asList( - new Step().withName("anhkigglclwalh") - .withDescription("bhgzphetxdq") - .withErrorMessage("yctajqz") - .withStatus("alec") - .withStartTimeUtc(OffsetDateTime.parse("2021-05-06T22:18:11Z")) - .withEndTimeUtc(OffsetDateTime.parse("2021-10-21T08:11:03Z")) - .withLastUpdatedTimeUtc(OffsetDateTime.parse("2021-09-17T15:16:08Z")) - .withExpectedExecutionTime("degyxsbfpzvo") - .withSteps(Arrays.asList(new Step())), - new Step().withName("twczf") - .withDescription("ushlcxpblalh") - .withErrorMessage("zpfkis") - .withStatus("idqzsaaoqdsgpto") - .withStartTimeUtc(OffsetDateTime.parse("2021-03-27T14:06:37Z")) - .withEndTimeUtc(OffsetDateTime.parse("2021-01-27T18:55:40Z")) - .withLastUpdatedTimeUtc(OffsetDateTime.parse("2021-10-22T00:46:28Z")) - .withExpectedExecutionTime("cnlrt") - .withSteps(Arrays.asList(new Step(), new Step(), new Step(), new Step())), - new Step().withName("zzcaoijolbuauk") - .withDescription("ieopexelxqdwr") - .withErrorMessage("yil") - .withStatus("ibkgxyxyau") - .withStartTimeUtc(OffsetDateTime.parse("2021-09-13T13:52:05Z")) - .withEndTimeUtc(OffsetDateTime.parse("2021-06-11T01:53:29Z")) - .withLastUpdatedTimeUtc(OffsetDateTime.parse("2021-03-17T10:44:28Z")) - .withExpectedExecutionTime("cnlt") - .withSteps(Arrays.asList(new Step(), new Step())), - new Step().withName("kujsqycmm") - .withDescription("fablqg") - .withErrorMessage("bmwhrialiwr") - .withStatus("gnwplrrb") - .withStartTimeUtc(OffsetDateTime.parse("2021-09-20T03:31:15Z")) - .withEndTimeUtc(OffsetDateTime.parse("2021-08-26T04:38:01Z")) - .withLastUpdatedTimeUtc(OffsetDateTime.parse("2021-09-02T14:41:47Z")) - .withExpectedExecutionTime("bticuhqv") - .withSteps(Arrays.asList(new Step(), new Step(), new Step(), new Step())))) + .define("vwlvivjmxmlit") + .withExistingUpdate("mnuf", "hr", "hxwwuzdm") + .withRegion("lzmiyddeeq") + .withTimeStarted(OffsetDateTime.parse("2021-03-14T10:57:20Z")) + .withLastUpdatedTime(OffsetDateTime.parse("2021-02-04T12:30:05Z")) + .withDuration("scotyx") + .withState(UpdateRunPropertiesState.SUCCEEDED) + .withNamePropertiesName("efndslvrqoemwsi") + .withDescription("ailwdqmqfyd") + .withErrorMessage("tmfx") + .withStatus("d") + .withStartTimeUtc(OffsetDateTime.parse("2021-03-07T02:15:56Z")) + .withEndTimeUtc(OffsetDateTime.parse("2021-07-27T16:24:14Z")) + .withLastUpdatedTimeUtc(OffsetDateTime.parse("2021-02-27T02:04:22Z")) + .withExpectedExecutionTime("uuyiuy") + .withSteps(Arrays.asList(new Step().withName("xlxicwgp") + .withDescription("dc") + .withErrorMessage("fzcfasf") + .withStatus("ropalvngtwyuskwg") + .withStartTimeUtc(OffsetDateTime.parse("2021-05-16T23:54:13Z")) + .withEndTimeUtc(OffsetDateTime.parse("2021-05-14T22:38:31Z")) + .withLastUpdatedTimeUtc(OffsetDateTime.parse("2021-08-19T20:43:12Z")) + .withExpectedExecutionTime("rcjlvkrkegtyczup") + .withSteps(Arrays.asList(new Step())))) .create(); - Assertions.assertEquals("yyjshcybwfuppo", response.location()); - Assertions.assertEquals(OffsetDateTime.parse("2021-07-04T04:46:54Z"), response.timeStarted()); - Assertions.assertEquals(OffsetDateTime.parse("2021-06-03T21:36:28Z"), response.lastUpdatedTime()); - Assertions.assertEquals("jxdiikmoxrezsv", response.duration()); - Assertions.assertEquals(UpdateRunPropertiesState.SUCCEEDED, response.state()); - Assertions.assertEquals("ikj", response.namePropertiesName()); - Assertions.assertEquals("ywlunpipcwybs", response.description()); - Assertions.assertEquals("ncnpat", response.errorMessage()); - Assertions.assertEquals("tsaebwfwhxorpwa", response.status()); - Assertions.assertEquals(OffsetDateTime.parse("2021-06-16T08:15:31Z"), response.startTimeUtc()); - Assertions.assertEquals(OffsetDateTime.parse("2021-02-06T18:53Z"), response.endTimeUtc()); - Assertions.assertEquals(OffsetDateTime.parse("2021-06-24T13:27:14Z"), response.lastUpdatedTimeUtc()); - Assertions.assertEquals("ojfccylhtrht", response.expectedExecutionTime()); - Assertions.assertEquals("jpwexcdrz", response.steps().get(0).name()); - Assertions.assertEquals("o", response.steps().get(0).description()); - Assertions.assertEquals("zxezmnr", response.steps().get(0).errorMessage()); - Assertions.assertEquals("gpjeuxsphlokfp", response.steps().get(0).status()); - Assertions.assertEquals(OffsetDateTime.parse("2021-04-01T17:54:10Z"), response.steps().get(0).startTimeUtc()); - Assertions.assertEquals(OffsetDateTime.parse("2021-07-25T23:33:25Z"), response.steps().get(0).endTimeUtc()); - Assertions.assertEquals(OffsetDateTime.parse("2021-09-27T10:36:11Z"), + Assertions.assertEquals("hzlrynjpchamkae", response.location()); + Assertions.assertEquals(OffsetDateTime.parse("2021-04-14T07:48:17Z"), response.timeStarted()); + Assertions.assertEquals(OffsetDateTime.parse("2021-04-09T06:18:41Z"), response.lastUpdatedTime()); + Assertions.assertEquals("xvb", response.duration()); + Assertions.assertEquals(UpdateRunPropertiesState.UNKNOWN, response.state()); + Assertions.assertEquals("egbthm", response.namePropertiesName()); + Assertions.assertEquals("i", response.description()); + Assertions.assertEquals("buiggrunozf", response.errorMessage()); + Assertions.assertEquals("aljthoivsdwsn", response.status()); + Assertions.assertEquals(OffsetDateTime.parse("2021-09-16T05:29:10Z"), response.startTimeUtc()); + Assertions.assertEquals(OffsetDateTime.parse("2020-12-31T04:40:29Z"), response.endTimeUtc()); + Assertions.assertEquals(OffsetDateTime.parse("2021-09-27T12:47:25Z"), response.lastUpdatedTimeUtc()); + Assertions.assertEquals("jvakmhzbhwahfbw", response.expectedExecutionTime()); + Assertions.assertEquals("nx", response.steps().get(0).name()); + Assertions.assertEquals("vynuqqkotauratn", response.steps().get(0).description()); + Assertions.assertEquals("ppfzsclef", response.steps().get(0).errorMessage()); + Assertions.assertEquals("letnd", response.steps().get(0).status()); + Assertions.assertEquals(OffsetDateTime.parse("2021-10-18T10:14:21Z"), response.steps().get(0).startTimeUtc()); + Assertions.assertEquals(OffsetDateTime.parse("2021-11-07T05:56:17Z"), response.steps().get(0).endTimeUtc()); + Assertions.assertEquals(OffsetDateTime.parse("2021-06-04T02:17:04Z"), response.steps().get(0).lastUpdatedTimeUtc()); - Assertions.assertEquals("fbhwbdqufvc", response.steps().get(0).expectedExecutionTime()); + Assertions.assertEquals("bbuypwovvvsflee", response.steps().get(0).expectedExecutionTime()); } } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/UpdateStatePropertiesTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/UpdateStatePropertiesTests.java index d81926d4c877..87a196acbd4e 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/UpdateStatePropertiesTests.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/UpdateStatePropertiesTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.generated; @@ -12,18 +12,18 @@ public final class UpdateStatePropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { UpdateStateProperties model - = BinaryData.fromString("{\"progressPercentage\":75.61018,\"notifyMessage\":\"iwdcxsmlzzhzd\"}") + = BinaryData.fromString("{\"progressPercentage\":80.68029643976244,\"notifyMessage\":\"wrsiwdyjqurykc\"}") .toObject(UpdateStateProperties.class); - Assertions.assertEquals(75.61018F, model.progressPercentage()); - Assertions.assertEquals("iwdcxsmlzzhzd", model.notifyMessage()); + Assertions.assertEquals(80.68029643976244D, model.progressPercentage()); + Assertions.assertEquals("wrsiwdyjqurykc", model.notifyMessage()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - UpdateStateProperties model - = new UpdateStateProperties().withProgressPercentage(75.61018F).withNotifyMessage("iwdcxsmlzzhzd"); + UpdateStateProperties model = new UpdateStateProperties().withProgressPercentage(80.68029643976244D) + .withNotifyMessage("wrsiwdyjqurykc"); model = BinaryData.fromObject(model).toObject(UpdateStateProperties.class); - Assertions.assertEquals(75.61018F, model.progressPercentage()); - Assertions.assertEquals("iwdcxsmlzzhzd", model.notifyMessage()); + Assertions.assertEquals(80.68029643976244D, model.progressPercentage()); + Assertions.assertEquals("wrsiwdyjqurykc", model.notifyMessage()); } } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/UpdateSummariesListTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/UpdateSummariesListTests.java index 5139fdbb06eb..93478032dbcc 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/UpdateSummariesListTests.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/UpdateSummariesListTests.java @@ -1,251 +1,53 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.generated; import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.azurestackhci.fluent.models.UpdateSummariesInner; +import com.azure.resourcemanager.azurestackhci.implementation.models.UpdateSummariesList; import com.azure.resourcemanager.azurestackhci.models.HealthState; -import com.azure.resourcemanager.azurestackhci.models.PackageVersionInfo; -import com.azure.resourcemanager.azurestackhci.models.PrecheckResult; -import com.azure.resourcemanager.azurestackhci.models.PrecheckResultTags; import com.azure.resourcemanager.azurestackhci.models.Severity; import com.azure.resourcemanager.azurestackhci.models.Status; -import com.azure.resourcemanager.azurestackhci.models.UpdateSummariesList; import com.azure.resourcemanager.azurestackhci.models.UpdateSummariesPropertiesState; import java.time.OffsetDateTime; -import java.util.Arrays; import org.junit.jupiter.api.Assertions; public final class UpdateSummariesListTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { UpdateSummariesList model = BinaryData.fromString( - "{\"value\":[{\"location\":\"fclduccbirdsv\",\"properties\":{\"provisioningState\":\"Creating\",\"oemFamily\":\"iegstm\",\"currentOemVersion\":\"nwjizcilnghgshej\",\"hardwareModel\":\"bxqmu\",\"packageVersions\":[{\"packageType\":\"xqzv\",\"version\":\"rsbycucrwn\",\"lastUpdated\":\"2021-01-22T04:44:02Z\"},{\"packageType\":\"ze\",\"version\":\"qbsms\",\"lastUpdated\":\"2021-07-12T06:31:29Z\"}],\"currentVersion\":\"gfuhokzrusw\",\"currentSbeVersion\":\"hczznvf\",\"lastUpdated\":\"2021-10-03T09:25:48Z\",\"lastChecked\":\"2021-12-08T17:30:41Z\",\"healthState\":\"Warning\",\"healthCheckResult\":[{\"name\":\"xzv\",\"displayName\":\"wmxqhndvnoamlds\",\"tags\":{},\"healthCheckTags\":\"dataohdjhhflzok\",\"title\":\"ox\",\"status\":\"ValidationSuccess\",\"severity\":\"Hidden\",\"description\":\"tag\",\"remediation\":\"sxoa\",\"targetResourceID\":\"tgzpnpb\",\"targetResourceName\":\"vefloccsrmozihmi\",\"targetResourceType\":\"awtxxpk\",\"timestamp\":\"2021-06-09T22:40:53Z\",\"additionalData\":\"cjxgrytf\",\"healthCheckSource\":\"cy\"}],\"healthCheckDate\":\"2021-02-23T15:17:22Z\",\"state\":\"UpdateAvailable\"},\"id\":\"aykggnoxu\",\"name\":\"t\",\"type\":\"ksxwpnd\"},{\"location\":\"pfnznthjtwkj\",\"properties\":{\"provisioningState\":\"Canceled\",\"oemFamily\":\"uzvoamktcqiosm\",\"currentOemVersion\":\"zah\",\"hardwareModel\":\"qdlyrtl\",\"packageVersions\":[{\"packageType\":\"rltzkatbhjmz\",\"version\":\"bsoqeqala\",\"lastUpdated\":\"2021-09-27T21:31:23Z\"}],\"currentVersion\":\"gunbtgfebwlnbm\",\"currentSbeVersion\":\"reeudzqavb\",\"lastUpdated\":\"2021-04-18T03:24:53Z\",\"lastChecked\":\"2021-05-03T15:28:46Z\",\"healthState\":\"Success\",\"healthCheckResult\":[{\"name\":\"glgou\",\"displayName\":\"lmjjyuo\",\"tags\":{},\"healthCheckTags\":\"dataobaxkjeytu\",\"title\":\"bfjkw\",\"status\":\"NotConnectedRecently\",\"severity\":\"Critical\",\"description\":\"bhsy\",\"remediation\":\"unjqh\",\"targetResourceID\":\"nxaulk\",\"targetResourceName\":\"kdk\",\"targetResourceType\":\"mjnnawtq\",\"timestamp\":\"2021-03-05T00:10:25Z\",\"additionalData\":\"uckpggqoweyir\",\"healthCheckSource\":\"lisn\"},{\"name\":\"fl\",\"displayName\":\"mpizru\",\"tags\":{},\"healthCheckTags\":\"dataqxpxiwfcngjsaa\",\"title\":\"ixtmkzjvkviirhgf\",\"status\":\"ValidationSuccess\",\"severity\":\"Warning\",\"description\":\"gratzvzbglbyvict\",\"remediation\":\"brxkjzwr\",\"targetResourceID\":\"ffm\",\"targetResourceName\":\"kwfbkgo\",\"targetResourceType\":\"wopdbydpiz\",\"timestamp\":\"2021-11-06T08:13:32Z\",\"additionalData\":\"napxbiygnug\",\"healthCheckSource\":\"nfsm\"}],\"healthCheckDate\":\"2020-12-29T23:37:42Z\",\"state\":\"UpdateFailed\"},\"id\":\"uuyilfl\",\"name\":\"oiquvrehmrnjhvs\",\"type\":\"jztczytqj\"},{\"location\":\"h\",\"properties\":{\"provisioningState\":\"Creating\",\"oemFamily\":\"prnjletlxsmr\",\"currentOemVersion\":\"do\",\"hardwareModel\":\"fa\",\"packageVersions\":[{\"packageType\":\"z\",\"version\":\"nknlqwzdvpi\",\"lastUpdated\":\"2021-05-20T09:01:05Z\"},{\"packageType\":\"szdtmaajquh\",\"version\":\"ylr\",\"lastUpdated\":\"2021-05-27T06:37:19Z\"}],\"currentVersion\":\"ygjbmzyospspsh\",\"currentSbeVersion\":\"fkyjpmspbpssdfpp\",\"lastUpdated\":\"2021-03-29T12:30:22Z\",\"lastChecked\":\"2021-07-23T05:28:51Z\",\"healthState\":\"Error\",\"healthCheckResult\":[{\"name\":\"vczkcnyxrxmunjd\",\"displayName\":\"glnkvxlxpagl\",\"tags\":{},\"healthCheckTags\":\"databgkc\",\"title\":\"hpzvuqdflvoniyp\",\"status\":\"NotYetRegistered\",\"severity\":\"Informational\",\"description\":\"zgp\",\"remediation\":\"ivhjknidi\",\"targetResourceID\":\"qjxgpnrhgovfgp\",\"targetResourceName\":\"qmhhaowj\",\"targetResourceType\":\"zvuporqzdfuydz\",\"timestamp\":\"2021-03-31T13:08:16Z\",\"additionalData\":\"xcnqmxqpswokmvkh\",\"healthCheckSource\":\"gdhbe\"},{\"name\":\"qkzszuwiwtglxxh\",\"displayName\":\"fpgpicrmnzhrgm\",\"tags\":{},\"healthCheckTags\":\"datasxvpqcbfrmbodths\",\"title\":\"gvriibakclac\",\"status\":\"DeploymentInProgress\",\"severity\":\"Informational\",\"description\":\"usx\",\"remediation\":\"zlwvsgmwohqfz\",\"targetResourceID\":\"vux\",\"targetResourceName\":\"kjsvthnwpzteko\",\"targetResourceType\":\"ribi\",\"timestamp\":\"2021-06-09T12:18:35Z\",\"additionalData\":\"plucfotangcfhnyk\",\"healthCheckSource\":\"ugswvx\"},{\"name\":\"mzqwmvtxnjmxmcu\",\"displayName\":\"dtcvcl\",\"tags\":{},\"healthCheckTags\":\"datapdkvg\",\"title\":\"buiyji\",\"status\":\"NotSpecified\",\"severity\":\"Informational\",\"description\":\"ugneikn\",\"remediation\":\"oxgjiuqhibt\",\"targetResourceID\":\"ipq\",\"targetResourceName\":\"edmurrxxge\",\"targetResourceType\":\"ktvqylkmqpzoy\",\"timestamp\":\"2021-06-19T06:46:21Z\",\"additionalData\":\"cgwgcloxoebqinji\",\"healthCheckSource\":\"wjfuj\"},{\"name\":\"afcba\",\"displayName\":\"pzpofoiyjw\",\"tags\":{},\"healthCheckTags\":\"datalkmkkholvdndvi\",\"title\":\"ogphuartvtiu\",\"status\":\"DeploymentFailed\",\"severity\":\"Warning\",\"description\":\"nmnahmnx\",\"remediation\":\"xjqirwrweoox\",\"targetResourceID\":\"i\",\"targetResourceName\":\"xwrsnew\",\"targetResourceType\":\"zqvbubqm\",\"timestamp\":\"2021-05-14T02:53:04Z\",\"additionalData\":\"ycxhxzgaztta\",\"healthCheckSource\":\"idvmfqhppubo\"}],\"healthCheckDate\":\"2021-04-23T03:49:20Z\",\"state\":\"UpdateInProgress\"},\"id\":\"g\",\"name\":\"mtdherngb\",\"type\":\"c\"}],\"nextLink\":\"ahokqtobkauxofsh\"}") + "{\"value\":[{\"properties\":{\"provisioningState\":\"DisableInProgress\",\"oemFamily\":\"fqfp\",\"currentOemVersion\":\"stcl\",\"hardwareModel\":\"rvwerfwxbsmtb\",\"packageVersions\":[{\"packageType\":\"h\",\"version\":\"ifkwdvbtbrekqhs\",\"lastUpdated\":\"2021-01-23T12:26:17Z\"},{\"packageType\":\"pwpq\",\"version\":\"ejuwyqwdqigmghgi\",\"lastUpdated\":\"2021-06-09T23:38:01Z\"}],\"currentVersion\":\"lujkhn\",\"currentSbeVersion\":\"mrnkfmkhcqtwml\",\"lastUpdated\":\"2021-09-23T04:33:55Z\",\"lastChecked\":\"2021-11-02T13:23:29Z\",\"healthState\":\"Success\",\"healthCheckResult\":[{\"name\":\"j\",\"displayName\":\"vragpokddx\",\"tags\":{},\"healthCheckTags\":\"datah\",\"title\":\"guavtptb\",\"status\":\"ValidationFailed\",\"severity\":\"Informational\",\"description\":\"n\",\"remediation\":\"gbvoffbkk\",\"targetResourceID\":\"dxaexqokmyrljia\",\"targetResourceName\":\"bn\",\"targetResourceType\":\"rqlpbcjtrpz\",\"timestamp\":\"2021-10-26T19:14:32Z\",\"additionalData\":\"ivb\",\"healthCheckSource\":\"hsqe\"},{\"name\":\"on\",\"displayName\":\"lwgdhuruz\",\"tags\":{},\"healthCheckTags\":\"dataarogatmolji\",\"title\":\"mpinmzvfkneerzzt\",\"status\":\"ValidationInProgress\",\"severity\":\"Critical\",\"description\":\"lugdybnhrxlelf\",\"remediation\":\"k\",\"targetResourceID\":\"z\",\"targetResourceName\":\"ihtd\",\"targetResourceType\":\"wjekptycaydbj\",\"timestamp\":\"2021-04-09T04:24:12Z\",\"additionalData\":\"mlcfnzhmhsurl\",\"healthCheckSource\":\"qkpmmzpstau\"},{\"name\":\"awi\",\"displayName\":\"momsgvvj\",\"tags\":{},\"healthCheckTags\":\"datalrlohewjjmajnkdf\",\"title\":\"ionsw\",\"status\":\"ValidationFailed\",\"severity\":\"Critical\",\"description\":\"zqxjosho\",\"remediation\":\"otryegp\",\"targetResourceID\":\"xrmexznlw\",\"targetResourceName\":\"fokxk\",\"targetResourceType\":\"p\",\"timestamp\":\"2021-06-01T05:06:28Z\",\"additionalData\":\"fgjblcd\",\"healthCheckSource\":\"yfcemftz\"}],\"healthCheckDate\":\"2021-07-18T21:30:58Z\",\"state\":\"Unknown\"},\"location\":\"lugekdfqnhtt\",\"id\":\"owrczfjjnnuxxr\",\"name\":\"kmhmnulwempdc\",\"type\":\"frhjulrsulwzp\"}],\"nextLink\":\"usnaw\"}") .toObject(UpdateSummariesList.class); - Assertions.assertEquals("fclduccbirdsv", model.value().get(0).location()); - Assertions.assertEquals("iegstm", model.value().get(0).oemFamily()); - Assertions.assertEquals("nwjizcilnghgshej", model.value().get(0).currentOemVersion()); - Assertions.assertEquals("bxqmu", model.value().get(0).hardwareModel()); - Assertions.assertEquals("xqzv", model.value().get(0).packageVersions().get(0).packageType()); - Assertions.assertEquals("rsbycucrwn", model.value().get(0).packageVersions().get(0).version()); - Assertions.assertEquals(OffsetDateTime.parse("2021-01-22T04:44:02Z"), + Assertions.assertEquals("lugekdfqnhtt", model.value().get(0).location()); + Assertions.assertEquals("fqfp", model.value().get(0).oemFamily()); + Assertions.assertEquals("stcl", model.value().get(0).currentOemVersion()); + Assertions.assertEquals("rvwerfwxbsmtb", model.value().get(0).hardwareModel()); + Assertions.assertEquals("h", model.value().get(0).packageVersions().get(0).packageType()); + Assertions.assertEquals("ifkwdvbtbrekqhs", model.value().get(0).packageVersions().get(0).version()); + Assertions.assertEquals(OffsetDateTime.parse("2021-01-23T12:26:17Z"), model.value().get(0).packageVersions().get(0).lastUpdated()); - Assertions.assertEquals("gfuhokzrusw", model.value().get(0).currentVersion()); - Assertions.assertEquals("hczznvf", model.value().get(0).currentSbeVersion()); - Assertions.assertEquals(OffsetDateTime.parse("2021-10-03T09:25:48Z"), model.value().get(0).lastUpdated()); - Assertions.assertEquals(OffsetDateTime.parse("2021-12-08T17:30:41Z"), model.value().get(0).lastChecked()); - Assertions.assertEquals(HealthState.WARNING, model.value().get(0).healthState()); - Assertions.assertEquals("xzv", model.value().get(0).healthCheckResult().get(0).name()); - Assertions.assertEquals("wmxqhndvnoamlds", model.value().get(0).healthCheckResult().get(0).displayName()); - Assertions.assertEquals("ox", model.value().get(0).healthCheckResult().get(0).title()); - Assertions.assertEquals(Status.VALIDATION_SUCCESS, model.value().get(0).healthCheckResult().get(0).status()); - Assertions.assertEquals(Severity.HIDDEN, model.value().get(0).healthCheckResult().get(0).severity()); - Assertions.assertEquals("tag", model.value().get(0).healthCheckResult().get(0).description()); - Assertions.assertEquals("sxoa", model.value().get(0).healthCheckResult().get(0).remediation()); - Assertions.assertEquals("tgzpnpb", model.value().get(0).healthCheckResult().get(0).targetResourceId()); - Assertions.assertEquals("vefloccsrmozihmi", - model.value().get(0).healthCheckResult().get(0).targetResourceName()); - Assertions.assertEquals("awtxxpk", model.value().get(0).healthCheckResult().get(0).targetResourceType()); - Assertions.assertEquals(OffsetDateTime.parse("2021-06-09T22:40:53Z"), + Assertions.assertEquals("lujkhn", model.value().get(0).currentVersion()); + Assertions.assertEquals("mrnkfmkhcqtwml", model.value().get(0).currentSbeVersion()); + Assertions.assertEquals(OffsetDateTime.parse("2021-09-23T04:33:55Z"), model.value().get(0).lastUpdated()); + Assertions.assertEquals(OffsetDateTime.parse("2021-11-02T13:23:29Z"), model.value().get(0).lastChecked()); + Assertions.assertEquals(HealthState.SUCCESS, model.value().get(0).healthState()); + Assertions.assertEquals("j", model.value().get(0).healthCheckResult().get(0).name()); + Assertions.assertEquals("vragpokddx", model.value().get(0).healthCheckResult().get(0).displayName()); + Assertions.assertEquals("guavtptb", model.value().get(0).healthCheckResult().get(0).title()); + Assertions.assertEquals(Status.VALIDATION_FAILED, model.value().get(0).healthCheckResult().get(0).status()); + Assertions.assertEquals(Severity.INFORMATIONAL, model.value().get(0).healthCheckResult().get(0).severity()); + Assertions.assertEquals("n", model.value().get(0).healthCheckResult().get(0).description()); + Assertions.assertEquals("gbvoffbkk", model.value().get(0).healthCheckResult().get(0).remediation()); + Assertions.assertEquals("dxaexqokmyrljia", model.value().get(0).healthCheckResult().get(0).targetResourceId()); + Assertions.assertEquals("bn", model.value().get(0).healthCheckResult().get(0).targetResourceName()); + Assertions.assertEquals("rqlpbcjtrpz", model.value().get(0).healthCheckResult().get(0).targetResourceType()); + Assertions.assertEquals(OffsetDateTime.parse("2021-10-26T19:14:32Z"), model.value().get(0).healthCheckResult().get(0).timestamp()); - Assertions.assertEquals("cjxgrytf", model.value().get(0).healthCheckResult().get(0).additionalData()); - Assertions.assertEquals("cy", model.value().get(0).healthCheckResult().get(0).healthCheckSource()); - Assertions.assertEquals(OffsetDateTime.parse("2021-02-23T15:17:22Z"), model.value().get(0).healthCheckDate()); - Assertions.assertEquals(UpdateSummariesPropertiesState.UPDATE_AVAILABLE, model.value().get(0).state()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - UpdateSummariesList model = new UpdateSummariesList().withValue(Arrays.asList( - new UpdateSummariesInner().withLocation("fclduccbirdsv") - .withOemFamily("iegstm") - .withCurrentOemVersion("nwjizcilnghgshej") - .withHardwareModel("bxqmu") - .withPackageVersions(Arrays.asList( - new PackageVersionInfo().withPackageType("xqzv") - .withVersion("rsbycucrwn") - .withLastUpdated(OffsetDateTime.parse("2021-01-22T04:44:02Z")), - new PackageVersionInfo().withPackageType("ze") - .withVersion("qbsms") - .withLastUpdated(OffsetDateTime.parse("2021-07-12T06:31:29Z")))) - .withCurrentVersion("gfuhokzrusw") - .withCurrentSbeVersion("hczznvf") - .withLastUpdated(OffsetDateTime.parse("2021-10-03T09:25:48Z")) - .withLastChecked(OffsetDateTime.parse("2021-12-08T17:30:41Z")) - .withHealthState(HealthState.WARNING) - .withHealthCheckResult(Arrays.asList(new PrecheckResult().withName("xzv") - .withDisplayName("wmxqhndvnoamlds") - .withTags(new PrecheckResultTags()) - .withHealthCheckTags("dataohdjhhflzok") - .withTitle("ox") - .withStatus(Status.VALIDATION_SUCCESS) - .withSeverity(Severity.HIDDEN) - .withDescription("tag") - .withRemediation("sxoa") - .withTargetResourceId("tgzpnpb") - .withTargetResourceName("vefloccsrmozihmi") - .withTargetResourceType("awtxxpk") - .withTimestamp(OffsetDateTime.parse("2021-06-09T22:40:53Z")) - .withAdditionalData("cjxgrytf") - .withHealthCheckSource("cy"))) - .withHealthCheckDate(OffsetDateTime.parse("2021-02-23T15:17:22Z")) - .withState(UpdateSummariesPropertiesState.UPDATE_AVAILABLE), - new UpdateSummariesInner().withLocation("pfnznthjtwkj") - .withOemFamily("uzvoamktcqiosm") - .withCurrentOemVersion("zah") - .withHardwareModel("qdlyrtl") - .withPackageVersions(Arrays.asList(new PackageVersionInfo().withPackageType("rltzkatbhjmz") - .withVersion("bsoqeqala") - .withLastUpdated(OffsetDateTime.parse("2021-09-27T21:31:23Z")))) - .withCurrentVersion("gunbtgfebwlnbm") - .withCurrentSbeVersion("reeudzqavb") - .withLastUpdated(OffsetDateTime.parse("2021-04-18T03:24:53Z")) - .withLastChecked(OffsetDateTime.parse("2021-05-03T15:28:46Z")) - .withHealthState(HealthState.SUCCESS) - .withHealthCheckResult(Arrays.asList( - new PrecheckResult().withName("glgou") - .withDisplayName("lmjjyuo") - .withTags(new PrecheckResultTags()) - .withHealthCheckTags("dataobaxkjeytu") - .withTitle("bfjkw") - .withStatus(Status.NOT_CONNECTED_RECENTLY) - .withSeverity(Severity.CRITICAL) - .withDescription("bhsy") - .withRemediation("unjqh") - .withTargetResourceId("nxaulk") - .withTargetResourceName("kdk") - .withTargetResourceType("mjnnawtq") - .withTimestamp(OffsetDateTime.parse("2021-03-05T00:10:25Z")) - .withAdditionalData("uckpggqoweyir") - .withHealthCheckSource("lisn"), - new PrecheckResult().withName("fl") - .withDisplayName("mpizru") - .withTags(new PrecheckResultTags()) - .withHealthCheckTags("dataqxpxiwfcngjsaa") - .withTitle("ixtmkzjvkviirhgf") - .withStatus(Status.VALIDATION_SUCCESS) - .withSeverity(Severity.WARNING) - .withDescription("gratzvzbglbyvict") - .withRemediation("brxkjzwr") - .withTargetResourceId("ffm") - .withTargetResourceName("kwfbkgo") - .withTargetResourceType("wopdbydpiz") - .withTimestamp(OffsetDateTime.parse("2021-11-06T08:13:32Z")) - .withAdditionalData("napxbiygnug") - .withHealthCheckSource("nfsm"))) - .withHealthCheckDate(OffsetDateTime.parse("2020-12-29T23:37:42Z")) - .withState(UpdateSummariesPropertiesState.UPDATE_FAILED), - new UpdateSummariesInner().withLocation("h") - .withOemFamily("prnjletlxsmr") - .withCurrentOemVersion("do") - .withHardwareModel("fa") - .withPackageVersions(Arrays.asList( - new PackageVersionInfo().withPackageType("z") - .withVersion("nknlqwzdvpi") - .withLastUpdated(OffsetDateTime.parse("2021-05-20T09:01:05Z")), - new PackageVersionInfo().withPackageType("szdtmaajquh") - .withVersion("ylr") - .withLastUpdated(OffsetDateTime.parse("2021-05-27T06:37:19Z")))) - .withCurrentVersion("ygjbmzyospspsh") - .withCurrentSbeVersion("fkyjpmspbpssdfpp") - .withLastUpdated(OffsetDateTime.parse("2021-03-29T12:30:22Z")) - .withLastChecked(OffsetDateTime.parse("2021-07-23T05:28:51Z")) - .withHealthState(HealthState.ERROR) - .withHealthCheckResult(Arrays.asList( - new PrecheckResult().withName("vczkcnyxrxmunjd") - .withDisplayName("glnkvxlxpagl") - .withTags(new PrecheckResultTags()) - .withHealthCheckTags("databgkc") - .withTitle("hpzvuqdflvoniyp") - .withStatus(Status.NOT_YET_REGISTERED) - .withSeverity(Severity.INFORMATIONAL) - .withDescription("zgp") - .withRemediation("ivhjknidi") - .withTargetResourceId("qjxgpnrhgovfgp") - .withTargetResourceName("qmhhaowj") - .withTargetResourceType("zvuporqzdfuydz") - .withTimestamp(OffsetDateTime.parse("2021-03-31T13:08:16Z")) - .withAdditionalData("xcnqmxqpswokmvkh") - .withHealthCheckSource("gdhbe"), - new PrecheckResult().withName("qkzszuwiwtglxxh") - .withDisplayName("fpgpicrmnzhrgm") - .withTags(new PrecheckResultTags()) - .withHealthCheckTags("datasxvpqcbfrmbodths") - .withTitle("gvriibakclac") - .withStatus(Status.DEPLOYMENT_IN_PROGRESS) - .withSeverity(Severity.INFORMATIONAL) - .withDescription("usx") - .withRemediation("zlwvsgmwohqfz") - .withTargetResourceId("vux") - .withTargetResourceName("kjsvthnwpzteko") - .withTargetResourceType("ribi") - .withTimestamp(OffsetDateTime.parse("2021-06-09T12:18:35Z")) - .withAdditionalData("plucfotangcfhnyk") - .withHealthCheckSource("ugswvx"), - new PrecheckResult().withName("mzqwmvtxnjmxmcu") - .withDisplayName("dtcvcl") - .withTags(new PrecheckResultTags()) - .withHealthCheckTags("datapdkvg") - .withTitle("buiyji") - .withStatus(Status.NOT_SPECIFIED) - .withSeverity(Severity.INFORMATIONAL) - .withDescription("ugneikn") - .withRemediation("oxgjiuqhibt") - .withTargetResourceId("ipq") - .withTargetResourceName("edmurrxxge") - .withTargetResourceType("ktvqylkmqpzoy") - .withTimestamp(OffsetDateTime.parse("2021-06-19T06:46:21Z")) - .withAdditionalData("cgwgcloxoebqinji") - .withHealthCheckSource("wjfuj"), - new PrecheckResult().withName("afcba") - .withDisplayName("pzpofoiyjw") - .withTags(new PrecheckResultTags()) - .withHealthCheckTags("datalkmkkholvdndvi") - .withTitle("ogphuartvtiu") - .withStatus(Status.DEPLOYMENT_FAILED) - .withSeverity(Severity.WARNING) - .withDescription("nmnahmnx") - .withRemediation("xjqirwrweoox") - .withTargetResourceId("i") - .withTargetResourceName("xwrsnew") - .withTargetResourceType("zqvbubqm") - .withTimestamp(OffsetDateTime.parse("2021-05-14T02:53:04Z")) - .withAdditionalData("ycxhxzgaztta") - .withHealthCheckSource("idvmfqhppubo"))) - .withHealthCheckDate(OffsetDateTime.parse("2021-04-23T03:49:20Z")) - .withState(UpdateSummariesPropertiesState.UPDATE_IN_PROGRESS))); - model = BinaryData.fromObject(model).toObject(UpdateSummariesList.class); - Assertions.assertEquals("fclduccbirdsv", model.value().get(0).location()); - Assertions.assertEquals("iegstm", model.value().get(0).oemFamily()); - Assertions.assertEquals("nwjizcilnghgshej", model.value().get(0).currentOemVersion()); - Assertions.assertEquals("bxqmu", model.value().get(0).hardwareModel()); - Assertions.assertEquals("xqzv", model.value().get(0).packageVersions().get(0).packageType()); - Assertions.assertEquals("rsbycucrwn", model.value().get(0).packageVersions().get(0).version()); - Assertions.assertEquals(OffsetDateTime.parse("2021-01-22T04:44:02Z"), - model.value().get(0).packageVersions().get(0).lastUpdated()); - Assertions.assertEquals("gfuhokzrusw", model.value().get(0).currentVersion()); - Assertions.assertEquals("hczznvf", model.value().get(0).currentSbeVersion()); - Assertions.assertEquals(OffsetDateTime.parse("2021-10-03T09:25:48Z"), model.value().get(0).lastUpdated()); - Assertions.assertEquals(OffsetDateTime.parse("2021-12-08T17:30:41Z"), model.value().get(0).lastChecked()); - Assertions.assertEquals(HealthState.WARNING, model.value().get(0).healthState()); - Assertions.assertEquals("xzv", model.value().get(0).healthCheckResult().get(0).name()); - Assertions.assertEquals("wmxqhndvnoamlds", model.value().get(0).healthCheckResult().get(0).displayName()); - Assertions.assertEquals("ox", model.value().get(0).healthCheckResult().get(0).title()); - Assertions.assertEquals(Status.VALIDATION_SUCCESS, model.value().get(0).healthCheckResult().get(0).status()); - Assertions.assertEquals(Severity.HIDDEN, model.value().get(0).healthCheckResult().get(0).severity()); - Assertions.assertEquals("tag", model.value().get(0).healthCheckResult().get(0).description()); - Assertions.assertEquals("sxoa", model.value().get(0).healthCheckResult().get(0).remediation()); - Assertions.assertEquals("tgzpnpb", model.value().get(0).healthCheckResult().get(0).targetResourceId()); - Assertions.assertEquals("vefloccsrmozihmi", - model.value().get(0).healthCheckResult().get(0).targetResourceName()); - Assertions.assertEquals("awtxxpk", model.value().get(0).healthCheckResult().get(0).targetResourceType()); - Assertions.assertEquals(OffsetDateTime.parse("2021-06-09T22:40:53Z"), - model.value().get(0).healthCheckResult().get(0).timestamp()); - Assertions.assertEquals("cjxgrytf", model.value().get(0).healthCheckResult().get(0).additionalData()); - Assertions.assertEquals("cy", model.value().get(0).healthCheckResult().get(0).healthCheckSource()); - Assertions.assertEquals(OffsetDateTime.parse("2021-02-23T15:17:22Z"), model.value().get(0).healthCheckDate()); - Assertions.assertEquals(UpdateSummariesPropertiesState.UPDATE_AVAILABLE, model.value().get(0).state()); + Assertions.assertEquals("ivb", model.value().get(0).healthCheckResult().get(0).additionalData()); + Assertions.assertEquals("hsqe", model.value().get(0).healthCheckResult().get(0).healthCheckSource()); + Assertions.assertEquals(OffsetDateTime.parse("2021-07-18T21:30:58Z"), model.value().get(0).healthCheckDate()); + Assertions.assertEquals(UpdateSummariesPropertiesState.UNKNOWN, model.value().get(0).state()); + Assertions.assertEquals("usnaw", model.nextLink()); } } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/UpdateSummariesOperationsDeleteMockTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/UpdateSummariesOperationsDeleteMockTests.java index c1db70fd00e9..6a5e0603e8eb 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/UpdateSummariesOperationsDeleteMockTests.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/UpdateSummariesOperationsDeleteMockTests.java @@ -1,13 +1,13 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.generated; import com.azure.core.credential.AccessToken; import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.azurestackhci.AzureStackHciManager; import java.nio.charset.StandardCharsets; @@ -25,9 +25,9 @@ public void testDelete() throws Exception { AzureStackHciManager manager = AzureStackHciManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - manager.updateSummariesOperations().delete("fqayopbtsix", "gvbhxmndztgs", com.azure.core.util.Context.NONE); + manager.updateSummariesOperations().delete("qcrbkompnbnfgywe", "jbepgcmah", com.azure.core.util.Context.NONE); } } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/UpdatesDeleteMockTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/UpdatesDeleteMockTests.java index c25934aea021..6d61c486d74d 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/UpdatesDeleteMockTests.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/UpdatesDeleteMockTests.java @@ -1,13 +1,13 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.generated; import com.azure.core.credential.AccessToken; import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.azurestackhci.AzureStackHciManager; import java.nio.charset.StandardCharsets; @@ -25,9 +25,9 @@ public void testDelete() throws Exception { AzureStackHciManager manager = AzureStackHciManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - manager.updates().delete("pnml", "iqcpszpmcvq", "vrdmvxyrxdh", com.azure.core.util.Context.NONE); + manager.updates().delete("hgyqvpbfj", "oqzucfzluczdq", "urbormvh", com.azure.core.util.Context.NONE); } } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/UpdatesPostMockTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/UpdatesPostMockTests.java index 84baa31431e0..e39566e2d081 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/UpdatesPostMockTests.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/UpdatesPostMockTests.java @@ -1,13 +1,13 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.generated; import com.azure.core.credential.AccessToken; import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.azurestackhci.AzureStackHciManager; import java.nio.charset.StandardCharsets; @@ -25,9 +25,9 @@ public void testPost() throws Exception { AzureStackHciManager manager = AzureStackHciManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - manager.updates().post("cybdueurgm", "dcpks", "lojermhzicsbfd", com.azure.core.util.Context.NONE); + manager.updates().post("osj", "fdizhrjq", "yayt", com.azure.core.util.Context.NONE); } } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/UploadCertificateRequestTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/UploadCertificateRequestTests.java index d4f38f430a4b..b3b2f29d6213 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/UploadCertificateRequestTests.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/UploadCertificateRequestTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.generated; @@ -14,16 +14,16 @@ public final class UploadCertificateRequestTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { UploadCertificateRequest model - = BinaryData.fromString("{\"properties\":{\"certificates\":[\"isgwbnbbeldawkz\",\"ali\"]}}") + = BinaryData.fromString("{\"properties\":{\"certificates\":[\"flhhcaal\",\"jixisxyawjoyaqcs\"]}}") .toObject(UploadCertificateRequest.class); - Assertions.assertEquals("isgwbnbbeldawkz", model.properties().certificates().get(0)); + Assertions.assertEquals("flhhcaal", model.properties().certificates().get(0)); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { UploadCertificateRequest model = new UploadCertificateRequest() - .withProperties(new RawCertificateData().withCertificates(Arrays.asList("isgwbnbbeldawkz", "ali"))); + .withProperties(new RawCertificateData().withCertificates(Arrays.asList("flhhcaal", "jixisxyawjoyaqcs"))); model = BinaryData.fromObject(model).toObject(UploadCertificateRequest.class); - Assertions.assertEquals("isgwbnbbeldawkz", model.properties().certificates().get(0)); + Assertions.assertEquals("flhhcaal", model.properties().certificates().get(0)); } } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/UserAssignedIdentityTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/UserAssignedIdentityTests.java index ccb621a272af..90d8130588ab 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/UserAssignedIdentityTests.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/UserAssignedIdentityTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.generated; @@ -10,8 +10,7 @@ public final class UserAssignedIdentityTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - UserAssignedIdentity model = BinaryData.fromString( - "{\"principalId\":\"7072640a-2e6c-4cbc-8a6f-cd0382bd7ee1\",\"clientId\":\"9ba6fe17-b9ab-4adb-8d77-54bf995c2ddc\"}") + UserAssignedIdentity model = BinaryData.fromString("{\"principalId\":\"ahvljuaha\",\"clientId\":\"hcdhmdual\"}") .toObject(UserAssignedIdentity.class); } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ValidateRequestTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ValidateRequestTests.java index fd99c0c9a301..ddc8378a9f71 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ValidateRequestTests.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ValidateRequestTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.generated; @@ -12,20 +12,21 @@ public final class ValidateRequestTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - ValidateRequest model = BinaryData.fromString( - "{\"edgeDeviceIds\":[\"xtqmieoxor\",\"gufhyaomtbg\",\"havgrvk\"],\"additionalInfo\":\"ovjzhpjbibgjmfx\"}") + ValidateRequest model = BinaryData + .fromString( + "{\"edgeDeviceIds\":[\"hbrnnhjx\",\"qwjhqkbiwetpozyc\",\"qiqyhgfsetzlexbs\"],\"additionalInfo\":\"e\"}") .toObject(ValidateRequest.class); - Assertions.assertEquals("xtqmieoxor", model.edgeDeviceIds().get(0)); - Assertions.assertEquals("ovjzhpjbibgjmfx", model.additionalInfo()); + Assertions.assertEquals("hbrnnhjx", model.edgeDeviceIds().get(0)); + Assertions.assertEquals("e", model.additionalInfo()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { ValidateRequest model - = new ValidateRequest().withEdgeDeviceIds(Arrays.asList("xtqmieoxor", "gufhyaomtbg", "havgrvk")) - .withAdditionalInfo("ovjzhpjbibgjmfx"); + = new ValidateRequest().withEdgeDeviceIds(Arrays.asList("hbrnnhjx", "qwjhqkbiwetpozyc", "qiqyhgfsetzlexbs")) + .withAdditionalInfo("e"); model = BinaryData.fromObject(model).toObject(ValidateRequest.class); - Assertions.assertEquals("xtqmieoxor", model.edgeDeviceIds().get(0)); - Assertions.assertEquals("ovjzhpjbibgjmfx", model.additionalInfo()); + Assertions.assertEquals("hbrnnhjx", model.edgeDeviceIds().get(0)); + Assertions.assertEquals("e", model.additionalInfo()); } } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ValidateResponseInnerTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ValidateResponseInnerTests.java index 126424668c59..fef1cbf61489 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ValidateResponseInnerTests.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ValidateResponseInnerTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.generated; @@ -11,12 +11,6 @@ public final class ValidateResponseInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ValidateResponseInner model - = BinaryData.fromString("{\"status\":\"vfcluyovwxnbkfe\"}").toObject(ValidateResponseInner.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ValidateResponseInner model = new ValidateResponseInner(); - model = BinaryData.fromObject(model).toObject(ValidateResponseInner.class); + = BinaryData.fromString("{\"status\":\"no\"}").toObject(ValidateResponseInner.class); } } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ValidatedSolutionRecipeCapabilitiesTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ValidatedSolutionRecipeCapabilitiesTests.java new file mode 100644 index 000000000000..811f1b896dd7 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ValidatedSolutionRecipeCapabilitiesTests.java @@ -0,0 +1,20 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.azurestackhci.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.azurestackhci.models.ValidatedSolutionRecipeCapabilities; +import org.junit.jupiter.api.Assertions; + +public final class ValidatedSolutionRecipeCapabilitiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ValidatedSolutionRecipeCapabilities model = BinaryData.fromString( + "{\"clusterCapabilities\":[{\"capabilityName\":\"ldiuhzzgqlm\"},{\"capabilityName\":\"aewzgiudjp\"},{\"capabilityName\":\"pqht\"}],\"nodeCapabilities\":[{\"capabilityName\":\"hnmhkrezsdsux\"},{\"capabilityName\":\"eqdgcruxsp\"}]}") + .toObject(ValidatedSolutionRecipeCapabilities.class); + Assertions.assertEquals("ldiuhzzgqlm", model.clusterCapabilities().get(0).capabilityName()); + Assertions.assertEquals("hnmhkrezsdsux", model.nodeCapabilities().get(0).capabilityName()); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ValidatedSolutionRecipeCapabilityTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ValidatedSolutionRecipeCapabilityTests.java new file mode 100644 index 000000000000..64f41863b349 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ValidatedSolutionRecipeCapabilityTests.java @@ -0,0 +1,18 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.azurestackhci.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.azurestackhci.models.ValidatedSolutionRecipeCapability; +import org.junit.jupiter.api.Assertions; + +public final class ValidatedSolutionRecipeCapabilityTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ValidatedSolutionRecipeCapability model = BinaryData.fromString("{\"capabilityName\":\"nymmqgwokmikpa\"}") + .toObject(ValidatedSolutionRecipeCapability.class); + Assertions.assertEquals("nymmqgwokmikpa", model.capabilityName()); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ValidatedSolutionRecipeComponentMetadataTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ValidatedSolutionRecipeComponentMetadataTests.java new file mode 100644 index 000000000000..fb145f2a215b --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ValidatedSolutionRecipeComponentMetadataTests.java @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.azurestackhci.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.azurestackhci.models.ValidatedSolutionRecipeComponentMetadata; +import org.junit.jupiter.api.Assertions; + +public final class ValidatedSolutionRecipeComponentMetadataTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ValidatedSolutionRecipeComponentMetadata model = BinaryData.fromString( + "{\"extensionType\":\"z\",\"publisher\":\"eqrztrxalxrdh\",\"enableAutomaticUpgrade\":true,\"lcmUpdate\":false,\"catalog\":\"sn\",\"ring\":\"pqatiwkkvyanxkv\",\"releaseTrain\":\"semsvuvd\",\"link\":\"qxetqmmlivrjjx\",\"name\":\"xdchp\",\"expectedHash\":\"xlehzlxpgfquwzp\",\"previewSource\":\"ibelwcerwkw\"}") + .toObject(ValidatedSolutionRecipeComponentMetadata.class); + Assertions.assertEquals("z", model.extensionType()); + Assertions.assertEquals("eqrztrxalxrdh", model.publisher()); + Assertions.assertTrue(model.enableAutomaticUpgrade()); + Assertions.assertFalse(model.lcmUpdate()); + Assertions.assertEquals("sn", model.catalog()); + Assertions.assertEquals("pqatiwkkvyanxkv", model.ring()); + Assertions.assertEquals("semsvuvd", model.releaseTrain()); + Assertions.assertEquals("qxetqmmlivrjjx", model.link()); + Assertions.assertEquals("xdchp", model.name()); + Assertions.assertEquals("xlehzlxpgfquwzp", model.expectedHash()); + Assertions.assertEquals("ibelwcerwkw", model.previewSource()); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ValidatedSolutionRecipeComponentPayloadTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ValidatedSolutionRecipeComponentPayloadTests.java new file mode 100644 index 000000000000..acb22f6967be --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ValidatedSolutionRecipeComponentPayloadTests.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.azurestackhci.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.azurestackhci.models.ValidatedSolutionRecipeComponentPayload; +import org.junit.jupiter.api.Assertions; + +public final class ValidatedSolutionRecipeComponentPayloadTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ValidatedSolutionRecipeComponentPayload model = BinaryData.fromString( + "{\"identifier\":\"ansbvriaqg\",\"hash\":\"tojrulfucte\",\"fileName\":\"rthcfjzh\",\"url\":\"lyubqjrostvrjeq\"}") + .toObject(ValidatedSolutionRecipeComponentPayload.class); + Assertions.assertEquals("ansbvriaqg", model.identifier()); + Assertions.assertEquals("tojrulfucte", model.hash()); + Assertions.assertEquals("rthcfjzh", model.fileName()); + Assertions.assertEquals("lyubqjrostvrjeq", model.url()); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ValidatedSolutionRecipeComponentTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ValidatedSolutionRecipeComponentTests.java new file mode 100644 index 000000000000..27dab8c933b2 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ValidatedSolutionRecipeComponentTests.java @@ -0,0 +1,38 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.azurestackhci.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.azurestackhci.models.ValidatedSolutionRecipeComponent; +import org.junit.jupiter.api.Assertions; + +public final class ValidatedSolutionRecipeComponentTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ValidatedSolutionRecipeComponent model = BinaryData.fromString( + "{\"name\":\"fbmjxuvji\",\"type\":\"fdvhaxdvwzae\",\"requiredVersion\":\"phth\",\"installOrder\":3219575550217011334,\"tags\":[\"etatlakf\",\"oixwgiksb\"],\"payloads\":[{\"identifier\":\"ooxr\",\"hash\":\"ogwp\",\"fileName\":\"chgjtnhtukfacih\",\"url\":\"bfntumeezbxvq\"},{\"identifier\":\"bnuvwcg\",\"hash\":\"sgomtmjz\",\"fileName\":\"xuqgovsxpwwztj\",\"url\":\"mkkhtgfredml\"}],\"metadata\":{\"extensionType\":\"rllccnaovjowazhp\",\"publisher\":\"acomlyotg\",\"enableAutomaticUpgrade\":true,\"lcmUpdate\":false,\"catalog\":\"rqorcgen\",\"ring\":\"c\",\"releaseTrain\":\"xeetq\",\"link\":\"xcxxqndcqjkedw\",\"name\":\"rcgojmrvvx\",\"expectedHash\":\"ongzsehqqrsil\",\"previewSource\":\"hskxx\"}}") + .toObject(ValidatedSolutionRecipeComponent.class); + Assertions.assertEquals("fbmjxuvji", model.name()); + Assertions.assertEquals("fdvhaxdvwzae", model.type()); + Assertions.assertEquals("phth", model.requiredVersion()); + Assertions.assertEquals(3219575550217011334L, model.installOrder()); + Assertions.assertEquals("etatlakf", model.tags().get(0)); + Assertions.assertEquals("ooxr", model.payloads().get(0).identifier()); + Assertions.assertEquals("ogwp", model.payloads().get(0).hash()); + Assertions.assertEquals("chgjtnhtukfacih", model.payloads().get(0).fileName()); + Assertions.assertEquals("bfntumeezbxvq", model.payloads().get(0).url()); + Assertions.assertEquals("rllccnaovjowazhp", model.metadata().extensionType()); + Assertions.assertEquals("acomlyotg", model.metadata().publisher()); + Assertions.assertTrue(model.metadata().enableAutomaticUpgrade()); + Assertions.assertFalse(model.metadata().lcmUpdate()); + Assertions.assertEquals("rqorcgen", model.metadata().catalog()); + Assertions.assertEquals("c", model.metadata().ring()); + Assertions.assertEquals("xeetq", model.metadata().releaseTrain()); + Assertions.assertEquals("xcxxqndcqjkedw", model.metadata().link()); + Assertions.assertEquals("rcgojmrvvx", model.metadata().name()); + Assertions.assertEquals("ongzsehqqrsil", model.metadata().expectedHash()); + Assertions.assertEquals("hskxx", model.metadata().previewSource()); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ValidatedSolutionRecipeContentTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ValidatedSolutionRecipeContentTests.java new file mode 100644 index 000000000000..77cb0656bc3c --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ValidatedSolutionRecipeContentTests.java @@ -0,0 +1,42 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.azurestackhci.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.azurestackhci.models.ValidatedSolutionRecipeContent; +import org.junit.jupiter.api.Assertions; + +public final class ValidatedSolutionRecipeContentTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ValidatedSolutionRecipeContent model = BinaryData.fromString( + "{\"info\":{\"solutionType\":\"swhgsaodk\",\"version\":\"wnbaf\"},\"capabilities\":{\"clusterCapabilities\":[{\"capabilityName\":\"ohzha\"}],\"nodeCapabilities\":[{\"capabilityName\":\"v\"},{\"capabilityName\":\"sxbgnvkervqchoa\"},{\"capabilityName\":\"hrsxqvzvspabdsrg\"}]},\"components\":[{\"name\":\"jglzrsubklrxhjnl\",\"type\":\"cetjdvq\",\"requiredVersion\":\"ie\",\"installOrder\":1754048666808617813,\"tags\":[\"ruwdxvqzxoebwgj\",\"bibanbau\",\"wtzvpakloz\",\"xbzrpejplssanb\"],\"payloads\":[{\"identifier\":\"kgsuxunrswgk\",\"hash\":\"jhboyikebhuhks\",\"fileName\":\"gwl\",\"url\":\"kh\"},{\"identifier\":\"eoijyzcqypzqzufg\",\"hash\":\"yfejyvdwtf\",\"fileName\":\"ptpqayamkn\",\"url\":\"fgybmxs\"},{\"identifier\":\"xocuullojkpoyhgw\",\"hash\":\"djuxdbdljzgd\",\"fileName\":\"rcvuqbsgzlrqhb\",\"url\":\"nq\"},{\"identifier\":\"gdxwbsfpyxx\",\"hash\":\"jlf\",\"fileName\":\"ecominxojjluxxd\",\"url\":\"ilz\"}],\"metadata\":{\"extensionType\":\"zqjmueza\",\"publisher\":\"vribqlotokht\",\"enableAutomaticUpgrade\":true,\"lcmUpdate\":true,\"catalog\":\"kcqwwxwjyofgwh\",\"ring\":\"btlwljssmcts\",\"releaseTrain\":\"dkpwolgisub\",\"link\":\"teogfgfiijr\",\"name\":\"wlefksxqceazfpxg\",\"expectedHash\":\"qvzvlu\",\"previewSource\":\"qa\"}},{\"name\":\"ossscyva\",\"type\":\"fppuacvfye\",\"requiredVersion\":\"psfx\",\"installOrder\":642969054149468778,\"tags\":[\"oy\"],\"payloads\":[{\"identifier\":\"v\",\"hash\":\"yqfttehdpboujst\",\"fileName\":\"fvvdshxcdedsue\",\"url\":\"ygnxcgjtfrnqukt\"},{\"identifier\":\"fnslnlrxsmy\",\"hash\":\"trwntfmtbgw\",\"fileName\":\"dxwnazkurrd\",\"url\":\"eyz\"},{\"identifier\":\"whsetwwjwzzqs\",\"hash\":\"uzu\",\"fileName\":\"kykcyqhyqqzz\",\"url\":\"c\"},{\"identifier\":\"keys\",\"hash\":\"ewfopazdazg\",\"fileName\":\"sqgpewqcfu\",\"url\":\"mdpv\"}],\"metadata\":{\"extensionType\":\"lq\",\"publisher\":\"kn\",\"enableAutomaticUpgrade\":false,\"lcmUpdate\":true,\"catalog\":\"zeyowmndcovdwzqa\",\"ring\":\"zanhmkvfru\",\"releaseTrain\":\"udrbcpftxudqyem\",\"link\":\"unaucm\",\"name\":\"rtneemmja\",\"expectedHash\":\"cgxefnohaitraniz\",\"previewSource\":\"wgudasmxu\"}},{\"name\":\"vfbngfco\",\"type\":\"ef\",\"requiredVersion\":\"riylfmpztra\",\"installOrder\":3536544353662439300,\"tags\":[\"lcdculregpq\",\"moj\"],\"payloads\":[{\"identifier\":\"ztnvgy\",\"hash\":\"hqrdgrtwmewjzlpy\",\"fileName\":\"cf\",\"url\":\"zzwjcayerzrran\"},{\"identifier\":\"ybylpol\",\"hash\":\"zrghsrleink\",\"fileName\":\"scjfncjwvuagf\",\"url\":\"wtltngvmreuptrk\"}],\"metadata\":{\"extensionType\":\"ijajwolx\",\"publisher\":\"vaghmpy\",\"enableAutomaticUpgrade\":true,\"lcmUpdate\":false,\"catalog\":\"ci\",\"ring\":\"zjc\",\"releaseTrain\":\"xqlaps\",\"link\":\"sovyxpavidnievw\",\"name\":\"cvvy\",\"expectedHash\":\"slpuxgcbdsva\",\"previewSource\":\"nptw\"}}]}") + .toObject(ValidatedSolutionRecipeContent.class); + Assertions.assertEquals("swhgsaodk", model.info().solutionType()); + Assertions.assertEquals("wnbaf", model.info().version()); + Assertions.assertEquals("ohzha", model.capabilities().clusterCapabilities().get(0).capabilityName()); + Assertions.assertEquals("v", model.capabilities().nodeCapabilities().get(0).capabilityName()); + Assertions.assertEquals("jglzrsubklrxhjnl", model.components().get(0).name()); + Assertions.assertEquals("cetjdvq", model.components().get(0).type()); + Assertions.assertEquals("ie", model.components().get(0).requiredVersion()); + Assertions.assertEquals(1754048666808617813L, model.components().get(0).installOrder()); + Assertions.assertEquals("ruwdxvqzxoebwgj", model.components().get(0).tags().get(0)); + Assertions.assertEquals("kgsuxunrswgk", model.components().get(0).payloads().get(0).identifier()); + Assertions.assertEquals("jhboyikebhuhks", model.components().get(0).payloads().get(0).hash()); + Assertions.assertEquals("gwl", model.components().get(0).payloads().get(0).fileName()); + Assertions.assertEquals("kh", model.components().get(0).payloads().get(0).url()); + Assertions.assertEquals("zqjmueza", model.components().get(0).metadata().extensionType()); + Assertions.assertEquals("vribqlotokht", model.components().get(0).metadata().publisher()); + Assertions.assertTrue(model.components().get(0).metadata().enableAutomaticUpgrade()); + Assertions.assertTrue(model.components().get(0).metadata().lcmUpdate()); + Assertions.assertEquals("kcqwwxwjyofgwh", model.components().get(0).metadata().catalog()); + Assertions.assertEquals("btlwljssmcts", model.components().get(0).metadata().ring()); + Assertions.assertEquals("dkpwolgisub", model.components().get(0).metadata().releaseTrain()); + Assertions.assertEquals("teogfgfiijr", model.components().get(0).metadata().link()); + Assertions.assertEquals("wlefksxqceazfpxg", model.components().get(0).metadata().name()); + Assertions.assertEquals("qvzvlu", model.components().get(0).metadata().expectedHash()); + Assertions.assertEquals("qa", model.components().get(0).metadata().previewSource()); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ValidatedSolutionRecipeInfoTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ValidatedSolutionRecipeInfoTests.java new file mode 100644 index 000000000000..fee7cdd01e48 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ValidatedSolutionRecipeInfoTests.java @@ -0,0 +1,20 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.azurestackhci.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.azurestackhci.models.ValidatedSolutionRecipeInfo; +import org.junit.jupiter.api.Assertions; + +public final class ValidatedSolutionRecipeInfoTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ValidatedSolutionRecipeInfo model + = BinaryData.fromString("{\"solutionType\":\"rkxgpazwugxyqvnj\",\"version\":\"bfe\"}") + .toObject(ValidatedSolutionRecipeInfo.class); + Assertions.assertEquals("rkxgpazwugxyqvnj", model.solutionType()); + Assertions.assertEquals("bfe", model.version()); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ValidatedSolutionRecipeInnerTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ValidatedSolutionRecipeInnerTests.java new file mode 100644 index 000000000000..5c1223c5c340 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ValidatedSolutionRecipeInnerTests.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.azurestackhci.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.azurestackhci.fluent.models.ValidatedSolutionRecipeInner; +import org.junit.jupiter.api.Assertions; + +public final class ValidatedSolutionRecipeInnerTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ValidatedSolutionRecipeInner model = BinaryData.fromString( + "{\"properties\":{\"recipeContent\":{\"info\":{\"solutionType\":\"crunfhi\",\"version\":\"c\"},\"capabilities\":{\"clusterCapabilities\":[{\"capabilityName\":\"bcpaqktkrumzued\"},{\"capabilityName\":\"yzbfvxovqkx\"},{\"capabilityName\":\"uxqggvqrnhyhl\"},{\"capabilityName\":\"cjsqggjhffbxr\"}],\"nodeCapabilities\":[{\"capabilityName\":\"kijpeuqlsdxeqztv\"},{\"capabilityName\":\"wmwwmjswen\"},{\"capabilityName\":\"wwa\"},{\"capabilityName\":\"ecleqioulndhzyo\"}]},\"components\":[{\"name\":\"jhtollh\",\"type\":\"vidmytzl\",\"requiredVersion\":\"lxpnovyoanf\",\"installOrder\":8377306520504942757,\"tags\":[\"agyw\",\"t\",\"igvjrktp\"],\"payloads\":[{\"identifier\":\"ukyawoh\",\"hash\":\"mwhqnucsklh\",\"fileName\":\"i\",\"url\":\"sjt\"},{\"identifier\":\"lpbnin\",\"hash\":\"gazlsvbz\",\"fileName\":\"cpuo\",\"url\":\"e\"}],\"metadata\":{\"extensionType\":\"cciklhs\",\"publisher\":\"krdre\",\"enableAutomaticUpgrade\":false,\"lcmUpdate\":true,\"catalog\":\"yehqbeivdlhydwb\",\"ring\":\"fgrlpun\",\"releaseTrain\":\"jlkesmmpath\",\"link\":\"ta\",\"name\":\"e\",\"expectedHash\":\"iiwllbvgwzsf\",\"previewSource\":\"edous\"}},{\"name\":\"ktjtgra\",\"type\":\"aqo\",\"requiredVersion\":\"kbeba\",\"installOrder\":8850466326741702382,\"tags\":[\"txxwpfh\",\"jzudrtpzk\",\"meboywhczzq\",\"hmngqb\"],\"payloads\":[{\"identifier\":\"gis\",\"hash\":\"zwnykdidjchl\",\"fileName\":\"mpwctoflds\",\"url\":\"acdhztxkbr\"},{\"identifier\":\"g\",\"hash\":\"rwjiyew\",\"fileName\":\"fj\",\"url\":\"rwq\"}],\"metadata\":{\"extensionType\":\"tfgcwvrr\",\"publisher\":\"qnt\",\"enableAutomaticUpgrade\":false,\"lcmUpdate\":false,\"catalog\":\"hvmaxgnuyeamcmhu\",\"ring\":\"jecehokwc\",\"releaseTrain\":\"twloesqr\",\"link\":\"vrbnyrukoil\",\"name\":\"iduw\",\"expectedHash\":\"e\",\"previewSource\":\"jlhwyxpzruzyt\"}},{\"name\":\"qkkwhbgxvellvul\",\"type\":\"xdm\",\"requiredVersion\":\"tmujdtvmc\",\"installOrder\":4987369453496003869,\"tags\":[\"fhmjp\",\"dnyxfzuvrz\"],\"payloads\":[{\"identifier\":\"mzjqrbr\",\"hash\":\"vnmdyfoeboj\",\"fileName\":\"jpp\",\"url\":\"laohoqkp\"},{\"identifier\":\"t\",\"hash\":\"qjilaywkdcwmqsyr\",\"fileName\":\"lmhxdqaolfylnk\",\"url\":\"bjpjvlyw\"},{\"identifier\":\"tmfwobbjwhl\",\"hash\":\"yj\",\"fileName\":\"nqzocrdzg\",\"url\":\"zeunt\"},{\"identifier\":\"xdncaqtt\",\"hash\":\"ekoifuvnyttzgi\",\"fileName\":\"gyrihlgm\",\"url\":\"behlqtxnr\"}],\"metadata\":{\"extensionType\":\"ndrndpgf\",\"publisher\":\"dhdaqotwfhipx\",\"enableAutomaticUpgrade\":false,\"lcmUpdate\":false,\"catalog\":\"c\",\"ring\":\"owzafczu\",\"releaseTrain\":\"ljcirvpefycdvei\",\"link\":\"tjnsx\",\"name\":\"jlnsj\",\"expectedHash\":\"ju\",\"previewSource\":\"xbxq\"}}]},\"signature\":\"vuaytuad\"},\"id\":\"xeqbwp\",\"name\":\"tghyksarcdr\",\"type\":\"xsl\"}") + .toObject(ValidatedSolutionRecipeInner.class); + Assertions.assertEquals("crunfhi", model.properties().recipeContent().info().solutionType()); + Assertions.assertEquals("c", model.properties().recipeContent().info().version()); + Assertions.assertEquals("bcpaqktkrumzued", + model.properties().recipeContent().capabilities().clusterCapabilities().get(0).capabilityName()); + Assertions.assertEquals("kijpeuqlsdxeqztv", + model.properties().recipeContent().capabilities().nodeCapabilities().get(0).capabilityName()); + Assertions.assertEquals("jhtollh", model.properties().recipeContent().components().get(0).name()); + Assertions.assertEquals("vidmytzl", model.properties().recipeContent().components().get(0).type()); + Assertions.assertEquals("lxpnovyoanf", + model.properties().recipeContent().components().get(0).requiredVersion()); + Assertions.assertEquals(8377306520504942757L, + model.properties().recipeContent().components().get(0).installOrder()); + Assertions.assertEquals("agyw", model.properties().recipeContent().components().get(0).tags().get(0)); + Assertions.assertEquals("ukyawoh", + model.properties().recipeContent().components().get(0).payloads().get(0).identifier()); + Assertions.assertEquals("mwhqnucsklh", + model.properties().recipeContent().components().get(0).payloads().get(0).hash()); + Assertions.assertEquals("i", + model.properties().recipeContent().components().get(0).payloads().get(0).fileName()); + Assertions.assertEquals("sjt", model.properties().recipeContent().components().get(0).payloads().get(0).url()); + Assertions.assertEquals("cciklhs", + model.properties().recipeContent().components().get(0).metadata().extensionType()); + Assertions.assertEquals("krdre", model.properties().recipeContent().components().get(0).metadata().publisher()); + Assertions + .assertFalse(model.properties().recipeContent().components().get(0).metadata().enableAutomaticUpgrade()); + Assertions.assertTrue(model.properties().recipeContent().components().get(0).metadata().lcmUpdate()); + Assertions.assertEquals("yehqbeivdlhydwb", + model.properties().recipeContent().components().get(0).metadata().catalog()); + Assertions.assertEquals("fgrlpun", model.properties().recipeContent().components().get(0).metadata().ring()); + Assertions.assertEquals("jlkesmmpath", + model.properties().recipeContent().components().get(0).metadata().releaseTrain()); + Assertions.assertEquals("ta", model.properties().recipeContent().components().get(0).metadata().link()); + Assertions.assertEquals("e", model.properties().recipeContent().components().get(0).metadata().name()); + Assertions.assertEquals("iiwllbvgwzsf", + model.properties().recipeContent().components().get(0).metadata().expectedHash()); + Assertions.assertEquals("edous", + model.properties().recipeContent().components().get(0).metadata().previewSource()); + Assertions.assertEquals("vuaytuad", model.properties().signature()); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ValidatedSolutionRecipeListResultTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ValidatedSolutionRecipeListResultTests.java new file mode 100644 index 000000000000..af1bedb4c2b9 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ValidatedSolutionRecipeListResultTests.java @@ -0,0 +1,45 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.azurestackhci.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.azurestackhci.implementation.models.ValidatedSolutionRecipeListResult; +import org.junit.jupiter.api.Assertions; + +public final class ValidatedSolutionRecipeListResultTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ValidatedSolutionRecipeListResult model = BinaryData.fromString( + "{\"value\":[{\"properties\":{\"recipeContent\":{\"info\":{\"solutionType\":\"xljtxbusqtbxxn\",\"version\":\"uisdzhgbdgz\"},\"capabilities\":{\"clusterCapabilities\":[{\"capabilityName\":\"secnadbuwqrgxf\"},{\"capabilityName\":\"lmqiynezoel\"},{\"capabilityName\":\"nkkiiwvmtumxpy\"},{\"capabilityName\":\"djf\"}],\"nodeCapabilities\":[{\"capabilityName\":\"xroq\"},{\"capabilityName\":\"qpilrgu\"},{\"capabilityName\":\"canlduwzorxs\"},{\"capabilityName\":\"mxaqklxym\"}]},\"components\":[{\"name\":\"qvfqepdxc\",\"type\":\"tuubwyvpjb\",\"tags\":[]}]},\"signature\":\"cpj\"},\"id\":\"uqgixex\",\"name\":\"ydfbwlj\",\"type\":\"vhuerkjddvrglieg\"},{\"properties\":{\"recipeContent\":{\"info\":{\"solutionType\":\"cvbiiftksdw\",\"version\":\"dnkefgm\"},\"capabilities\":{\"clusterCapabilities\":[{\"capabilityName\":\"c\"},{\"capabilityName\":\"buvczldbglzoutb\"},{\"capabilityName\":\"aqgzekajclyzgs\"},{\"capabilityName\":\"orbjg\"}],\"nodeCapabilities\":[{\"capabilityName\":\"zjotvmrxkhlo\"},{\"capabilityName\":\"vvjbhvhdiqayf\"}]},\"components\":[{\"name\":\"iyu\",\"type\":\"snuudtelvhyibdr\",\"tags\":[]},{\"name\":\"rswhbuubpyro\",\"type\":\"tjoxztfw\",\"tags\":[]}]},\"signature\":\"chvczev\"},\"id\":\"nctagfyvrtpqpem\",\"name\":\"z\",\"type\":\"gkrepdqhqyhw\"}],\"nextLink\":\"e\"}") + .toObject(ValidatedSolutionRecipeListResult.class); + Assertions.assertEquals("xljtxbusqtbxxn", + model.value().get(0).properties().recipeContent().info().solutionType()); + Assertions.assertEquals("uisdzhgbdgz", model.value().get(0).properties().recipeContent().info().version()); + Assertions.assertEquals("secnadbuwqrgxf", + model.value() + .get(0) + .properties() + .recipeContent() + .capabilities() + .clusterCapabilities() + .get(0) + .capabilityName()); + Assertions.assertEquals("xroq", + model.value() + .get(0) + .properties() + .recipeContent() + .capabilities() + .nodeCapabilities() + .get(0) + .capabilityName()); + Assertions.assertEquals("qvfqepdxc", + model.value().get(0).properties().recipeContent().components().get(0).name()); + Assertions.assertEquals("tuubwyvpjb", + model.value().get(0).properties().recipeContent().components().get(0).type()); + Assertions.assertEquals("cpj", model.value().get(0).properties().signature()); + Assertions.assertEquals("e", model.nextLink()); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ValidatedSolutionRecipePropertiesTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ValidatedSolutionRecipePropertiesTests.java new file mode 100644 index 000000000000..66826a1ee693 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ValidatedSolutionRecipePropertiesTests.java @@ -0,0 +1,48 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.azurestackhci.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.azurestackhci.models.ValidatedSolutionRecipeProperties; +import org.junit.jupiter.api.Assertions; + +public final class ValidatedSolutionRecipePropertiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ValidatedSolutionRecipeProperties model = BinaryData.fromString( + "{\"recipeContent\":{\"info\":{\"solutionType\":\"vlzladl\",\"version\":\"x\"},\"capabilities\":{\"clusterCapabilities\":[{\"capabilityName\":\"qhvfd\"},{\"capabilityName\":\"qjwkrhwz\"},{\"capabilityName\":\"anojisgglmvokat\"}],\"nodeCapabilities\":[{\"capabilityName\":\"tjctibpvbkaeh\"},{\"capabilityName\":\"smz\"},{\"capabilityName\":\"g\"},{\"capabilityName\":\"fwakw\"}]},\"components\":[{\"name\":\"ivmakx\",\"type\":\"ysowl\",\"requiredVersion\":\"x\",\"installOrder\":6288643011884264791,\"tags\":[\"tvtfjms\",\"dchmaiubavlz\"],\"payloads\":[{\"identifier\":\"gmfalkzazmgoked\",\"hash\":\"jqafkmkro\",\"fileName\":\"zrthqet\",\"url\":\"pqrtvaoznqni\"},{\"identifier\":\"iezeagm\",\"hash\":\"eituugedhfpjs\",\"fileName\":\"lzmb\",\"url\":\"syjdeolctae\"},{\"identifier\":\"fsyrledjc\",\"hash\":\"stbvtqig\",\"fileName\":\"xzvsgeafgf\",\"url\":\"sehxlzsxezp\"},{\"identifier\":\"kkwa\",\"hash\":\"es\",\"fileName\":\"yfjlpzeqto\",\"url\":\"rpl\"}],\"metadata\":{\"extensionType\":\"aj\",\"publisher\":\"lpquevhamfow\",\"enableAutomaticUpgrade\":true,\"lcmUpdate\":true,\"catalog\":\"ekxpkzwaqxofqo\",\"ring\":\"hiq\",\"releaseTrain\":\"lvfidusztekxbyjg\",\"link\":\"fepxyihpqadag\",\"name\":\"rdi\",\"expectedHash\":\"dw\",\"previewSource\":\"fowxwyovcxjsgbi\"}},{\"name\":\"cu\",\"type\":\"dveksbuhoduch\",\"requiredVersion\":\"scrdp\",\"installOrder\":5816876396673298682,\"tags\":[\"jdusspyszekb\",\"wlkaaggkrehbfrnu\",\"bffljfiimreoag\"],\"payloads\":[{\"identifier\":\"aadusrexxfa\",\"hash\":\"sqwudohzilfmnli\",\"fileName\":\"psimsf\",\"url\":\"ypofqpmbhyqgs\"},{\"identifier\":\"rmmttjxop\",\"hash\":\"gerhsmvg\",\"fileName\":\"htwzmqilr\",\"url\":\"xy\"}],\"metadata\":{\"extensionType\":\"imsqywwwmhk\",\"publisher\":\"wa\",\"enableAutomaticUpgrade\":false,\"lcmUpdate\":false,\"catalog\":\"mlqoinhzduew\",\"ring\":\"apfjiik\",\"releaseTrain\":\"diqfliejhpclbi\",\"link\":\"fsbw\",\"name\":\"ivbvzi\",\"expectedHash\":\"wxgoooxzpra\",\"previewSource\":\"s\"}}]},\"signature\":\"knpdgzigjsu\"}") + .toObject(ValidatedSolutionRecipeProperties.class); + Assertions.assertEquals("vlzladl", model.recipeContent().info().solutionType()); + Assertions.assertEquals("x", model.recipeContent().info().version()); + Assertions.assertEquals("qhvfd", + model.recipeContent().capabilities().clusterCapabilities().get(0).capabilityName()); + Assertions.assertEquals("tjctibpvbkaeh", + model.recipeContent().capabilities().nodeCapabilities().get(0).capabilityName()); + Assertions.assertEquals("ivmakx", model.recipeContent().components().get(0).name()); + Assertions.assertEquals("ysowl", model.recipeContent().components().get(0).type()); + Assertions.assertEquals("x", model.recipeContent().components().get(0).requiredVersion()); + Assertions.assertEquals(6288643011884264791L, model.recipeContent().components().get(0).installOrder()); + Assertions.assertEquals("tvtfjms", model.recipeContent().components().get(0).tags().get(0)); + Assertions.assertEquals("gmfalkzazmgoked", + model.recipeContent().components().get(0).payloads().get(0).identifier()); + Assertions.assertEquals("jqafkmkro", model.recipeContent().components().get(0).payloads().get(0).hash()); + Assertions.assertEquals("zrthqet", model.recipeContent().components().get(0).payloads().get(0).fileName()); + Assertions.assertEquals("pqrtvaoznqni", model.recipeContent().components().get(0).payloads().get(0).url()); + Assertions.assertEquals("aj", model.recipeContent().components().get(0).metadata().extensionType()); + Assertions.assertEquals("lpquevhamfow", model.recipeContent().components().get(0).metadata().publisher()); + Assertions.assertTrue(model.recipeContent().components().get(0).metadata().enableAutomaticUpgrade()); + Assertions.assertTrue(model.recipeContent().components().get(0).metadata().lcmUpdate()); + Assertions.assertEquals("ekxpkzwaqxofqo", model.recipeContent().components().get(0).metadata().catalog()); + Assertions.assertEquals("hiq", model.recipeContent().components().get(0).metadata().ring()); + Assertions.assertEquals("lvfidusztekxbyjg", + model.recipeContent().components().get(0).metadata().releaseTrain()); + Assertions.assertEquals("fepxyihpqadag", model.recipeContent().components().get(0).metadata().link()); + Assertions.assertEquals("rdi", model.recipeContent().components().get(0).metadata().name()); + Assertions.assertEquals("dw", model.recipeContent().components().get(0).metadata().expectedHash()); + Assertions.assertEquals("fowxwyovcxjsgbi", + model.recipeContent().components().get(0).metadata().previewSource()); + Assertions.assertEquals("knpdgzigjsu", model.signature()); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ValidatedSolutionRecipesGetWithResponseMockTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ValidatedSolutionRecipesGetWithResponseMockTests.java new file mode 100644 index 000000000000..59ae87813545 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ValidatedSolutionRecipesGetWithResponseMockTests.java @@ -0,0 +1,60 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.azurestackhci.generated; + +import com.azure.core.credential.AccessToken; +import com.azure.core.http.HttpClient; +import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; +import com.azure.core.test.http.MockHttpResponse; +import com.azure.resourcemanager.azurestackhci.AzureStackHciManager; +import com.azure.resourcemanager.azurestackhci.models.ValidatedSolutionRecipe; +import java.nio.charset.StandardCharsets; +import java.time.OffsetDateTime; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Test; +import reactor.core.publisher.Mono; + +public final class ValidatedSolutionRecipesGetWithResponseMockTests { + @Test + public void testGetWithResponse() throws Exception { + String responseStr + = "{\"properties\":{\"recipeContent\":{\"info\":{\"solutionType\":\"cejo\",\"version\":\"ylblfsprr\"},\"capabilities\":{\"clusterCapabilities\":[{\"capabilityName\":\"pimtc\"},{\"capabilityName\":\"vfxrdytz\"},{\"capabilityName\":\"slxizhqikmgob\"}],\"nodeCapabilities\":[{\"capabilityName\":\"qemcdi\"},{\"capabilityName\":\"isklbonxxupjxv\"},{\"capabilityName\":\"rk\"},{\"capabilityName\":\"kgenjqnnpjwkosn\"}]},\"components\":[{\"name\":\"igfoujjcxgdqmr\",\"type\":\"hnzkwopswnyinxu\",\"requiredVersion\":\"rxyxwjezbfqp\",\"installOrder\":8381855132335920069,\"tags\":[\"kdcpvu\"],\"payloads\":[{\"identifier\":\"svjmnsvujnjk\",\"hash\":\"volefcj\",\"fileName\":\"se\",\"url\":\"kdb\"},{\"identifier\":\"otfbjampqoclann\",\"hash\":\"xynlsuqb\",\"fileName\":\"zstrktgvpatrg\",\"url\":\"jktfinf\"},{\"identifier\":\"oksmmculwk\",\"hash\":\"icruo\",\"fileName\":\"krjflsgaojb\",\"url\":\"qpqsdoctpzpuj\"},{\"identifier\":\"flmcdsgxc\",\"hash\":\"lujiswlluunxhfw\",\"fileName\":\"fxzf\",\"url\":\"u\"}],\"metadata\":{}},{\"name\":\"upcknecexkgrvfp\",\"type\":\"jdmngsytqpdzfyxc\",\"requiredVersion\":\"awoxcgzbe\",\"installOrder\":6345755361733329646,\"tags\":[\"fopfjxdwdrpazqjk\",\"fmbwotfcuuugt\"],\"payloads\":[{\"identifier\":\"pgayiawohfmhnnzm\",\"hash\":\"cjjkmqenh\",\"fileName\":\"idzr\",\"url\":\"vs\"}],\"metadata\":{}},{\"name\":\"oiovslvivq\",\"type\":\"uvwtenbgpi\",\"requiredVersion\":\"khcyoaqxuk\",\"installOrder\":1097905589940544769,\"tags\":[\"f\",\"ekiooanduewfhv\"],\"payloads\":[{\"identifier\":\"hxzubfjzabbw\",\"hash\":\"gvzua\",\"fileName\":\"xcdckixspsa\",\"url\":\"gavkmv\"},{\"identifier\":\"xzerej\",\"hash\":\"kpzjbyetjxryopt\",\"fileName\":\"eitwhlbecgi\",\"url\":\"z\"},{\"identifier\":\"pemnrrabo\",\"hash\":\"rwwxywpj\",\"fileName\":\"spboxhifp\",\"url\":\"skpeswyhhmifjua\"},{\"identifier\":\"xwwvcmmpeg\",\"hash\":\"y\",\"fileName\":\"qvcml\",\"url\":\"exbzbqufpnezsjza\"}],\"metadata\":{}}]},\"signature\":\"dror\"},\"id\":\"ogzmsimehtcuuwdh\",\"name\":\"qqhyhnimxtns\",\"type\":\"gi\"}"; + + HttpClient httpClient + = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); + AzureStackHciManager manager = AzureStackHciManager.configure() + .withHttpClient(httpClient) + .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); + + ValidatedSolutionRecipe response = manager.validatedSolutionRecipes() + .getWithResponse("kin", "teyrqshi", com.azure.core.util.Context.NONE) + .getValue(); + + Assertions.assertEquals("cejo", response.properties().recipeContent().info().solutionType()); + Assertions.assertEquals("ylblfsprr", response.properties().recipeContent().info().version()); + Assertions.assertEquals("pimtc", + response.properties().recipeContent().capabilities().clusterCapabilities().get(0).capabilityName()); + Assertions.assertEquals("qemcdi", + response.properties().recipeContent().capabilities().nodeCapabilities().get(0).capabilityName()); + Assertions.assertEquals("igfoujjcxgdqmr", response.properties().recipeContent().components().get(0).name()); + Assertions.assertEquals("hnzkwopswnyinxu", response.properties().recipeContent().components().get(0).type()); + Assertions.assertEquals("rxyxwjezbfqp", + response.properties().recipeContent().components().get(0).requiredVersion()); + Assertions.assertEquals(8381855132335920069L, + response.properties().recipeContent().components().get(0).installOrder()); + Assertions.assertEquals("kdcpvu", response.properties().recipeContent().components().get(0).tags().get(0)); + Assertions.assertEquals("svjmnsvujnjk", + response.properties().recipeContent().components().get(0).payloads().get(0).identifier()); + Assertions.assertEquals("volefcj", + response.properties().recipeContent().components().get(0).payloads().get(0).hash()); + Assertions.assertEquals("se", + response.properties().recipeContent().components().get(0).payloads().get(0).fileName()); + Assertions.assertEquals("kdb", + response.properties().recipeContent().components().get(0).payloads().get(0).url()); + Assertions.assertEquals("dror", response.properties().signature()); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ValidatedSolutionRecipesListBySubscriptionLocationResourceMockTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ValidatedSolutionRecipesListBySubscriptionLocationResourceMockTests.java new file mode 100644 index 000000000000..e5cc451bdeb3 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ValidatedSolutionRecipesListBySubscriptionLocationResourceMockTests.java @@ -0,0 +1,79 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.azurestackhci.generated; + +import com.azure.core.credential.AccessToken; +import com.azure.core.http.HttpClient; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; +import com.azure.core.test.http.MockHttpResponse; +import com.azure.resourcemanager.azurestackhci.AzureStackHciManager; +import com.azure.resourcemanager.azurestackhci.models.ValidatedSolutionRecipe; +import java.nio.charset.StandardCharsets; +import java.time.OffsetDateTime; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Test; +import reactor.core.publisher.Mono; + +public final class ValidatedSolutionRecipesListBySubscriptionLocationResourceMockTests { + @Test + public void testListBySubscriptionLocationResource() throws Exception { + String responseStr + = "{\"value\":[{\"properties\":{\"recipeContent\":{\"info\":{\"solutionType\":\"micjixxfsf\",\"version\":\"crtnuguefxxi\"},\"capabilities\":{\"clusterCapabilities\":[{\"capabilityName\":\"bdveywetkrhl\"},{\"capabilityName\":\"lmcnwepfgsv\"}],\"nodeCapabilities\":[{\"capabilityName\":\"vaqdljnpetl\"}]},\"components\":[{\"name\":\"rdetawevxehuekdx\",\"type\":\"jzvdovbrblerlp\",\"requiredVersion\":\"aqccddcbnyg\",\"installOrder\":780190439960173929,\"tags\":[\"wbpwy\",\"kdigq\",\"lrzndas\"],\"payloads\":[{\"identifier\":\"dmjqmvy\",\"hash\":\"gkiqla\",\"fileName\":\"hqtwv\",\"url\":\"azekdzdzffzjwzts\"}],\"metadata\":{}}]},\"signature\":\"hggryelgf\"},\"id\":\"tig\",\"name\":\"gfrrkdknczgoryw\",\"type\":\"vojtvmdevdlhqv\"}]}"; + + HttpClient httpClient + = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); + AzureStackHciManager manager = AzureStackHciManager.configure() + .withHttpClient(httpClient) + .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); + + PagedIterable response = manager.validatedSolutionRecipes() + .listBySubscriptionLocationResource("nomwnwnghojovke", com.azure.core.util.Context.NONE); + + Assertions.assertEquals("micjixxfsf", + response.iterator().next().properties().recipeContent().info().solutionType()); + Assertions.assertEquals("crtnuguefxxi", + response.iterator().next().properties().recipeContent().info().version()); + Assertions.assertEquals("bdveywetkrhl", + response.iterator() + .next() + .properties() + .recipeContent() + .capabilities() + .clusterCapabilities() + .get(0) + .capabilityName()); + Assertions.assertEquals("vaqdljnpetl", + response.iterator() + .next() + .properties() + .recipeContent() + .capabilities() + .nodeCapabilities() + .get(0) + .capabilityName()); + Assertions.assertEquals("rdetawevxehuekdx", + response.iterator().next().properties().recipeContent().components().get(0).name()); + Assertions.assertEquals("jzvdovbrblerlp", + response.iterator().next().properties().recipeContent().components().get(0).type()); + Assertions.assertEquals("aqccddcbnyg", + response.iterator().next().properties().recipeContent().components().get(0).requiredVersion()); + Assertions.assertEquals(780190439960173929L, + response.iterator().next().properties().recipeContent().components().get(0).installOrder()); + Assertions.assertEquals("wbpwy", + response.iterator().next().properties().recipeContent().components().get(0).tags().get(0)); + Assertions.assertEquals("dmjqmvy", + response.iterator().next().properties().recipeContent().components().get(0).payloads().get(0).identifier()); + Assertions.assertEquals("gkiqla", + response.iterator().next().properties().recipeContent().components().get(0).payloads().get(0).hash()); + Assertions.assertEquals("hqtwv", + response.iterator().next().properties().recipeContent().components().get(0).payloads().get(0).fileName()); + Assertions.assertEquals("azekdzdzffzjwzts", + response.iterator().next().properties().recipeContent().components().get(0).payloads().get(0).url()); + Assertions.assertEquals("hggryelgf", response.iterator().next().properties().signature()); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/tsp-location.yaml b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/tsp-location.yaml new file mode 100644 index 000000000000..b7eb96962beb --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/tsp-location.yaml @@ -0,0 +1,4 @@ +directory: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/StackHCI +commit: 2daa450f8eaef939165415ce90178334568eacfd +repo: Azure/azure-rest-api-specs +additionalDirectories: