diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/CHANGELOG.md b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/CHANGELOG.md index cbb537d7d6e6..2f019b1e988b 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/CHANGELOG.md +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/CHANGELOG.md @@ -1,14 +1,908 @@ # Release History -## 1.0.0-beta.6 (Unreleased) +## 1.0.0-beta.6 (2025-12-17) -### 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 2025-12-01-preview. 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.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 coreCount()` -> `java.lang.Double coreCount()` +* `java.lang.Float memoryInGiB()` -> `java.lang.Double memoryInGiB()` +* `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 +* `withDisplay(models.OperationDisplay)` was removed +* `models.ActionType actionType()` -> `models.ActionType actionType()` +* `fromJson(com.azure.json.JsonReader)` was removed +* `models.OperationDisplay display()` -> `models.OperationDisplay display()` +* `models.Origin origin()` -> `models.Origin origin()` +* `validate()` was removed +* `java.lang.Boolean isDataAction()` -> `java.lang.Boolean isDataAction()` +* `toJson(com.azure.json.JsonWriter)` 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 +* `withDiagnosticLevel(models.DiagnosticLevel)` was removed +* `validate()` 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.lang.Float trialDaysRemaining()` -> `java.lang.Double trialDaysRemaining()` +* `java.util.UUID principalId()` -> `java.lang.String principalId()` +* `java.util.UUID tenantId()` -> `java.lang.String tenantId()` + +#### `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 +* `withMarketplaceSkuVersions(java.util.List)` was removed +* `validate()` was removed +* `withCatalogPlanId(java.lang.String)` 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 +* `withLevel(models.StatusLevelTypes)` was removed +* `withTime(java.time.OffsetDateTime)` was removed +* `validate()` was removed +* `withDisplayStatus(java.lang.String)` was removed +* `withCode(java.lang.String)` was removed +* `withMessage(java.lang.String)` 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 + +* `withPackageSizeInMb(java.lang.Float)` was removed +* `withProgressPercentage(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 + +* `validate()` was removed +* `java.util.UUID tenantId()` -> `java.lang.String tenantId()` +* `java.util.UUID principalId()` -> `java.lang.String principalId()` + +#### `models.HciUpdate$Definition` was modified + +* `withPackageSizeInMb(java.lang.Float)` was removed +* `withProgressPercentage(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 + +* `java.util.UUID principalId()` -> `java.lang.String principalId()` +* `java.util.UUID clientId()` -> `java.lang.String clientId()` +* `validate()` was removed + +#### `models.Operations` was modified + +* `models.OperationListResult list()` -> `com.azure.core.http.rest.PagedIterable list()` +* `listWithResponse(com.azure.core.util.Context)` was removed + +#### `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 + +* `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()` +* `withConnectivityProperties(java.lang.Object)` was removed +* `validate()` 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 +* `withStatus(models.ExtensionInstanceViewStatus)` was removed +* `withName(java.lang.String)` was removed +* `validate()` was removed +* `withTypeHandlerVersion(java.lang.String)` was removed +* `withType(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.StorageConfiguration` was added + +* `models.DnsServerConfig` was added + +* `models.HciEdgeDeviceJobProperties` was added + +* `models.HciHardwareProfile` was added + +* `models.IgvmStatusDetail` was added + +* `models.ValidatedSolutionRecipes` was added + +* `models.ProvisionOsJobProperties` was added + +* `models.EdgeMachinePatch` was added + +* `models.HciEdgeDeviceJobType` was added + +* `models.DownloadRequest` was added + +* `models.ValidatedSolutionRecipeComponent` was added + +* `models.ReconcileArcSettingsRequest` was added + +* `models.ReconcileArcSettingsRequestProperties` was added + +* `models.UpdateContent` was added + +* `models.ProvisionOsReportedProperties` was added + +* `models.SecretType` was added + +* `models.PlatformUpdateProperties` was added + +* `models.EdgeMachineProperties` was added + +* `models.LocalAvailabilityZones` was added + +* `models.EdgeDeviceJobs` was added + +* `models.ValidatedSolutionRecipeComponentMetadata` was added + +* `models.EdgeMachineJob` was added + +* `models.DnsZones` was added + +* `models.UpdateContents` was added + +* `models.ContentPayload` was added + +* `models.ValidateOwnershipVouchersRequest` was added + +* `models.TimeConfiguration` was added + +* `models.EdgeMachineJobProperties` was added + +* `models.EdgeMachineRemoteSupportJobProperties` was added + +* `models.HciStorageProfile` was added + +* `models.EdgeMachines` was added + +* `models.ValidatedSolutionRecipeComponentPayload` was added + +* `models.ClusterPattern` was added + +* `models.EdgeMachine$Definition` was added + +* `models.PlatformPayload` was added + +* `models.ConfidentialVmProfile` was added + +* `models.ConfidentialVmIntent` was added + +* `models.ValidatedSolutionRecipeInfo` was added + +* `models.OsImages` was added + +* `models.EdgeMachineJobs` was added + +* `models.IpAddressRange` was added + +* `models.AssemblyInfo` was added + +* `models.OSOperationType` was added + +* `models.KubernetesVersion` was added + +* `models.SecretsLocationsChangeRequest` was added + +* `models.EdgeMachine$DefinitionStages` was added + +* `models.OsImageProperties` was added + +* `models.EdgeMachineJob$DefinitionStages` was added + +* `models.EdgeMachineRemoteSupportJobReportedProperties` was added + +* `models.DownloadOsJobProperties` was added + +* `models.EdgeMachineJob$Definition` was added + +* `models.RemoteSupportAccessLevel` was added + +* `models.OnboardingConfiguration` was added + +* `models.PlatformUpdates` was added + +* `models.LogCollectionJobSession` was added + +* `models.ValidatedSolutionRecipeCapabilities` was added + +* `models.SecretsType` was added + +* `models.AssemblyInfoPayload` was added + +* `models.ClusterSdnProperties` was added + +* `models.KubernetesVersions` was added + +* `models.RemoteSupportJobReportedProperties` was added + +* `models.EdgeMachineNicDetail` was added + +* `models.OnboardingResourceType` was added + +* `models.EdgeMachine` was added + +* `models.UpdateContentProperties` was added + +* `models.EdgeMachineKind` was added + +* `models.RemoteSupportJobNodeSettings` was added + +* `models.RdmaCapability` was added + +* `models.OwnershipVoucherValidationStatus` was added + +* `models.SdnStatus` was added + +* `models.OwnershipVoucherDetails` was added + +* `models.OsProvisionProfile` was added + +* `models.SiteDetails` was added + +* `models.ValidateOwnershipVouchersResponse` was added + +* `models.SupportStatus` was added + +* `models.IgvmStatus` was added + +* `models.UserDetails` was added + +* `models.DeviceLogCollectionStatus` was added + +* `models.TargetDeviceConfiguration` was added + +* `models.ValidatedSolutionRecipeContent` was added + +* `models.IpAssignmentType` was added + +* `models.ServiceConfiguration` was added + +* `models.ChangeRingRequestProperties` was added + +* `models.NetworkConfiguration` was added + +* `models.ProvisioningRequest` was added + +* `models.DownloadOsProfile` was added + +* `models.PlatformUpdateDetails` was added + +* `models.OsImage` was added + +* `models.SecretsLocationDetails` was added + +* `models.ConfidentialVmProperties` was added + +* `models.ArcConnectivityProperties` was added + +* `models.EdgeMachineReportedProperties` was added + +* `models.SdnIntegrationIntent` was added + +* `models.EdgeMachineRemoteSupportNodeSettings` was added + +* `models.HciRemoteSupportJobProperties` was added + +* `models.OwnershipVoucherValidationDetails` was added + +* `models.IdentityProvider` was added + +* `models.NetworkAdapter` was added + +* `models.KubernetesVersionProperties` was added + +* `models.ProvisioningOsType` was added + +* `models.HardwareClass` was added + +* `models.EdgeMachineJob$Update` was added + +* `models.EdgeMachine$UpdateStages` was added + +* `models.EdgeMachineJobType` was added + +* `models.OwnerKeyType` was added + +* `models.EdgeMachineCollectLogJobReportedProperties` was added + +* `models.OperationDetail` was added + +* `models.StorageProfile` was added + +* `models.HardwareProfile` was added + +* `models.EdgeMachineConnectivityStatus` was added + +* `models.ValidatedSolutionRecipeCapability` was added + +* `models.ServiceName` was added + +* `models.OwnershipVouchers` was added + +* `models.EdgeMachineCollectLogJobProperties` was added + +* `models.EdgeDeviceJob` was added + +* `models.LogCollectionReportedProperties` was added + +* `models.EdgeMachineState` was added + +* `models.WebProxyConfiguration` was added + +* `models.SdnProperties` was added + +* `models.EdgeMachineJob$UpdateStages` was added + +* `models.EdgeDeviceKind` was added + +* `models.ChangeRingRequest` was added + +* `models.ValidatedSolutionRecipeProperties` was added + +* `models.ProvisioningDetails` was added + +* `models.HciEdgeDeviceJob` was added + +* `models.EdgeMachine$Update` was added + +* `models.OsProfile` was added + +* `models.PlatformUpdate` was added + +* `models.ConfidentialVmStatus` was added + +* `models.ValidatedSolutionRecipe` was added + +* `models.EdgeMachineNetworkProfile` was added + +* `models.HciCollectLogJobProperties` was added + +#### `models.DeploymentData` was modified + +* `isManagementCluster()` was added +* `withIsManagementCluster(java.lang.Boolean)` was added +* `withAssemblyInfo(models.AssemblyInfo)` was added +* `assemblyInfo()` was added +* `identityProvider()` was added +* `withLocalAvailabilityZones(java.util.List)` was added +* `withIdentityProvider(models.IdentityProvider)` was added +* `localAvailabilityZones()` was added + +#### `models.HciReportedProperties` was modified + +* `confidentialVmProfile()` was added +* `storageProfile()` was added +* `hardwareProfile()` was added +* `lastSyncTimestamp()` was added + +#### `models.Operation` was modified + +* `innerModel()` was added + +#### `models.ArcSetting$Definition` was modified + +* `withConnectivityProperties(models.ArcConnectivityProperties)` was added + +#### `models.Clusters` was modified + +* `changeRing(java.lang.String,java.lang.String,models.ChangeRingRequest,com.azure.core.util.Context)` was added +* `updateSecretsLocations(java.lang.String,java.lang.String,models.SecretsLocationsChangeRequest,com.azure.core.util.Context)` was added +* `changeRing(java.lang.String,java.lang.String,models.ChangeRingRequest)` 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 +* `withClusterPattern(models.ClusterPattern)` was added +* `hardwareClass()` was added + +#### `models.Cluster` was modified + +* `confidentialVmProperties()` was added +* `clusterPattern()` was added +* `localAvailabilityZones()` was added +* `changeRing(models.ChangeRingRequest)` was added +* `secretsLocations()` was added +* `changeRing(models.ChangeRingRequest,com.azure.core.util.Context)` was added +* `sdnProperties()` was added +* `supportStatus()` was added +* `updateSecretsLocations(models.SecretsLocationsChangeRequest)` was added +* `kind()` was added +* `updateSecretsLocations(models.SecretsLocationsChangeRequest,com.azure.core.util.Context)` was added +* `ring()` was added +* `isManagementCluster()` was added +* `identityProvider()` was added + +#### `models.HciNetworkProfile` was modified + +* `sdnProperties()` was added + +#### `models.InfrastructureNetwork` was modified + +* `withDnsZones(java.util.List)` was added +* `withDnsServerConfig(models.DnsServerConfig)` was added +* `dnsServerConfig()` was added +* `dnsZones()` was added + +#### `models.ReportedProperties` was modified + +* `confidentialVmProfile()` was added +* `lastSyncTimestamp()` 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,com.azure.core.util.Context)` was added +* `reconcile(models.ReconcileArcSettingsRequest)` was added + +#### `models.HciUpdate$Definition` was modified + +* `withPackageSizeInMb(java.lang.Double)` was added +* `withProgressPercentage(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 + +* `withLocalAvailabilityZones(java.util.List)` was added +* `withSecretsLocations(java.util.List)` was added +* `withKind(java.lang.String)` was added + +#### `AzureStackHciManager` was modified + +* `ownershipVouchers()` was added +* `edgeDeviceJobs()` was added +* `platformUpdates()` was added +* `updateContents()` was added +* `validatedSolutionRecipes()` was added +* `kubernetesVersions()` was added +* `edgeMachineJobs()` was added +* `edgeMachines()` was added +* `osImages()` 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..07f59c925e70 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 2025-12-01-preview. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). ## We'd love to hear your feedback @@ -52,7 +52,7 @@ Azure subscription ID can be configured via `AZURE_SUBSCRIPTION_ID` environment Assuming the use of the `DefaultAzureCredential` credential class, the client can be authenticated using the following code: ```java -AzureProfile profile = new AzureProfile(AzureEnvironment.AZURE); +AzureProfile profile = new AzureProfile(AzureCloud.AZURE_PUBLIC_CLOUD); TokenCredential credential = new DefaultAzureCredentialBuilder() .authorityHost(profile.getEnvironment().getActiveDirectoryEndpoint()) .build(); @@ -60,7 +60,7 @@ 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..d8409c126c67 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/SAMPLE.md +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/SAMPLE.md @@ -11,10 +11,12 @@ - [Get](#arcsettings_get) - [InitializeDisableProcess](#arcsettings_initializedisableprocess) - [ListByCluster](#arcsettings_listbycluster) +- [Reconcile](#arcsettings_reconcile) - [Update](#arcsettings_update) ## Clusters +- [ChangeRing](#clusters_changering) - [ConfigureRemoteSupport](#clusters_configureremotesupport) - [Create](#clusters_create) - [CreateIdentity](#clusters_createidentity) @@ -25,6 +27,7 @@ - [ListByResourceGroup](#clusters_listbyresourcegroup) - [TriggerLogCollection](#clusters_triggerlogcollection) - [Update](#clusters_update) +- [UpdateSecretsLocations](#clusters_updatesecretslocations) - [UploadCertificate](#clusters_uploadcertificate) ## DeploymentSettings @@ -34,6 +37,13 @@ - [Get](#deploymentsettings_get) - [ListByClusters](#deploymentsettings_listbyclusters) +## EdgeDeviceJobs + +- [CreateOrUpdate](#edgedevicejobs_createorupdate) +- [Delete](#edgedevicejobs_delete) +- [Get](#edgedevicejobs_get) +- [ListByEdgeDevice](#edgedevicejobs_listbyedgedevice) + ## EdgeDevices - [CreateOrUpdate](#edgedevices_createorupdate) @@ -42,6 +52,22 @@ - [List](#edgedevices_list) - [Validate](#edgedevices_validate) +## EdgeMachineJobs + +- [CreateOrUpdate](#edgemachinejobs_createorupdate) +- [Delete](#edgemachinejobs_delete) +- [Get](#edgemachinejobs_get) +- [List](#edgemachinejobs_list) + +## EdgeMachines + +- [CreateOrUpdate](#edgemachines_createorupdate) +- [Delete](#edgemachines_delete) +- [GetByResourceGroup](#edgemachines_getbyresourcegroup) +- [List](#edgemachines_list) +- [ListByResourceGroup](#edgemachines_listbyresourcegroup) +- [Update](#edgemachines_update) + ## Extensions - [Create](#extensions_create) @@ -51,6 +77,10 @@ - [Update](#extensions_update) - [Upgrade](#extensions_upgrade) +## KubernetesVersions + +- [ListBySubscriptionLocationResource](#kubernetesversions_listbysubscriptionlocationresource) + ## Offers - [Get](#offers_get) @@ -61,6 +91,20 @@ - [List](#operations_list) +## OsImages + +- [Get](#osimages_get) +- [ListBySubscriptionLocationResource](#osimages_listbysubscriptionlocationresource) + +## OwnershipVouchers + +- [Validate](#ownershipvouchers_validate) + +## PlatformUpdates + +- [Get](#platformupdates_get) +- [List](#platformupdates_list) + ## Publishers - [Get](#publishers_get) @@ -78,6 +122,11 @@ - [Get](#skus_get) - [ListByOffer](#skus_listbyoffer) +## UpdateContents + +- [Get](#updatecontents_get) +- [List](#updatecontents_list) + ## UpdateRuns - [Delete](#updateruns_delete) @@ -99,6 +148,11 @@ - [List](#updates_list) - [Post](#updates_post) - [Put](#updates_put) + +## ValidatedSolutionRecipes + +- [Get](#validatedsolutionrecipes_get) +- [ListBySubscriptionLocationResource](#validatedsolutionrecipes_listbysubscriptionlocationresource) ### ArcSettings_ConsentAndInstallDefaultExtensions ```java @@ -107,9 +161,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: 2025-12-01-preview/ConsentAndInstallDefaultExtensions.json */ /** * Sample code: Consent And Install Default Extensions. @@ -133,9 +185,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: 2025-12-01-preview/PutArcSetting.json */ /** * Sample code: Create ArcSetting. @@ -156,9 +206,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: 2025-12-01-preview/CreateArcIdentity.json */ /** * Sample code: Create Arc Identity. @@ -179,9 +227,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: 2025-12-01-preview/DeleteArcSetting.json */ /** * Sample code: Delete ArcSetting. @@ -202,9 +248,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: 2025-12-01-preview/GeneratePassword.json */ /** * Sample code: Generate Password. @@ -226,9 +270,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: 2025-12-01-preview/GetArcSetting.json */ /** * Sample code: Get ArcSetting. @@ -249,9 +291,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: 2025-12-01-preview/InitializeDisableProcess.json */ /** * Sample code: Trigger ARC Disable. @@ -273,9 +313,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: 2025-12-01-preview/ListArcSettingsByCluster.json */ /** * Sample code: List ArcSetting resources by HCI Cluster. @@ -289,42 +327,98 @@ 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: 2025-12-01-preview/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: 2025-12-01-preview/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(); } } ``` +### Clusters_ChangeRing + +```java +import com.azure.resourcemanager.azurestackhci.models.ChangeRingRequest; +import com.azure.resourcemanager.azurestackhci.models.ChangeRingRequestProperties; + +/** + * Samples for Clusters ChangeRing. + */ +public final class ClustersChangeRingSamples { + /* + * x-ms-original-file: 2025-12-01-preview/ChangeClusterRing.json + */ + /** + * Sample code: Change cluster ring. + * + * @param manager Entry point to AzureStackHciManager. + */ + public static void changeClusterRing(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { + manager.clusters() + .changeRing("test-rg", "myCluster", + new ChangeRingRequest().withProperties(new ChangeRingRequestProperties().withTargetRing("Insider")), + com.azure.core.util.Context.NONE); + } +} +``` + ### Clusters_ConfigureRemoteSupport ```java @@ -338,9 +432,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: 2025-12-01-preview/ConfigureRemoteSupport.json */ /** * Sample code: Configure Remote Support. @@ -368,9 +460,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: 2025-12-01-preview/CreateCluster.json */ /** * Sample code: Create cluster. @@ -382,10 +472,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 +489,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: 2025-12-01-preview/CreateClusterIdentity.json */ /** * Sample code: Create cluster Identity. @@ -422,9 +510,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: 2025-12-01-preview/DeleteCluster.json */ /** * Sample code: Delete cluster. @@ -449,9 +535,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: 2025-12-01-preview/ExtendSoftwareAssuranceBenefit.json */ /** * Sample code: Create cluster Identity. @@ -476,9 +560,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: 2025-12-01-preview/GetCluster.json */ /** * Sample code: Get cluster. @@ -499,9 +581,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: 2025-12-01-preview/ListClustersBySubscription.json */ /** * Sample code: List clusters in a given subscription. @@ -523,9 +603,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: 2025-12-01-preview/ListClustersByResourceGroup.json */ /** * Sample code: List clusters in a given resource group. @@ -551,9 +629,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: 2025-12-01-preview/TriggerLogCollection.json */ /** * Sample code: Trigger Log Collection. @@ -587,9 +663,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: 2025-12-01-preview/UpdateCluster.json */ /** * Sample code: Update cluster. @@ -624,6 +698,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: 2025-12-01-preview/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 +742,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: 2025-12-01-preview/UploadCertificate.json */ /** * Sample code: Upload certificate. @@ -669,8 +773,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 +801,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: 2025-12-01-preview/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: 2025-12-01-preview/PutDeploymentSettings.json */ /** * Sample code: Create Deployment Settings. @@ -742,6 +960,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 +997,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 +1035,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: 2025-12-01-preview/DeleteDeploymentSettings.json */ /** * Sample code: Delete Deployment Settings. @@ -838,196 +1056,780 @@ 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: 2025-12-01-preview/GetDeploymentSettings.json + */ + /** + * Sample code: Get Deployment Settings. + * + * @param manager Entry point to AzureStackHciManager. + */ + public static void getDeploymentSettings(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { + manager.deploymentSettings() + .getWithResponse("test-rg", "myCluster", "default", com.azure.core.util.Context.NONE); + } +} +``` + +### DeploymentSettings_ListByClusters + +```java +/** + * Samples for DeploymentSettings ListByClusters. + */ +public final class DeploymentSettingsListByClustersSamples { + /* + * x-ms-original-file: 2025-12-01-preview/ListDeploymentSettingsByCluster.json + */ + /** + * Sample code: List Deployment Settings. + * + * @param manager Entry point to AzureStackHciManager. + */ + public static void listDeploymentSettings(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { + manager.deploymentSettings().listByClusters("test-rg", "myCluster", com.azure.core.util.Context.NONE); + } +} +``` + +### 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: 2025-12-01-preview/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: 2025-12-01-preview/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: 2025-12-01-preview/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: 2025-12-01-preview/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: 2025-12-01-preview/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 +import com.azure.resourcemanager.azurestackhci.models.DeviceConfiguration; +import com.azure.resourcemanager.azurestackhci.models.HciEdgeDevice; +import com.azure.resourcemanager.azurestackhci.models.HciEdgeDeviceProperties; +import com.azure.resourcemanager.azurestackhci.models.NicDetail; +import java.util.Arrays; + +/** + * Samples for EdgeDevices CreateOrUpdate. + */ +public final class EdgeDevicesCreateOrUpdateSamples { + /* + * x-ms-original-file: 2025-12-01-preview/CreateHciEdgeDevice.json + */ + /** + * Sample code: Create HCI Edge Device. + * + * @param manager Entry point to AzureStackHciManager. + */ + public static void createHCIEdgeDevice(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { + manager.edgeDevices() + .createOrUpdate( + "subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/ArcInstance-rg/providers/Microsoft.HybridCompute/machines/Node-1", + "default", + new HciEdgeDevice().withProperties(new HciEdgeDeviceProperties().withDeviceConfiguration( + new DeviceConfiguration().withNicDetails(Arrays.asList(new NicDetail().withAdapterName("ethernet") + .withInterfaceDescription("NDIS 6.70 ") + .withComponentId("VMBUS{f8615163-df3e-46c5-913f-f2d2f965ed0g} ") + .withDriverVersion("10.0.20348.1547 ") + .withIp4Address("10.10.10.10") + .withSubnetMask("255.255.255.0") + .withDefaultGateway("10.10.10.1") + .withDnsServers(Arrays.asList("100.10.10.1")) + .withDefaultIsolationId("0"))).withDeviceMetadata(""))), + com.azure.core.util.Context.NONE); + } +} +``` + +### EdgeDevices_Delete + +```java +/** + * Samples for EdgeDevices Delete. + */ +public final class EdgeDevicesDeleteSamples { + /* + * x-ms-original-file: 2025-12-01-preview/DeleteEdgeDevices.json + */ + /** + * Sample code: Delete Edge Devices. + * + * @param manager Entry point to AzureStackHciManager. + */ + public static void deleteEdgeDevices(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { + manager.edgeDevices() + .delete( + "subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/ArcInstance-rg/providers/Microsoft.HybridCompute/machines/Node-1", + "default", com.azure.core.util.Context.NONE); + } +} +``` + +### EdgeDevices_Get + +```java +/** + * Samples for EdgeDevices Get. + */ +public final class EdgeDevicesGetSamples { + /* + * x-ms-original-file: 2025-12-01-preview/GetEdgeDevices.json + */ + /** + * Sample code: Get Edge Device. + * + * @param manager Entry point to AzureStackHciManager. + */ + public static void getEdgeDevice(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { + manager.edgeDevices() + .getWithResponse( + "subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/ArcInstance-rg/providers/Microsoft.HybridCompute/machines/Node-1", + "default", com.azure.core.util.Context.NONE); + } +} +``` + +### EdgeDevices_List + +```java +/** + * Samples for EdgeDevices List. + */ +public final class EdgeDevicesListSamples { + /* + * x-ms-original-file: 2025-12-01-preview/ListEdgeDevices.json + */ + /** + * Sample code: List Edge Devices. + * + * @param manager Entry point to AzureStackHciManager. + */ + public static void listEdgeDevices(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { + manager.edgeDevices() + .list( + "subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/ArcInstance-rg/providers/Microsoft.HybridCompute/machines/Node-1", + com.azure.core.util.Context.NONE); + } +} +``` + +### EdgeDevices_Validate + +```java +import com.azure.resourcemanager.azurestackhci.models.ValidateRequest; +import java.util.Arrays; + +/** + * Samples for EdgeDevices Validate. + */ +public final class EdgeDevicesValidateSamples { + /* + * x-ms-original-file: 2025-12-01-preview/ValidateEdgeDevices.json + */ + /** + * Sample code: Validate Edge Devices. + * + * @param manager Entry point to AzureStackHciManager. + */ + public static void validateEdgeDevices(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { + manager.edgeDevices() + .validate( + "subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/ArcInstance-rg/providers/Microsoft.HybridCompute/machines/Node-1", + "default", + new ValidateRequest().withEdgeDeviceIds(Arrays.asList( + "/subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/ArcInstance-rg/providers/Microsoft.HybridCompute/machines/Node-1/edgeDevices/default", + "/subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/ArcInstance-rg/providers/Microsoft.HybridCompute/machines/Node-2/edgeDevices/default")) + .withAdditionalInfo("test"), + com.azure.core.util.Context.NONE); + } +} +``` + +### EdgeMachineJobs_CreateOrUpdate + +```java +import com.azure.resourcemanager.azurestackhci.models.DeploymentMode; +import com.azure.resourcemanager.azurestackhci.models.DownloadOsJobProperties; +import com.azure.resourcemanager.azurestackhci.models.DownloadOsProfile; +import com.azure.resourcemanager.azurestackhci.models.DownloadRequest; +import com.azure.resourcemanager.azurestackhci.models.EdgeMachineJobProperties; +import com.azure.resourcemanager.azurestackhci.models.EdgeMachineRemoteSupportJobProperties; +import com.azure.resourcemanager.azurestackhci.models.IpAddressRange; +import com.azure.resourcemanager.azurestackhci.models.IpAssignmentType; +import com.azure.resourcemanager.azurestackhci.models.NetworkAdapter; +import com.azure.resourcemanager.azurestackhci.models.NetworkConfiguration; +import com.azure.resourcemanager.azurestackhci.models.OSOperationType; +import com.azure.resourcemanager.azurestackhci.models.OnboardingConfiguration; +import com.azure.resourcemanager.azurestackhci.models.OnboardingResourceType; +import com.azure.resourcemanager.azurestackhci.models.OsProvisionProfile; +import com.azure.resourcemanager.azurestackhci.models.ProvisionOsJobProperties; +import com.azure.resourcemanager.azurestackhci.models.ProvisioningOsType; +import com.azure.resourcemanager.azurestackhci.models.ProvisioningRequest; +import com.azure.resourcemanager.azurestackhci.models.RemoteSupportAccessLevel; +import com.azure.resourcemanager.azurestackhci.models.RemoteSupportType; +import com.azure.resourcemanager.azurestackhci.models.SecretType; +import com.azure.resourcemanager.azurestackhci.models.StorageConfiguration; +import com.azure.resourcemanager.azurestackhci.models.TargetDeviceConfiguration; +import com.azure.resourcemanager.azurestackhci.models.TimeConfiguration; +import com.azure.resourcemanager.azurestackhci.models.UserDetails; +import com.azure.resourcemanager.azurestackhci.models.WebProxyConfiguration; +import java.time.OffsetDateTime; +import java.util.Arrays; + +/** + * Samples for EdgeMachineJobs CreateOrUpdate. + */ +public final class EdgeMachineJobsCreateOrUpdateSamples { + /* + * x-ms-original-file: 2025-12-01-preview/EdgeMachineJobs_CreateOrUpdate_DownloadOs.json + */ + /** + * Sample code: EdgeMachineJobs_CreateOrUpdate_DownloadOs. + * + * @param manager Entry point to AzureStackHciManager. + */ + public static void + edgeMachineJobsCreateOrUpdateDownloadOs(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { + manager.edgeMachineJobs() + .define("DownloadOs") + .withExistingEdgeMachine("ArcInstance-rg", "machine1") + .withProperties(new DownloadOsJobProperties().withDeploymentMode(DeploymentMode.DEPLOY) + .withDownloadRequest(new DownloadRequest().withTarget(ProvisioningOsType.AZURE_LINUX) + .withOsProfile(new DownloadOsProfile().withOsName("AzureLinux") + .withOsType("AzureLinux") + .withOsVersion("3.0") + .withOsImageLocation("https://aka.ms/aep/azlinux3.0") + .withVsrVersion("1.0.0") + .withImageHash("sha256:a8b1c2d3e4f5a6b7c8d9e0f1a2b3c4d5e6f7a8b9c0d1e2f3a4b5c6d7e8f9a0b1") + .withGpgPubKey("fakeTokenPlaceholder")))) + .create(); + } + + /* + * x-ms-original-file: 2025-12-01-preview/EdgeMachineJobs_CreateOrUpdate_ProvisionOs.json + */ + /** + * Sample code: EdgeMachineJobs_CreateOrUpdate_ProvisionOs. + * + * @param manager Entry point to AzureStackHciManager. + */ + public static void + edgeMachineJobsCreateOrUpdateProvisionOs(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { + manager.edgeMachineJobs() + .define("ProvisionOs") + .withExistingEdgeMachine("ArcInstance-rg", "machine1") + .withProperties(new ProvisionOsJobProperties().withDeploymentMode(DeploymentMode.DEPLOY) + .withProvisioningRequest(new ProvisioningRequest().withTarget(ProvisioningOsType.AZURE_LINUX) + .withOsProfile(new OsProvisionProfile().withOsName("AzureLinux") + .withOsType("AzureLinux") + .withOsVersion("3.0") + .withOsImageLocation("https://aka.ms/aep/azlinux3.0") + .withVsrVersion("1.0.0") + .withImageHash("sha256:a1b2c3d4e5f6789012345678901234567890abcdef1234567890abcdef123456") + .withGpgPubKey("fakeTokenPlaceholder") + .withOperationType(OSOperationType.PROVISION)) + .withUserDetails(Arrays.asList(new UserDetails().withUserName("edgeuser") + .withSecretType(SecretType.KEY_VAULT) + .withSecretLocation("fakeTokenPlaceholder") + .withSshPubKey( + Arrays.asList("ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC7... edgeuser@example.com")))) + .withOnboardingConfiguration(new OnboardingConfiguration() + .withType(OnboardingResourceType.HYBRID_COMPUTE_MACHINE) + .withResourceId( + "/subscriptions/ff0aa6da-20f8-44fe-9aee-381c8e8a4aeb/resourceGroups/bhukumar-test-rg/providers/Microsoft.HybridCompute/machines/bkumar-t1") + .withLocation("eastus") + .withTenantId("72f988bf-86f1-41af-91ab-2d7cd011db47") + .withArcVirtualMachineId("634b9db8-83e1-46ed-b391-c1614e2d0097")) + .withDeviceConfiguration(new TargetDeviceConfiguration() + .withNetwork(new NetworkConfiguration().withNetworkAdapters( + Arrays.asList(new NetworkAdapter().withIpAssignmentType(IpAssignmentType.AUTOMATIC) + .withIpAddress("") + .withIpAddressRange(new IpAddressRange().withStartIp("").withEndIp("")) + .withGateway("") + .withSubnetMask("") + .withDnsAddressArray(Arrays.asList("8.8.8.8")) + .withVlanId("0")))) + .withHostName("634b9db8-83e1-46ed-b391-c1614e2d0097") + .withWebProxy(new WebProxyConfiguration().withConnectionUri("https://microsoft.com/a") + .withPort("") + .withBypassList(Arrays.asList())) + .withTime(new TimeConfiguration().withPrimaryTimeServer("") + .withSecondaryTimeServer("") + .withTimeZone("UTC")) + .withStorage(new StorageConfiguration().withPartitionSize("30GB"))) + .withCustomConfiguration("eyJjdXN0b21Db25maWciOiAiZXhhbXBsZSBiYXNlNjQgZW5jb2RlZCBjb25maWcifQ=="))) + .create(); + } + + /* + * x-ms-original-file: 2025-12-01-preview/EdgeMachineJobs_CreateOrUpdate_UpdateOs.json + */ + /** + * Sample code: EdgeMachineJobs_CreateOrUpdate_UpdateOs. + * + * @param manager Entry point to AzureStackHciManager. + */ + public static void + edgeMachineJobsCreateOrUpdateUpdateOs(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { + manager.edgeMachineJobs() + .define("UpdateOs") + .withExistingEdgeMachine("ArcInstance-rg", "machine1") + .withProperties(new ProvisionOsJobProperties().withDeploymentMode(DeploymentMode.DEPLOY) + .withProvisioningRequest(new ProvisioningRequest().withTarget(ProvisioningOsType.AZURE_LINUX) + .withOsProfile(new OsProvisionProfile().withOsName("AzureLinux") + .withOsType("AzureLinux") + .withOsVersion("3.1") + .withOsImageLocation("https://aka.ms/aep/azlinux3.1") + .withVsrVersion("1.1.0") + .withImageHash("sha256:b2c3d4e5f6789012345678901234567890abcdef1234567890abcdef12345678") + .withGpgPubKey("fakeTokenPlaceholder") + .withOperationType(OSOperationType.UPDATE)) + .withUserDetails(Arrays.asList(new UserDetails().withUserName("edgeuser") + .withSecretType(SecretType.KEY_VAULT) + .withSecretLocation("fakeTokenPlaceholder") + .withSshPubKey( + Arrays.asList("ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC7... edgeuser@example.com")))) + .withOnboardingConfiguration(new OnboardingConfiguration() + .withType(OnboardingResourceType.HYBRID_COMPUTE_MACHINE) + .withResourceId( + "/subscriptions/ff0aa6da-20f8-44fe-9aee-381c8e8a4aeb/resourceGroups/bhukumar-test-rg/providers/Microsoft.HybridCompute/machines/bkumar-t1") + .withLocation("eastus") + .withTenantId("72f988bf-86f1-41af-91ab-2d7cd011db47") + .withArcVirtualMachineId("634b9db8-83e1-46ed-b391-c1614e2d0097")) + .withDeviceConfiguration(new TargetDeviceConfiguration() + .withNetwork(new NetworkConfiguration().withNetworkAdapters( + Arrays.asList(new NetworkAdapter().withIpAssignmentType(IpAssignmentType.AUTOMATIC) + .withIpAddress("") + .withIpAddressRange(new IpAddressRange().withStartIp("").withEndIp("")) + .withGateway("") + .withSubnetMask("") + .withDnsAddressArray(Arrays.asList("8.8.8.8")) + .withVlanId("0")))) + .withHostName("634b9db8-83e1-46ed-b391-c1614e2d0097") + .withWebProxy(new WebProxyConfiguration().withConnectionUri("https://microsoft.com/a") + .withPort("") + .withBypassList(Arrays.asList())) + .withTime(new TimeConfiguration().withPrimaryTimeServer("") + .withSecondaryTimeServer("") + .withTimeZone("UTC"))) + .withCustomConfiguration("eyJjdXN0b21Db25maWciOiAiZXhhbXBsZSBiYXNlNjQgZW5jb2RlZCBjb25maWcifQ=="))) + .create(); + } + + /* + * x-ms-original-file: 2025-12-01-preview/EdgeMachineJobs_CreateOrUpdate_CollectLog.json + */ + /** + * Sample code: EdgeMachineJobs_CreateOrUpdate_CollectLog. + * + * @param manager Entry point to AzureStackHciManager. + */ + public static void + edgeMachineJobsCreateOrUpdateCollectLog(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { + manager.edgeMachineJobs() + .define("triggerLogCollection") + .withExistingEdgeMachine("ArcInstance-rg", "machine1") + .withProperties(new EdgeMachineJobProperties().withDeploymentMode(DeploymentMode.VALIDATE)) + .create(); + } + + /* + * x-ms-original-file: 2025-12-01-preview/EdgeMachineJobs_CreateOrUpdate_RemoteSupport.json + */ + /** + * Sample code: EdgeMachineJobs_CreateOrUpdate_RemoteSupport. + * + * @param manager Entry point to AzureStackHciManager. + */ + public static void edgeMachineJobsCreateOrUpdateRemoteSupport( + com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { + manager.edgeMachineJobs() + .define("RemoteSupport") + .withExistingEdgeMachine("ArcInstance-rg", "machine1") + .withProperties( + new EdgeMachineRemoteSupportJobProperties().withAccessLevel(RemoteSupportAccessLevel.DIAGNOSTICS) + .withExpirationTimestamp(OffsetDateTime.parse("2024-01-29T10:43:27.9471574Z")) + .withType(RemoteSupportType.ENABLE)) + .create(); + } +} +``` + +### EdgeMachineJobs_Delete + +```java +/** + * Samples for EdgeMachineJobs Delete. + */ +public final class EdgeMachineJobsDeleteSamples { + /* + * x-ms-original-file: 2025-12-01-preview/EdgeMachineJobs_Delete_MaximumSet_Gen.json + */ + /** + * Sample code: EdgeMachineJobs_Delete_MaximumSet. + * + * @param manager Entry point to AzureStackHciManager. + */ + public static void + edgeMachineJobsDeleteMaximumSet(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { + manager.edgeMachineJobs() + .delete("ArcInstance-rg", "machine1", "triggerLogCollection", com.azure.core.util.Context.NONE); + } +} +``` + +### EdgeMachineJobs_Get + +```java +/** + * Samples for EdgeMachineJobs Get. + */ +public final class EdgeMachineJobsGetSamples { + /* + * x-ms-original-file: 2025-12-01-preview/EdgeMachineJobs_Get_ProvisionOs.json + */ + /** + * Sample code: EdgeMachineJobs_Get_ProvisionOs. + * + * @param manager Entry point to AzureStackHciManager. + */ + public static void + edgeMachineJobsGetProvisionOs(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { + manager.edgeMachineJobs() + .getWithResponse("ArcInstance-rg", "machine1", "ProvisionOs", com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: 2025-12-01-preview/EdgeMachineJobs_Get_CollectLog.json + */ + /** + * Sample code: EdgeMachineJobs_Get_CollectLog. + * + * @param manager Entry point to AzureStackHciManager. + */ + public static void + edgeMachineJobsGetCollectLog(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { + manager.edgeMachineJobs() + .getWithResponse("ArcInstance-rg", "machine1", "collectLog", com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: 2025-12-01-preview/EdgeMachineJobs_Get_RemoteSupport.json + */ + /** + * Sample code: EdgeMachineJobs_Get_RemoteSupport. + * + * @param manager Entry point to AzureStackHciManager. + */ + public static void + edgeMachineJobsGetRemoteSupport(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { + manager.edgeMachineJobs() + .getWithResponse("ArcInstance-rg", "machine1", "RemoteSupport", com.azure.core.util.Context.NONE); + } +} +``` + +### EdgeMachineJobs_List + +```java +/** + * Samples for EdgeMachineJobs List. + */ +public final class EdgeMachineJobsListSamples { + /* + * x-ms-original-file: 2025-12-01-preview/EdgeMachineJobs_List_MaximumSet_Gen.json */ /** - * Sample code: Get Deployment Settings. + * Sample code: EdgeMachineJobs_List_MaximumSet. * * @param manager Entry point to AzureStackHciManager. */ - public static void getDeploymentSettings(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { - manager.deploymentSettings() - .getWithResponse("test-rg", "myCluster", "default", com.azure.core.util.Context.NONE); + public static void + edgeMachineJobsListMaximumSet(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { + manager.edgeMachineJobs().list("ArcInstance-rg", "machine1", com.azure.core.util.Context.NONE); } } ``` -### DeploymentSettings_ListByClusters +### EdgeMachines_CreateOrUpdate ```java +import com.azure.resourcemanager.azurestackhci.models.EdgeMachineProperties; + /** - * Samples for DeploymentSettings ListByClusters. + * Samples for EdgeMachines CreateOrUpdate. */ -public final class DeploymentSettingsListByClustersSamples { +public final class EdgeMachinesCreateOrUpdateSamples { /* - * x-ms-original-file: - * specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/StackHCI/stable/2024-04-01/examples/ - * ListDeploymentSettingsByCluster.json + * x-ms-original-file: 2025-12-01-preview/EdgeMachines_CreateOrUpdate.json */ /** - * Sample code: List Deployment Settings. + * Sample code: EdgeMachines_CreateOrUpdate. * * @param manager Entry point to AzureStackHciManager. */ - public static void listDeploymentSettings(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { - manager.deploymentSettings().listByClusters("test-rg", "myCluster", com.azure.core.util.Context.NONE); + public static void + edgeMachinesCreateOrUpdate(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { + manager.edgeMachines() + .define("machine-1") + .withRegion("eastus") + .withExistingResourceGroup("ArcInstance-rg") + .withProperties(new EdgeMachineProperties() + .withArcMachineResourceGroupId( + "/subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/ArcInstance-rg") + .withArcMachineResourceId( + "/subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/ArcInstance-rg/providers/Microsoft.HybridCompute/machines/Node-1")) + .create(); } } ``` -### EdgeDevices_CreateOrUpdate +### EdgeMachines_Delete ```java -import com.azure.resourcemanager.azurestackhci.models.DeviceConfiguration; -import com.azure.resourcemanager.azurestackhci.models.HciEdgeDevice; -import com.azure.resourcemanager.azurestackhci.models.HciEdgeDeviceProperties; -import com.azure.resourcemanager.azurestackhci.models.NicDetail; -import java.util.Arrays; - /** - * Samples for EdgeDevices CreateOrUpdate. + * Samples for EdgeMachines Delete. */ -public final class EdgeDevicesCreateOrUpdateSamples { +public final class EdgeMachinesDeleteSamples { /* - * x-ms-original-file: - * specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/StackHCI/stable/2024-04-01/examples/ - * CreateHciEdgeDevice.json + * x-ms-original-file: 2025-12-01-preview/EdgeMachines_Delete.json */ /** - * Sample code: Create HCI Edge Device. + * Sample code: EdgeMachines_Delete_MaximumSet. * * @param manager Entry point to AzureStackHciManager. */ - public static void createHCIEdgeDevice(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { - manager.edgeDevices() - .createOrUpdate( - "subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/ArcInstance-rg/providers/Microsoft.HybridCompute/machines/Node-1", - "default", - new HciEdgeDevice().withProperties(new HciEdgeDeviceProperties().withDeviceConfiguration( - new DeviceConfiguration().withNicDetails(Arrays.asList(new NicDetail().withAdapterName("ethernet") - .withInterfaceDescription("NDIS 6.70 ") - .withComponentId("VMBUS{f8615163-df3e-46c5-913f-f2d2f965ed0g} ") - .withDriverVersion("10.0.20348.1547 ") - .withIp4Address("10.10.10.10") - .withSubnetMask("255.255.255.0") - .withDefaultGateway("10.10.10.1") - .withDnsServers(Arrays.asList("100.10.10.1")) - .withDefaultIsolationId("0"))).withDeviceMetadata(""))), - com.azure.core.util.Context.NONE); + public static void + edgeMachinesDeleteMaximumSet(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { + manager.edgeMachines().delete("ArcInstance-rg", "machine-1", com.azure.core.util.Context.NONE); } } ``` -### EdgeDevices_Delete +### EdgeMachines_GetByResourceGroup ```java /** - * Samples for EdgeDevices Delete. + * Samples for EdgeMachines GetByResourceGroup. */ -public final class EdgeDevicesDeleteSamples { +public final class EdgeMachinesGetByResourceGroupSamples { /* - * x-ms-original-file: - * specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/StackHCI/stable/2024-04-01/examples/ - * DeleteEdgeDevices.json + * x-ms-original-file: 2025-12-01-preview/EdgeMachines_Get.json */ /** - * Sample code: Delete Edge Devices. + * Sample code: EdgeMachines_Get_MaximumSet. * * @param manager Entry point to AzureStackHciManager. */ - public static void deleteEdgeDevices(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { - manager.edgeDevices() - .delete( - "subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/ArcInstance-rg/providers/Microsoft.HybridCompute/machines/Node-1", - "default", com.azure.core.util.Context.NONE); + public static void edgeMachinesGetMaximumSet(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { + manager.edgeMachines() + .getByResourceGroupWithResponse("ArcInstance-rg", "machine-1", com.azure.core.util.Context.NONE); } } ``` -### EdgeDevices_Get +### EdgeMachines_List ```java /** - * Samples for EdgeDevices Get. + * Samples for EdgeMachines List. */ -public final class EdgeDevicesGetSamples { +public final class EdgeMachinesListSamples { /* - * x-ms-original-file: - * specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/StackHCI/stable/2024-04-01/examples/ - * GetEdgeDevices.json + * x-ms-original-file: 2025-12-01-preview/EdgeMachines_ListBySubscription.json */ /** - * Sample code: Get Edge Device. + * Sample code: List edge machines in a given subscription. * * @param manager Entry point to AzureStackHciManager. */ - public static void getEdgeDevice(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { - manager.edgeDevices() - .getWithResponse( - "subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/ArcInstance-rg/providers/Microsoft.HybridCompute/machines/Node-1", - "default", com.azure.core.util.Context.NONE); + public static void + listEdgeMachinesInAGivenSubscription(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { + manager.edgeMachines().list(com.azure.core.util.Context.NONE); } } ``` -### EdgeDevices_List +### EdgeMachines_ListByResourceGroup ```java /** - * Samples for EdgeDevices List. + * Samples for EdgeMachines ListByResourceGroup. */ -public final class EdgeDevicesListSamples { +public final class EdgeMachinesListByResourceGroupSamples { /* - * x-ms-original-file: - * specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/StackHCI/stable/2024-04-01/examples/ - * ListEdgeDevices.json + * x-ms-original-file: 2025-12-01-preview/EdgeMachines_ListByResourceGroup.json */ /** - * Sample code: List Edge Devices. + * Sample code: List edge machines in a given resource group. * * @param manager Entry point to AzureStackHciManager. */ - public static void listEdgeDevices(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { - manager.edgeDevices() - .list( - "subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/ArcInstance-rg/providers/Microsoft.HybridCompute/machines/Node-1", - com.azure.core.util.Context.NONE); + public static void + listEdgeMachinesInAGivenResourceGroup(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { + manager.edgeMachines().listByResourceGroup("ArcInstance-rg", com.azure.core.util.Context.NONE); } } ``` -### EdgeDevices_Validate +### EdgeMachines_Update ```java -import com.azure.resourcemanager.azurestackhci.models.ValidateRequest; -import java.util.Arrays; +import com.azure.resourcemanager.azurestackhci.models.EdgeMachine; +import java.util.HashMap; +import java.util.Map; /** - * Samples for EdgeDevices Validate. + * Samples for EdgeMachines Update. */ -public final class EdgeDevicesValidateSamples { +public final class EdgeMachinesUpdateSamples { /* - * x-ms-original-file: - * specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/StackHCI/stable/2024-04-01/examples/ - * ValidateEdgeDevices.json + * x-ms-original-file: 2025-12-01-preview/EdgeMachines_Update.json */ /** - * Sample code: Validate Edge Devices. + * Sample code: EdgeMachines_Update. * * @param manager Entry point to AzureStackHciManager. */ - public static void validateEdgeDevices(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { - manager.edgeDevices() - .validate( - "subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/ArcInstance-rg/providers/Microsoft.HybridCompute/machines/Node-1", - "default", - new ValidateRequest().withEdgeDeviceIds(Arrays.asList( - "/subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/ArcInstance-rg/providers/Microsoft.HybridCompute/machines/Node-1/edgeDevices/default", - "/subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/ArcInstance-rg/providers/Microsoft.HybridCompute/machines/Node-2/edgeDevices/default")) - .withAdditionalInfo("test"), - com.azure.core.util.Context.NONE); + public static void edgeMachinesUpdate(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { + EdgeMachine resource = manager.edgeMachines() + .getByResourceGroupWithResponse("ArcInstance-rg", "machine-1", com.azure.core.util.Context.NONE) + .getValue(); + resource.update().withTags(mapOf("key2335", "fakeTokenPlaceholder")).apply(); + } + + // 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; } } ``` @@ -1044,9 +1846,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: 2025-12-01-preview/PutExtension.json */ /** * Sample code: Create Arc Extension. @@ -1079,9 +1879,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: 2025-12-01-preview/DeleteExtension.json */ /** * Sample code: Delete Arc Extension. @@ -1103,9 +1901,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: 2025-12-01-preview/GetExtension.json */ /** * Sample code: Get ArcSettings Extension. @@ -1128,9 +1924,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: 2025-12-01-preview/ListExtensionsByArcSetting.json */ /** * Sample code: List Extensions under ArcSetting resource. @@ -1158,9 +1952,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: 2025-12-01-preview/PatchExtension.json */ /** * Sample code: Update Arc Extension. @@ -1195,9 +1987,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: 2025-12-01-preview/Extensions_Upgrade.json */ /** * Sample code: Upgrade Machine Extensions. @@ -1212,6 +2002,28 @@ public final class ExtensionsUpgradeSamples { } ``` +### KubernetesVersions_ListBySubscriptionLocationResource + +```java +/** + * Samples for KubernetesVersions ListBySubscriptionLocationResource. + */ +public final class KubernetesVersionsListBySubscriptionLocationResourceSamples { + /* + * x-ms-original-file: 2025-12-01-preview/KubernetesVersions_ListBySubscriptionLocationResource_MaximumSet_Gen.json + */ + /** + * Sample code: KubernetesVersions_ListBySubscriptionLocationResource_MaximumSet. + * + * @param manager Entry point to AzureStackHciManager. + */ + public static void kubernetesVersionsListBySubscriptionLocationResourceMaximumSet( + com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { + manager.kubernetesVersions().listBySubscriptionLocationResource("westus2", com.azure.core.util.Context.NONE); + } +} +``` + ### Offers_Get ```java @@ -1220,9 +2032,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: 2025-12-01-preview/GetOffer.json */ /** * Sample code: Get Offer. @@ -1244,9 +2054,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: 2025-12-01-preview/ListOffersByCluster.json */ /** * Sample code: List Offer resources by HCI Cluster. @@ -1268,9 +2076,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: 2025-12-01-preview/ListOffersByPublisher.json */ /** * Sample code: List Offer resources by publisher for the HCI Cluster. @@ -1292,17 +2098,135 @@ 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 + * x-ms-original-file: 2025-12-01-preview/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); + } +} +``` + +### OsImages_Get + +```java +/** + * Samples for OsImages Get. + */ +public final class OsImagesGetSamples { + /* + * x-ms-original-file: 2025-12-01-preview/OsImages_Get_MaximumSet_Gen.json + */ + /** + * Sample code: OsImages_Get_MaximumSet. + * + * @param manager Entry point to AzureStackHciManager. + */ + public static void osImagesGetMaximumSet(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { + manager.osImages().getWithResponse("arowdcr", "10.2408.0.1", com.azure.core.util.Context.NONE); + } +} +``` + +### OsImages_ListBySubscriptionLocationResource + +```java +/** + * Samples for OsImages ListBySubscriptionLocationResource. + */ +public final class OsImagesListBySubscriptionLocationResourceSamples { + /* + * x-ms-original-file: 2025-12-01-preview/OsImages_ListBySubscriptionLocationResource_MaximumSet_Gen.json + */ + /** + * Sample code: OsImages_ListBySubscriptionLocationResource_MaximumSet. + * + * @param manager Entry point to AzureStackHciManager. + */ + public static void osImagesListBySubscriptionLocationResourceMaximumSet( + com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { + manager.osImages().listBySubscriptionLocationResource("westus2", com.azure.core.util.Context.NONE); + } +} +``` + +### OwnershipVouchers_Validate + +```java +import com.azure.resourcemanager.azurestackhci.models.OwnerKeyType; +import com.azure.resourcemanager.azurestackhci.models.OwnershipVoucherDetails; +import com.azure.resourcemanager.azurestackhci.models.ValidateOwnershipVouchersRequest; +import java.util.Arrays; + +/** + * Samples for OwnershipVouchers Validate. + */ +public final class OwnershipVouchersValidateSamples { + /* + * x-ms-original-file: 2025-12-01-preview/ValidateOwnershipVouchers_ByResourceGroup.json + */ + /** + * Sample code: Validate ownership vouchers in a given resource group. + * + * @param manager Entry point to AzureStackHciManager. + */ + public static void validateOwnershipVouchersInAGivenResourceGroup( + com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { + manager.ownershipVouchers() + .validateWithResponse("ArcInstance-rg", "westus", + new ValidateOwnershipVouchersRequest().withOwnershipVoucherDetails( + Arrays.asList(new OwnershipVoucherDetails().withOwnershipVoucher("Device Model Ownership content") + .withOwnerKeyType(OwnerKeyType.MICROSOFT_MANAGED))), + com.azure.core.util.Context.NONE); + } +} +``` + +### PlatformUpdates_Get + +```java +/** + * Samples for PlatformUpdates Get. + */ +public final class PlatformUpdatesGetSamples { + /* + * x-ms-original-file: 2025-12-01-preview/PlatformUpdates_Get_MaximumSet_Gen.json + */ + /** + * Sample code: PlatformUpdates_Get_MaximumSet. + * + * @param manager Entry point to AzureStackHciManager. + */ + public static void + platformUpdatesGetMaximumSet(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { + manager.platformUpdates().getWithResponse("westus2", "10.2408.0.1", com.azure.core.util.Context.NONE); + } +} +``` + +### PlatformUpdates_List + +```java +/** + * Samples for PlatformUpdates List. + */ +public final class PlatformUpdatesListSamples { + /* + * x-ms-original-file: 2025-12-01-preview/PlatformUpdates_ListByLocation_MaximumSet_Gen.json + */ + /** + * Sample code: PlatformUpdates_ListByLocation_MaximumSet. + * + * @param manager Entry point to AzureStackHciManager. + */ + public static void + platformUpdatesListByLocationMaximumSet(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { + manager.platformUpdates().list("westus2", com.azure.core.util.Context.NONE); } } ``` @@ -1315,9 +2239,7 @@ public final class OperationsListSamples { */ public final class PublishersGetSamples { /* - * x-ms-original-file: - * specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/StackHCI/stable/2024-04-01/examples/ - * GetPublisher.json + * x-ms-original-file: 2025-12-01-preview/GetPublisher.json */ /** * Sample code: Get Publisher. @@ -1338,9 +2260,7 @@ public final class PublishersGetSamples { */ 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: 2025-12-01-preview/ListPublishersByCluster.json */ /** * Sample code: List Publisher resources by HCI Cluster. @@ -1364,9 +2284,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: 2025-12-01-preview/PutSecuritySettings.json */ /** * Sample code: Create Security Settings. @@ -1393,9 +2311,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: 2025-12-01-preview/DeleteSecuritySettings.json */ /** * Sample code: Delete Security Settings. @@ -1416,9 +2332,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: 2025-12-01-preview/GetSecuritySettings.json */ /** * Sample code: Get Security Settings. @@ -1439,9 +2353,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: 2025-12-01-preview/ListSecuritySettingsByCluster.json */ /** * Sample code: List Security Settings. @@ -1462,9 +2374,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: 2025-12-01-preview/GetSku.json */ /** * Sample code: Get Sku. @@ -1487,9 +2397,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: 2025-12-01-preview/ListSkusByOffer.json */ /** * Sample code: List SKU resources by offer for the HCI Cluster. @@ -1504,6 +2412,50 @@ public final class SkusListByOfferSamples { } ``` +### UpdateContents_Get + +```java +/** + * Samples for UpdateContents Get. + */ +public final class UpdateContentsGetSamples { + /* + * x-ms-original-file: 2025-12-01-preview/UpdateContents_Get_MaximumSet_Gen.json + */ + /** + * Sample code: UpdateContents_Get_MaximumSet. + * + * @param manager Entry point to AzureStackHciManager. + */ + public static void + updateContentsGetMaximumSet(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { + manager.updateContents().getWithResponse("westus2", "12.2510.0.1", com.azure.core.util.Context.NONE); + } +} +``` + +### UpdateContents_List + +```java +/** + * Samples for UpdateContents List. + */ +public final class UpdateContentsListSamples { + /* + * x-ms-original-file: 2025-12-01-preview/UpdateContents_ListByLocation_MaximumSet_Gen.json + */ + /** + * Sample code: UpdateContents_ListByLocation_MaximumSet. + * + * @param manager Entry point to AzureStackHciManager. + */ + public static void + updateContentsListByLocationMaximumSet(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { + manager.updateContents().list("westus2", com.azure.core.util.Context.NONE); + } +} +``` + ### UpdateRuns_Delete ```java @@ -1512,9 +2464,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: 2025-12-01-preview/DeleteUpdateRuns.json */ /** * Sample code: Delete an Update. @@ -1537,9 +2487,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: 2025-12-01-preview/GetUpdateRuns.json */ /** * Sample code: Get Update runs under cluster resource. @@ -1563,9 +2511,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: 2025-12-01-preview/ListUpdateRuns.json */ /** * Sample code: List Update runs under cluster resource. @@ -1592,9 +2538,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: 2025-12-01-preview/PutUpdateRuns.json */ /** * Sample code: Get Update runs under cluster resource. @@ -1636,9 +2580,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: 2025-12-01-preview/DeleteUpdateSummaries.json */ /** * Sample code: Delete an Update. @@ -1659,9 +2601,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: 2025-12-01-preview/GetUpdateSummaries.json */ /** * Sample code: Get Update summaries under cluster resource. @@ -1683,9 +2623,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: 2025-12-01-preview/ListUpdateSummaries.json */ /** * Sample code: Get Update summaries under cluster resource. @@ -1711,9 +2649,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: 2025-12-01-preview/PutUpdateSummaries.json */ /** * Sample code: Put Update summaries under cluster resource. @@ -1743,9 +2679,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: 2025-12-01-preview/DeleteUpdates.json */ /** * Sample code: Delete an Update. @@ -1766,9 +2700,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: 2025-12-01-preview/GetUpdates.json */ /** * Sample code: Get a specific update. @@ -1790,9 +2722,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: 2025-12-01-preview/ListUpdates.json */ /** * Sample code: List available updates. @@ -1813,9 +2743,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: 2025-12-01-preview/PostUpdates.json */ /** * Sample code: List available updates. @@ -1843,9 +2771,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: 2025-12-01-preview/PutUpdates.json */ /** * Sample code: Put a specific update. @@ -1864,7 +2790,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 +2798,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: 2025-12-01-preview/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: 2025-12-01-preview/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 f3e3ba17a71b..4fcd3cc84a88 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/pom.xml +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/pom.xml @@ -1,7 +1,7 @@ 4.0.0 @@ -17,8 +17,8 @@ 1.0.0-beta.6 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 2025-12-01-preview. https://github.com/Azure/azure-sdk-for-java @@ -48,11 +48,6 @@ true - - com.azure - azure-json - 1.5.0 - com.azure azure-core @@ -75,5 +70,10 @@ 1.18.1 test + + com.azure + azure-json + 1.5.0 + 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..78e03cbcb99a 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,72 +11,102 @@ 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.EdgeMachineJobsImpl; +import com.azure.resourcemanager.azurestackhci.implementation.EdgeMachinesImpl; import com.azure.resourcemanager.azurestackhci.implementation.ExtensionsImpl; +import com.azure.resourcemanager.azurestackhci.implementation.KubernetesVersionsImpl; import com.azure.resourcemanager.azurestackhci.implementation.OffersImpl; import com.azure.resourcemanager.azurestackhci.implementation.OperationsImpl; +import com.azure.resourcemanager.azurestackhci.implementation.OsImagesImpl; +import com.azure.resourcemanager.azurestackhci.implementation.OwnershipVouchersImpl; +import com.azure.resourcemanager.azurestackhci.implementation.PlatformUpdatesImpl; 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.UpdateContentsImpl; 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.EdgeMachineJobs; +import com.azure.resourcemanager.azurestackhci.models.EdgeMachines; import com.azure.resourcemanager.azurestackhci.models.Extensions; +import com.azure.resourcemanager.azurestackhci.models.KubernetesVersions; import com.azure.resourcemanager.azurestackhci.models.Offers; import com.azure.resourcemanager.azurestackhci.models.Operations; +import com.azure.resourcemanager.azurestackhci.models.OsImages; +import com.azure.resourcemanager.azurestackhci.models.OwnershipVouchers; +import com.azure.resourcemanager.azurestackhci.models.PlatformUpdates; 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.UpdateContents; 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 KubernetesVersions kubernetesVersions; + + private PlatformUpdates platformUpdates; + + private OsImages osImages; + + private UpdateContents updateContents; + + 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; @@ -85,16 +115,24 @@ public final class AzureStackHciManager { private UpdateRuns updateRuns; - private UpdateSummariesOperations updateSummariesOperations; - private Updates updates; - private final AzureStackHciClient clientObject; + private ValidatedSolutionRecipes validatedSolutionRecipes; + + private EdgeMachines edgeMachines; + + private EdgeMachineJobs edgeMachineJobs; + + private OwnershipVouchers ownershipVouchers; + + 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 +140,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 +153,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 +179,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 +279,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 +329,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 +342,66 @@ public AzureStackHciManager authenticate(TokenCredential credential, AzureProfil } } + /** + * Gets the resource collection API of KubernetesVersions. + * + * @return Resource collection API of KubernetesVersions. + */ + public KubernetesVersions kubernetesVersions() { + if (this.kubernetesVersions == null) { + this.kubernetesVersions = new KubernetesVersionsImpl(clientObject.getKubernetesVersions(), this); + } + return kubernetesVersions; + } + + /** + * Gets the resource collection API of PlatformUpdates. + * + * @return Resource collection API of PlatformUpdates. + */ + public PlatformUpdates platformUpdates() { + if (this.platformUpdates == null) { + this.platformUpdates = new PlatformUpdatesImpl(clientObject.getPlatformUpdates(), this); + } + return platformUpdates; + } + + /** + * Gets the resource collection API of OsImages. + * + * @return Resource collection API of OsImages. + */ + public OsImages osImages() { + if (this.osImages == null) { + this.osImages = new OsImagesImpl(clientObject.getOsImages(), this); + } + return osImages; + } + + /** + * Gets the resource collection API of UpdateContents. + * + * @return Resource collection API of UpdateContents. + */ + public UpdateContents updateContents() { + if (this.updateContents == null) { + this.updateContents = new UpdateContentsImpl(clientObject.getUpdateContents(), this); + } + return updateContents; + } + + /** + * 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 +414,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 +450,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,30 +486,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. * @@ -431,6 +534,67 @@ 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 EdgeMachines. It manages EdgeMachine. + * + * @return Resource collection API of EdgeMachines. + */ + public EdgeMachines edgeMachines() { + if (this.edgeMachines == null) { + this.edgeMachines = new EdgeMachinesImpl(clientObject.getEdgeMachines(), this); + } + return edgeMachines; + } + + /** + * Gets the resource collection API of EdgeMachineJobs. It manages EdgeMachineJob. + * + * @return Resource collection API of EdgeMachineJobs. + */ + public EdgeMachineJobs edgeMachineJobs() { + if (this.edgeMachineJobs == null) { + this.edgeMachineJobs = new EdgeMachineJobsImpl(clientObject.getEdgeMachineJobs(), this); + } + return edgeMachineJobs; + } + + /** + * Gets the resource collection API of OwnershipVouchers. + * + * @return Resource collection API of OwnershipVouchers. + */ + public OwnershipVouchers ownershipVouchers() { + if (this.ownershipVouchers == null) { + this.ownershipVouchers = new OwnershipVouchersImpl(clientObject.getOwnershipVouchers(), this); + } + return ownershipVouchers; + } + /** * Gets the resource collection API of UpdateSummariesOperations. * @@ -445,24 +609,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 62% 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..5fd0383642f4 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,41 @@ public interface AzureStackHciClient { */ Duration getDefaultPollInterval(); + /** + * Gets the KubernetesVersionsClient object to access its operations. + * + * @return the KubernetesVersionsClient object. + */ + KubernetesVersionsClient getKubernetesVersions(); + + /** + * Gets the PlatformUpdatesClient object to access its operations. + * + * @return the PlatformUpdatesClient object. + */ + PlatformUpdatesClient getPlatformUpdates(); + + /** + * Gets the OsImagesClient object to access its operations. + * + * @return the OsImagesClient object. + */ + OsImagesClient getOsImages(); + + /** + * Gets the UpdateContentsClient object to access its operations. + * + * @return the UpdateContentsClient object. + */ + UpdateContentsClient getUpdateContents(); + + /** + * Gets the OperationsClient object to access its operations. + * + * @return the OperationsClient object. + */ + OperationsClient getOperations(); + /** * Gets the ArcSettingsClient object to access its operations. * @@ -53,6 +88,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 +109,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,20 +130,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. * @@ -124,16 +159,44 @@ 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 EdgeMachinesClient object to access its operations. + * + * @return the EdgeMachinesClient object. + */ + EdgeMachinesClient getEdgeMachines(); + + /** + * Gets the EdgeMachineJobsClient object to access its operations. + * + * @return the EdgeMachineJobsClient object. + */ + EdgeMachineJobsClient getEdgeMachineJobs(); + + /** + * Gets the OwnershipVouchersClient object to access its operations. + * + * @return the OwnershipVouchersClient object. + */ + OwnershipVouchersClient getOwnershipVouchers(); + + /** + * 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..ff63396cb3c3 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; @@ -13,9 +13,11 @@ import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.azurestackhci.fluent.models.ClusterIdentityResponseInner; import com.azure.resourcemanager.azurestackhci.fluent.models.ClusterInner; +import com.azure.resourcemanager.azurestackhci.models.ChangeRingRequest; 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 +25,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 +165,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 +342,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 +357,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 +371,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 +385,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 +399,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 +415,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 +430,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,12 +446,73 @@ 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, SoftwareAssuranceChangeRequest softwareAssuranceChangeRequest, Context context); + /** + * Changes ring of a cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param changeRingRequest Change ring request payload. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is 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> beginChangeRing(String resourceGroupName, String clusterName, + ChangeRingRequest changeRingRequest); + + /** + * Changes ring of a cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param changeRingRequest Change ring request payload. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is 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> beginChangeRing(String resourceGroupName, String clusterName, + ChangeRingRequest changeRingRequest, Context context); + + /** + * Changes ring of a cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param changeRingRequest Change ring request payload. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown 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 changeRing(String resourceGroupName, String clusterName, ChangeRingRequest changeRingRequest); + + /** + * Changes ring of a cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param changeRingRequest Change ring request payload. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown 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 changeRing(String resourceGroupName, String clusterName, ChangeRingRequest changeRingRequest, + Context context); + /** * Trigger Log Collection on a cluster. * @@ -397,7 +522,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 +538,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 +553,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 +569,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 +584,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 +600,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 +615,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 +631,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/EdgeMachineJobsClient.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/EdgeMachineJobsClient.java new file mode 100644 index 000000000000..aad055bb7d46 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/EdgeMachineJobsClient.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.EdgeMachineJobInner; + +/** + * An instance of this class provides access to all the operations defined in EdgeMachineJobsClient. + */ +public interface EdgeMachineJobsClient { + /** + * Get a EdgeMachineJob. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param edgeMachineName Name of Device. + * @param jobsName Name of EdgeMachineJob. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a EdgeMachineJob along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse(String resourceGroupName, String edgeMachineName, String jobsName, + Context context); + + /** + * Get a EdgeMachineJob. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param edgeMachineName Name of Device. + * @param jobsName Name of EdgeMachineJob. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a EdgeMachineJob. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + EdgeMachineJobInner get(String resourceGroupName, String edgeMachineName, String jobsName); + + /** + * Create a EdgeMachineJob. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param edgeMachineName Name of Device. + * @param jobsName Name of EdgeMachineJob. + * @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 cluster Jobs resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, EdgeMachineJobInner> beginCreateOrUpdate(String resourceGroupName, + String edgeMachineName, String jobsName, EdgeMachineJobInner resource); + + /** + * Create a EdgeMachineJob. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param edgeMachineName Name of Device. + * @param jobsName Name of EdgeMachineJob. + * @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 cluster Jobs resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, EdgeMachineJobInner> beginCreateOrUpdate(String resourceGroupName, + String edgeMachineName, String jobsName, EdgeMachineJobInner resource, Context context); + + /** + * Create a EdgeMachineJob. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param edgeMachineName Name of Device. + * @param jobsName Name of EdgeMachineJob. + * @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 cluster Jobs resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + EdgeMachineJobInner createOrUpdate(String resourceGroupName, String edgeMachineName, String jobsName, + EdgeMachineJobInner resource); + + /** + * Create a EdgeMachineJob. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param edgeMachineName Name of Device. + * @param jobsName Name of EdgeMachineJob. + * @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 cluster Jobs resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + EdgeMachineJobInner createOrUpdate(String resourceGroupName, String edgeMachineName, String jobsName, + EdgeMachineJobInner resource, Context context); + + /** + * Delete a EdgeMachineJob. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param edgeMachineName Name of Device. + * @param jobsName Name of EdgeMachineJob. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is 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 edgeMachineName, String jobsName); + + /** + * Delete a EdgeMachineJob. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param edgeMachineName Name of Device. + * @param jobsName Name of EdgeMachineJob. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is 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 edgeMachineName, String jobsName, + Context context); + + /** + * Delete a EdgeMachineJob. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param edgeMachineName Name of Device. + * @param jobsName Name of EdgeMachineJob. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String edgeMachineName, String jobsName); + + /** + * Delete a EdgeMachineJob. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param edgeMachineName Name of Device. + * @param jobsName Name of EdgeMachineJob. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String edgeMachineName, String jobsName, Context context); + + /** + * List EdgeMachineJob resources by EdgeMachines. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param edgeMachineName 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 EdgeMachineJob list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, String edgeMachineName); + + /** + * List EdgeMachineJob resources by EdgeMachines. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param edgeMachineName 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 EdgeMachineJob list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, String edgeMachineName, Context context); +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/EdgeMachinesClient.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/EdgeMachinesClient.java new file mode 100644 index 000000000000..1e131426f1a1 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/EdgeMachinesClient.java @@ -0,0 +1,269 @@ +// 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.EdgeMachineInner; +import com.azure.resourcemanager.azurestackhci.models.EdgeMachinePatch; + +/** + * An instance of this class provides access to all the operations defined in EdgeMachinesClient. + */ +public interface EdgeMachinesClient { + /** + * Get an edge machine. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param edgeMachineName 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 an edge machine along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getByResourceGroupWithResponse(String resourceGroupName, String edgeMachineName, + Context context); + + /** + * Get an edge machine. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param edgeMachineName 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 an edge machine. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + EdgeMachineInner getByResourceGroup(String resourceGroupName, String edgeMachineName); + + /** + * Create or update an edge machine. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param edgeMachineName Name of Device. + * @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 edgeMachine details. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, EdgeMachineInner> beginCreateOrUpdate(String resourceGroupName, + String edgeMachineName, EdgeMachineInner resource); + + /** + * Create or update an edge machine. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param edgeMachineName 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 com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of edgeMachine details. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, EdgeMachineInner> beginCreateOrUpdate(String resourceGroupName, + String edgeMachineName, EdgeMachineInner resource, Context context); + + /** + * Create or update an edge machine. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param edgeMachineName Name of Device. + * @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 edgeMachine details. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + EdgeMachineInner createOrUpdate(String resourceGroupName, String edgeMachineName, EdgeMachineInner resource); + + /** + * Create or update an edge machine. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param edgeMachineName 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 com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return edgeMachine details. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + EdgeMachineInner createOrUpdate(String resourceGroupName, String edgeMachineName, EdgeMachineInner resource, + Context context); + + /** + * Update an edge machine. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param edgeMachineName Name of Device. + * @param properties The resource properties to be updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of edgeMachine details. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, EdgeMachineInner> beginUpdate(String resourceGroupName, + String edgeMachineName, EdgeMachinePatch properties); + + /** + * Update an edge machine. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param edgeMachineName Name of Device. + * @param properties The resource properties to be updated. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of edgeMachine details. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, EdgeMachineInner> beginUpdate(String resourceGroupName, + String edgeMachineName, EdgeMachinePatch properties, Context context); + + /** + * Update an edge machine. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param edgeMachineName Name of Device. + * @param properties The resource properties to be updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return edgeMachine details. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + EdgeMachineInner update(String resourceGroupName, String edgeMachineName, EdgeMachinePatch properties); + + /** + * Update an edge machine. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param edgeMachineName Name of Device. + * @param properties The resource properties to be updated. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return edgeMachine details. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + EdgeMachineInner update(String resourceGroupName, String edgeMachineName, EdgeMachinePatch properties, + Context context); + + /** + * Delete an edge machine. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param edgeMachineName 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 {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDelete(String resourceGroupName, String edgeMachineName); + + /** + * Delete an edge machine. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param edgeMachineName 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 {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDelete(String resourceGroupName, String edgeMachineName, Context context); + + /** + * Delete an edge machine. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param edgeMachineName 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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String edgeMachineName); + + /** + * Delete an edge machine. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param edgeMachineName 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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String edgeMachineName, Context context); + + /** + * List all edge machines 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 the response of a EdgeMachine list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByResourceGroup(String resourceGroupName); + + /** + * List all edge machines 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 the response of a EdgeMachine list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByResourceGroup(String resourceGroupName, Context context); + + /** + * List all edge machines 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 the response of a EdgeMachine list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(); + + /** + * List all edge machines 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 the response of a EdgeMachine list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(Context context); +} 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/KubernetesVersionsClient.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/KubernetesVersionsClient.java new file mode 100644 index 000000000000..7471455a983f --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/KubernetesVersionsClient.java @@ -0,0 +1,41 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.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.util.Context; +import com.azure.resourcemanager.azurestackhci.fluent.models.KubernetesVersionInner; + +/** + * An instance of this class provides access to all the operations defined in KubernetesVersionsClient. + */ +public interface KubernetesVersionsClient { + /** + * List all kubernetes versions. + * + * @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 KubernetesVersion list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listBySubscriptionLocationResource(String location); + + /** + * List all kubernetes versions. + * + * @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 KubernetesVersion list operation as paginated response with {@link PagedIterable}. + */ + @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/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/OsImagesClient.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/OsImagesClient.java new file mode 100644 index 000000000000..34e32965494a --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/OsImagesClient.java @@ -0,0 +1,69 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.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.util.Context; +import com.azure.resourcemanager.azurestackhci.fluent.models.OsImageInner; + +/** + * An instance of this class provides access to all the operations defined in OsImagesClient. + */ +public interface OsImagesClient { + /** + * Get a os image. + * + * @param location The name of the Azure region. + * @param osImageName The name of the OsImage. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a os image along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse(String location, String osImageName, Context context); + + /** + * Get a os image. + * + * @param location The name of the Azure region. + * @param osImageName The name of the OsImage. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a os image. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + OsImageInner get(String location, String osImageName); + + /** + * List all os images. + * + * @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 OsImage list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listBySubscriptionLocationResource(String location); + + /** + * List all os images. + * + * @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 OsImage list operation as paginated response with {@link PagedIterable}. + */ + @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/OwnershipVouchersClient.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/OwnershipVouchersClient.java new file mode 100644 index 000000000000..d819634be919 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/OwnershipVouchersClient.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.fluent; + +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; +import com.azure.resourcemanager.azurestackhci.fluent.models.ValidateOwnershipVouchersResponseInner; +import com.azure.resourcemanager.azurestackhci.models.ValidateOwnershipVouchersRequest; + +/** + * An instance of this class provides access to all the operations defined in OwnershipVouchersClient. + */ +public interface OwnershipVouchersClient { + /** + * Validates ownership vouchers. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param location The name of the Azure region. + * @param validationRequest Ownership vouchers to be validated. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return validate Ownership Voucher Response along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response validateWithResponse(String resourceGroupName, String location, + ValidateOwnershipVouchersRequest validationRequest, Context context); + + /** + * Validates ownership vouchers. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param location The name of the Azure region. + * @param validationRequest Ownership vouchers to be validated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return validate Ownership Voucher Response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ValidateOwnershipVouchersResponseInner validate(String resourceGroupName, String location, + ValidateOwnershipVouchersRequest validationRequest); +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/PlatformUpdatesClient.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/PlatformUpdatesClient.java new file mode 100644 index 000000000000..864b77571b5f --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/PlatformUpdatesClient.java @@ -0,0 +1,69 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.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.util.Context; +import com.azure.resourcemanager.azurestackhci.fluent.models.PlatformUpdateInner; + +/** + * An instance of this class provides access to all the operations defined in PlatformUpdatesClient. + */ +public interface PlatformUpdatesClient { + /** + * Get a platform update. + * + * @param location The name of the Azure region. + * @param platformUpdateName The name of the PlatformUpdate. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a platform update along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse(String location, String platformUpdateName, Context context); + + /** + * Get a platform update. + * + * @param location The name of the Azure region. + * @param platformUpdateName The name of the PlatformUpdate. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a platform update. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + PlatformUpdateInner get(String location, String platformUpdateName); + + /** + * List all platform updates. + * + * @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 PlatformUpdate list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String location); + + /** + * List all platform updates. + * + * @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 PlatformUpdate list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String location, 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/PublishersClient.java index fc00e8192d2e..79e4cb1ff033 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/PublishersClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under 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,59 +16,59 @@ */ public interface PublishersClient { /** - * List Publishers available for the HCI Cluster. + * 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 list of Publisher proxy resources for the HCI cluster as paginated response with {@link PagedIterable}. + * @return publisher resource details of HCI Cluster along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByCluster(String resourceGroupName, String clusterName); + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse(String resourceGroupName, String clusterName, String publisherName, + Context context); /** - * List Publishers available for the HCI Cluster. + * 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 context The context to associate with this operation. + * @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 Publisher proxy resources for the HCI cluster as paginated response with {@link PagedIterable}. + * @return publisher resource details of HCI Cluster. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByCluster(String resourceGroupName, String clusterName, Context context); + @ServiceMethod(returns = ReturnType.SINGLE) + PublisherInner get(String resourceGroupName, String clusterName, String publisherName); /** - * Get Publisher resource details of HCI Cluster. + * 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 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}. + * @return list of Publisher proxy resources for the HCI cluster 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 listByCluster(String resourceGroupName, String clusterName); /** - * Get Publisher resource details of HCI Cluster. + * 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 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. + * @return list of Publisher proxy resources for the HCI cluster as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - PublisherInner get(String resourceGroupName, String clusterName, String publisherName); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByCluster(String resourceGroupName, String clusterName, 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/UpdateContentsClient.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/UpdateContentsClient.java new file mode 100644 index 000000000000..edc99c584585 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/UpdateContentsClient.java @@ -0,0 +1,69 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.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.util.Context; +import com.azure.resourcemanager.azurestackhci.fluent.models.UpdateContentInner; + +/** + * An instance of this class provides access to all the operations defined in UpdateContentsClient. + */ +public interface UpdateContentsClient { + /** + * Gets content for an update. + * + * @param location The name of the Azure region. + * @param updateContentName The name of the UpdateContent. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return content for an update along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse(String location, String updateContentName, Context context); + + /** + * Gets content for an update. + * + * @param location The name of the Azure region. + * @param updateContentName The name of the UpdateContent. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return content for an update. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + UpdateContentInner get(String location, String updateContentName); + + /** + * List all update contents. + * + * @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 UpdateContent list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String location); + + /** + * List all update contents. + * + * @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 UpdateContent list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String location, 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/ValidatedSolutionRecipesClient.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/ValidatedSolutionRecipesClient.java new file mode 100644 index 000000000000..30eadaa45a9a --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/ValidatedSolutionRecipesClient.java @@ -0,0 +1,72 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.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.util.Context; +import com.azure.resourcemanager.azurestackhci.fluent.models.ValidatedSolutionRecipeInner; + +/** + * An instance of this class provides access to all the operations defined in ValidatedSolutionRecipesClient. + */ +public interface ValidatedSolutionRecipesClient { + /** + * 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}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + 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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ValidatedSolutionRecipeInner 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}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + 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}. + */ + @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..254f031269a8 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,27 @@ 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.ClusterSdnProperties; +import com.azure.resourcemanager.azurestackhci.models.ConfidentialVmProperties; 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.SupportStatus; 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 +39,19 @@ @Fluent public final class ClusterInner extends Resource { /* - * Identity of Cluster resource + * Cluster properties. + */ + private ClusterProperties innerProperties; + + /* + * The managed service identities assigned to this resource. */ private ManagedServiceIdentity innerIdentity; /* - * Cluster properties. + * This property identifies the purpose of the Cluster deployment. For example, a valid value is AzureLocal */ - private ClusterProperties innerProperties; + private String kind; /* * Azure Resource Manager metadata containing createdBy and modifiedBy information. @@ -47,9 +59,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 +69,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,7 +80,16 @@ public ClusterInner() { } /** - * Get the innerIdentity property: Identity of Cluster resource. + * Get the innerProperties property: Cluster properties. + * + * @return the innerProperties value. + */ + private ClusterProperties innerProperties() { + return this.innerProperties; + } + + /** + * Get the innerIdentity property: The managed service identities assigned to this resource. * * @return the innerIdentity value. */ @@ -77,12 +98,25 @@ private ManagedServiceIdentity innerIdentity() { } /** - * Get the innerProperties property: Cluster properties. + * Get the kind property: This property identifies the purpose of the Cluster deployment. For example, a valid value + * is AzureLocal. * - * @return the innerProperties value. + * @return the kind value. */ - private ClusterProperties innerProperties() { - return this.innerProperties; + public String kind() { + return this.kind; + } + + /** + * Set the kind property: This property identifies the purpose of the Cluster deployment. For example, a valid value + * is AzureLocal. + * + * @param kind the kind value to set. + * @return the ClusterInner object itself. + */ + public ClusterInner withKind(String kind) { + this.kind = kind; + return this; } /** @@ -95,13 +129,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 +149,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 +177,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 +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. */ @@ -235,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. */ @@ -243,6 +206,15 @@ public ConnectivityStatus connectivityStatus() { return this.innerProperties() == null ? null : this.innerProperties().connectivityStatus(); } + /** + * Get the supportStatus property: Indicates whether the cluster is under support. + * + * @return the supportStatus value. + */ + public SupportStatus supportStatus() { + return this.innerProperties() == null ? null : this.innerProperties().supportStatus(); + } + /** * Get the cloudId property: Unique, immutable resource id. * @@ -252,6 +224,15 @@ public String cloudId() { return this.innerProperties() == null ? null : this.innerProperties().cloudId(); } + /** + * Get the ring property: The ring to which this cluster belongs to. + * + * @return the ring value. + */ + public String ring() { + return this.innerProperties() == null ? null : this.innerProperties().ring(); + } + /** * Get the cloudManagementEndpoint property: Endpoint configured for management from the Azure portal. * @@ -390,6 +371,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 +474,7 @@ public IsolatedVmAttestationConfiguration isolatedVmAttestationConfiguration() { * * @return the trialDaysRemaining value. */ - public Float trialDaysRemaining() { + public Double trialDaysRemaining() { return this.innerProperties() == null ? null : this.innerProperties().trialDaysRemaining(); } @@ -542,17 +533,152 @@ public String resourceProviderObjectId() { } /** - * Validates the instance. + * Get the secretsLocations property: List of secret locations. * - * @throws IllegalArgumentException thrown if the instance is not valid. + * @return the secretsLocations value. */ - public void validate() { - if (innerIdentity() != null) { - innerIdentity().validate(); + 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(); } - if (innerProperties() != null) { - innerProperties().validate(); + 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 confidentialVmProperties property: Represents the Confidential Virtual Machine (CVM) support intent and + * current status for the cluster resource. + * + * @return the confidentialVmProperties value. + */ + public ConfidentialVmProperties confidentialVmProperties() { + return this.innerProperties() == null ? null : this.innerProperties().confidentialVmProperties(); + } + + /** + * Get the sdnProperties property: Software Defined Networking Properties of the cluster. + * + * @return the sdnProperties value. + */ + public ClusterSdnProperties sdnProperties() { + return this.innerProperties() == null ? null : this.innerProperties().sdnProperties(); + } + + /** + * 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. + * + * @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 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 +689,9 @@ 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); + jsonWriter.writeStringField("kind", this.kind); return jsonWriter.writeEndObject(); } @@ -595,10 +722,12 @@ 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 ("kind".equals(fieldName)) { + deserializedClusterInner.kind = reader.getString(); } 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..60a85a6fea78 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,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.ClusterSdnProperties; +import com.azure.resourcemanager.azurestackhci.models.ConfidentialVmProperties; 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 com.azure.resourcemanager.azurestackhci.models.SupportStatus; import java.io.IOException; import java.time.OffsetDateTime; +import java.util.List; /** * Cluster properties. @@ -28,25 +36,38 @@ @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; + /* + * Indicates whether the cluster is under support. + */ + private SupportStatus supportStatus; + /* * Unique, immutable resource id. */ private String cloudId; + /* + * The ring to which this cluster belongs to. + */ + private String ring; + /* * Endpoint configured for management from the Azure portal. */ @@ -77,6 +98,11 @@ public final class ClusterProperties implements JsonSerializable secretsLocations; + + /* + * Supported Storage Type for HCI Cluster + */ + private ClusterPattern clusterPattern; + + /* + * Represents the Confidential Virtual Machine (CVM) support intent and current status for the cluster resource. + */ + private ConfidentialVmProperties confidentialVmProperties; + + /* + * Software Defined Networking Properties of the cluster + */ + private ClusterSdnProperties sdnProperties; + + /* + * 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 +200,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 +210,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 +220,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. */ @@ -170,6 +229,15 @@ public ConnectivityStatus connectivityStatus() { return this.connectivityStatus; } + /** + * Get the supportStatus property: Indicates whether the cluster is under support. + * + * @return the supportStatus value. + */ + public SupportStatus supportStatus() { + return this.supportStatus; + } + /** * Get the cloudId property: Unique, immutable resource id. * @@ -179,6 +247,15 @@ public String cloudId() { return this.cloudId; } + /** + * Get the ring property: The ring to which this cluster belongs to. + * + * @return the ring value. + */ + public String ring() { + return this.ring; + } + /** * Get the cloudManagementEndpoint property: Endpoint configured for management from the Azure portal. * @@ -299,6 +376,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 +470,7 @@ public IsolatedVmAttestationConfiguration isolatedVmAttestationConfiguration() { * * @return the trialDaysRemaining value. */ - public Float trialDaysRemaining() { + public Double trialDaysRemaining() { return this.trialDaysRemaining; } @@ -442,29 +529,80 @@ 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 confidentialVmProperties property: Represents the Confidential Virtual Machine (CVM) support intent and + * current status for the cluster resource. + * + * @return the confidentialVmProperties value. + */ + public ConfidentialVmProperties confidentialVmProperties() { + return this.confidentialVmProperties; + } + + /** + * Get the sdnProperties property: Software Defined Networking Properties of the cluster. + * + * @return the sdnProperties value. + */ + public ClusterSdnProperties sdnProperties() { + return this.sdnProperties; + } + + /** + * 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 +620,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(); } @@ -507,8 +649,12 @@ public static ClusterProperties fromJson(JsonReader jsonReader) throws IOExcepti } else if ("connectivityStatus".equals(fieldName)) { deserializedClusterProperties.connectivityStatus = ConnectivityStatus.fromString(reader.getString()); + } else if ("supportStatus".equals(fieldName)) { + deserializedClusterProperties.supportStatus = SupportStatus.fromString(reader.getString()); } else if ("cloudId".equals(fieldName)) { deserializedClusterProperties.cloudId = reader.getString(); + } else if ("ring".equals(fieldName)) { + deserializedClusterProperties.ring = reader.getString(); } else if ("cloudManagementEndpoint".equals(fieldName)) { deserializedClusterProperties.cloudManagementEndpoint = reader.getString(); } else if ("aadClientId".equals(fieldName)) { @@ -522,6 +668,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 +682,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 +698,22 @@ 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 ("confidentialVmProperties".equals(fieldName)) { + deserializedClusterProperties.confidentialVmProperties = ConfidentialVmProperties.fromJson(reader); + } else if ("sdnProperties".equals(fieldName)) { + deserializedClusterProperties.sdnProperties = ClusterSdnProperties.fromJson(reader); + } 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/EdgeMachineInner.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/EdgeMachineInner.java new file mode 100644 index 000000000000..d5494e8d63dc --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/EdgeMachineInner.java @@ -0,0 +1,209 @@ +// 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.Fluent; +import com.azure.core.management.Resource; +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.EdgeMachineProperties; +import java.io.IOException; +import java.util.Map; + +/** + * EdgeMachine details. + */ +@Fluent +public final class EdgeMachineInner extends Resource { + /* + * The resource-specific properties for this resource. + */ + private EdgeMachineProperties properties; + + /* + * The managed service identities assigned to this resource. + */ + private ManagedServiceIdentity identity; + + /* + * 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 EdgeMachineInner class. + */ + public EdgeMachineInner() { + } + + /** + * Get the properties property: The resource-specific properties for this resource. + * + * @return the properties value. + */ + public EdgeMachineProperties properties() { + return this.properties; + } + + /** + * Set the properties property: The resource-specific properties for this resource. + * + * @param properties the properties value to set. + * @return the EdgeMachineInner object itself. + */ + public EdgeMachineInner withProperties(EdgeMachineProperties properties) { + this.properties = properties; + return this; + } + + /** + * Get the identity property: The managed service identities assigned to this resource. + * + * @return the identity value. + */ + public ManagedServiceIdentity identity() { + return this.identity; + } + + /** + * Set the identity property: The managed service identities assigned to this resource. + * + * @param identity the identity value to set. + * @return the EdgeMachineInner object itself. + */ + public EdgeMachineInner withIdentity(ManagedServiceIdentity identity) { + this.identity = identity; + return this; + } + + /** + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + + /** + * Get the type property: The type of the resource. + * + * @return the type value. + */ + @Override + public String type() { + return this.type; + } + + /** + * Get the name property: The name of the resource. + * + * @return the name value. + */ + @Override + public String name() { + return this.name; + } + + /** + * Get the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + @Override + public String id() { + return this.id; + } + + /** + * {@inheritDoc} + */ + @Override + public EdgeMachineInner withLocation(String location) { + super.withLocation(location); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public EdgeMachineInner withTags(Map tags) { + super.withTags(tags); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("location", location()); + jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); + jsonWriter.writeJsonField("properties", this.properties); + jsonWriter.writeJsonField("identity", this.identity); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of EdgeMachineInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of EdgeMachineInner 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 EdgeMachineInner. + */ + public static EdgeMachineInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + EdgeMachineInner deserializedEdgeMachineInner = new EdgeMachineInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedEdgeMachineInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedEdgeMachineInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedEdgeMachineInner.type = reader.getString(); + } else if ("location".equals(fieldName)) { + deserializedEdgeMachineInner.withLocation(reader.getString()); + } else if ("tags".equals(fieldName)) { + Map tags = reader.readMap(reader1 -> reader1.getString()); + deserializedEdgeMachineInner.withTags(tags); + } else if ("properties".equals(fieldName)) { + deserializedEdgeMachineInner.properties = EdgeMachineProperties.fromJson(reader); + } else if ("identity".equals(fieldName)) { + deserializedEdgeMachineInner.identity = ManagedServiceIdentity.fromJson(reader); + } else if ("systemData".equals(fieldName)) { + deserializedEdgeMachineInner.systemData = SystemData.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedEdgeMachineInner; + }); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/EdgeMachineJobInner.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/EdgeMachineJobInner.java new file mode 100644 index 000000000000..80380f1bad93 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/EdgeMachineJobInner.java @@ -0,0 +1,155 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.azurestackhci.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.management.ProxyResource; +import com.azure.core.management.SystemData; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.azurestackhci.models.EdgeMachineJobProperties; +import java.io.IOException; + +/** + * Cluster Jobs resource. + */ +@Fluent +public final class EdgeMachineJobInner extends ProxyResource { + /* + * The resource-specific properties for this resource. + */ + private EdgeMachineJobProperties properties; + + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + private SystemData systemData; + + /* + * The type of the resource. + */ + private String type; + + /* + * The name of the resource. + */ + private String name; + + /* + * Fully qualified resource Id for the resource. + */ + private String id; + + /** + * Creates an instance of EdgeMachineJobInner class. + */ + public EdgeMachineJobInner() { + } + + /** + * Get the properties property: The resource-specific properties for this resource. + * + * @return the properties value. + */ + public EdgeMachineJobProperties properties() { + return this.properties; + } + + /** + * Set the properties property: The resource-specific properties for this resource. + * + * @param properties the properties value to set. + * @return the EdgeMachineJobInner object itself. + */ + public EdgeMachineJobInner withProperties(EdgeMachineJobProperties properties) { + this.properties = properties; + return this; + } + + /** + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + + /** + * Get the type property: The type of the resource. + * + * @return the type value. + */ + @Override + public String type() { + return this.type; + } + + /** + * Get the name property: The name of the resource. + * + * @return the name value. + */ + @Override + public String name() { + return this.name; + } + + /** + * Get the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + @Override + public String id() { + return this.id; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("properties", this.properties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of EdgeMachineJobInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of EdgeMachineJobInner 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 EdgeMachineJobInner. + */ + public static EdgeMachineJobInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + EdgeMachineJobInner deserializedEdgeMachineJobInner = new EdgeMachineJobInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedEdgeMachineJobInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedEdgeMachineJobInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedEdgeMachineJobInner.type = reader.getString(); + } else if ("properties".equals(fieldName)) { + deserializedEdgeMachineJobInner.properties = EdgeMachineJobProperties.fromJson(reader); + } else if ("systemData".equals(fieldName)) { + deserializedEdgeMachineJobInner.systemData = SystemData.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedEdgeMachineJobInner; + }); + } +} 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/KubernetesVersionInner.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/KubernetesVersionInner.java new file mode 100644 index 000000000000..f270ddea9e2b --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/KubernetesVersionInner.java @@ -0,0 +1,144 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.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.KubernetesVersionProperties; +import java.io.IOException; + +/** + * Represents a kubernetes version resource. + */ +@Immutable +public final class KubernetesVersionInner extends ProxyResource { + /* + * The resource-specific properties for this resource. + */ + private KubernetesVersionProperties properties; + + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + private SystemData systemData; + + /* + * The type of the resource. + */ + private String type; + + /* + * The name of the resource. + */ + private String name; + + /* + * Fully qualified resource Id for the resource. + */ + private String id; + + /** + * Creates an instance of KubernetesVersionInner class. + */ + private KubernetesVersionInner() { + } + + /** + * Get the properties property: The resource-specific properties for this resource. + * + * @return the properties value. + */ + public KubernetesVersionProperties properties() { + return this.properties; + } + + /** + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + + /** + * Get the type property: The type of the resource. + * + * @return the type value. + */ + @Override + public String type() { + return this.type; + } + + /** + * Get the name property: The name of the resource. + * + * @return the name value. + */ + @Override + public String name() { + return this.name; + } + + /** + * Get the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + @Override + public String id() { + return this.id; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("properties", this.properties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of KubernetesVersionInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of KubernetesVersionInner 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 KubernetesVersionInner. + */ + public static KubernetesVersionInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + KubernetesVersionInner deserializedKubernetesVersionInner = new KubernetesVersionInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedKubernetesVersionInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedKubernetesVersionInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedKubernetesVersionInner.type = reader.getString(); + } else if ("properties".equals(fieldName)) { + deserializedKubernetesVersionInner.properties = KubernetesVersionProperties.fromJson(reader); + } else if ("systemData".equals(fieldName)) { + deserializedKubernetesVersionInner.systemData = SystemData.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedKubernetesVersionInner; + }); + } +} 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/OsImageInner.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/OsImageInner.java new file mode 100644 index 000000000000..1c529cfd98c5 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/OsImageInner.java @@ -0,0 +1,144 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.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.OsImageProperties; +import java.io.IOException; + +/** + * Represents a os image resource. + */ +@Immutable +public final class OsImageInner extends ProxyResource { + /* + * The resource-specific properties for this resource. + */ + private OsImageProperties properties; + + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + private SystemData systemData; + + /* + * The type of the resource. + */ + private String type; + + /* + * The name of the resource. + */ + private String name; + + /* + * Fully qualified resource Id for the resource. + */ + private String id; + + /** + * Creates an instance of OsImageInner class. + */ + private OsImageInner() { + } + + /** + * Get the properties property: The resource-specific properties for this resource. + * + * @return the properties value. + */ + public OsImageProperties properties() { + return this.properties; + } + + /** + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + + /** + * Get the type property: The type of the resource. + * + * @return the type value. + */ + @Override + public String type() { + return this.type; + } + + /** + * Get the name property: The name of the resource. + * + * @return the name value. + */ + @Override + public String name() { + return this.name; + } + + /** + * Get the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + @Override + public String id() { + return this.id; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("properties", this.properties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of OsImageInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of OsImageInner 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 OsImageInner. + */ + public static OsImageInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + OsImageInner deserializedOsImageInner = new OsImageInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedOsImageInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedOsImageInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedOsImageInner.type = reader.getString(); + } else if ("properties".equals(fieldName)) { + deserializedOsImageInner.properties = OsImageProperties.fromJson(reader); + } else if ("systemData".equals(fieldName)) { + deserializedOsImageInner.systemData = SystemData.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedOsImageInner; + }); + } +} 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 { + PlatformUpdateInner deserializedPlatformUpdateInner = new PlatformUpdateInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedPlatformUpdateInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedPlatformUpdateInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedPlatformUpdateInner.type = reader.getString(); + } else if ("properties".equals(fieldName)) { + deserializedPlatformUpdateInner.properties = PlatformUpdateProperties.fromJson(reader); + } else if ("systemData".equals(fieldName)) { + deserializedPlatformUpdateInner.systemData = SystemData.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedPlatformUpdateInner; + }); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/PublisherInner.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/PublisherInner.java index 90b19e0bec07..70f17956756f 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/PublisherInner.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/PublisherInner.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under 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,9 +28,9 @@ public final class PublisherInner 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. @@ -38,14 +38,14 @@ public final class PublisherInner 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 PublisherInner class. */ - public PublisherInner() { + private PublisherInner() { } /** @@ -67,13 +67,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; } /** @@ -87,13 +87,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; } /** @@ -105,17 +105,6 @@ public String provisioningState() { return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (innerProperties() != null) { - innerProperties().validate(); - } - } - /** * {@inheritDoc} */ diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/PublisherProperties.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/PublisherProperties.java index 74dab509d810..d8241f458eae 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/PublisherProperties.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/PublisherProperties.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under 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 PublisherProperties implements JsonSerializable 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/UpdateContentInner.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/UpdateContentInner.java new file mode 100644 index 000000000000..309647109593 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/UpdateContentInner.java @@ -0,0 +1,144 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.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.UpdateContentProperties; +import java.io.IOException; + +/** + * Represents a update content. + */ +@Immutable +public final class UpdateContentInner extends ProxyResource { + /* + * The resource-specific properties for this resource. + */ + private UpdateContentProperties properties; + + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + private SystemData systemData; + + /* + * The type of the resource. + */ + private String type; + + /* + * The name of the resource. + */ + private String name; + + /* + * Fully qualified resource Id for the resource. + */ + private String id; + + /** + * Creates an instance of UpdateContentInner class. + */ + private UpdateContentInner() { + } + + /** + * Get the properties property: The resource-specific properties for this resource. + * + * @return the properties value. + */ + public UpdateContentProperties properties() { + return this.properties; + } + + /** + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + + /** + * Get the type property: The type of the resource. + * + * @return the type value. + */ + @Override + public String type() { + return this.type; + } + + /** + * Get the name property: The name of the resource. + * + * @return the name value. + */ + @Override + public String name() { + return this.name; + } + + /** + * Get the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + @Override + public String id() { + return this.id; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("properties", this.properties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of UpdateContentInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of UpdateContentInner 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 UpdateContentInner. + */ + public static UpdateContentInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + UpdateContentInner deserializedUpdateContentInner = new UpdateContentInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedUpdateContentInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedUpdateContentInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedUpdateContentInner.type = reader.getString(); + } else if ("properties".equals(fieldName)) { + deserializedUpdateContentInner.properties = UpdateContentProperties.fromJson(reader); + } else if ("systemData".equals(fieldName)) { + deserializedUpdateContentInner.systemData = SystemData.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedUpdateContentInner; + }); + } +} 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/ValidateOwnershipVouchersResponseInner.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/ValidateOwnershipVouchersResponseInner.java new file mode 100644 index 000000000000..93ba5ccdf69c --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/ValidateOwnershipVouchersResponseInner.java @@ -0,0 +1,83 @@ +// 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.OwnershipVoucherValidationDetails; +import java.io.IOException; +import java.util.List; + +/** + * Validate Ownership Voucher Response. + */ +@Immutable +public final class ValidateOwnershipVouchersResponseInner + implements JsonSerializable { + /* + * Ownership Voucher Validation Details. + */ + private List ownershipVoucherValidationDetails; + + /** + * Creates an instance of ValidateOwnershipVouchersResponseInner class. + */ + private ValidateOwnershipVouchersResponseInner() { + } + + /** + * Get the ownershipVoucherValidationDetails property: Ownership Voucher Validation Details. + * + * @return the ownershipVoucherValidationDetails value. + */ + public List ownershipVoucherValidationDetails() { + return this.ownershipVoucherValidationDetails; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("ownershipVoucherValidationDetails", this.ownershipVoucherValidationDetails, + (writer, element) -> writer.writeJson(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ValidateOwnershipVouchersResponseInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ValidateOwnershipVouchersResponseInner 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 ValidateOwnershipVouchersResponseInner. + */ + public static ValidateOwnershipVouchersResponseInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ValidateOwnershipVouchersResponseInner deserializedValidateOwnershipVouchersResponseInner + = new ValidateOwnershipVouchersResponseInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("ownershipVoucherValidationDetails".equals(fieldName)) { + List ownershipVoucherValidationDetails + = reader.readArray(reader1 -> OwnershipVoucherValidationDetails.fromJson(reader1)); + deserializedValidateOwnershipVouchersResponseInner.ownershipVoucherValidationDetails + = ownershipVoucherValidationDetails; + } else { + reader.skipChildren(); + } + } + + return deserializedValidateOwnershipVouchersResponseInner; + }); + } +} 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 { + ValidatedSolutionRecipeInner deserializedValidatedSolutionRecipeInner = new ValidatedSolutionRecipeInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedValidatedSolutionRecipeInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedValidatedSolutionRecipeInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedValidatedSolutionRecipeInner.type = reader.getString(); + } else if ("properties".equals(fieldName)) { + deserializedValidatedSolutionRecipeInner.properties + = ValidatedSolutionRecipeProperties.fromJson(reader); + } else if ("systemData".equals(fieldName)) { + deserializedValidatedSolutionRecipeInner.systemData = SystemData.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + 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 70% 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..13500a9e3fdc 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,42 @@ 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.EdgeMachineJobsClient; +import com.azure.resourcemanager.azurestackhci.fluent.EdgeMachinesClient; import com.azure.resourcemanager.azurestackhci.fluent.ExtensionsClient; +import com.azure.resourcemanager.azurestackhci.fluent.KubernetesVersionsClient; import com.azure.resourcemanager.azurestackhci.fluent.OffersClient; import com.azure.resourcemanager.azurestackhci.fluent.OperationsClient; +import com.azure.resourcemanager.azurestackhci.fluent.OsImagesClient; +import com.azure.resourcemanager.azurestackhci.fluent.OwnershipVouchersClient; +import com.azure.resourcemanager.azurestackhci.fluent.PlatformUpdatesClient; 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.UpdateContentsClient; 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 +59,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 +78,12 @@ public String getEndpoint() { } /** - * Api Version. + * Version parameter. */ private final String apiVersion; /** - * Gets Api Version. + * Gets Version parameter. * * @return the apiVersion value. */ @@ -93,6 +91,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 +147,76 @@ public Duration getDefaultPollInterval() { return this.defaultPollInterval; } + /** + * The KubernetesVersionsClient object to access its operations. + */ + private final KubernetesVersionsClient kubernetesVersions; + + /** + * Gets the KubernetesVersionsClient object to access its operations. + * + * @return the KubernetesVersionsClient object. + */ + public KubernetesVersionsClient getKubernetesVersions() { + return this.kubernetesVersions; + } + + /** + * The PlatformUpdatesClient object to access its operations. + */ + private final PlatformUpdatesClient platformUpdates; + + /** + * Gets the PlatformUpdatesClient object to access its operations. + * + * @return the PlatformUpdatesClient object. + */ + public PlatformUpdatesClient getPlatformUpdates() { + return this.platformUpdates; + } + + /** + * The OsImagesClient object to access its operations. + */ + private final OsImagesClient osImages; + + /** + * Gets the OsImagesClient object to access its operations. + * + * @return the OsImagesClient object. + */ + public OsImagesClient getOsImages() { + return this.osImages; + } + + /** + * The UpdateContentsClient object to access its operations. + */ + private final UpdateContentsClient updateContents; + + /** + * Gets the UpdateContentsClient object to access its operations. + * + * @return the UpdateContentsClient object. + */ + public UpdateContentsClient getUpdateContents() { + return this.updateContents; + } + + /** + * 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 +231,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 +273,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,34 +315,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. */ @@ -290,64 +372,129 @@ 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 EdgeMachinesClient object to access its operations. + */ + private final EdgeMachinesClient edgeMachines; + + /** + * Gets the EdgeMachinesClient object to access its operations. + * + * @return the EdgeMachinesClient object. + */ + public EdgeMachinesClient getEdgeMachines() { + return this.edgeMachines; + } + + /** + * The EdgeMachineJobsClient object to access its operations. + */ + private final EdgeMachineJobsClient edgeMachineJobs; + + /** + * Gets the EdgeMachineJobsClient object to access its operations. + * + * @return the EdgeMachineJobsClient object. + */ + public EdgeMachineJobsClient getEdgeMachineJobs() { + return this.edgeMachineJobs; + } + + /** + * The OwnershipVouchersClient object to access its operations. + */ + private final OwnershipVouchersClient ownershipVouchers; + + /** + * Gets the OwnershipVouchersClient object to access its operations. + * + * @return the OwnershipVouchersClient object. + */ + public OwnershipVouchersClient getOwnershipVouchers() { + return this.ownershipVouchers; } /** - * Initializes an instance of AzureStackHciClient client. + * 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 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 = "2025-12-01-preview"; + this.kubernetesVersions = new KubernetesVersionsClientImpl(this); + this.platformUpdates = new PlatformUpdatesClientImpl(this); + this.osImages = new OsImagesClientImpl(this); + this.updateContents = new UpdateContentsClientImpl(this); + 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.edgeMachines = new EdgeMachinesClientImpl(this); + this.edgeMachineJobs = new EdgeMachineJobsClientImpl(this); + this.ownershipVouchers = new OwnershipVouchersClientImpl(this); + this.updateSummariesOperations = new UpdateSummariesOperationsClientImpl(this); } /** @@ -387,6 +534,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 +640,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..c2ab1a5b99ba 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; @@ -8,28 +8,37 @@ import com.azure.core.management.SystemData; import com.azure.core.util.Context; import com.azure.resourcemanager.azurestackhci.fluent.models.ClusterInner; +import com.azure.resourcemanager.azurestackhci.models.ChangeRingRequest; import com.azure.resourcemanager.azurestackhci.models.Cluster; 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.ClusterSdnProperties; +import com.azure.resourcemanager.azurestackhci.models.ConfidentialVmProperties; 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; +import com.azure.resourcemanager.azurestackhci.models.SupportStatus; import com.azure.resourcemanager.azurestackhci.models.UploadCertificateRequest; 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; @@ -61,29 +70,12 @@ public Map tags() { } } - public SystemData systemData() { - return this.innerModel().systemData(); - } - - public UUID principalId() { - return this.innerModel().principalId(); - } - - public UUID tenantId() { - return this.innerModel().tenantId(); + public String kind() { + return this.innerModel().kind(); } - 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 SystemData systemData() { + return this.innerModel().systemData(); } public ProvisioningState provisioningState() { @@ -98,10 +90,18 @@ public ConnectivityStatus connectivityStatus() { return this.innerModel().connectivityStatus(); } + public SupportStatus supportStatus() { + return this.innerModel().supportStatus(); + } + public String cloudId() { return this.innerModel().cloudId(); } + public String ring() { + return this.innerModel().ring(); + } + public String cloudManagementEndpoint() { return this.innerModel().cloudManagementEndpoint(); } @@ -126,6 +126,10 @@ public SoftwareAssuranceProperties softwareAssuranceProperties() { return this.innerModel().softwareAssuranceProperties(); } + public Boolean isManagementCluster() { + return this.innerModel().isManagementCluster(); + } + public LogCollectionProperties logCollectionProperties() { return this.innerModel().logCollectionProperties(); } @@ -146,7 +150,7 @@ public IsolatedVmAttestationConfiguration isolatedVmAttestationConfiguration() { return this.innerModel().isolatedVmAttestationConfiguration(); } - public Float trialDaysRemaining() { + public Double trialDaysRemaining() { return this.innerModel().trialDaysRemaining(); } @@ -174,6 +178,61 @@ 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 ConfidentialVmProperties confidentialVmProperties() { + return this.innerModel().confidentialVmProperties(); + } + + public ClusterSdnProperties sdnProperties() { + return this.innerModel().sdnProperties(); + } + + 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 +330,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); } @@ -298,6 +365,14 @@ public Cluster extendSoftwareAssuranceBenefit(SoftwareAssuranceChangeRequest sof .extendSoftwareAssuranceBenefit(resourceGroupName, clusterName, softwareAssuranceChangeRequest, context); } + public Cluster changeRing(ChangeRingRequest changeRingRequest) { + return serviceManager.clusters().changeRing(resourceGroupName, clusterName, changeRingRequest); + } + + public Cluster changeRing(ChangeRingRequest changeRingRequest, Context context) { + return serviceManager.clusters().changeRing(resourceGroupName, clusterName, changeRingRequest, context); + } + public Cluster triggerLogCollection(LogCollectionRequest logCollectionRequest) { return serviceManager.clusters().triggerLogCollection(resourceGroupName, clusterName, logCollectionRequest); } @@ -336,21 +411,11 @@ public ClusterImpl withTags(Map tags) { } } - public ClusterImpl withTypeIdentityType(ManagedServiceIdentityType typeIdentityType) { - this.innerModel().withTypeIdentityType(typeIdentityType); + public ClusterImpl withKind(String kind) { + this.innerModel().withKind(kind); 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 +481,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..fac3e3e80050 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,12 @@ 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.ChangeRingRequest; 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 +61,601 @@ 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("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("clusterName") String clusterName, + 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, + Response deleteSync(@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({ "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); + + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/clusters/{clusterName}/changeRing") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> changeRing(@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") ChangeRingRequest changeRingRequest, Context context); + + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/clusters/{clusterName}/changeRing") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response changeRingSync(@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") ChangeRingRequest changeRingRequest, 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); + + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/clusters/{clusterName}/configureRemoteSupport") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> configureRemoteSupport(@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" }) @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, + Response configureRemoteSupportSync(@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); + + @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); } /** - * 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 PollerFlux} 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) + 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 the {@link SyncPoller} for polling of long-running operation. + */ + @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); + } + + /** + * 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,472 +663,363 @@ 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.COLLECTION) + private PagedFlux listAsync() { + return new PagedFlux<>(() -> listSinglePageAsync(), + nextLink -> listBySubscriptionNextSinglePageAsync(nextLink)); + } + + /** + * 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}. */ @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(); - } + private PagedResponse listSinglePage() { 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); + 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 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(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. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response updateWithResponse(String resourceGroupName, String clusterName, ClusterPatch cluster, - Context context) { - return updateWithResponseAsync(resourceGroupName, clusterName, cluster, context).block(); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list() { + return new PagedIterable<>(() -> listSinglePage(), nextLink -> listBySubscriptionNextSinglePage(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. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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(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 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) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.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"; return FluxUtil - .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, clusterName, this.client.getApiVersion(), accept, context)) + .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 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}. */ @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 Response updateSecretsLocationsWithResponse(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 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) { - 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, 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 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 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); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - context); + 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 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) { - return this.beginDeleteAsync(resourceGroupName, clusterName).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. @@ -954,70 +1027,65 @@ public SyncPoller, Void> beginDelete(String resourceGroupName, * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete(String resourceGroupName, String clusterName, - Context context) { - return this.beginDeleteAsync(resourceGroupName, clusterName, context).getSyncPoller(); - } - - /** - * 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 A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String clusterName) { - return beginDeleteAsync(resourceGroupName, clusterName).last().flatMap(this.client::getLroFinalResultOrError); + 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,32 +1102,11 @@ 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())); } @@ -1069,40 +1116,18 @@ private Mono>> uploadCertificateWithResponseAsync(Stri * @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}. + * @return the response body along with {@link Response}. */ @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); + private Response uploadCertificateWithResponse(String resourceGroupName, String clusterName, + UploadCertificateRequest uploadCertificateRequest) { + final String contentType = "application/json"; + return service.uploadCertificateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, clusterName, contentType, uploadCertificateRequest, + Context.NONE); } /** @@ -1111,18 +1136,19 @@ private Mono>> uploadCertificateWithResponseAsync(Stri * @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 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, - UploadCertificateRequest uploadCertificateRequest) { - Mono>> mono - = uploadCertificateWithResponseAsync(resourceGroupName, clusterName, uploadCertificateRequest); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - this.client.getContext()); + @ServiceMethod(returns = ReturnType.SINGLE) + private Response uploadCertificateWithResponse(String resourceGroupName, String clusterName, + UploadCertificateRequest uploadCertificateRequest, Context context) { + final String contentType = "application/json"; + return service.uploadCertificateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, clusterName, contentType, uploadCertificateRequest, + context); } /** @@ -1131,7 +1157,6 @@ private PollerFlux, Void> beginUploadCertificateAsync(String re * @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. @@ -1139,12 +1164,11 @@ private PollerFlux, Void> beginUploadCertificateAsync(String re */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginUploadCertificateAsync(String resourceGroupName, String clusterName, - UploadCertificateRequest uploadCertificateRequest, Context context) { - context = this.client.mergeContext(context); + UploadCertificateRequest uploadCertificateRequest) { Mono>> mono - = uploadCertificateWithResponseAsync(resourceGroupName, clusterName, uploadCertificateRequest, context); + = uploadCertificateWithResponseAsync(resourceGroupName, clusterName, uploadCertificateRequest); return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - context); + this.client.getContext()); } /** @@ -1161,8 +1185,9 @@ private PollerFlux, Void> beginUploadCertificateAsync(String re @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginUploadCertificate(String resourceGroupName, String clusterName, UploadCertificateRequest uploadCertificateRequest) { - return this.beginUploadCertificateAsync(resourceGroupName, clusterName, uploadCertificateRequest) - .getSyncPoller(); + Response response + = uploadCertificateWithResponse(resourceGroupName, clusterName, uploadCertificateRequest); + return this.client.getLroResult(response, Void.class, Void.class, Context.NONE); } /** @@ -1180,8 +1205,9 @@ 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(); + Response response + = uploadCertificateWithResponse(resourceGroupName, clusterName, uploadCertificateRequest, context); + return this.client.getLroResult(response, Void.class, Void.class, context); } /** @@ -1208,17 +1234,14 @@ 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. - * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono uploadCertificateAsync(String resourceGroupName, String clusterName, - UploadCertificateRequest uploadCertificateRequest, Context context) { - return beginUploadCertificateAsync(resourceGroupName, clusterName, uploadCertificateRequest, context).last() - .flatMap(this.client::getLroFinalResultOrError); + public void uploadCertificate(String resourceGroupName, String clusterName, + UploadCertificateRequest uploadCertificateRequest) { + beginUploadCertificate(resourceGroupName, clusterName, uploadCertificateRequest).getFinalResult(); } /** @@ -1227,31 +1250,35 @@ 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. */ @ServiceMethod(returns = ReturnType.SINGLE) public void uploadCertificate(String resourceGroupName, String clusterName, - UploadCertificateRequest uploadCertificateRequest) { - uploadCertificateAsync(resourceGroupName, clusterName, uploadCertificateRequest).block(); + UploadCertificateRequest uploadCertificateRequest, Context context) { + beginUploadCertificate(resourceGroupName, clusterName, uploadCertificateRequest, context).getFinalResult(); } /** - * Upload certificate. + * Create cluster identity. * * @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 response body along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void uploadCertificate(String resourceGroupName, String clusterName, - UploadCertificateRequest uploadCertificateRequest, Context context) { - uploadCertificateAsync(resourceGroupName, clusterName, uploadCertificateRequest, context).block(); + private Mono>> createIdentityWithResponseAsync(String resourceGroupName, + String clusterName) { + final String accept = "application/json"; + return FluxUtil + .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())); } /** @@ -1262,31 +1289,13 @@ 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}. */ @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.")); - } + private Response createIdentityWithResponse(String resourceGroupName, String clusterName) { final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.createIdentity(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, clusterName, this.client.getApiVersion(), accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + return service.createIdentitySync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, clusterName, accept, Context.NONE); } /** @@ -1298,30 +1307,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 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, + Context context) { 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); } /** @@ -1332,7 +1325,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 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> @@ -1348,21 +1341,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 context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown 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 SyncPoller} 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); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), ClusterIdentityResponseInner.class, ClusterIdentityResponseInner.class, - context); + public SyncPoller, ClusterIdentityResponseInner> + beginCreateIdentity(String resourceGroupName, String clusterName) { + Response response = createIdentityWithResponse(resourceGroupName, clusterName); + return this.client.getLroResult(response, + ClusterIdentityResponseInner.class, ClusterIdentityResponseInner.class, Context.NONE); } /** @@ -1370,15 +1359,49 @@ 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 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(); + beginCreateIdentity(String resourceGroupName, String clusterName, Context context) { + Response response = createIdentityWithResponse(resourceGroupName, clusterName, context); + return this.client.getLroResult(response, + ClusterIdentityResponseInner.class, ClusterIdentityResponseInner.class, context); + } + + /** + * Create cluster identity. + * + * @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 body on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createIdentityAsync(String resourceGroupName, String clusterName) { + return beginCreateIdentityAsync(resourceGroupName, clusterName).last() + .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. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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 ClusterIdentityResponseInner createIdentity(String resourceGroupName, String clusterName) { + return beginCreateIdentity(resourceGroupName, clusterName).getFinalResult(); } /** @@ -1386,326 +1409,377 @@ 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. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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 ClusterIdentityResponseInner createIdentity(String resourceGroupName, String clusterName, Context context) { + return beginCreateIdentity(resourceGroupName, clusterName, context).getFinalResult(); + } + + /** + * 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. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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>> extendSoftwareAssuranceBenefitWithResponseAsync(String resourceGroupName, + String clusterName, SoftwareAssuranceChangeRequest softwareAssuranceChangeRequest) { + final String contentType = "application/json"; + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.extendSoftwareAssuranceBenefit(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, clusterName, + contentType, accept, softwareAssuranceChangeRequest, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * 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. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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 extendSoftwareAssuranceBenefitWithResponse(String resourceGroupName, + String clusterName, SoftwareAssuranceChangeRequest softwareAssuranceChangeRequest) { + 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.NONE); + } + + /** + * 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 the response body along with {@link Response}. + */ + @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); + } + + /** + * 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. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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, 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()); + } + + /** + * 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. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is 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(); + public SyncPoller, ClusterInner> beginExtendSoftwareAssuranceBenefit( + String resourceGroupName, String clusterName, SoftwareAssuranceChangeRequest softwareAssuranceChangeRequest) { + Response response = extendSoftwareAssuranceBenefitWithResponse(resourceGroupName, clusterName, + softwareAssuranceChangeRequest); + return this.client.getLroResult(response, ClusterInner.class, ClusterInner.class, + Context.NONE); } /** - * Create cluster identity. + * 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 Identity details on successful completion of {@link Mono}. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createIdentityAsync(String resourceGroupName, String clusterName) { - return beginCreateIdentityAsync(resourceGroupName, clusterName).last() - .flatMap(this.client::getLroFinalResultOrError); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, ClusterInner> beginExtendSoftwareAssuranceBenefit( + String resourceGroupName, String clusterName, SoftwareAssuranceChangeRequest softwareAssuranceChangeRequest, + Context context) { + Response response = extendSoftwareAssuranceBenefitWithResponse(resourceGroupName, clusterName, + softwareAssuranceChangeRequest, context); + return this.client.getLroResult(response, ClusterInner.class, ClusterInner.class, + context); } /** - * Create cluster identity. + * 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 context The context to associate with this operation. + * @param softwareAssuranceChangeRequest Software Assurance Change Request Payload. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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, - Context context) { - return beginCreateIdentityAsync(resourceGroupName, clusterName, context).last() + private Mono extendSoftwareAssuranceBenefitAsync(String resourceGroupName, String clusterName, + SoftwareAssuranceChangeRequest softwareAssuranceChangeRequest) { + return beginExtendSoftwareAssuranceBenefitAsync(resourceGroupName, clusterName, softwareAssuranceChangeRequest) + .last() .flatMap(this.client::getLroFinalResultOrError); } /** - * Create cluster identity. + * 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. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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(); + public ClusterInner extendSoftwareAssuranceBenefit(String resourceGroupName, String clusterName, + SoftwareAssuranceChangeRequest softwareAssuranceChangeRequest) { + return beginExtendSoftwareAssuranceBenefit(resourceGroupName, clusterName, softwareAssuranceChangeRequest) + .getFinalResult(); } /** - * Create cluster identity. + * 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 Identity details. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ClusterIdentityResponseInner createIdentity(String resourceGroupName, String clusterName, Context context) { - return createIdentityAsync(resourceGroupName, clusterName, context).block(); + public ClusterInner extendSoftwareAssuranceBenefit(String resourceGroupName, String clusterName, + SoftwareAssuranceChangeRequest softwareAssuranceChangeRequest, Context context) { + return beginExtendSoftwareAssuranceBenefit(resourceGroupName, clusterName, softwareAssuranceChangeRequest, + context).getFinalResult(); } /** - * Extends Software Assurance Benefit to a cluster. + * Changes ring of 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 changeRingRequest Change ring request payload. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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(); - } + private Mono>> changeRingWithResponseAsync(String resourceGroupName, String clusterName, + ChangeRingRequest changeRingRequest) { + 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)) + .withContext(context -> service.changeRing(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, clusterName, contentType, accept, changeRingRequest, + context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Extends Software Assurance Benefit to a cluster. + * Changes ring of 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. + * @param changeRingRequest Change ring request payload. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 changeRingWithResponse(String resourceGroupName, String clusterName, + ChangeRingRequest changeRingRequest) { + 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.changeRingSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, clusterName, contentType, accept, changeRingRequest, + Context.NONE); } /** - * Extends Software Assurance Benefit to a cluster. + * Changes ring of 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 changeRingRequest Change ring 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 changeRingWithResponse(String resourceGroupName, String clusterName, + ChangeRingRequest changeRingRequest, Context context) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.changeRingSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, clusterName, contentType, accept, changeRingRequest, + context); } /** - * Extends Software Assurance Benefit to a cluster. + * Changes ring of 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. + * @param changeRingRequest Change ring request payload. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown 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); - Mono>> mono = extendSoftwareAssuranceBenefitWithResponseAsync(resourceGroupName, - clusterName, softwareAssuranceChangeRequest, context); + private PollerFlux, ClusterInner> beginChangeRingAsync(String resourceGroupName, + String clusterName, ChangeRingRequest changeRingRequest) { + Mono>> mono + = changeRingWithResponseAsync(resourceGroupName, clusterName, changeRingRequest); return this.client.getLroResult(mono, this.client.getHttpPipeline(), - ClusterInner.class, ClusterInner.class, context); + ClusterInner.class, ClusterInner.class, this.client.getContext()); } /** - * Extends Software Assurance Benefit to a cluster. + * Changes ring of 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 changeRingRequest Change ring request payload. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is 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(); + public SyncPoller, ClusterInner> beginChangeRing(String resourceGroupName, + String clusterName, ChangeRingRequest changeRingRequest) { + Response response = changeRingWithResponse(resourceGroupName, clusterName, changeRingRequest); + return this.client.getLroResult(response, ClusterInner.class, ClusterInner.class, + Context.NONE); } /** - * Extends Software Assurance Benefit to a cluster. + * Changes ring of 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 changeRingRequest Change ring 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 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(); + public SyncPoller, ClusterInner> beginChangeRing(String resourceGroupName, + String clusterName, ChangeRingRequest changeRingRequest, Context context) { + Response response + = changeRingWithResponse(resourceGroupName, clusterName, changeRingRequest, context); + return this.client.getLroResult(response, ClusterInner.class, ClusterInner.class, + context); } /** - * Extends Software Assurance Benefit to a cluster. + * Changes ring of 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 changeRingRequest Change ring request payload. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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, - SoftwareAssuranceChangeRequest softwareAssuranceChangeRequest) { - return beginExtendSoftwareAssuranceBenefitAsync(resourceGroupName, clusterName, softwareAssuranceChangeRequest) - .last() + private Mono changeRingAsync(String resourceGroupName, String clusterName, + ChangeRingRequest changeRingRequest) { + return beginChangeRingAsync(resourceGroupName, clusterName, changeRingRequest).last() .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. + * Changes ring of 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 changeRingRequest Change ring request payload. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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(); + public ClusterInner changeRing(String resourceGroupName, String clusterName, ChangeRingRequest changeRingRequest) { + return beginChangeRing(resourceGroupName, clusterName, changeRingRequest).getFinalResult(); } /** - * Extends Software Assurance Benefit to a cluster. + * Changes ring of 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 changeRingRequest Change ring 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. + * @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(); + public ClusterInner changeRing(String resourceGroupName, String clusterName, ChangeRingRequest changeRingRequest, + Context context) { + return beginChangeRing(resourceGroupName, clusterName, changeRingRequest, context).getFinalResult(); } /** @@ -1717,37 +1791,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 +1811,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 +1832,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 +1854,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 +1877,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 +1898,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 +1918,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 +1927,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 +1936,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 +1954,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 +1972,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 +1992,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 +2013,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 +2035,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 +2058,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 +2079,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 +2099,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 +2108,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 +2117,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 +2135,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 +2154,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 +2190,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 +2211,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 +2247,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..4dffa4af1de3 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; @@ -12,11 +12,13 @@ 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.ChangeRingRequest; import com.azure.resourcemanager.azurestackhci.models.Cluster; import com.azure.resourcemanager.azurestackhci.models.ClusterIdentityResponse; 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 +35,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 +64,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); @@ -133,6 +155,26 @@ public Cluster extendSoftwareAssuranceBenefit(String resourceGroupName, String c } } + public Cluster changeRing(String resourceGroupName, String clusterName, ChangeRingRequest changeRingRequest) { + ClusterInner inner = this.serviceClient().changeRing(resourceGroupName, clusterName, changeRingRequest); + if (inner != null) { + return new ClusterImpl(inner, this.manager()); + } else { + return null; + } + } + + public Cluster changeRing(String resourceGroupName, String clusterName, ChangeRingRequest changeRingRequest, + Context context) { + ClusterInner inner + = this.serviceClient().changeRing(resourceGroupName, clusterName, changeRingRequest, context); + if (inner != null) { + return new ClusterImpl(inner, this.manager()); + } else { + return null; + } + } + public Cluster triggerLogCollection(String resourceGroupName, String clusterName, LogCollectionRequest logCollectionRequest) { ClusterInner inner 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/EdgeDeviceJobImpl.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/EdgeDeviceJobImpl.java new file mode 100644 index 000000000000..2fde0a295340 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/EdgeDeviceJobImpl.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.EdgeDeviceJobInner; +import com.azure.resourcemanager.azurestackhci.models.EdgeDeviceJob; +import com.azure.resourcemanager.azurestackhci.models.EdgeDeviceKind; + +public final class EdgeDeviceJobImpl implements EdgeDeviceJob { + private EdgeDeviceJobInner innerObject; + + private final com.azure.resourcemanager.azurestackhci.AzureStackHciManager serviceManager; + + EdgeDeviceJobImpl(EdgeDeviceJobInner 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 EdgeDeviceKind kind() { + return this.innerModel().kind(); + } + + public SystemData systemData() { + return this.innerModel().systemData(); + } + + public EdgeDeviceJobInner 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/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/EdgeMachineImpl.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/EdgeMachineImpl.java new file mode 100644 index 000000000000..b8468f158bb5 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/EdgeMachineImpl.java @@ -0,0 +1,192 @@ +// 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.Region; +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.azurestackhci.fluent.models.EdgeMachineInner; +import com.azure.resourcemanager.azurestackhci.fluent.models.ManagedServiceIdentity; +import com.azure.resourcemanager.azurestackhci.models.EdgeMachine; +import com.azure.resourcemanager.azurestackhci.models.EdgeMachinePatch; +import com.azure.resourcemanager.azurestackhci.models.EdgeMachineProperties; +import java.util.Collections; +import java.util.Map; + +public final class EdgeMachineImpl implements EdgeMachine, EdgeMachine.Definition, EdgeMachine.Update { + private EdgeMachineInner innerObject; + + private final com.azure.resourcemanager.azurestackhci.AzureStackHciManager serviceManager; + + public String id() { + return this.innerModel().id(); + } + + public String name() { + return this.innerModel().name(); + } + + public String type() { + return this.innerModel().type(); + } + + public String location() { + return this.innerModel().location(); + } + + public Map tags() { + Map inner = this.innerModel().tags(); + if (inner != null) { + return Collections.unmodifiableMap(inner); + } else { + return Collections.emptyMap(); + } + } + + public EdgeMachineProperties properties() { + return this.innerModel().properties(); + } + + public ManagedServiceIdentity identity() { + return this.innerModel().identity(); + } + + public SystemData systemData() { + return this.innerModel().systemData(); + } + + public Region region() { + return Region.fromName(this.regionName()); + } + + public String regionName() { + return this.location(); + } + + public String resourceGroupName() { + return resourceGroupName; + } + + public EdgeMachineInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager() { + return this.serviceManager; + } + + private String resourceGroupName; + + private String edgeMachineName; + + private EdgeMachinePatch updateProperties; + + public EdgeMachineImpl withExistingResourceGroup(String resourceGroupName) { + this.resourceGroupName = resourceGroupName; + return this; + } + + public EdgeMachine create() { + this.innerObject = serviceManager.serviceClient() + .getEdgeMachines() + .createOrUpdate(resourceGroupName, edgeMachineName, this.innerModel(), Context.NONE); + return this; + } + + public EdgeMachine create(Context context) { + this.innerObject = serviceManager.serviceClient() + .getEdgeMachines() + .createOrUpdate(resourceGroupName, edgeMachineName, this.innerModel(), context); + return this; + } + + EdgeMachineImpl(String name, com.azure.resourcemanager.azurestackhci.AzureStackHciManager serviceManager) { + this.innerObject = new EdgeMachineInner(); + this.serviceManager = serviceManager; + this.edgeMachineName = name; + } + + public EdgeMachineImpl update() { + this.updateProperties = new EdgeMachinePatch(); + return this; + } + + public EdgeMachine apply() { + this.innerObject = serviceManager.serviceClient() + .getEdgeMachines() + .update(resourceGroupName, edgeMachineName, updateProperties, Context.NONE); + return this; + } + + public EdgeMachine apply(Context context) { + this.innerObject = serviceManager.serviceClient() + .getEdgeMachines() + .update(resourceGroupName, edgeMachineName, updateProperties, context); + return this; + } + + EdgeMachineImpl(EdgeMachineInner innerObject, + com.azure.resourcemanager.azurestackhci.AzureStackHciManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); + this.edgeMachineName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "edgeMachines"); + } + + public EdgeMachine refresh() { + this.innerObject = serviceManager.serviceClient() + .getEdgeMachines() + .getByResourceGroupWithResponse(resourceGroupName, edgeMachineName, Context.NONE) + .getValue(); + return this; + } + + public EdgeMachine refresh(Context context) { + this.innerObject = serviceManager.serviceClient() + .getEdgeMachines() + .getByResourceGroupWithResponse(resourceGroupName, edgeMachineName, context) + .getValue(); + return this; + } + + public EdgeMachineImpl withRegion(Region location) { + this.innerModel().withLocation(location.toString()); + return this; + } + + public EdgeMachineImpl withRegion(String location) { + this.innerModel().withLocation(location); + return this; + } + + public EdgeMachineImpl withTags(Map tags) { + if (isInCreateMode()) { + this.innerModel().withTags(tags); + return this; + } else { + this.updateProperties.withTags(tags); + return this; + } + } + + public EdgeMachineImpl withProperties(EdgeMachineProperties properties) { + this.innerModel().withProperties(properties); + return this; + } + + public EdgeMachineImpl withIdentity(ManagedServiceIdentity identity) { + if (isInCreateMode()) { + this.innerModel().withIdentity(identity); + return this; + } else { + this.updateProperties.withIdentity(identity); + return this; + } + } + + private boolean isInCreateMode() { + return this.innerModel() == null || this.innerModel().id() == null; + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/EdgeMachineJobImpl.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/EdgeMachineJobImpl.java new file mode 100644 index 000000000000..aed855260d7f --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/EdgeMachineJobImpl.java @@ -0,0 +1,129 @@ +// 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.core.util.Context; +import com.azure.resourcemanager.azurestackhci.fluent.models.EdgeMachineJobInner; +import com.azure.resourcemanager.azurestackhci.models.EdgeMachineJob; +import com.azure.resourcemanager.azurestackhci.models.EdgeMachineJobProperties; + +public final class EdgeMachineJobImpl implements EdgeMachineJob, EdgeMachineJob.Definition, EdgeMachineJob.Update { + private EdgeMachineJobInner innerObject; + + private final com.azure.resourcemanager.azurestackhci.AzureStackHciManager serviceManager; + + public String id() { + return this.innerModel().id(); + } + + public String name() { + return this.innerModel().name(); + } + + public String type() { + return this.innerModel().type(); + } + + public EdgeMachineJobProperties properties() { + return this.innerModel().properties(); + } + + public SystemData systemData() { + return this.innerModel().systemData(); + } + + public String resourceGroupName() { + return resourceGroupName; + } + + public EdgeMachineJobInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager() { + return this.serviceManager; + } + + private String resourceGroupName; + + private String edgeMachineName; + + private String jobsName; + + public EdgeMachineJobImpl withExistingEdgeMachine(String resourceGroupName, String edgeMachineName) { + this.resourceGroupName = resourceGroupName; + this.edgeMachineName = edgeMachineName; + return this; + } + + public EdgeMachineJob create() { + this.innerObject = serviceManager.serviceClient() + .getEdgeMachineJobs() + .createOrUpdate(resourceGroupName, edgeMachineName, jobsName, this.innerModel(), Context.NONE); + return this; + } + + public EdgeMachineJob create(Context context) { + this.innerObject = serviceManager.serviceClient() + .getEdgeMachineJobs() + .createOrUpdate(resourceGroupName, edgeMachineName, jobsName, this.innerModel(), context); + return this; + } + + EdgeMachineJobImpl(String name, com.azure.resourcemanager.azurestackhci.AzureStackHciManager serviceManager) { + this.innerObject = new EdgeMachineJobInner(); + this.serviceManager = serviceManager; + this.jobsName = name; + } + + public EdgeMachineJobImpl update() { + return this; + } + + public EdgeMachineJob apply() { + this.innerObject = serviceManager.serviceClient() + .getEdgeMachineJobs() + .createOrUpdate(resourceGroupName, edgeMachineName, jobsName, this.innerModel(), Context.NONE); + return this; + } + + public EdgeMachineJob apply(Context context) { + this.innerObject = serviceManager.serviceClient() + .getEdgeMachineJobs() + .createOrUpdate(resourceGroupName, edgeMachineName, jobsName, this.innerModel(), context); + return this; + } + + EdgeMachineJobImpl(EdgeMachineJobInner innerObject, + com.azure.resourcemanager.azurestackhci.AzureStackHciManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); + this.edgeMachineName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "edgeMachines"); + this.jobsName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "jobs"); + } + + public EdgeMachineJob refresh() { + this.innerObject = serviceManager.serviceClient() + .getEdgeMachineJobs() + .getWithResponse(resourceGroupName, edgeMachineName, jobsName, Context.NONE) + .getValue(); + return this; + } + + public EdgeMachineJob refresh(Context context) { + this.innerObject = serviceManager.serviceClient() + .getEdgeMachineJobs() + .getWithResponse(resourceGroupName, edgeMachineName, jobsName, context) + .getValue(); + return this; + } + + public EdgeMachineJobImpl withProperties(EdgeMachineJobProperties properties) { + this.innerModel().withProperties(properties); + return this; + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/EdgeMachineJobsClientImpl.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/EdgeMachineJobsClientImpl.java new file mode 100644 index 000000000000..7a1ad37222c2 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/EdgeMachineJobsClientImpl.java @@ -0,0 +1,763 @@ +// 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.EdgeMachineJobsClient; +import com.azure.resourcemanager.azurestackhci.fluent.models.EdgeMachineJobInner; +import com.azure.resourcemanager.azurestackhci.implementation.models.EdgeMachineJobListResult; +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 EdgeMachineJobsClient. + */ +public final class EdgeMachineJobsClientImpl implements EdgeMachineJobsClient { + /** + * The proxy service used to perform REST calls. + */ + private final EdgeMachineJobsService service; + + /** + * The service client containing this operation class. + */ + private final AzureStackHciManagementClientImpl client; + + /** + * Initializes an instance of EdgeMachineJobsClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + EdgeMachineJobsClientImpl(AzureStackHciManagementClientImpl client) { + this.service + = RestProxy.create(EdgeMachineJobsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for AzureStackHciManagementClientEdgeMachineJobs to be used by the proxy + * service to perform REST calls. + */ + @Host("{endpoint}") + @ServiceInterface(name = "AzureStackHciManagementClientEdgeMachineJobs") + public interface EdgeMachineJobsService { + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/edgeMachines/{edgeMachineName}/jobs/{jobsName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> get(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("edgeMachineName") String edgeMachineName, @PathParam("jobsName") String jobsName, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/edgeMachines/{edgeMachineName}/jobs/{jobsName}") + @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("edgeMachineName") String edgeMachineName, @PathParam("jobsName") String jobsName, + @HeaderParam("Accept") String accept, Context context); + + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/edgeMachines/{edgeMachineName}/jobs/{jobsName}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> createOrUpdate(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("edgeMachineName") String edgeMachineName, @PathParam("jobsName") String jobsName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") EdgeMachineJobInner resource, Context context); + + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/edgeMachines/{edgeMachineName}/jobs/{jobsName}") + @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("edgeMachineName") String edgeMachineName, @PathParam("jobsName") String jobsName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") EdgeMachineJobInner resource, Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/edgeMachines/{edgeMachineName}/jobs/{jobsName}") + @ExpectedResponses({ 202, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> delete(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("edgeMachineName") String edgeMachineName, @PathParam("jobsName") String jobsName, + Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/edgeMachines/{edgeMachineName}/jobs/{jobsName}") + @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("edgeMachineName") String edgeMachineName, @PathParam("jobsName") String jobsName, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/edgeMachines/{edgeMachineName}/jobs") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> list(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("edgeMachineName") String edgeMachineName, @HeaderParam("Accept") String accept, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/edgeMachines/{edgeMachineName}/jobs") + @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("edgeMachineName") String edgeMachineName, @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); + } + + /** + * Get a EdgeMachineJob. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param edgeMachineName Name of Device. + * @param jobsName Name of EdgeMachineJob. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a EdgeMachineJob along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync(String resourceGroupName, String edgeMachineName, + String jobsName) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, edgeMachineName, jobsName, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get a EdgeMachineJob. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param edgeMachineName Name of Device. + * @param jobsName Name of EdgeMachineJob. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a EdgeMachineJob on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getAsync(String resourceGroupName, String edgeMachineName, String jobsName) { + return getWithResponseAsync(resourceGroupName, edgeMachineName, jobsName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Get a EdgeMachineJob. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param edgeMachineName Name of Device. + * @param jobsName Name of EdgeMachineJob. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a EdgeMachineJob along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse(String resourceGroupName, String edgeMachineName, + String jobsName, Context context) { + final String accept = "application/json"; + return service.getSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, edgeMachineName, jobsName, accept, context); + } + + /** + * Get a EdgeMachineJob. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param edgeMachineName Name of Device. + * @param jobsName Name of EdgeMachineJob. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a EdgeMachineJob. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public EdgeMachineJobInner get(String resourceGroupName, String edgeMachineName, String jobsName) { + return getWithResponse(resourceGroupName, edgeMachineName, jobsName, Context.NONE).getValue(); + } + + /** + * Create a EdgeMachineJob. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param edgeMachineName Name of Device. + * @param jobsName Name of EdgeMachineJob. + * @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 cluster Jobs resource along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, + String edgeMachineName, String jobsName, EdgeMachineJobInner resource) { + final String contentType = "application/json"; + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, edgeMachineName, jobsName, contentType, accept, + resource, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Create a EdgeMachineJob. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param edgeMachineName Name of Device. + * @param jobsName Name of EdgeMachineJob. + * @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 cluster Jobs resource along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response createOrUpdateWithResponse(String resourceGroupName, String edgeMachineName, + String jobsName, EdgeMachineJobInner resource) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, edgeMachineName, jobsName, contentType, accept, + resource, Context.NONE); + } + + /** + * Create a EdgeMachineJob. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param edgeMachineName Name of Device. + * @param jobsName Name of EdgeMachineJob. + * @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 cluster Jobs resource along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response createOrUpdateWithResponse(String resourceGroupName, String edgeMachineName, + String jobsName, EdgeMachineJobInner 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, edgeMachineName, jobsName, contentType, accept, + resource, context); + } + + /** + * Create a EdgeMachineJob. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param edgeMachineName Name of Device. + * @param jobsName Name of EdgeMachineJob. + * @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 cluster Jobs resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, EdgeMachineJobInner> beginCreateOrUpdateAsync( + String resourceGroupName, String edgeMachineName, String jobsName, EdgeMachineJobInner resource) { + Mono>> mono + = createOrUpdateWithResponseAsync(resourceGroupName, edgeMachineName, jobsName, resource); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + EdgeMachineJobInner.class, EdgeMachineJobInner.class, this.client.getContext()); + } + + /** + * Create a EdgeMachineJob. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param edgeMachineName Name of Device. + * @param jobsName Name of EdgeMachineJob. + * @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 cluster Jobs resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, EdgeMachineJobInner> beginCreateOrUpdate( + String resourceGroupName, String edgeMachineName, String jobsName, EdgeMachineJobInner resource) { + Response response + = createOrUpdateWithResponse(resourceGroupName, edgeMachineName, jobsName, resource); + return this.client.getLroResult(response, EdgeMachineJobInner.class, + EdgeMachineJobInner.class, Context.NONE); + } + + /** + * Create a EdgeMachineJob. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param edgeMachineName Name of Device. + * @param jobsName Name of EdgeMachineJob. + * @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 cluster Jobs resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, EdgeMachineJobInner> beginCreateOrUpdate( + String resourceGroupName, String edgeMachineName, String jobsName, EdgeMachineJobInner resource, + Context context) { + Response response + = createOrUpdateWithResponse(resourceGroupName, edgeMachineName, jobsName, resource, context); + return this.client.getLroResult(response, EdgeMachineJobInner.class, + EdgeMachineJobInner.class, context); + } + + /** + * Create a EdgeMachineJob. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param edgeMachineName Name of Device. + * @param jobsName Name of EdgeMachineJob. + * @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 cluster Jobs resource on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateAsync(String resourceGroupName, String edgeMachineName, + String jobsName, EdgeMachineJobInner resource) { + return beginCreateOrUpdateAsync(resourceGroupName, edgeMachineName, jobsName, resource).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Create a EdgeMachineJob. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param edgeMachineName Name of Device. + * @param jobsName Name of EdgeMachineJob. + * @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 cluster Jobs resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public EdgeMachineJobInner createOrUpdate(String resourceGroupName, String edgeMachineName, String jobsName, + EdgeMachineJobInner resource) { + return beginCreateOrUpdate(resourceGroupName, edgeMachineName, jobsName, resource).getFinalResult(); + } + + /** + * Create a EdgeMachineJob. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param edgeMachineName Name of Device. + * @param jobsName Name of EdgeMachineJob. + * @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 cluster Jobs resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public EdgeMachineJobInner createOrUpdate(String resourceGroupName, String edgeMachineName, String jobsName, + EdgeMachineJobInner resource, Context context) { + return beginCreateOrUpdate(resourceGroupName, edgeMachineName, jobsName, resource, context).getFinalResult(); + } + + /** + * Delete a EdgeMachineJob. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param edgeMachineName Name of Device. + * @param jobsName Name of EdgeMachineJob. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> deleteWithResponseAsync(String resourceGroupName, String edgeMachineName, + String jobsName) { + return FluxUtil + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, edgeMachineName, jobsName, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Delete a EdgeMachineJob. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param edgeMachineName Name of Device. + * @param jobsName Name of EdgeMachineJob. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response deleteWithResponse(String resourceGroupName, String edgeMachineName, String jobsName) { + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, edgeMachineName, jobsName, Context.NONE); + } + + /** + * Delete a EdgeMachineJob. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param edgeMachineName Name of Device. + * @param jobsName Name of EdgeMachineJob. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response deleteWithResponse(String resourceGroupName, String edgeMachineName, String jobsName, + Context context) { + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, edgeMachineName, jobsName, context); + } + + /** + * Delete a EdgeMachineJob. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param edgeMachineName Name of Device. + * @param jobsName Name of EdgeMachineJob. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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 edgeMachineName, + String jobsName) { + Mono>> mono = deleteWithResponseAsync(resourceGroupName, edgeMachineName, jobsName); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); + } + + /** + * Delete a EdgeMachineJob. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param edgeMachineName Name of Device. + * @param jobsName Name of EdgeMachineJob. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is 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 edgeMachineName, + String jobsName) { + Response response = deleteWithResponse(resourceGroupName, edgeMachineName, jobsName); + return this.client.getLroResult(response, Void.class, Void.class, Context.NONE); + } + + /** + * Delete a EdgeMachineJob. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param edgeMachineName Name of Device. + * @param jobsName Name of EdgeMachineJob. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is 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 edgeMachineName, + String jobsName, Context context) { + Response response = deleteWithResponse(resourceGroupName, edgeMachineName, jobsName, context); + return this.client.getLroResult(response, Void.class, Void.class, context); + } + + /** + * Delete a EdgeMachineJob. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param edgeMachineName Name of Device. + * @param jobsName Name of EdgeMachineJob. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 edgeMachineName, String jobsName) { + return beginDeleteAsync(resourceGroupName, edgeMachineName, jobsName).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Delete a EdgeMachineJob. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param edgeMachineName Name of Device. + * @param jobsName Name of EdgeMachineJob. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @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 edgeMachineName, String jobsName) { + beginDelete(resourceGroupName, edgeMachineName, jobsName).getFinalResult(); + } + + /** + * Delete a EdgeMachineJob. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param edgeMachineName Name of Device. + * @param jobsName Name of EdgeMachineJob. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @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 edgeMachineName, String jobsName, Context context) { + beginDelete(resourceGroupName, edgeMachineName, jobsName, context).getFinalResult(); + } + + /** + * List EdgeMachineJob resources by EdgeMachines. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param edgeMachineName 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 EdgeMachineJob list operation along with {@link PagedResponse} on successful completion + * of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync(String resourceGroupName, + String edgeMachineName) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, edgeMachineName, 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 EdgeMachineJob resources by EdgeMachines. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param edgeMachineName 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 EdgeMachineJob list operation as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String resourceGroupName, String edgeMachineName) { + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, edgeMachineName), + nextLink -> listNextSinglePageAsync(nextLink)); + } + + /** + * List EdgeMachineJob resources by EdgeMachines. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param edgeMachineName 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 EdgeMachineJob list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listSinglePage(String resourceGroupName, String edgeMachineName) { + final String accept = "application/json"; + Response res + = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, edgeMachineName, accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * List EdgeMachineJob resources by EdgeMachines. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param edgeMachineName 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 EdgeMachineJob list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listSinglePage(String resourceGroupName, String edgeMachineName, + Context context) { + final String accept = "application/json"; + Response res + = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, edgeMachineName, accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * List EdgeMachineJob resources by EdgeMachines. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param edgeMachineName 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 EdgeMachineJob list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String resourceGroupName, String edgeMachineName) { + return new PagedIterable<>(() -> listSinglePage(resourceGroupName, edgeMachineName), + nextLink -> listNextSinglePage(nextLink)); + } + + /** + * List EdgeMachineJob resources by EdgeMachines. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param edgeMachineName 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 EdgeMachineJob list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String resourceGroupName, String edgeMachineName, Context context) { + return new PagedIterable<>(() -> listSinglePage(resourceGroupName, edgeMachineName, 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 the response of a EdgeMachineJob list operation along with {@link PagedResponse} on successful completion + * of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listNextSinglePageAsync(String nextLink) { + final String accept = "application/json"; + return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a EdgeMachineJob list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listNextSinglePage(String nextLink) { + final String accept = "application/json"; + Response res + = service.listNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a EdgeMachineJob list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listNextSinglePage(String nextLink, Context context) { + final String accept = "application/json"; + Response res + = service.listNextSync(nextLink, this.client.getEndpoint(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/EdgeMachineJobsImpl.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/EdgeMachineJobsImpl.java new file mode 100644 index 000000000000..20be39b6609c --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/EdgeMachineJobsImpl.java @@ -0,0 +1,157 @@ +// 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.EdgeMachineJobsClient; +import com.azure.resourcemanager.azurestackhci.fluent.models.EdgeMachineJobInner; +import com.azure.resourcemanager.azurestackhci.models.EdgeMachineJob; +import com.azure.resourcemanager.azurestackhci.models.EdgeMachineJobs; + +public final class EdgeMachineJobsImpl implements EdgeMachineJobs { + private static final ClientLogger LOGGER = new ClientLogger(EdgeMachineJobsImpl.class); + + private final EdgeMachineJobsClient innerClient; + + private final com.azure.resourcemanager.azurestackhci.AzureStackHciManager serviceManager; + + public EdgeMachineJobsImpl(EdgeMachineJobsClient innerClient, + com.azure.resourcemanager.azurestackhci.AzureStackHciManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public Response getWithResponse(String resourceGroupName, String edgeMachineName, String jobsName, + Context context) { + Response inner + = this.serviceClient().getWithResponse(resourceGroupName, edgeMachineName, jobsName, context); + if (inner != null) { + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new EdgeMachineJobImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public EdgeMachineJob get(String resourceGroupName, String edgeMachineName, String jobsName) { + EdgeMachineJobInner inner = this.serviceClient().get(resourceGroupName, edgeMachineName, jobsName); + if (inner != null) { + return new EdgeMachineJobImpl(inner, this.manager()); + } else { + return null; + } + } + + public void delete(String resourceGroupName, String edgeMachineName, String jobsName) { + this.serviceClient().delete(resourceGroupName, edgeMachineName, jobsName); + } + + public void delete(String resourceGroupName, String edgeMachineName, String jobsName, Context context) { + this.serviceClient().delete(resourceGroupName, edgeMachineName, jobsName, context); + } + + public PagedIterable list(String resourceGroupName, String edgeMachineName) { + PagedIterable inner = this.serviceClient().list(resourceGroupName, edgeMachineName); + return ResourceManagerUtils.mapPage(inner, inner1 -> new EdgeMachineJobImpl(inner1, this.manager())); + } + + public PagedIterable list(String resourceGroupName, String edgeMachineName, Context context) { + PagedIterable inner + = this.serviceClient().list(resourceGroupName, edgeMachineName, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new EdgeMachineJobImpl(inner1, this.manager())); + } + + public EdgeMachineJob getById(String id) { + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String edgeMachineName = ResourceManagerUtils.getValueFromIdByName(id, "edgeMachines"); + if (edgeMachineName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'edgeMachines'.", id))); + } + String jobsName = ResourceManagerUtils.getValueFromIdByName(id, "jobs"); + if (jobsName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'jobs'.", id))); + } + return this.getWithResponse(resourceGroupName, edgeMachineName, jobsName, Context.NONE).getValue(); + } + + public Response getByIdWithResponse(String id, Context context) { + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String edgeMachineName = ResourceManagerUtils.getValueFromIdByName(id, "edgeMachines"); + if (edgeMachineName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'edgeMachines'.", id))); + } + String jobsName = ResourceManagerUtils.getValueFromIdByName(id, "jobs"); + if (jobsName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'jobs'.", id))); + } + return this.getWithResponse(resourceGroupName, edgeMachineName, jobsName, context); + } + + public void deleteById(String id) { + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String edgeMachineName = ResourceManagerUtils.getValueFromIdByName(id, "edgeMachines"); + if (edgeMachineName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'edgeMachines'.", id))); + } + String jobsName = ResourceManagerUtils.getValueFromIdByName(id, "jobs"); + if (jobsName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'jobs'.", id))); + } + this.delete(resourceGroupName, edgeMachineName, jobsName, Context.NONE); + } + + public void deleteByIdWithResponse(String id, Context context) { + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String edgeMachineName = ResourceManagerUtils.getValueFromIdByName(id, "edgeMachines"); + if (edgeMachineName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'edgeMachines'.", id))); + } + String jobsName = ResourceManagerUtils.getValueFromIdByName(id, "jobs"); + if (jobsName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'jobs'.", id))); + } + this.delete(resourceGroupName, edgeMachineName, jobsName, context); + } + + private EdgeMachineJobsClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager() { + return this.serviceManager; + } + + public EdgeMachineJobImpl define(String name) { + return new EdgeMachineJobImpl(name, this.manager()); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/EdgeMachinesClientImpl.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/EdgeMachinesClientImpl.java new file mode 100644 index 000000000000..8d60eb083549 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/EdgeMachinesClientImpl.java @@ -0,0 +1,1105 @@ +// 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.Patch; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.Put; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.PagedResponse; +import com.azure.core.http.rest.PagedResponseBase; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.management.exception.ManagementException; +import com.azure.core.management.polling.PollResult; +import com.azure.core.util.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.EdgeMachinesClient; +import com.azure.resourcemanager.azurestackhci.fluent.models.EdgeMachineInner; +import com.azure.resourcemanager.azurestackhci.implementation.models.EdgeMachineListResult; +import com.azure.resourcemanager.azurestackhci.models.EdgeMachinePatch; +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 EdgeMachinesClient. + */ +public final class EdgeMachinesClientImpl implements EdgeMachinesClient { + /** + * The proxy service used to perform REST calls. + */ + private final EdgeMachinesService service; + + /** + * The service client containing this operation class. + */ + private final AzureStackHciManagementClientImpl client; + + /** + * Initializes an instance of EdgeMachinesClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + EdgeMachinesClientImpl(AzureStackHciManagementClientImpl client) { + this.service + = RestProxy.create(EdgeMachinesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for AzureStackHciManagementClientEdgeMachines to be used by the proxy + * service to perform REST calls. + */ + @Host("{endpoint}") + @ServiceInterface(name = "AzureStackHciManagementClientEdgeMachines") + public interface EdgeMachinesService { + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/edgeMachines/{edgeMachineName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> getByResourceGroup(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("edgeMachineName") String edgeMachineName, @HeaderParam("Accept") String accept, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/edgeMachines/{edgeMachineName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response getByResourceGroupSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("edgeMachineName") String edgeMachineName, @HeaderParam("Accept") String accept, + Context context); + + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/edgeMachines/{edgeMachineName}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> createOrUpdate(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("edgeMachineName") String edgeMachineName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") EdgeMachineInner resource, + Context context); + + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/edgeMachines/{edgeMachineName}") + @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("edgeMachineName") String edgeMachineName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") EdgeMachineInner resource, + Context context); + + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/edgeMachines/{edgeMachineName}") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> update(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("edgeMachineName") String edgeMachineName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") EdgeMachinePatch properties, + Context context); + + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/edgeMachines/{edgeMachineName}") + @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("edgeMachineName") String edgeMachineName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") EdgeMachinePatch properties, + Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/edgeMachines/{edgeMachineName}") + @ExpectedResponses({ 202, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> delete(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("edgeMachineName") String edgeMachineName, Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/edgeMachines/{edgeMachineName}") + @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("edgeMachineName") String edgeMachineName, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/edgeMachines") + @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/edgeMachines") + @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/edgeMachines") + @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/edgeMachines") + @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); + + @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) + 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> 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); + } + + /** + * Get an edge machine. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param edgeMachineName 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 an edge machine along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, + String edgeMachineName) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.getByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, edgeMachineName, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get an edge machine. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param edgeMachineName 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 an edge machine on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getByResourceGroupAsync(String resourceGroupName, String edgeMachineName) { + return getByResourceGroupWithResponseAsync(resourceGroupName, edgeMachineName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Get an edge machine. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param edgeMachineName 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 an edge machine along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getByResourceGroupWithResponse(String resourceGroupName, String edgeMachineName, + Context context) { + final String accept = "application/json"; + return service.getByResourceGroupSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, edgeMachineName, accept, context); + } + + /** + * Get an edge machine. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param edgeMachineName 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 an edge machine. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public EdgeMachineInner getByResourceGroup(String resourceGroupName, String edgeMachineName) { + return getByResourceGroupWithResponse(resourceGroupName, edgeMachineName, Context.NONE).getValue(); + } + + /** + * Create or update an edge machine. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param edgeMachineName Name of Device. + * @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 edgeMachine details along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, + String edgeMachineName, EdgeMachineInner resource) { + final String contentType = "application/json"; + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, edgeMachineName, contentType, accept, resource, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Create or update an edge machine. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param edgeMachineName Name of Device. + * @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 edgeMachine details along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response createOrUpdateWithResponse(String resourceGroupName, String edgeMachineName, + EdgeMachineInner resource) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, edgeMachineName, contentType, accept, resource, + Context.NONE); + } + + /** + * Create or update an edge machine. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param edgeMachineName 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 edgeMachine details along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response createOrUpdateWithResponse(String resourceGroupName, String edgeMachineName, + EdgeMachineInner 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, edgeMachineName, contentType, accept, resource, + context); + } + + /** + * Create or update an edge machine. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param edgeMachineName Name of Device. + * @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 edgeMachine details. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, EdgeMachineInner> + beginCreateOrUpdateAsync(String resourceGroupName, String edgeMachineName, EdgeMachineInner resource) { + Mono>> mono + = createOrUpdateWithResponseAsync(resourceGroupName, edgeMachineName, resource); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + EdgeMachineInner.class, EdgeMachineInner.class, this.client.getContext()); + } + + /** + * Create or update an edge machine. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param edgeMachineName Name of Device. + * @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 edgeMachine details. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, EdgeMachineInner> beginCreateOrUpdate(String resourceGroupName, + String edgeMachineName, EdgeMachineInner resource) { + Response response = createOrUpdateWithResponse(resourceGroupName, edgeMachineName, resource); + return this.client.getLroResult(response, EdgeMachineInner.class, + EdgeMachineInner.class, Context.NONE); + } + + /** + * Create or update an edge machine. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param edgeMachineName 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 SyncPoller} for polling of edgeMachine details. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, EdgeMachineInner> beginCreateOrUpdate(String resourceGroupName, + String edgeMachineName, EdgeMachineInner resource, Context context) { + Response response + = createOrUpdateWithResponse(resourceGroupName, edgeMachineName, resource, context); + return this.client.getLroResult(response, EdgeMachineInner.class, + EdgeMachineInner.class, context); + } + + /** + * Create or update an edge machine. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param edgeMachineName Name of Device. + * @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 edgeMachine details on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateAsync(String resourceGroupName, String edgeMachineName, + EdgeMachineInner resource) { + return beginCreateOrUpdateAsync(resourceGroupName, edgeMachineName, resource).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Create or update an edge machine. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param edgeMachineName Name of Device. + * @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 edgeMachine details. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public EdgeMachineInner createOrUpdate(String resourceGroupName, String edgeMachineName, + EdgeMachineInner resource) { + return beginCreateOrUpdate(resourceGroupName, edgeMachineName, resource).getFinalResult(); + } + + /** + * Create or update an edge machine. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param edgeMachineName 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 edgeMachine details. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public EdgeMachineInner createOrUpdate(String resourceGroupName, String edgeMachineName, EdgeMachineInner resource, + Context context) { + return beginCreateOrUpdate(resourceGroupName, edgeMachineName, resource, context).getFinalResult(); + } + + /** + * Update an edge machine. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param edgeMachineName Name of Device. + * @param properties The resource properties to be updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return edgeMachine details along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> updateWithResponseAsync(String resourceGroupName, String edgeMachineName, + EdgeMachinePatch properties) { + final String contentType = "application/json"; + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, edgeMachineName, contentType, accept, properties, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Update an edge machine. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param edgeMachineName Name of Device. + * @param properties The resource properties to be updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return edgeMachine details along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response updateWithResponse(String resourceGroupName, String edgeMachineName, + EdgeMachinePatch properties) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, edgeMachineName, contentType, accept, properties, + Context.NONE); + } + + /** + * Update an edge machine. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param edgeMachineName Name of Device. + * @param properties The resource properties to be updated. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return edgeMachine details along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response updateWithResponse(String resourceGroupName, String edgeMachineName, + EdgeMachinePatch properties, 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, edgeMachineName, contentType, accept, properties, + context); + } + + /** + * Update an edge machine. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param edgeMachineName Name of Device. + * @param properties The resource properties to be updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of edgeMachine details. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, EdgeMachineInner> beginUpdateAsync(String resourceGroupName, + String edgeMachineName, EdgeMachinePatch properties) { + Mono>> mono = updateWithResponseAsync(resourceGroupName, edgeMachineName, properties); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + EdgeMachineInner.class, EdgeMachineInner.class, this.client.getContext()); + } + + /** + * Update an edge machine. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param edgeMachineName Name of Device. + * @param properties The resource properties to be updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of edgeMachine details. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, EdgeMachineInner> beginUpdate(String resourceGroupName, + String edgeMachineName, EdgeMachinePatch properties) { + Response response = updateWithResponse(resourceGroupName, edgeMachineName, properties); + return this.client.getLroResult(response, EdgeMachineInner.class, + EdgeMachineInner.class, Context.NONE); + } + + /** + * Update an edge machine. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param edgeMachineName Name of Device. + * @param properties The resource properties to be updated. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of edgeMachine details. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, EdgeMachineInner> beginUpdate(String resourceGroupName, + String edgeMachineName, EdgeMachinePatch properties, Context context) { + Response response = updateWithResponse(resourceGroupName, edgeMachineName, properties, context); + return this.client.getLroResult(response, EdgeMachineInner.class, + EdgeMachineInner.class, context); + } + + /** + * Update an edge machine. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param edgeMachineName Name of Device. + * @param properties The resource properties to be updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return edgeMachine details on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono updateAsync(String resourceGroupName, String edgeMachineName, + EdgeMachinePatch properties) { + return beginUpdateAsync(resourceGroupName, edgeMachineName, properties).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Update an edge machine. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param edgeMachineName Name of Device. + * @param properties The resource properties to be updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return edgeMachine details. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public EdgeMachineInner update(String resourceGroupName, String edgeMachineName, EdgeMachinePatch properties) { + return beginUpdate(resourceGroupName, edgeMachineName, properties).getFinalResult(); + } + + /** + * Update an edge machine. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param edgeMachineName Name of Device. + * @param properties The resource properties to be updated. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return edgeMachine details. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public EdgeMachineInner update(String resourceGroupName, String edgeMachineName, EdgeMachinePatch properties, + Context context) { + return beginUpdate(resourceGroupName, edgeMachineName, properties, context).getFinalResult(); + } + + /** + * Delete an edge machine. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param edgeMachineName 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 {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> deleteWithResponseAsync(String resourceGroupName, String edgeMachineName) { + return FluxUtil + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, edgeMachineName, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Delete an edge machine. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param edgeMachineName 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 body along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response deleteWithResponse(String resourceGroupName, String edgeMachineName) { + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, edgeMachineName, Context.NONE); + } + + /** + * Delete an edge machine. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param edgeMachineName 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 body along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response deleteWithResponse(String resourceGroupName, String edgeMachineName, Context context) { + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, edgeMachineName, context); + } + + /** + * Delete an edge machine. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param edgeMachineName 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 {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String edgeMachineName) { + Mono>> mono = deleteWithResponseAsync(resourceGroupName, edgeMachineName); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); + } + + /** + * Delete an edge machine. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param edgeMachineName 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 {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDelete(String resourceGroupName, String edgeMachineName) { + Response response = deleteWithResponse(resourceGroupName, edgeMachineName); + return this.client.getLroResult(response, Void.class, Void.class, Context.NONE); + } + + /** + * Delete an edge machine. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param edgeMachineName 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 SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDelete(String resourceGroupName, String edgeMachineName, + Context context) { + Response response = deleteWithResponse(resourceGroupName, edgeMachineName, context); + return this.client.getLroResult(response, Void.class, Void.class, context); + } + + /** + * Delete an edge machine. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param edgeMachineName 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 A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteAsync(String resourceGroupName, String edgeMachineName) { + return beginDeleteAsync(resourceGroupName, edgeMachineName).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Delete an edge machine. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param edgeMachineName 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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String resourceGroupName, String edgeMachineName) { + beginDelete(resourceGroupName, edgeMachineName).getFinalResult(); + } + + /** + * Delete an edge machine. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param edgeMachineName 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 resourceGroupName, String edgeMachineName, Context context) { + beginDelete(resourceGroupName, edgeMachineName, context).getFinalResult(); + } + + /** + * List all edge machines 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 ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a EdgeMachine list operation along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * List all edge machines 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 ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a EdgeMachine list operation as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByResourceGroupAsync(String resourceGroupName) { + return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName), + nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); + } + + /** + * List all edge machines 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 ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a EdgeMachine list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + 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); + } + + /** + * List all edge machines 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 ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a EdgeMachine list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + 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); + } + + /** + * List all edge machines 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 ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a EdgeMachine list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByResourceGroup(String resourceGroupName) { + return new PagedIterable<>(() -> listByResourceGroupSinglePage(resourceGroupName), + nextLink -> listByResourceGroupNextSinglePage(nextLink)); + } + + /** + * List all edge machines 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 ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a EdgeMachine list operation 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 edge machines 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 the response of a EdgeMachine list operation along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync() { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * List all edge machines 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 the response of a EdgeMachine list operation as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync() { + return new PagedFlux<>(() -> listSinglePageAsync(), + nextLink -> listBySubscriptionNextSinglePageAsync(nextLink)); + } + + /** + * List all edge machines 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 the response of a EdgeMachine list operation 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(), + this.client.getSubscriptionId(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * List all edge machines in a subscription. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a EdgeMachine list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + 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); + } + + /** + * List all edge machines 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 the response of a EdgeMachine list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list() { + return new PagedIterable<>(() -> listSinglePage(), nextLink -> listBySubscriptionNextSinglePage(nextLink)); + } + + /** + * List all edge machines in a subscription. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a EdgeMachine list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(Context context) { + return new PagedIterable<>(() -> listSinglePage(context), + nextLink -> listBySubscriptionNextSinglePage(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 EdgeMachine list operation along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByResourceGroupNextSinglePageAsync(String nextLink) { + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> service.listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a EdgeMachine list operation 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. + * + * @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 EdgeMachine list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByResourceGroupNextSinglePage(String nextLink, Context context) { + final String accept = "application/json"; + 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); + } + + /** + * 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 EdgeMachine list operation along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listBySubscriptionNextSinglePageAsync(String nextLink) { + final String accept = "application/json"; + return FluxUtil + .withContext( + 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 the response of a EdgeMachine list operation 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. + * + * @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 EdgeMachine list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listBySubscriptionNextSinglePage(String nextLink, Context context) { + final String accept = "application/json"; + 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/EdgeMachinesImpl.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/EdgeMachinesImpl.java new file mode 100644 index 000000000000..fc0405118610 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/EdgeMachinesImpl.java @@ -0,0 +1,146 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.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.EdgeMachinesClient; +import com.azure.resourcemanager.azurestackhci.fluent.models.EdgeMachineInner; +import com.azure.resourcemanager.azurestackhci.models.EdgeMachine; +import com.azure.resourcemanager.azurestackhci.models.EdgeMachines; + +public final class EdgeMachinesImpl implements EdgeMachines { + private static final ClientLogger LOGGER = new ClientLogger(EdgeMachinesImpl.class); + + private final EdgeMachinesClient innerClient; + + private final com.azure.resourcemanager.azurestackhci.AzureStackHciManager serviceManager; + + public EdgeMachinesImpl(EdgeMachinesClient innerClient, + com.azure.resourcemanager.azurestackhci.AzureStackHciManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public Response getByResourceGroupWithResponse(String resourceGroupName, String edgeMachineName, + Context context) { + Response inner + = this.serviceClient().getByResourceGroupWithResponse(resourceGroupName, edgeMachineName, context); + if (inner != null) { + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new EdgeMachineImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public EdgeMachine getByResourceGroup(String resourceGroupName, String edgeMachineName) { + EdgeMachineInner inner = this.serviceClient().getByResourceGroup(resourceGroupName, edgeMachineName); + if (inner != null) { + return new EdgeMachineImpl(inner, this.manager()); + } else { + return null; + } + } + + public void deleteByResourceGroup(String resourceGroupName, String edgeMachineName) { + this.serviceClient().delete(resourceGroupName, edgeMachineName); + } + + public void delete(String resourceGroupName, String edgeMachineName, Context context) { + this.serviceClient().delete(resourceGroupName, edgeMachineName, context); + } + + public PagedIterable listByResourceGroup(String resourceGroupName) { + PagedIterable inner = this.serviceClient().listByResourceGroup(resourceGroupName); + return ResourceManagerUtils.mapPage(inner, inner1 -> new EdgeMachineImpl(inner1, this.manager())); + } + + public PagedIterable listByResourceGroup(String resourceGroupName, Context context) { + PagedIterable inner = this.serviceClient().listByResourceGroup(resourceGroupName, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new EdgeMachineImpl(inner1, this.manager())); + } + + public PagedIterable list() { + PagedIterable inner = this.serviceClient().list(); + return ResourceManagerUtils.mapPage(inner, inner1 -> new EdgeMachineImpl(inner1, this.manager())); + } + + public PagedIterable list(Context context) { + PagedIterable inner = this.serviceClient().list(context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new EdgeMachineImpl(inner1, this.manager())); + } + + public EdgeMachine getById(String id) { + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String edgeMachineName = ResourceManagerUtils.getValueFromIdByName(id, "edgeMachines"); + if (edgeMachineName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'edgeMachines'.", id))); + } + return this.getByResourceGroupWithResponse(resourceGroupName, edgeMachineName, Context.NONE).getValue(); + } + + public Response getByIdWithResponse(String id, Context context) { + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String edgeMachineName = ResourceManagerUtils.getValueFromIdByName(id, "edgeMachines"); + if (edgeMachineName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'edgeMachines'.", id))); + } + return this.getByResourceGroupWithResponse(resourceGroupName, edgeMachineName, context); + } + + public void deleteById(String id) { + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String edgeMachineName = ResourceManagerUtils.getValueFromIdByName(id, "edgeMachines"); + if (edgeMachineName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'edgeMachines'.", id))); + } + this.delete(resourceGroupName, edgeMachineName, Context.NONE); + } + + public void deleteByIdWithResponse(String id, Context context) { + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String edgeMachineName = ResourceManagerUtils.getValueFromIdByName(id, "edgeMachines"); + if (edgeMachineName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'edgeMachines'.", id))); + } + this.delete(resourceGroupName, edgeMachineName, context); + } + + private EdgeMachinesClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager() { + return this.serviceManager; + } + + public EdgeMachineImpl define(String name) { + return new EdgeMachineImpl(name, this.manager()); + } +} 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/KubernetesVersionImpl.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/KubernetesVersionImpl.java new file mode 100644 index 000000000000..a058ad082e16 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/KubernetesVersionImpl.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.KubernetesVersionInner; +import com.azure.resourcemanager.azurestackhci.models.KubernetesVersion; +import com.azure.resourcemanager.azurestackhci.models.KubernetesVersionProperties; + +public final class KubernetesVersionImpl implements KubernetesVersion { + private KubernetesVersionInner innerObject; + + private final com.azure.resourcemanager.azurestackhci.AzureStackHciManager serviceManager; + + KubernetesVersionImpl(KubernetesVersionInner 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 KubernetesVersionProperties properties() { + return this.innerModel().properties(); + } + + public SystemData systemData() { + return this.innerModel().systemData(); + } + + public KubernetesVersionInner 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/KubernetesVersionsClientImpl.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/KubernetesVersionsClientImpl.java new file mode 100644 index 000000000000..401566a8e44e --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/KubernetesVersionsClientImpl.java @@ -0,0 +1,267 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.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.KubernetesVersionsClient; +import com.azure.resourcemanager.azurestackhci.fluent.models.KubernetesVersionInner; +import com.azure.resourcemanager.azurestackhci.implementation.models.KubernetesVersionListResult; +import reactor.core.publisher.Mono; + +/** + * An instance of this class provides access to all the operations defined in KubernetesVersionsClient. + */ +public final class KubernetesVersionsClientImpl implements KubernetesVersionsClient { + /** + * The proxy service used to perform REST calls. + */ + private final KubernetesVersionsService service; + + /** + * The service client containing this operation class. + */ + private final AzureStackHciManagementClientImpl client; + + /** + * Initializes an instance of KubernetesVersionsClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + KubernetesVersionsClientImpl(AzureStackHciManagementClientImpl client) { + this.service = RestProxy.create(KubernetesVersionsService.class, client.getHttpPipeline(), + client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for AzureStackHciManagementClientKubernetesVersions to be used by the + * proxy service to perform REST calls. + */ + @Host("{endpoint}") + @ServiceInterface(name = "AzureStackHciManagementClientKubernetesVersions") + public interface KubernetesVersionsService { + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/providers/Microsoft.AzureStackHCI/locations/{location}/kubernetesVersions") + @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}/kubernetesVersions") + @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); + } + + /** + * List all kubernetes versions. + * + * @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 KubernetesVersion 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 kubernetes versions. + * + * @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 KubernetesVersion 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 kubernetes versions. + * + * @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 KubernetesVersion 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 kubernetes versions. + * + * @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 KubernetesVersion 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 kubernetes versions. + * + * @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 KubernetesVersion 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 kubernetes versions. + * + * @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 KubernetesVersion 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 KubernetesVersion 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 KubernetesVersion 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 KubernetesVersion 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/KubernetesVersionsImpl.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/KubernetesVersionsImpl.java new file mode 100644 index 000000000000..d68edc7419c8 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/KubernetesVersionsImpl.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.implementation; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.util.Context; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.azurestackhci.fluent.KubernetesVersionsClient; +import com.azure.resourcemanager.azurestackhci.fluent.models.KubernetesVersionInner; +import com.azure.resourcemanager.azurestackhci.models.KubernetesVersion; +import com.azure.resourcemanager.azurestackhci.models.KubernetesVersions; + +public final class KubernetesVersionsImpl implements KubernetesVersions { + private static final ClientLogger LOGGER = new ClientLogger(KubernetesVersionsImpl.class); + + private final KubernetesVersionsClient innerClient; + + private final com.azure.resourcemanager.azurestackhci.AzureStackHciManager serviceManager; + + public KubernetesVersionsImpl(KubernetesVersionsClient innerClient, + com.azure.resourcemanager.azurestackhci.AzureStackHciManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public PagedIterable listBySubscriptionLocationResource(String location) { + PagedIterable inner = this.serviceClient().listBySubscriptionLocationResource(location); + return ResourceManagerUtils.mapPage(inner, inner1 -> new KubernetesVersionImpl(inner1, this.manager())); + } + + public PagedIterable listBySubscriptionLocationResource(String location, Context context) { + PagedIterable inner + = this.serviceClient().listBySubscriptionLocationResource(location, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new KubernetesVersionImpl(inner1, this.manager())); + } + + private KubernetesVersionsClient 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/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/OsImageImpl.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/OsImageImpl.java new file mode 100644 index 000000000000..26a8c8ac65c2 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/OsImageImpl.java @@ -0,0 +1,49 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.azurestackhci.implementation; + +import com.azure.core.management.SystemData; +import com.azure.resourcemanager.azurestackhci.fluent.models.OsImageInner; +import com.azure.resourcemanager.azurestackhci.models.OsImage; +import com.azure.resourcemanager.azurestackhci.models.OsImageProperties; + +public final class OsImageImpl implements OsImage { + private OsImageInner innerObject; + + private final com.azure.resourcemanager.azurestackhci.AzureStackHciManager serviceManager; + + OsImageImpl(OsImageInner 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 OsImageProperties properties() { + return this.innerModel().properties(); + } + + public SystemData systemData() { + return this.innerModel().systemData(); + } + + public OsImageInner 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/OsImagesClientImpl.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/OsImagesClientImpl.java new file mode 100644 index 000000000000..ee73075c9c23 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/OsImagesClientImpl.java @@ -0,0 +1,344 @@ +// 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.OsImagesClient; +import com.azure.resourcemanager.azurestackhci.fluent.models.OsImageInner; +import com.azure.resourcemanager.azurestackhci.implementation.models.OsImageListResult; +import reactor.core.publisher.Mono; + +/** + * An instance of this class provides access to all the operations defined in OsImagesClient. + */ +public final class OsImagesClientImpl implements OsImagesClient { + /** + * The proxy service used to perform REST calls. + */ + private final OsImagesService service; + + /** + * The service client containing this operation class. + */ + private final AzureStackHciManagementClientImpl client; + + /** + * Initializes an instance of OsImagesClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + OsImagesClientImpl(AzureStackHciManagementClientImpl client) { + this.service = RestProxy.create(OsImagesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for AzureStackHciManagementClientOsImages to be used by the proxy service + * to perform REST calls. + */ + @Host("{endpoint}") + @ServiceInterface(name = "AzureStackHciManagementClientOsImages") + public interface OsImagesService { + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/providers/Microsoft.AzureStackHCI/locations/{location}/osImages/{osImageName}") + @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("osImageName") String osImageName, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/providers/Microsoft.AzureStackHCI/locations/{location}/osImages/{osImageName}") + @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("osImageName") String osImageName, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/providers/Microsoft.AzureStackHCI/locations/{location}/osImages") + @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}/osImages") + @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 os image. + * + * @param location The name of the Azure region. + * @param osImageName The name of the OsImage. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a os image along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync(String location, String osImageName) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), location, osImageName, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get a os image. + * + * @param location The name of the Azure region. + * @param osImageName The name of the OsImage. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a os image on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getAsync(String location, String osImageName) { + return getWithResponseAsync(location, osImageName).flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Get a os image. + * + * @param location The name of the Azure region. + * @param osImageName The name of the OsImage. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a os image along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse(String location, String osImageName, Context context) { + final String accept = "application/json"; + return service.getSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + location, osImageName, accept, context); + } + + /** + * Get a os image. + * + * @param location The name of the Azure region. + * @param osImageName The name of the OsImage. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a os image. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public OsImageInner get(String location, String osImageName) { + return getWithResponse(location, osImageName, Context.NONE).getValue(); + } + + /** + * List all os images. + * + * @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 OsImage 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 os images. + * + * @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 OsImage 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 os images. + * + * @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 OsImage 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 os images. + * + * @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 OsImage 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 os images. + * + * @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 OsImage 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 os images. + * + * @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 OsImage 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 OsImage 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 OsImage 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 OsImage 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/OsImagesImpl.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/OsImagesImpl.java new file mode 100644 index 000000000000..fa925a764362 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/OsImagesImpl.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.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.OsImagesClient; +import com.azure.resourcemanager.azurestackhci.fluent.models.OsImageInner; +import com.azure.resourcemanager.azurestackhci.models.OsImage; +import com.azure.resourcemanager.azurestackhci.models.OsImages; + +public final class OsImagesImpl implements OsImages { + private static final ClientLogger LOGGER = new ClientLogger(OsImagesImpl.class); + + private final OsImagesClient innerClient; + + private final com.azure.resourcemanager.azurestackhci.AzureStackHciManager serviceManager; + + public OsImagesImpl(OsImagesClient innerClient, + com.azure.resourcemanager.azurestackhci.AzureStackHciManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public Response getWithResponse(String location, String osImageName, Context context) { + Response inner = this.serviceClient().getWithResponse(location, osImageName, context); + if (inner != null) { + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new OsImageImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public OsImage get(String location, String osImageName) { + OsImageInner inner = this.serviceClient().get(location, osImageName); + if (inner != null) { + return new OsImageImpl(inner, this.manager()); + } else { + return null; + } + } + + public PagedIterable listBySubscriptionLocationResource(String location) { + PagedIterable inner = this.serviceClient().listBySubscriptionLocationResource(location); + return ResourceManagerUtils.mapPage(inner, inner1 -> new OsImageImpl(inner1, this.manager())); + } + + public PagedIterable listBySubscriptionLocationResource(String location, Context context) { + PagedIterable inner = this.serviceClient().listBySubscriptionLocationResource(location, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new OsImageImpl(inner1, this.manager())); + } + + private OsImagesClient 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/OwnershipVouchersClientImpl.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/OwnershipVouchersClientImpl.java new file mode 100644 index 000000000000..6b98f0ac1056 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/OwnershipVouchersClientImpl.java @@ -0,0 +1,159 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.azurestackhci.implementation; + +import com.azure.core.annotation.BodyParam; +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.Post; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.management.exception.ManagementException; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.resourcemanager.azurestackhci.fluent.OwnershipVouchersClient; +import com.azure.resourcemanager.azurestackhci.fluent.models.ValidateOwnershipVouchersResponseInner; +import com.azure.resourcemanager.azurestackhci.models.ValidateOwnershipVouchersRequest; +import reactor.core.publisher.Mono; + +/** + * An instance of this class provides access to all the operations defined in OwnershipVouchersClient. + */ +public final class OwnershipVouchersClientImpl implements OwnershipVouchersClient { + /** + * The proxy service used to perform REST calls. + */ + private final OwnershipVouchersService service; + + /** + * The service client containing this operation class. + */ + private final AzureStackHciManagementClientImpl client; + + /** + * Initializes an instance of OwnershipVouchersClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + OwnershipVouchersClientImpl(AzureStackHciManagementClientImpl client) { + this.service + = RestProxy.create(OwnershipVouchersService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for AzureStackHciManagementClientOwnershipVouchers to be used by the + * proxy service to perform REST calls. + */ + @Host("{endpoint}") + @ServiceInterface(name = "AzureStackHciManagementClientOwnershipVouchers") + public interface OwnershipVouchersService { + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/locations/{location}/validateOwnershipVouchers") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> validate(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("location") String location, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") ValidateOwnershipVouchersRequest validationRequest, Context context); + + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/locations/{location}/validateOwnershipVouchers") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response validateSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("location") String location, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") ValidateOwnershipVouchersRequest validationRequest, Context context); + } + + /** + * Validates ownership vouchers. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param location The name of the Azure region. + * @param validationRequest Ownership vouchers to be validated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return validate Ownership Voucher Response along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> validateWithResponseAsync(String resourceGroupName, + String location, ValidateOwnershipVouchersRequest validationRequest) { + final String contentType = "application/json"; + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.validate(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, location, contentType, accept, validationRequest, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Validates ownership vouchers. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param location The name of the Azure region. + * @param validationRequest Ownership vouchers to be validated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return validate Ownership Voucher Response on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono validateAsync(String resourceGroupName, String location, + ValidateOwnershipVouchersRequest validationRequest) { + return validateWithResponseAsync(resourceGroupName, location, validationRequest) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Validates ownership vouchers. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param location The name of the Azure region. + * @param validationRequest Ownership vouchers to be validated. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return validate Ownership Voucher Response along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response validateWithResponse(String resourceGroupName, + String location, ValidateOwnershipVouchersRequest validationRequest, Context context) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.validateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, location, contentType, accept, validationRequest, + context); + } + + /** + * Validates ownership vouchers. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param location The name of the Azure region. + * @param validationRequest Ownership vouchers to be validated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return validate Ownership Voucher Response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ValidateOwnershipVouchersResponseInner validate(String resourceGroupName, String location, + ValidateOwnershipVouchersRequest validationRequest) { + return validateWithResponse(resourceGroupName, location, validationRequest, Context.NONE).getValue(); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/OwnershipVouchersImpl.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/OwnershipVouchersImpl.java new file mode 100644 index 000000000000..0d6e020489d9 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/OwnershipVouchersImpl.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.implementation; + +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.OwnershipVouchersClient; +import com.azure.resourcemanager.azurestackhci.fluent.models.ValidateOwnershipVouchersResponseInner; +import com.azure.resourcemanager.azurestackhci.models.OwnershipVouchers; +import com.azure.resourcemanager.azurestackhci.models.ValidateOwnershipVouchersRequest; +import com.azure.resourcemanager.azurestackhci.models.ValidateOwnershipVouchersResponse; + +public final class OwnershipVouchersImpl implements OwnershipVouchers { + private static final ClientLogger LOGGER = new ClientLogger(OwnershipVouchersImpl.class); + + private final OwnershipVouchersClient innerClient; + + private final com.azure.resourcemanager.azurestackhci.AzureStackHciManager serviceManager; + + public OwnershipVouchersImpl(OwnershipVouchersClient innerClient, + com.azure.resourcemanager.azurestackhci.AzureStackHciManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public Response validateWithResponse(String resourceGroupName, String location, + ValidateOwnershipVouchersRequest validationRequest, Context context) { + Response inner + = this.serviceClient().validateWithResponse(resourceGroupName, location, validationRequest, context); + if (inner != null) { + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new ValidateOwnershipVouchersResponseImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public ValidateOwnershipVouchersResponse validate(String resourceGroupName, String location, + ValidateOwnershipVouchersRequest validationRequest) { + ValidateOwnershipVouchersResponseInner inner + = this.serviceClient().validate(resourceGroupName, location, validationRequest); + if (inner != null) { + return new ValidateOwnershipVouchersResponseImpl(inner, this.manager()); + } else { + return null; + } + } + + private OwnershipVouchersClient 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/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/PlatformUpdateImpl.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/PlatformUpdateImpl.java new file mode 100644 index 000000000000..05ad2cad31cf --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/PlatformUpdateImpl.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.PlatformUpdateInner; +import com.azure.resourcemanager.azurestackhci.models.PlatformUpdate; +import com.azure.resourcemanager.azurestackhci.models.PlatformUpdateProperties; + +public final class PlatformUpdateImpl implements PlatformUpdate { + private PlatformUpdateInner innerObject; + + private final com.azure.resourcemanager.azurestackhci.AzureStackHciManager serviceManager; + + PlatformUpdateImpl(PlatformUpdateInner 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 PlatformUpdateProperties properties() { + return this.innerModel().properties(); + } + + public SystemData systemData() { + return this.innerModel().systemData(); + } + + public PlatformUpdateInner 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/PlatformUpdatesClientImpl.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/PlatformUpdatesClientImpl.java new file mode 100644 index 000000000000..89e03e5801c0 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/PlatformUpdatesClientImpl.java @@ -0,0 +1,339 @@ +// 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.PlatformUpdatesClient; +import com.azure.resourcemanager.azurestackhci.fluent.models.PlatformUpdateInner; +import com.azure.resourcemanager.azurestackhci.implementation.models.PlatformUpdateListResult; +import reactor.core.publisher.Mono; + +/** + * An instance of this class provides access to all the operations defined in PlatformUpdatesClient. + */ +public final class PlatformUpdatesClientImpl implements PlatformUpdatesClient { + /** + * The proxy service used to perform REST calls. + */ + private final PlatformUpdatesService service; + + /** + * The service client containing this operation class. + */ + private final AzureStackHciManagementClientImpl client; + + /** + * Initializes an instance of PlatformUpdatesClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + PlatformUpdatesClientImpl(AzureStackHciManagementClientImpl client) { + this.service + = RestProxy.create(PlatformUpdatesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for AzureStackHciManagementClientPlatformUpdates to be used by the proxy + * service to perform REST calls. + */ + @Host("{endpoint}") + @ServiceInterface(name = "AzureStackHciManagementClientPlatformUpdates") + public interface PlatformUpdatesService { + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/providers/Microsoft.AzureStackHCI/locations/{location}/platformUpdates/{platformUpdateName}") + @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("platformUpdateName") String platformUpdateName, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/providers/Microsoft.AzureStackHCI/locations/{location}/platformUpdates/{platformUpdateName}") + @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("platformUpdateName") String platformUpdateName, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/providers/Microsoft.AzureStackHCI/locations/{location}/platformUpdates") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> list(@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}/platformUpdates") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listSync(@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> 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); + } + + /** + * Get a platform update. + * + * @param location The name of the Azure region. + * @param platformUpdateName The name of the PlatformUpdate. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a platform update along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync(String location, String platformUpdateName) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), location, platformUpdateName, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get a platform update. + * + * @param location The name of the Azure region. + * @param platformUpdateName The name of the PlatformUpdate. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a platform update on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getAsync(String location, String platformUpdateName) { + return getWithResponseAsync(location, platformUpdateName).flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Get a platform update. + * + * @param location The name of the Azure region. + * @param platformUpdateName The name of the PlatformUpdate. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a platform update along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse(String location, String platformUpdateName, Context context) { + final String accept = "application/json"; + return service.getSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + location, platformUpdateName, accept, context); + } + + /** + * Get a platform update. + * + * @param location The name of the Azure region. + * @param platformUpdateName The name of the PlatformUpdate. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a platform update. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public PlatformUpdateInner get(String location, String platformUpdateName) { + return getWithResponse(location, platformUpdateName, Context.NONE).getValue(); + } + + /** + * List all platform updates. + * + * @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 PlatformUpdate list operation along with {@link PagedResponse} on successful completion + * of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync(String location) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.list(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 platform updates. + * + * @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 PlatformUpdate list operation as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String location) { + return new PagedFlux<>(() -> listSinglePageAsync(location), nextLink -> listNextSinglePageAsync(nextLink)); + } + + /** + * List all platform updates. + * + * @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 PlatformUpdate list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listSinglePage(String location) { + final String accept = "application/json"; + Response res = service.listSync(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 platform updates. + * + * @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 PlatformUpdate list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listSinglePage(String location, Context context) { + final String accept = "application/json"; + Response res = service.listSync(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 platform updates. + * + * @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 PlatformUpdate list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String location) { + return new PagedIterable<>(() -> listSinglePage(location), nextLink -> listNextSinglePage(nextLink)); + } + + /** + * List all platform updates. + * + * @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 PlatformUpdate list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String location, Context context) { + return new PagedIterable<>(() -> listSinglePage(location, 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 the response of a PlatformUpdate list operation along with {@link PagedResponse} on successful completion + * of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listNextSinglePageAsync(String nextLink) { + final String accept = "application/json"; + return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a PlatformUpdate list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listNextSinglePage(String nextLink) { + final String accept = "application/json"; + Response res + = service.listNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a PlatformUpdate list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listNextSinglePage(String nextLink, Context context) { + final String accept = "application/json"; + Response res + = service.listNextSync(nextLink, this.client.getEndpoint(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/PlatformUpdatesImpl.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/PlatformUpdatesImpl.java new file mode 100644 index 000000000000..16bdecc21d14 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/PlatformUpdatesImpl.java @@ -0,0 +1,67 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.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.PlatformUpdatesClient; +import com.azure.resourcemanager.azurestackhci.fluent.models.PlatformUpdateInner; +import com.azure.resourcemanager.azurestackhci.models.PlatformUpdate; +import com.azure.resourcemanager.azurestackhci.models.PlatformUpdates; + +public final class PlatformUpdatesImpl implements PlatformUpdates { + private static final ClientLogger LOGGER = new ClientLogger(PlatformUpdatesImpl.class); + + private final PlatformUpdatesClient innerClient; + + private final com.azure.resourcemanager.azurestackhci.AzureStackHciManager serviceManager; + + public PlatformUpdatesImpl(PlatformUpdatesClient innerClient, + com.azure.resourcemanager.azurestackhci.AzureStackHciManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public Response getWithResponse(String location, String platformUpdateName, Context context) { + Response inner + = this.serviceClient().getWithResponse(location, platformUpdateName, context); + if (inner != null) { + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new PlatformUpdateImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public PlatformUpdate get(String location, String platformUpdateName) { + PlatformUpdateInner inner = this.serviceClient().get(location, platformUpdateName); + if (inner != null) { + return new PlatformUpdateImpl(inner, this.manager()); + } else { + return null; + } + } + + public PagedIterable list(String location) { + PagedIterable inner = this.serviceClient().list(location); + return ResourceManagerUtils.mapPage(inner, inner1 -> new PlatformUpdateImpl(inner1, this.manager())); + } + + public PagedIterable list(String location, Context context) { + PagedIterable inner = this.serviceClient().list(location, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new PlatformUpdateImpl(inner1, this.manager())); + } + + private PlatformUpdatesClient 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/PublisherImpl.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/PublisherImpl.java index 412046443c03..b0119490088c 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/PublisherImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under 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 index d0f93a6b4129..0daf178da2fd 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under 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.PublishersClient; import com.azure.resourcemanager.azurestackhci.fluent.models.PublisherInner; -import com.azure.resourcemanager.azurestackhci.models.PublisherList; +import com.azure.resourcemanager.azurestackhci.implementation.models.PublisherList; import reactor.core.publisher.Mono; /** @@ -42,43 +42,60 @@ public final class PublishersClientImpl implements PublishersClient { /** * The service client containing this operation class. */ - private final AzureStackHciClientImpl client; + private final AzureStackHciManagementClientImpl client; /** * Initializes an instance of PublishersClientImpl. * * @param client the instance of the service client containing this operation class. */ - PublishersClientImpl(AzureStackHciClientImpl client) { + PublishersClientImpl(AzureStackHciManagementClientImpl 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. + * The interface defining all the services for AzureStackHciManagementClientPublishers to be used by the proxy + * service to perform REST calls. */ - @Host("{$host}") - @ServiceInterface(name = "AzureStackHciClientP") + @Host("{endpoint}") + @ServiceInterface(name = "AzureStackHciManagementClientPublishers") public interface PublishersService { @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/clusters/{clusterName}/publishers") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/clusters/{clusterName}/publishers/{publisherName}") @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("publisherName") String publisherName, @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, + 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, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/clusters/{clusterName}/publishers") + @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, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/clusters/{clusterName}/publishers") + @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, - @PathParam("publisherName") String publisherName, @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @@ -86,118 +103,89 @@ Mono> get(@HostParam("$host") String endpoint, @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 Publishers available for the HCI Cluster. + * 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 list of Publisher proxy resources for the HCI cluster along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * @return publisher resource details of HCI Cluster along with {@link Response} 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.")); - } + private Mono> getWithResponseAsync(String resourceGroupName, String clusterName, + String publisherName) { 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)) + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, clusterName, publisherName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * List Publishers available for the HCI Cluster. + * 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 context The context to associate with this operation. + * @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 list of Publisher proxy resources for the HCI cluster along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * @return publisher resource details of HCI Cluster 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)); + private Mono getAsync(String resourceGroupName, String clusterName, String publisherName) { + return getWithResponseAsync(resourceGroupName, clusterName, publisherName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** - * List Publishers available for the HCI Cluster. + * 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 list of Publisher proxy resources for the HCI cluster as paginated response with {@link PagedFlux}. + * @return publisher resource details of HCI Cluster along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByClusterAsync(String resourceGroupName, String clusterName) { - return new PagedFlux<>(() -> listByClusterSinglePageAsync(resourceGroupName, clusterName), - nextLink -> listByClusterNextSinglePageAsync(nextLink)); + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse(String resourceGroupName, String clusterName, String publisherName, + Context context) { + final String accept = "application/json"; + return service.getSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, clusterName, publisherName, accept, context); } /** - * List Publishers available for the HCI Cluster. + * 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 context The context to associate with this operation. + * @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 list of Publisher proxy resources for the HCI cluster as paginated response with {@link PagedFlux}. + * @return publisher resource details of HCI Cluster. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByClusterAsync(String resourceGroupName, String clusterName, - Context context) { - return new PagedFlux<>(() -> listByClusterSinglePageAsync(resourceGroupName, clusterName, context), - nextLink -> listByClusterNextSinglePageAsync(nextLink, context)); + @ServiceMethod(returns = ReturnType.SINGLE) + public PublisherInner get(String resourceGroupName, String clusterName, String publisherName) { + return getWithResponse(resourceGroupName, clusterName, publisherName, Context.NONE).getValue(); } /** @@ -208,11 +196,19 @@ private PagedFlux listByClusterAsync(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 list of Publisher proxy resources for the HCI cluster as paginated response with {@link PagedIterable}. + * @return list of Publisher proxy resources for the HCI cluster along with {@link PagedResponse} on successful + * completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByCluster(String resourceGroupName, String clusterName) { - return new PagedIterable<>(listByClusterAsync(resourceGroupName, clusterName)); + @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())); } /** @@ -220,146 +216,108 @@ public PagedIterable listByCluster(String resourceGroupName, Str * * @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}. + * @return list of Publisher proxy resources for the HCI cluster as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByCluster(String resourceGroupName, String clusterName, Context context) { - return new PagedIterable<>(listByClusterAsync(resourceGroupName, clusterName, context)); + private PagedFlux listByClusterAsync(String resourceGroupName, String clusterName) { + return new PagedFlux<>(() -> listByClusterSinglePageAsync(resourceGroupName, clusterName), + nextLink -> listByClusterNextSinglePageAsync(nextLink)); } /** - * Get Publisher resource details of HCI Cluster. + * 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 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}. + * @return list of Publisher proxy resources for the HCI cluster along with {@link PagedResponse}. */ @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.")); - } + private PagedResponse listByClusterSinglePage(String resourceGroupName, String clusterName) { 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())); + 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); } /** - * Get Publisher resource details of HCI Cluster. + * 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 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}. + * @return list of Publisher proxy resources for the HCI cluster along with {@link PagedResponse}. */ @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.")); - } + private PagedResponse listByClusterSinglePage(String resourceGroupName, String clusterName, + Context context) { 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); + 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); } /** - * Get Publisher resource details of HCI Cluster. + * 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 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}. + * @return list of Publisher 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) { - return getWithResponseAsync(resourceGroupName, clusterName, publisherName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByCluster(String resourceGroupName, String clusterName) { + return new PagedIterable<>(() -> listByClusterSinglePage(resourceGroupName, clusterName), + nextLink -> listByClusterNextSinglePage(nextLink)); } /** - * Get Publisher resource details of HCI Cluster. + * 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 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}. + * @return list of Publisher 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, - Context context) { - return getWithResponseAsync(resourceGroupName, clusterName, publisherName, context).block(); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByCluster(String resourceGroupName, String clusterName, Context context) { + return new PagedIterable<>(() -> listByClusterSinglePage(resourceGroupName, clusterName, context), + nextLink -> listByClusterNextSinglePage(nextLink, context)); } /** - * Get Publisher resource details 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 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 publisher resource details of HCI Cluster. + * @return list of Publisher proxy resources for the HCI cluster along with {@link PagedResponse} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public PublisherInner get(String resourceGroupName, String clusterName, String publisherName) { - return getWithResponse(resourceGroupName, clusterName, publisherName, Context.NONE).getValue(); + private Mono> listByClusterNextSinglePageAsync(String nextLink) { + 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())); } /** @@ -369,24 +327,15 @@ public PublisherInner get(String resourceGroupName, String clusterName, String p * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of Publisher proxy resources for the HCI cluster along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * @return list of Publisher proxy resources for the HCI cluster along with {@link PagedResponse}. */ @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.")); - } + private PagedResponse listByClusterNextSinglePage(String nextLink) { 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); } /** @@ -397,22 +346,14 @@ private Mono> listByClusterNextSinglePageAsync(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 Publisher proxy resources for the HCI cluster along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * @return list of Publisher 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/PublishersImpl.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/PublishersImpl.java index 633fca2b6424..e67c25b8446b 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under 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,17 +27,6 @@ public PublishersImpl(PublishersClient 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 @@ -59,6 +48,17 @@ public Publisher get(String resourceGroupName, String clusterName, String publis } } + 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())); + } + private PublishersClient serviceClient() { return this.innerClient; } 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/UpdateContentImpl.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/UpdateContentImpl.java new file mode 100644 index 000000000000..a1460ce64e17 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/UpdateContentImpl.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.UpdateContentInner; +import com.azure.resourcemanager.azurestackhci.models.UpdateContent; +import com.azure.resourcemanager.azurestackhci.models.UpdateContentProperties; + +public final class UpdateContentImpl implements UpdateContent { + private UpdateContentInner innerObject; + + private final com.azure.resourcemanager.azurestackhci.AzureStackHciManager serviceManager; + + UpdateContentImpl(UpdateContentInner 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 UpdateContentProperties properties() { + return this.innerModel().properties(); + } + + public SystemData systemData() { + return this.innerModel().systemData(); + } + + public UpdateContentInner 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/UpdateContentsClientImpl.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/UpdateContentsClientImpl.java new file mode 100644 index 000000000000..1f10513d19db --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/UpdateContentsClientImpl.java @@ -0,0 +1,338 @@ +// 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.UpdateContentsClient; +import com.azure.resourcemanager.azurestackhci.fluent.models.UpdateContentInner; +import com.azure.resourcemanager.azurestackhci.implementation.models.UpdateContentListResult; +import reactor.core.publisher.Mono; + +/** + * An instance of this class provides access to all the operations defined in UpdateContentsClient. + */ +public final class UpdateContentsClientImpl implements UpdateContentsClient { + /** + * The proxy service used to perform REST calls. + */ + private final UpdateContentsService service; + + /** + * The service client containing this operation class. + */ + private final AzureStackHciManagementClientImpl client; + + /** + * Initializes an instance of UpdateContentsClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + UpdateContentsClientImpl(AzureStackHciManagementClientImpl client) { + this.service + = RestProxy.create(UpdateContentsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for AzureStackHciManagementClientUpdateContents to be used by the proxy + * service to perform REST calls. + */ + @Host("{endpoint}") + @ServiceInterface(name = "AzureStackHciManagementClientUpdateContents") + public interface UpdateContentsService { + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/providers/Microsoft.AzureStackHCI/locations/{location}/updateContents/{updateContentName}") + @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("updateContentName") String updateContentName, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/providers/Microsoft.AzureStackHCI/locations/{location}/updateContents/{updateContentName}") + @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("updateContentName") String updateContentName, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/providers/Microsoft.AzureStackHCI/locations/{location}/updateContents") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> list(@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}/updateContents") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listSync(@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> 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); + } + + /** + * Gets content for an update. + * + * @param location The name of the Azure region. + * @param updateContentName The name of the UpdateContent. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return content for an update along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync(String location, String updateContentName) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), location, updateContentName, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Gets content for an update. + * + * @param location The name of the Azure region. + * @param updateContentName The name of the UpdateContent. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return content for an update on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getAsync(String location, String updateContentName) { + return getWithResponseAsync(location, updateContentName).flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Gets content for an update. + * + * @param location The name of the Azure region. + * @param updateContentName The name of the UpdateContent. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return content for an update along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse(String location, String updateContentName, Context context) { + final String accept = "application/json"; + return service.getSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + location, updateContentName, accept, context); + } + + /** + * Gets content for an update. + * + * @param location The name of the Azure region. + * @param updateContentName The name of the UpdateContent. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return content for an update. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public UpdateContentInner get(String location, String updateContentName) { + return getWithResponse(location, updateContentName, Context.NONE).getValue(); + } + + /** + * List all update contents. + * + * @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 UpdateContent list operation along with {@link PagedResponse} on successful completion + * of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync(String location) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.list(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 update contents. + * + * @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 UpdateContent list operation as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String location) { + return new PagedFlux<>(() -> listSinglePageAsync(location), nextLink -> listNextSinglePageAsync(nextLink)); + } + + /** + * List all update contents. + * + * @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 UpdateContent list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listSinglePage(String location) { + final String accept = "application/json"; + Response res = service.listSync(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 update contents. + * + * @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 UpdateContent list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listSinglePage(String location, Context context) { + final String accept = "application/json"; + Response res = service.listSync(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 update contents. + * + * @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 UpdateContent list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String location) { + return new PagedIterable<>(() -> listSinglePage(location), nextLink -> listNextSinglePage(nextLink)); + } + + /** + * List all update contents. + * + * @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 UpdateContent list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String location, Context context) { + return new PagedIterable<>(() -> listSinglePage(location, 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 the response of a UpdateContent list operation along with {@link PagedResponse} on successful completion + * of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listNextSinglePageAsync(String nextLink) { + final String accept = "application/json"; + return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a UpdateContent list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listNextSinglePage(String nextLink) { + final String accept = "application/json"; + Response res + = service.listNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a UpdateContent list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listNextSinglePage(String nextLink, Context context) { + final String accept = "application/json"; + Response res + = service.listNextSync(nextLink, this.client.getEndpoint(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/UpdateContentsImpl.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/UpdateContentsImpl.java new file mode 100644 index 000000000000..0132a8dc7048 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/UpdateContentsImpl.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.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.UpdateContentsClient; +import com.azure.resourcemanager.azurestackhci.fluent.models.UpdateContentInner; +import com.azure.resourcemanager.azurestackhci.models.UpdateContent; +import com.azure.resourcemanager.azurestackhci.models.UpdateContents; + +public final class UpdateContentsImpl implements UpdateContents { + private static final ClientLogger LOGGER = new ClientLogger(UpdateContentsImpl.class); + + private final UpdateContentsClient innerClient; + + private final com.azure.resourcemanager.azurestackhci.AzureStackHciManager serviceManager; + + public UpdateContentsImpl(UpdateContentsClient innerClient, + com.azure.resourcemanager.azurestackhci.AzureStackHciManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public Response getWithResponse(String location, String updateContentName, Context context) { + Response inner = this.serviceClient().getWithResponse(location, updateContentName, context); + if (inner != null) { + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new UpdateContentImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public UpdateContent get(String location, String updateContentName) { + UpdateContentInner inner = this.serviceClient().get(location, updateContentName); + if (inner != null) { + return new UpdateContentImpl(inner, this.manager()); + } else { + return null; + } + } + + public PagedIterable list(String location) { + PagedIterable inner = this.serviceClient().list(location); + return ResourceManagerUtils.mapPage(inner, inner1 -> new UpdateContentImpl(inner1, this.manager())); + } + + public PagedIterable list(String location, Context context) { + PagedIterable inner = this.serviceClient().list(location, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new UpdateContentImpl(inner1, this.manager())); + } + + private UpdateContentsClient 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/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/ValidateOwnershipVouchersResponseImpl.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/ValidateOwnershipVouchersResponseImpl.java new file mode 100644 index 000000000000..92b9865be92b --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/ValidateOwnershipVouchersResponseImpl.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.implementation; + +import com.azure.resourcemanager.azurestackhci.fluent.models.ValidateOwnershipVouchersResponseInner; +import com.azure.resourcemanager.azurestackhci.models.OwnershipVoucherValidationDetails; +import com.azure.resourcemanager.azurestackhci.models.ValidateOwnershipVouchersResponse; +import java.util.Collections; +import java.util.List; + +public final class ValidateOwnershipVouchersResponseImpl implements ValidateOwnershipVouchersResponse { + private ValidateOwnershipVouchersResponseInner innerObject; + + private final com.azure.resourcemanager.azurestackhci.AzureStackHciManager serviceManager; + + ValidateOwnershipVouchersResponseImpl(ValidateOwnershipVouchersResponseInner innerObject, + com.azure.resourcemanager.azurestackhci.AzureStackHciManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + } + + public List ownershipVoucherValidationDetails() { + List inner = this.innerModel().ownershipVoucherValidationDetails(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + + public ValidateOwnershipVouchersResponseInner 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/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/implementation/models/EdgeMachineJobListResult.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/models/EdgeMachineJobListResult.java new file mode 100644 index 000000000000..0b2e111715cd --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/models/EdgeMachineJobListResult.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.EdgeMachineJobInner; +import java.io.IOException; +import java.util.List; + +/** + * The response of a EdgeMachineJob list operation. + */ +@Immutable +public final class EdgeMachineJobListResult implements JsonSerializable { + /* + * The EdgeMachineJob items on this page + */ + private List value; + + /* + * The link to the next page of items + */ + private String nextLink; + + /** + * Creates an instance of EdgeMachineJobListResult class. + */ + private EdgeMachineJobListResult() { + } + + /** + * Get the value property: The EdgeMachineJob 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 EdgeMachineJobListResult from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of EdgeMachineJobListResult 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 EdgeMachineJobListResult. + */ + public static EdgeMachineJobListResult fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + EdgeMachineJobListResult deserializedEdgeMachineJobListResult = new EdgeMachineJobListResult(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value + = reader.readArray(reader1 -> EdgeMachineJobInner.fromJson(reader1)); + deserializedEdgeMachineJobListResult.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedEdgeMachineJobListResult.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedEdgeMachineJobListResult; + }); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/models/EdgeMachineListResult.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/models/EdgeMachineListResult.java new file mode 100644 index 000000000000..48268c11a0c7 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/models/EdgeMachineListResult.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.EdgeMachineInner; +import java.io.IOException; +import java.util.List; + +/** + * The response of a EdgeMachine list operation. + */ +@Immutable +public final class EdgeMachineListResult implements JsonSerializable { + /* + * The EdgeMachine items on this page + */ + private List value; + + /* + * The link to the next page of items + */ + private String nextLink; + + /** + * Creates an instance of EdgeMachineListResult class. + */ + private EdgeMachineListResult() { + } + + /** + * Get the value property: The EdgeMachine 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 EdgeMachineListResult from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of EdgeMachineListResult 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 EdgeMachineListResult. + */ + public static EdgeMachineListResult fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + EdgeMachineListResult deserializedEdgeMachineListResult = new EdgeMachineListResult(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value = reader.readArray(reader1 -> EdgeMachineInner.fromJson(reader1)); + deserializedEdgeMachineListResult.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedEdgeMachineListResult.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedEdgeMachineListResult; + }); + } +} 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/implementation/models/KubernetesVersionListResult.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/models/KubernetesVersionListResult.java new file mode 100644 index 000000000000..985f104450ae --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/models/KubernetesVersionListResult.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.KubernetesVersionInner; +import java.io.IOException; +import java.util.List; + +/** + * The response of a KubernetesVersion list operation. + */ +@Immutable +public final class KubernetesVersionListResult implements JsonSerializable { + /* + * The KubernetesVersion items on this page + */ + private List value; + + /* + * The link to the next page of items + */ + private String nextLink; + + /** + * Creates an instance of KubernetesVersionListResult class. + */ + private KubernetesVersionListResult() { + } + + /** + * Get the value property: The KubernetesVersion 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 KubernetesVersionListResult from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of KubernetesVersionListResult 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 KubernetesVersionListResult. + */ + public static KubernetesVersionListResult fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + KubernetesVersionListResult deserializedKubernetesVersionListResult = new KubernetesVersionListResult(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value + = reader.readArray(reader1 -> KubernetesVersionInner.fromJson(reader1)); + deserializedKubernetesVersionListResult.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedKubernetesVersionListResult.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedKubernetesVersionListResult; + }); + } +} 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/implementation/models/OsImageListResult.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/models/OsImageListResult.java new file mode 100644 index 000000000000..ba3ff4cc0a67 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/models/OsImageListResult.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.OsImageInner; +import java.io.IOException; +import java.util.List; + +/** + * The response of a OsImage list operation. + */ +@Immutable +public final class OsImageListResult implements JsonSerializable { + /* + * The OsImage items on this page + */ + private List value; + + /* + * The link to the next page of items + */ + private String nextLink; + + /** + * Creates an instance of OsImageListResult class. + */ + private OsImageListResult() { + } + + /** + * Get the value property: The OsImage 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 OsImageListResult from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of OsImageListResult 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 OsImageListResult. + */ + public static OsImageListResult fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + OsImageListResult deserializedOsImageListResult = new OsImageListResult(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value = reader.readArray(reader1 -> OsImageInner.fromJson(reader1)); + deserializedOsImageListResult.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedOsImageListResult.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedOsImageListResult; + }); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/models/PlatformUpdateListResult.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/models/PlatformUpdateListResult.java new file mode 100644 index 000000000000..d8ff82053401 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/models/PlatformUpdateListResult.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.PlatformUpdateInner; +import java.io.IOException; +import java.util.List; + +/** + * The response of a PlatformUpdate list operation. + */ +@Immutable +public final class PlatformUpdateListResult implements JsonSerializable { + /* + * The PlatformUpdate items on this page + */ + private List value; + + /* + * The link to the next page of items + */ + private String nextLink; + + /** + * Creates an instance of PlatformUpdateListResult class. + */ + private PlatformUpdateListResult() { + } + + /** + * Get the value property: The PlatformUpdate 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 PlatformUpdateListResult from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of PlatformUpdateListResult 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 PlatformUpdateListResult. + */ + public static PlatformUpdateListResult fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + PlatformUpdateListResult deserializedPlatformUpdateListResult = new PlatformUpdateListResult(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value + = reader.readArray(reader1 -> PlatformUpdateInner.fromJson(reader1)); + deserializedPlatformUpdateListResult.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedPlatformUpdateListResult.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedPlatformUpdateListResult; + }); + } +} 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/implementation/models/PublisherList.java similarity index 79% rename from sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/PublisherList.java rename to sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/models/PublisherList.java index ab1f70e8d201..aa86651eac52 100644 --- 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/implementation/models/PublisherList.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 PublisherList implements JsonSerializable { /* - * List of Publisher proxy resources. + * The Publisher 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 PublisherList class. */ - public PublisherList() { + private PublisherList() { } /** - * Get the value property: List of Publisher proxy resources. + * Get the value property: The Publisher 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 PublisherList 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 PublisherList. */ public static PublisherList fromJson(JsonReader jsonReader) throws IOException { 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/implementation/models/UpdateContentListResult.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/models/UpdateContentListResult.java new file mode 100644 index 000000000000..b2549901e2b2 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/models/UpdateContentListResult.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.UpdateContentInner; +import java.io.IOException; +import java.util.List; + +/** + * The response of a UpdateContent list operation. + */ +@Immutable +public final class UpdateContentListResult implements JsonSerializable { + /* + * The UpdateContent items on this page + */ + private List value; + + /* + * The link to the next page of items + */ + private String nextLink; + + /** + * Creates an instance of UpdateContentListResult class. + */ + private UpdateContentListResult() { + } + + /** + * Get the value property: The UpdateContent 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 UpdateContentListResult from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of UpdateContentListResult 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 UpdateContentListResult. + */ + public static UpdateContentListResult fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + UpdateContentListResult deserializedUpdateContentListResult = new UpdateContentListResult(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value = reader.readArray(reader1 -> UpdateContentInner.fromJson(reader1)); + deserializedUpdateContentListResult.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedUpdateContentListResult.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedUpdateContentListResult; + }); + } +} 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/ChangeRingRequest.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/ChangeRingRequest.java new file mode 100644 index 000000000000..60aaca8bb075 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/ChangeRingRequest.java @@ -0,0 +1,85 @@ +// 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; + +/** + * The ChangeRingRequest model. + */ +@Fluent +public final class ChangeRingRequest implements JsonSerializable { + /* + * The properties property. + */ + private ChangeRingRequestProperties properties; + + /** + * Creates an instance of ChangeRingRequest class. + */ + public ChangeRingRequest() { + } + + /** + * Get the properties property: The properties property. + * + * @return the properties value. + */ + public ChangeRingRequestProperties properties() { + return this.properties; + } + + /** + * Set the properties property: The properties property. + * + * @param properties the properties value to set. + * @return the ChangeRingRequest object itself. + */ + public ChangeRingRequest withProperties(ChangeRingRequestProperties 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 ChangeRingRequest from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ChangeRingRequest 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 ChangeRingRequest. + */ + public static ChangeRingRequest fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ChangeRingRequest deserializedChangeRingRequest = new ChangeRingRequest(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("properties".equals(fieldName)) { + deserializedChangeRingRequest.properties = ChangeRingRequestProperties.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedChangeRingRequest; + }); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/ChangeRingRequestProperties.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/ChangeRingRequestProperties.java new file mode 100644 index 000000000000..d239288c5535 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/ChangeRingRequestProperties.java @@ -0,0 +1,85 @@ +// 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; + +/** + * The ChangeRingRequestProperties model. + */ +@Fluent +public final class ChangeRingRequestProperties implements JsonSerializable { + /* + * The target ring for the cluster. + */ + private String targetRing; + + /** + * Creates an instance of ChangeRingRequestProperties class. + */ + public ChangeRingRequestProperties() { + } + + /** + * Get the targetRing property: The target ring for the cluster. + * + * @return the targetRing value. + */ + public String targetRing() { + return this.targetRing; + } + + /** + * Set the targetRing property: The target ring for the cluster. + * + * @param targetRing the targetRing value to set. + * @return the ChangeRingRequestProperties object itself. + */ + public ChangeRingRequestProperties withTargetRing(String targetRing) { + this.targetRing = targetRing; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("targetRing", this.targetRing); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ChangeRingRequestProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ChangeRingRequestProperties 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 ChangeRingRequestProperties. + */ + public static ChangeRingRequestProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ChangeRingRequestProperties deserializedChangeRingRequestProperties = new ChangeRingRequestProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("targetRing".equals(fieldName)) { + deserializedChangeRingRequestProperties.targetRing = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedChangeRingRequestProperties; + }); + } +} 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..bb85a60afe94 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. @@ -52,67 +52,51 @@ public interface Cluster { Map tags(); /** - * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * - * @return the systemData value. - */ - 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. + * Gets the kind property: This property identifies the purpose of the Cluster deployment. For example, a valid + * value is AzureLocal. * - * @return the tenantId value. + * @return the kind value. */ - UUID tenantId(); + String kind(); /** - * 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. + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. * - * @return the userAssignedIdentities value. + * @return the systemData value. */ - Map userAssignedIdentities(); + SystemData systemData(); /** - * 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. */ ConnectivityStatus connectivityStatus(); + /** + * Gets the supportStatus property: Indicates whether the cluster is under support. + * + * @return the supportStatus value. + */ + SupportStatus supportStatus(); + /** * Gets the cloudId property: Unique, immutable resource id. * @@ -120,6 +104,13 @@ public interface Cluster { */ String cloudId(); + /** + * Gets the ring property: The ring to which this cluster belongs to. + * + * @return the ring value. + */ + String ring(); + /** * Gets the cloudManagementEndpoint property: Endpoint configured for management from the Azure portal. * @@ -162,6 +153,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 +202,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 +246,79 @@ 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 confidentialVmProperties property: Represents the Confidential Virtual Machine (CVM) support intent and + * current status for the cluster resource. + * + * @return the confidentialVmProperties value. + */ + ConfidentialVmProperties confidentialVmProperties(); + + /** + * Gets the sdnProperties property: Software Defined Networking Properties of the cluster. + * + * @return the sdnProperties value. + */ + ClusterSdnProperties sdnProperties(); + + /** + * 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 +402,14 @@ 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.WithKind, 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. * @@ -366,37 +440,18 @@ interface WithTags { } /** - * 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. + * The stage of the Cluster definition allowing to specify kind. */ - interface WithUserAssignedIdentities { + interface WithKind { /** - * 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 kind property: This property identifies the purpose of the Cluster deployment. For example, + * a valid value is AzureLocal. * - * @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 kind This property identifies the purpose of the Cluster deployment. For example, a valid value is + * AzureLocal. * @return the next definition stage. */ - WithCreate withUserAssignedIdentities(Map userAssignedIdentities); + WithCreate withKind(String kind); } /** @@ -516,6 +571,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 +676,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 +689,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 +765,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 +814,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 +825,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 +836,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,11 +848,34 @@ 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); + /** + * Changes ring of a cluster. + * + * @param changeRingRequest Change ring request payload. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown 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 changeRing(ChangeRingRequest changeRingRequest); + + /** + * Changes ring of a cluster. + * + * @param changeRingRequest Change ring request payload. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown 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 changeRing(ChangeRingRequest changeRingRequest, Context context); + /** * Trigger Log Collection on a cluster. * @@ -738,7 +883,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 +895,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 +906,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 +918,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/ClusterSdnProperties.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/ClusterSdnProperties.java new file mode 100644 index 000000000000..00dda26f1fd0 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/ClusterSdnProperties.java @@ -0,0 +1,133 @@ +// 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.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Represents the Software Defined Networking (SDN) configuration state of the Azure Stack HCI cluster. + */ +@Immutable +public final class ClusterSdnProperties extends SdnProperties { + /* + * Indicates whether Software Defined Networking (SDN) integration should be enabled or disabled for this + * deployment. + */ + private SdnIntegrationIntent sdnIntegrationIntent; + + /* + * Represents the API address for the SDN deployment. + */ + private String sdnApiAddress; + + /* + * The fully qualified domain name (FQDN) associated with the SDN deployment. This value is propagated from the + * Device Management Extension to the cluster resource. It is typically in the format `-nc.` when + * SDN is enabled. May be null or absent in unsupported or disabled states. + */ + private String sdnDomainName; + + /* + * Indicates the current Software Defined Networking (SDN) status of the resource, which may be an individual device + * or a cluster. + */ + private SdnStatus sdnStatus; + + /** + * Creates an instance of ClusterSdnProperties class. + */ + private ClusterSdnProperties() { + } + + /** + * Get the sdnIntegrationIntent property: Indicates whether Software Defined Networking (SDN) integration should be + * enabled or disabled for this deployment. + * + * @return the sdnIntegrationIntent value. + */ + public SdnIntegrationIntent sdnIntegrationIntent() { + return this.sdnIntegrationIntent; + } + + /** + * Get the sdnApiAddress property: Represents the API address for the SDN deployment. + * + * @return the sdnApiAddress value. + */ + @Override + public String sdnApiAddress() { + return this.sdnApiAddress; + } + + /** + * Get the sdnDomainName property: The fully qualified domain name (FQDN) associated with the SDN deployment. This + * value is propagated from the Device Management Extension to the cluster resource. It is typically in the format + * `<sdnPrefix>-nc.<domain>` when SDN is enabled. May be null or absent in unsupported or disabled + * states. + * + * @return the sdnDomainName value. + */ + @Override + public String sdnDomainName() { + return this.sdnDomainName; + } + + /** + * Get the sdnStatus property: Indicates the current Software Defined Networking (SDN) status of the resource, which + * may be an individual device or a cluster. + * + * @return the sdnStatus value. + */ + @Override + public SdnStatus sdnStatus() { + return this.sdnStatus; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ClusterSdnProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ClusterSdnProperties 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 ClusterSdnProperties. + */ + public static ClusterSdnProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ClusterSdnProperties deserializedClusterSdnProperties = new ClusterSdnProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("sdnStatus".equals(fieldName)) { + deserializedClusterSdnProperties.sdnStatus = SdnStatus.fromString(reader.getString()); + } else if ("sdnDomainName".equals(fieldName)) { + deserializedClusterSdnProperties.sdnDomainName = reader.getString(); + } else if ("sdnApiAddress".equals(fieldName)) { + deserializedClusterSdnProperties.sdnApiAddress = reader.getString(); + } else if ("sdnIntegrationIntent".equals(fieldName)) { + deserializedClusterSdnProperties.sdnIntegrationIntent + = SdnIntegrationIntent.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedClusterSdnProperties; + }); + } +} 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..1c9d5a0e1170 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,11 +207,39 @@ 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); + /** + * Changes ring of a cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param changeRingRequest Change ring request payload. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown 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 changeRing(String resourceGroupName, String clusterName, ChangeRingRequest changeRingRequest); + + /** + * Changes ring of a cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param changeRingRequest Change ring request payload. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown 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 changeRing(String resourceGroupName, String clusterName, ChangeRingRequest changeRingRequest, + Context context); + /** * Trigger Log Collection on a cluster. * @@ -193,7 +249,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 +264,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 +278,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 +293,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/ConfidentialVmIntent.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/ConfidentialVmIntent.java new file mode 100644 index 000000000000..c7b6461b5bcc --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/ConfidentialVmIntent.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; + +/** + * Captures the customer's intent to enable or disable Confidential Virtual Machine (CVM) support on the cluster, either + * during initial deployment (Day-0) or at a later stage (Day-N). + */ +public final class ConfidentialVmIntent extends ExpandableStringEnum { + /** + * Indicates that the customer intends to enable CVM support on the cluster. + */ + public static final ConfidentialVmIntent ENABLE = fromString("Enable"); + + /** + * Indicates that the customer intends to disable CVM support on the cluster. + */ + public static final ConfidentialVmIntent DISABLE = fromString("Disable"); + + /** + * Creates a new instance of ConfidentialVmIntent value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public ConfidentialVmIntent() { + } + + /** + * Creates or finds a ConfidentialVmIntent from its string representation. + * + * @param name a name to look for. + * @return the corresponding ConfidentialVmIntent. + */ + public static ConfidentialVmIntent fromString(String name) { + return fromString(name, ConfidentialVmIntent.class); + } + + /** + * Gets known ConfidentialVmIntent values. + * + * @return known ConfidentialVmIntent values. + */ + public static Collection values() { + return values(ConfidentialVmIntent.class); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/ConfidentialVmProfile.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/ConfidentialVmProfile.java new file mode 100644 index 000000000000..7372aeb9bf9a --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/ConfidentialVmProfile.java @@ -0,0 +1,99 @@ +// 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 Confidential Virtual Machine (CVM) configuration status for an edge device. It includes the current + * IGVM support state and detailed component-level status information. + */ +@Immutable +public final class ConfidentialVmProfile implements JsonSerializable { + /* + * Indicates whether Independent Guest Virtual Machine (IGVM) support is available on the device. This will be + * 'Enabled' if the device supports CVMs, 'Disabled' if not, and 'Unknown' if the status cannot be determined. + */ + private IgvmStatus igvmStatus; + + /* + * Provides detailed status entries for IGVM-related components, including deployment status, compatibility checks, + * and error diagnostics. + */ + private List statusDetails; + + /** + * Creates an instance of ConfidentialVmProfile class. + */ + private ConfidentialVmProfile() { + } + + /** + * Get the igvmStatus property: Indicates whether Independent Guest Virtual Machine (IGVM) support is available on + * the device. This will be 'Enabled' if the device supports CVMs, 'Disabled' if not, and 'Unknown' if the status + * cannot be determined. + * + * @return the igvmStatus value. + */ + public IgvmStatus igvmStatus() { + return this.igvmStatus; + } + + /** + * Get the statusDetails property: Provides detailed status entries for IGVM-related components, including + * deployment status, compatibility checks, and error diagnostics. + * + * @return the statusDetails value. + */ + public List statusDetails() { + return this.statusDetails; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("statusDetails", this.statusDetails, (writer, element) -> writer.writeJson(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ConfidentialVmProfile from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ConfidentialVmProfile 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 ConfidentialVmProfile. + */ + public static ConfidentialVmProfile fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ConfidentialVmProfile deserializedConfidentialVmProfile = new ConfidentialVmProfile(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("igvmStatus".equals(fieldName)) { + deserializedConfidentialVmProfile.igvmStatus = IgvmStatus.fromString(reader.getString()); + } else if ("statusDetails".equals(fieldName)) { + List statusDetails + = reader.readArray(reader1 -> IgvmStatusDetail.fromJson(reader1)); + deserializedConfidentialVmProfile.statusDetails = statusDetails; + } else { + reader.skipChildren(); + } + } + + return deserializedConfidentialVmProfile; + }); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/ConfidentialVmProperties.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/ConfidentialVmProperties.java new file mode 100644 index 000000000000..f35a782f7497 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/ConfidentialVmProperties.java @@ -0,0 +1,111 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.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 the Confidential Virtual Machine (CVM) support intent and current status for the cluster resource. + */ +@Immutable +public final class ConfidentialVmProperties implements JsonSerializable { + /* + * Captures the customer's intent to enable or disable CVM support on the cluster, either during initial deployment + * (Day-0) or at a later stage (Day-N). + */ + private ConfidentialVmIntent confidentialVmIntent; + + /* + * Captures the current status of CVM support on the cluster. + */ + private ConfidentialVmStatus confidentialVmStatus; + + /* + * Additional context about CVM support on the cluster, such as reasons for partial enablement or hardware + * constraints. + */ + private String confidentialVmStatusSummary; + + /** + * Creates an instance of ConfidentialVmProperties class. + */ + private ConfidentialVmProperties() { + } + + /** + * Get the confidentialVmIntent property: Captures the customer's intent to enable or disable CVM support on the + * cluster, either during initial deployment (Day-0) or at a later stage (Day-N). + * + * @return the confidentialVmIntent value. + */ + public ConfidentialVmIntent confidentialVmIntent() { + return this.confidentialVmIntent; + } + + /** + * Get the confidentialVmStatus property: Captures the current status of CVM support on the cluster. + * + * @return the confidentialVmStatus value. + */ + public ConfidentialVmStatus confidentialVmStatus() { + return this.confidentialVmStatus; + } + + /** + * Get the confidentialVmStatusSummary property: Additional context about CVM support on the cluster, such as + * reasons for partial enablement or hardware constraints. + * + * @return the confidentialVmStatusSummary value. + */ + public String confidentialVmStatusSummary() { + return this.confidentialVmStatusSummary; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ConfidentialVmProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ConfidentialVmProperties 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 ConfidentialVmProperties. + */ + public static ConfidentialVmProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ConfidentialVmProperties deserializedConfidentialVmProperties = new ConfidentialVmProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("confidentialVmIntent".equals(fieldName)) { + deserializedConfidentialVmProperties.confidentialVmIntent + = ConfidentialVmIntent.fromString(reader.getString()); + } else if ("confidentialVmStatus".equals(fieldName)) { + deserializedConfidentialVmProperties.confidentialVmStatus + = ConfidentialVmStatus.fromString(reader.getString()); + } else if ("confidentialVmStatusSummary".equals(fieldName)) { + deserializedConfidentialVmProperties.confidentialVmStatusSummary = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedConfidentialVmProperties; + }); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/ConfidentialVmStatus.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/ConfidentialVmStatus.java new file mode 100644 index 000000000000..4dd30782ffc2 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/ConfidentialVmStatus.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; + +/** + * Captures the current status of Confidential Virtual Machine (CVM) support on the cluster. + */ +public final class ConfidentialVmStatus extends ExpandableStringEnum { + /** + * CVM support is fully enabled on the cluster. All nodes are CVM capable. + */ + public static final ConfidentialVmStatus ENABLED = fromString("Enabled"); + + /** + * CVM support is partially enabled. At least one node in the cluster is CVM capable. + */ + public static final ConfidentialVmStatus PARTIALLY_ENABLED = fromString("PartiallyEnabled"); + + /** + * CVM support is disabled. None of the nodes in the cluster are CVM capable. + */ + public static final ConfidentialVmStatus DISABLED = fromString("Disabled"); + + /** + * Creates a new instance of ConfidentialVmStatus value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public ConfidentialVmStatus() { + } + + /** + * Creates or finds a ConfidentialVmStatus from its string representation. + * + * @param name a name to look for. + * @return the corresponding ConfidentialVmStatus. + */ + public static ConfidentialVmStatus fromString(String name) { + return fromString(name, ConfidentialVmStatus.class); + } + + /** + * Gets known ConfidentialVmStatus values. + * + * @return known ConfidentialVmStatus values. + */ + public static Collection values() { + return values(ConfidentialVmStatus.class); + } +} 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/ContentPayload.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/ContentPayload.java new file mode 100644 index 000000000000..7655f340426b --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/ContentPayload.java @@ -0,0 +1,176 @@ +// 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 details of a specific update content payload. + */ +@Immutable +public final class ContentPayload implements JsonSerializable { + /* + * Represents url of a update payload. + */ + private String url; + + /* + * Represents hash of a update payload. + */ + private String hash; + + /* + * Represents hash algorithm of a update payload. + */ + private String hashAlgorithm; + + /* + * Represents identifier of a update payload. + */ + private String identifier; + + /* + * Represents size in bytes of a update payload. + */ + private String packageSizeInBytes; + + /* + * Represents the group of a update payload. + */ + private String group; + + /* + * Represents the file name of a update payload. + */ + private String fileName; + + /** + * Creates an instance of ContentPayload class. + */ + private ContentPayload() { + } + + /** + * Get the url property: Represents url of a update payload. + * + * @return the url value. + */ + public String url() { + return this.url; + } + + /** + * Get the hash property: Represents hash of a update payload. + * + * @return the hash value. + */ + public String hash() { + return this.hash; + } + + /** + * Get the hashAlgorithm property: Represents hash algorithm of a update payload. + * + * @return the hashAlgorithm value. + */ + public String hashAlgorithm() { + return this.hashAlgorithm; + } + + /** + * Get the identifier property: Represents identifier of a update payload. + * + * @return the identifier value. + */ + public String identifier() { + return this.identifier; + } + + /** + * Get the packageSizeInBytes property: Represents size in bytes of a update payload. + * + * @return the packageSizeInBytes value. + */ + public String packageSizeInBytes() { + return this.packageSizeInBytes; + } + + /** + * Get the group property: Represents the group of a update payload. + * + * @return the group value. + */ + public String group() { + return this.group; + } + + /** + * Get the fileName property: Represents the file name of a update payload. + * + * @return the fileName value. + */ + public String fileName() { + return this.fileName; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("url", this.url); + jsonWriter.writeStringField("hash", this.hash); + jsonWriter.writeStringField("hashAlgorithm", this.hashAlgorithm); + jsonWriter.writeStringField("identifier", this.identifier); + jsonWriter.writeStringField("packageSizeInBytes", this.packageSizeInBytes); + jsonWriter.writeStringField("group", this.group); + jsonWriter.writeStringField("fileName", this.fileName); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ContentPayload from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ContentPayload 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 ContentPayload. + */ + public static ContentPayload fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ContentPayload deserializedContentPayload = new ContentPayload(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("url".equals(fieldName)) { + deserializedContentPayload.url = reader.getString(); + } else if ("hash".equals(fieldName)) { + deserializedContentPayload.hash = reader.getString(); + } else if ("hashAlgorithm".equals(fieldName)) { + deserializedContentPayload.hashAlgorithm = reader.getString(); + } else if ("identifier".equals(fieldName)) { + deserializedContentPayload.identifier = reader.getString(); + } else if ("packageSizeInBytes".equals(fieldName)) { + deserializedContentPayload.packageSizeInBytes = reader.getString(); + } else if ("group".equals(fieldName)) { + deserializedContentPayload.group = reader.getString(); + } else if ("fileName".equals(fieldName)) { + deserializedContentPayload.fileName = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedContentPayload; + }); + } +} 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/DownloadOsJobProperties.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/DownloadOsJobProperties.java new file mode 100644 index 000000000000..b2166b29d762 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/DownloadOsJobProperties.java @@ -0,0 +1,162 @@ +// 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.management.exception.ManagementError; +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; + +/** + * Represents the properties of Download Os job. + */ +@Fluent +public final class DownloadOsJobProperties extends EdgeMachineJobProperties { + /* + * Job Type to support polymorphic resource. + */ + private EdgeMachineJobType jobType = EdgeMachineJobType.DOWNLOAD_OS; + + /* + * Download OS request. + */ + private DownloadRequest downloadRequest; + + /* + * Reported Properties for Download Os job + */ + private ProvisionOsReportedProperties reportedProperties; + + /** + * Creates an instance of DownloadOsJobProperties class. + */ + public DownloadOsJobProperties() { + } + + /** + * Get the jobType property: Job Type to support polymorphic resource. + * + * @return the jobType value. + */ + @Override + public EdgeMachineJobType jobType() { + return this.jobType; + } + + /** + * Get the downloadRequest property: Download OS request. + * + * @return the downloadRequest value. + */ + public DownloadRequest downloadRequest() { + return this.downloadRequest; + } + + /** + * Set the downloadRequest property: Download OS request. + * + * @param downloadRequest the downloadRequest value to set. + * @return the DownloadOsJobProperties object itself. + */ + public DownloadOsJobProperties withDownloadRequest(DownloadRequest downloadRequest) { + this.downloadRequest = downloadRequest; + return this; + } + + /** + * Get the reportedProperties property: Reported Properties for Download Os job. + * + * @return the reportedProperties value. + */ + public ProvisionOsReportedProperties reportedProperties() { + return this.reportedProperties; + } + + /** + * Set the reportedProperties property: Reported Properties for Download Os job. + * + * @param reportedProperties the reportedProperties value to set. + * @return the DownloadOsJobProperties object itself. + */ + public DownloadOsJobProperties withReportedProperties(ProvisionOsReportedProperties reportedProperties) { + this.reportedProperties = reportedProperties; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public DownloadOsJobProperties 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.writeJsonField("downloadRequest", this.downloadRequest); + jsonWriter.writeStringField("jobType", this.jobType == null ? null : this.jobType.toString()); + jsonWriter.writeJsonField("reportedProperties", this.reportedProperties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of DownloadOsJobProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of DownloadOsJobProperties 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 DownloadOsJobProperties. + */ + public static DownloadOsJobProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + DownloadOsJobProperties deserializedDownloadOsJobProperties = new DownloadOsJobProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("deploymentMode".equals(fieldName)) { + deserializedDownloadOsJobProperties + .withDeploymentMode(DeploymentMode.fromString(reader.getString())); + } else if ("provisioningState".equals(fieldName)) { + deserializedDownloadOsJobProperties + .withProvisioningState(ProvisioningState.fromString(reader.getString())); + } else if ("jobId".equals(fieldName)) { + deserializedDownloadOsJobProperties.withJobId(reader.getString()); + } else if ("startTimeUtc".equals(fieldName)) { + deserializedDownloadOsJobProperties.withStartTimeUtc(reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString()))); + } else if ("endTimeUtc".equals(fieldName)) { + deserializedDownloadOsJobProperties.withEndTimeUtc(reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString()))); + } else if ("status".equals(fieldName)) { + deserializedDownloadOsJobProperties.withStatus(JobStatus.fromString(reader.getString())); + } else if ("error".equals(fieldName)) { + deserializedDownloadOsJobProperties.withError(ManagementError.fromJson(reader)); + } else if ("downloadRequest".equals(fieldName)) { + deserializedDownloadOsJobProperties.downloadRequest = DownloadRequest.fromJson(reader); + } else if ("jobType".equals(fieldName)) { + deserializedDownloadOsJobProperties.jobType = EdgeMachineJobType.fromString(reader.getString()); + } else if ("reportedProperties".equals(fieldName)) { + deserializedDownloadOsJobProperties.reportedProperties + = ProvisionOsReportedProperties.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedDownloadOsJobProperties; + }); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/DownloadOsProfile.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/DownloadOsProfile.java new file mode 100644 index 000000000000..506a2d3a8655 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/DownloadOsProfile.java @@ -0,0 +1,253 @@ +// 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; + +/** + * Operating system profile. + */ +@Fluent +public final class DownloadOsProfile implements JsonSerializable { + /* + * Name of the operating system. + */ + private String osName; + + /* + * Type of the operating system. + */ + private String osType; + + /* + * Version of the operating system. + */ + private String osVersion; + + /* + * Location of the operating system image. + */ + private String osImageLocation; + + /* + * Validated Solution Recipe version to be used for the job + */ + private String vsrVersion; + + /* + * Hash of the OS package downloaded + */ + private String imageHash; + + /* + * GPG Public Key used for package verification + */ + private String gpgPubKey; + + /** + * Creates an instance of DownloadOsProfile class. + */ + public DownloadOsProfile() { + } + + /** + * Get the osName property: Name of the operating system. + * + * @return the osName value. + */ + public String osName() { + return this.osName; + } + + /** + * Set the osName property: Name of the operating system. + * + * @param osName the osName value to set. + * @return the DownloadOsProfile object itself. + */ + public DownloadOsProfile withOsName(String osName) { + this.osName = osName; + return this; + } + + /** + * Get the osType property: Type of the operating system. + * + * @return the osType value. + */ + public String osType() { + return this.osType; + } + + /** + * Set the osType property: Type of the operating system. + * + * @param osType the osType value to set. + * @return the DownloadOsProfile object itself. + */ + public DownloadOsProfile withOsType(String osType) { + this.osType = osType; + return this; + } + + /** + * Get the osVersion property: Version of the operating system. + * + * @return the osVersion value. + */ + public String osVersion() { + return this.osVersion; + } + + /** + * Set the osVersion property: Version of the operating system. + * + * @param osVersion the osVersion value to set. + * @return the DownloadOsProfile object itself. + */ + public DownloadOsProfile withOsVersion(String osVersion) { + this.osVersion = osVersion; + return this; + } + + /** + * Get the osImageLocation property: Location of the operating system image. + * + * @return the osImageLocation value. + */ + public String osImageLocation() { + return this.osImageLocation; + } + + /** + * Set the osImageLocation property: Location of the operating system image. + * + * @param osImageLocation the osImageLocation value to set. + * @return the DownloadOsProfile object itself. + */ + public DownloadOsProfile withOsImageLocation(String osImageLocation) { + this.osImageLocation = osImageLocation; + return this; + } + + /** + * Get the vsrVersion property: Validated Solution Recipe version to be used for the job. + * + * @return the vsrVersion value. + */ + public String vsrVersion() { + return this.vsrVersion; + } + + /** + * Set the vsrVersion property: Validated Solution Recipe version to be used for the job. + * + * @param vsrVersion the vsrVersion value to set. + * @return the DownloadOsProfile object itself. + */ + public DownloadOsProfile withVsrVersion(String vsrVersion) { + this.vsrVersion = vsrVersion; + return this; + } + + /** + * Get the imageHash property: Hash of the OS package downloaded. + * + * @return the imageHash value. + */ + public String imageHash() { + return this.imageHash; + } + + /** + * Set the imageHash property: Hash of the OS package downloaded. + * + * @param imageHash the imageHash value to set. + * @return the DownloadOsProfile object itself. + */ + public DownloadOsProfile withImageHash(String imageHash) { + this.imageHash = imageHash; + return this; + } + + /** + * Get the gpgPubKey property: GPG Public Key used for package verification. + * + * @return the gpgPubKey value. + */ + public String gpgPubKey() { + return this.gpgPubKey; + } + + /** + * Set the gpgPubKey property: GPG Public Key used for package verification. + * + * @param gpgPubKey the gpgPubKey value to set. + * @return the DownloadOsProfile object itself. + */ + public DownloadOsProfile withGpgPubKey(String gpgPubKey) { + this.gpgPubKey = gpgPubKey; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("osName", this.osName); + jsonWriter.writeStringField("osType", this.osType); + jsonWriter.writeStringField("osVersion", this.osVersion); + jsonWriter.writeStringField("osImageLocation", this.osImageLocation); + jsonWriter.writeStringField("vsrVersion", this.vsrVersion); + jsonWriter.writeStringField("imageHash", this.imageHash); + jsonWriter.writeStringField("gpgPubKey", this.gpgPubKey); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of DownloadOsProfile from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of DownloadOsProfile 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 DownloadOsProfile. + */ + public static DownloadOsProfile fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + DownloadOsProfile deserializedDownloadOsProfile = new DownloadOsProfile(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("osName".equals(fieldName)) { + deserializedDownloadOsProfile.osName = reader.getString(); + } else if ("osType".equals(fieldName)) { + deserializedDownloadOsProfile.osType = reader.getString(); + } else if ("osVersion".equals(fieldName)) { + deserializedDownloadOsProfile.osVersion = reader.getString(); + } else if ("osImageLocation".equals(fieldName)) { + deserializedDownloadOsProfile.osImageLocation = reader.getString(); + } else if ("vsrVersion".equals(fieldName)) { + deserializedDownloadOsProfile.vsrVersion = reader.getString(); + } else if ("imageHash".equals(fieldName)) { + deserializedDownloadOsProfile.imageHash = reader.getString(); + } else if ("gpgPubKey".equals(fieldName)) { + deserializedDownloadOsProfile.gpgPubKey = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedDownloadOsProfile; + }); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/DownloadRequest.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/DownloadRequest.java new file mode 100644 index 000000000000..66b50929b3ee --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/DownloadRequest.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; + +/** + * Download Request properties. + */ +@Fluent +public final class DownloadRequest implements JsonSerializable { + /* + * Target operating system to support polymorphic resource. + */ + private ProvisioningOsType target; + + /* + * Operating system profile. + */ + private DownloadOsProfile osProfile; + + /** + * Creates an instance of DownloadRequest class. + */ + public DownloadRequest() { + } + + /** + * Get the target property: Target operating system to support polymorphic resource. + * + * @return the target value. + */ + public ProvisioningOsType target() { + return this.target; + } + + /** + * Set the target property: Target operating system to support polymorphic resource. + * + * @param target the target value to set. + * @return the DownloadRequest object itself. + */ + public DownloadRequest withTarget(ProvisioningOsType target) { + this.target = target; + return this; + } + + /** + * Get the osProfile property: Operating system profile. + * + * @return the osProfile value. + */ + public DownloadOsProfile osProfile() { + return this.osProfile; + } + + /** + * Set the osProfile property: Operating system profile. + * + * @param osProfile the osProfile value to set. + * @return the DownloadRequest object itself. + */ + public DownloadRequest withOsProfile(DownloadOsProfile osProfile) { + this.osProfile = osProfile; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("target", this.target == null ? null : this.target.toString()); + jsonWriter.writeJsonField("osProfile", this.osProfile); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of DownloadRequest from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of DownloadRequest 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 DownloadRequest. + */ + public static DownloadRequest fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + DownloadRequest deserializedDownloadRequest = new DownloadRequest(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("target".equals(fieldName)) { + deserializedDownloadRequest.target = ProvisioningOsType.fromString(reader.getString()); + } else if ("osProfile".equals(fieldName)) { + deserializedDownloadRequest.osProfile = DownloadOsProfile.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedDownloadRequest; + }); + } +} 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/EdgeMachine.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/EdgeMachine.java new file mode 100644 index 000000000000..4e745958007f --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/EdgeMachine.java @@ -0,0 +1,287 @@ +// 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.Region; +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.azurestackhci.fluent.models.EdgeMachineInner; +import com.azure.resourcemanager.azurestackhci.fluent.models.ManagedServiceIdentity; +import java.util.Map; + +/** + * An immutable client-side representation of EdgeMachine. + */ +public interface EdgeMachine { + /** + * Gets the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + String id(); + + /** + * Gets the name property: The name of the resource. + * + * @return the name value. + */ + String name(); + + /** + * Gets the type property: The type of the resource. + * + * @return the type value. + */ + String type(); + + /** + * Gets the location property: The geo-location where the resource lives. + * + * @return the location value. + */ + String location(); + + /** + * Gets the tags property: Resource tags. + * + * @return the tags value. + */ + Map tags(); + + /** + * Gets the properties property: The resource-specific properties for this resource. + * + * @return the properties value. + */ + EdgeMachineProperties properties(); + + /** + * Gets the identity property: The managed service identities assigned to this resource. + * + * @return the identity value. + */ + ManagedServiceIdentity identity(); + + /** + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + SystemData systemData(); + + /** + * Gets the region of the resource. + * + * @return the region of the resource. + */ + Region region(); + + /** + * Gets the name of the resource region. + * + * @return the name of the resource region. + */ + String regionName(); + + /** + * Gets the name of the resource group. + * + * @return the name of the resource group. + */ + String resourceGroupName(); + + /** + * Gets the inner com.azure.resourcemanager.azurestackhci.fluent.models.EdgeMachineInner object. + * + * @return the inner object. + */ + EdgeMachineInner innerModel(); + + /** + * The entirety of the EdgeMachine definition. + */ + interface Definition extends DefinitionStages.Blank, DefinitionStages.WithLocation, + DefinitionStages.WithResourceGroup, DefinitionStages.WithCreate { + } + + /** + * The EdgeMachine definition stages. + */ + interface DefinitionStages { + /** + * The first stage of the EdgeMachine definition. + */ + interface Blank extends WithLocation { + } + + /** + * The stage of the EdgeMachine definition allowing to specify location. + */ + interface WithLocation { + /** + * Specifies the region for the resource. + * + * @param location The geo-location where the resource lives. + * @return the next definition stage. + */ + WithResourceGroup withRegion(Region location); + + /** + * Specifies the region for the resource. + * + * @param location The geo-location where the resource lives. + * @return the next definition stage. + */ + WithResourceGroup withRegion(String location); + } + + /** + * The stage of the EdgeMachine definition allowing to specify parent resource. + */ + interface WithResourceGroup { + /** + * Specifies resourceGroupName. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @return the next definition stage. + */ + WithCreate withExistingResourceGroup(String resourceGroupName); + } + + /** + * The stage of the EdgeMachine 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.WithProperties, DefinitionStages.WithIdentity { + /** + * Executes the create request. + * + * @return the created resource. + */ + EdgeMachine create(); + + /** + * Executes the create request. + * + * @param context The context to associate with this operation. + * @return the created resource. + */ + EdgeMachine create(Context context); + } + + /** + * The stage of the EdgeMachine definition allowing to specify tags. + */ + interface WithTags { + /** + * Specifies the tags property: Resource tags.. + * + * @param tags Resource tags. + * @return the next definition stage. + */ + WithCreate withTags(Map tags); + } + + /** + * The stage of the EdgeMachine definition allowing to specify properties. + */ + interface WithProperties { + /** + * Specifies the properties property: The resource-specific properties for this resource.. + * + * @param properties The resource-specific properties for this resource. + * @return the next definition stage. + */ + WithCreate withProperties(EdgeMachineProperties properties); + } + + /** + * The stage of the EdgeMachine definition allowing to specify identity. + */ + interface WithIdentity { + /** + * Specifies the identity property: The managed service identities assigned to this resource.. + * + * @param identity The managed service identities assigned to this resource. + * @return the next definition stage. + */ + WithCreate withIdentity(ManagedServiceIdentity identity); + } + } + + /** + * Begins update for the EdgeMachine resource. + * + * @return the stage of resource update. + */ + EdgeMachine.Update update(); + + /** + * The template for EdgeMachine update. + */ + interface Update extends UpdateStages.WithTags, UpdateStages.WithIdentity { + /** + * Executes the update request. + * + * @return the updated resource. + */ + EdgeMachine apply(); + + /** + * Executes the update request. + * + * @param context The context to associate with this operation. + * @return the updated resource. + */ + EdgeMachine apply(Context context); + } + + /** + * The EdgeMachine update stages. + */ + interface UpdateStages { + /** + * The stage of the EdgeMachine update allowing to specify tags. + */ + interface WithTags { + /** + * Specifies the tags property: Resource tags.. + * + * @param tags Resource tags. + * @return the next definition stage. + */ + Update withTags(Map tags); + } + + /** + * The stage of the EdgeMachine update allowing to specify identity. + */ + interface WithIdentity { + /** + * Specifies the identity property: The managed service identities assigned to this resource.. + * + * @param identity The managed service identities assigned to this resource. + * @return the next definition stage. + */ + Update withIdentity(ManagedServiceIdentity identity); + } + } + + /** + * Refreshes the resource to sync with Azure. + * + * @return the refreshed resource. + */ + EdgeMachine refresh(); + + /** + * Refreshes the resource to sync with Azure. + * + * @param context The context to associate with this operation. + * @return the refreshed resource. + */ + EdgeMachine refresh(Context context); +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/EdgeMachineCollectLogJobProperties.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/EdgeMachineCollectLogJobProperties.java new file mode 100644 index 000000000000..d801d26016e6 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/EdgeMachineCollectLogJobProperties.java @@ -0,0 +1,203 @@ +// 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.management.exception.ManagementError; +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; + +/** + * Properties for pausing a server in the cluster. + */ +@Fluent +public final class EdgeMachineCollectLogJobProperties extends EdgeMachineJobProperties { + /* + * Job Type to support polymorphic resource. + */ + private EdgeMachineJobType jobType = EdgeMachineJobType.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 EdgeMachineCollectLogJobReportedProperties reportedProperties; + + /** + * Creates an instance of EdgeMachineCollectLogJobProperties class. + */ + public EdgeMachineCollectLogJobProperties() { + } + + /** + * Get the jobType property: Job Type to support polymorphic resource. + * + * @return the jobType value. + */ + @Override + public EdgeMachineJobType 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 EdgeMachineCollectLogJobProperties object itself. + */ + public EdgeMachineCollectLogJobProperties 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 EdgeMachineCollectLogJobProperties object itself. + */ + public EdgeMachineCollectLogJobProperties 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 EdgeMachineCollectLogJobReportedProperties reportedProperties() { + return this.reportedProperties; + } + + /** + * {@inheritDoc} + */ + @Override + public EdgeMachineCollectLogJobProperties 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 EdgeMachineCollectLogJobProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of EdgeMachineCollectLogJobProperties 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 EdgeMachineCollectLogJobProperties. + */ + public static EdgeMachineCollectLogJobProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + EdgeMachineCollectLogJobProperties deserializedEdgeMachineCollectLogJobProperties + = new EdgeMachineCollectLogJobProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("deploymentMode".equals(fieldName)) { + deserializedEdgeMachineCollectLogJobProperties + .withDeploymentMode(DeploymentMode.fromString(reader.getString())); + } else if ("provisioningState".equals(fieldName)) { + deserializedEdgeMachineCollectLogJobProperties + .withProvisioningState(ProvisioningState.fromString(reader.getString())); + } else if ("jobId".equals(fieldName)) { + deserializedEdgeMachineCollectLogJobProperties.withJobId(reader.getString()); + } else if ("startTimeUtc".equals(fieldName)) { + deserializedEdgeMachineCollectLogJobProperties.withStartTimeUtc(reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString()))); + } else if ("endTimeUtc".equals(fieldName)) { + deserializedEdgeMachineCollectLogJobProperties.withEndTimeUtc(reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString()))); + } else if ("status".equals(fieldName)) { + deserializedEdgeMachineCollectLogJobProperties.withStatus(JobStatus.fromString(reader.getString())); + } else if ("error".equals(fieldName)) { + deserializedEdgeMachineCollectLogJobProperties.withError(ManagementError.fromJson(reader)); + } else if ("fromDate".equals(fieldName)) { + deserializedEdgeMachineCollectLogJobProperties.fromDate = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("toDate".equals(fieldName)) { + deserializedEdgeMachineCollectLogJobProperties.toDate = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("jobType".equals(fieldName)) { + deserializedEdgeMachineCollectLogJobProperties.jobType + = EdgeMachineJobType.fromString(reader.getString()); + } else if ("lastLogGenerated".equals(fieldName)) { + deserializedEdgeMachineCollectLogJobProperties.lastLogGenerated = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("reportedProperties".equals(fieldName)) { + deserializedEdgeMachineCollectLogJobProperties.reportedProperties + = EdgeMachineCollectLogJobReportedProperties.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedEdgeMachineCollectLogJobProperties; + }); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/EdgeMachineCollectLogJobReportedProperties.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/EdgeMachineCollectLogJobReportedProperties.java new file mode 100644 index 000000000000..4150285d3f8b --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/EdgeMachineCollectLogJobReportedProperties.java @@ -0,0 +1,130 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.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 EdgeMachineCollectLogJobReportedProperties + 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 EdgeMachineCollectLogJobReportedProperties class. + */ + private EdgeMachineCollectLogJobReportedProperties() { + } + + /** + * 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 EdgeMachineCollectLogJobReportedProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of EdgeMachineCollectLogJobReportedProperties 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 EdgeMachineCollectLogJobReportedProperties. + */ + public static EdgeMachineCollectLogJobReportedProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + EdgeMachineCollectLogJobReportedProperties deserializedEdgeMachineCollectLogJobReportedProperties + = new EdgeMachineCollectLogJobReportedProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("percentComplete".equals(fieldName)) { + deserializedEdgeMachineCollectLogJobReportedProperties.percentComplete + = reader.getNullable(JsonReader::getInt); + } else if ("validationStatus".equals(fieldName)) { + deserializedEdgeMachineCollectLogJobReportedProperties.validationStatus + = EceActionStatus.fromJson(reader); + } else if ("deploymentStatus".equals(fieldName)) { + deserializedEdgeMachineCollectLogJobReportedProperties.deploymentStatus + = EceActionStatus.fromJson(reader); + } else if ("logCollectionSessionDetails".equals(fieldName)) { + List logCollectionSessionDetails + = reader.readArray(reader1 -> LogCollectionJobSession.fromJson(reader1)); + deserializedEdgeMachineCollectLogJobReportedProperties.logCollectionSessionDetails + = logCollectionSessionDetails; + } else { + reader.skipChildren(); + } + } + + return deserializedEdgeMachineCollectLogJobReportedProperties; + }); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/EdgeMachineConnectivityStatus.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/EdgeMachineConnectivityStatus.java new file mode 100644 index 000000000000..37f8f49e7830 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/EdgeMachineConnectivityStatus.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; + +/** + * Overall connectivity status for the machine resource. + */ +public final class EdgeMachineConnectivityStatus extends ExpandableStringEnum { + /** + * The connectivity status of the machine resource is not specified. + */ + public static final EdgeMachineConnectivityStatus NOT_SPECIFIED = fromString("NotSpecified"); + + /** + * The machine resource is disconnected. + */ + public static final EdgeMachineConnectivityStatus DISCONNECTED = fromString("Disconnected"); + + /** + * The machine resource is connected. + */ + public static final EdgeMachineConnectivityStatus CONNECTED = fromString("Connected"); + + /** + * Creates a new instance of EdgeMachineConnectivityStatus value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public EdgeMachineConnectivityStatus() { + } + + /** + * Creates or finds a EdgeMachineConnectivityStatus from its string representation. + * + * @param name a name to look for. + * @return the corresponding EdgeMachineConnectivityStatus. + */ + public static EdgeMachineConnectivityStatus fromString(String name) { + return fromString(name, EdgeMachineConnectivityStatus.class); + } + + /** + * Gets known EdgeMachineConnectivityStatus values. + * + * @return known EdgeMachineConnectivityStatus values. + */ + public static Collection values() { + return values(EdgeMachineConnectivityStatus.class); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/EdgeMachineJob.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/EdgeMachineJob.java new file mode 100644 index 000000000000..a53cb91394c2 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/EdgeMachineJob.java @@ -0,0 +1,189 @@ +// 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.core.util.Context; +import com.azure.resourcemanager.azurestackhci.fluent.models.EdgeMachineJobInner; + +/** + * An immutable client-side representation of EdgeMachineJob. + */ +public interface EdgeMachineJob { + /** + * Gets the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + String id(); + + /** + * Gets the name property: The name of the resource. + * + * @return the name value. + */ + String name(); + + /** + * Gets the type property: The type of the resource. + * + * @return the type value. + */ + String type(); + + /** + * Gets the properties property: The resource-specific properties for this resource. + * + * @return the properties value. + */ + EdgeMachineJobProperties properties(); + + /** + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + SystemData systemData(); + + /** + * Gets the name of the resource group. + * + * @return the name of the resource group. + */ + String resourceGroupName(); + + /** + * Gets the inner com.azure.resourcemanager.azurestackhci.fluent.models.EdgeMachineJobInner object. + * + * @return the inner object. + */ + EdgeMachineJobInner innerModel(); + + /** + * The entirety of the EdgeMachineJob definition. + */ + interface Definition + extends DefinitionStages.Blank, DefinitionStages.WithParentResource, DefinitionStages.WithCreate { + } + + /** + * The EdgeMachineJob definition stages. + */ + interface DefinitionStages { + /** + * The first stage of the EdgeMachineJob definition. + */ + interface Blank extends WithParentResource { + } + + /** + * The stage of the EdgeMachineJob definition allowing to specify parent resource. + */ + interface WithParentResource { + /** + * Specifies resourceGroupName, edgeMachineName. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param edgeMachineName Name of Device. + * @return the next definition stage. + */ + WithCreate withExistingEdgeMachine(String resourceGroupName, String edgeMachineName); + } + + /** + * The stage of the EdgeMachineJob 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.WithProperties { + /** + * Executes the create request. + * + * @return the created resource. + */ + EdgeMachineJob create(); + + /** + * Executes the create request. + * + * @param context The context to associate with this operation. + * @return the created resource. + */ + EdgeMachineJob create(Context context); + } + + /** + * The stage of the EdgeMachineJob definition allowing to specify properties. + */ + interface WithProperties { + /** + * Specifies the properties property: The resource-specific properties for this resource.. + * + * @param properties The resource-specific properties for this resource. + * @return the next definition stage. + */ + WithCreate withProperties(EdgeMachineJobProperties properties); + } + } + + /** + * Begins update for the EdgeMachineJob resource. + * + * @return the stage of resource update. + */ + EdgeMachineJob.Update update(); + + /** + * The template for EdgeMachineJob update. + */ + interface Update extends UpdateStages.WithProperties { + /** + * Executes the update request. + * + * @return the updated resource. + */ + EdgeMachineJob apply(); + + /** + * Executes the update request. + * + * @param context The context to associate with this operation. + * @return the updated resource. + */ + EdgeMachineJob apply(Context context); + } + + /** + * The EdgeMachineJob update stages. + */ + interface UpdateStages { + /** + * The stage of the EdgeMachineJob update allowing to specify properties. + */ + interface WithProperties { + /** + * Specifies the properties property: The resource-specific properties for this resource.. + * + * @param properties The resource-specific properties for this resource. + * @return the next definition stage. + */ + Update withProperties(EdgeMachineJobProperties properties); + } + } + + /** + * Refreshes the resource to sync with Azure. + * + * @return the refreshed resource. + */ + EdgeMachineJob refresh(); + + /** + * Refreshes the resource to sync with Azure. + * + * @param context The context to associate with this operation. + * @return the refreshed resource. + */ + EdgeMachineJob refresh(Context context); +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/EdgeMachineJobProperties.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/EdgeMachineJobProperties.java new file mode 100644 index 000000000000..ae8a568249c3 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/EdgeMachineJobProperties.java @@ -0,0 +1,302 @@ +// 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.management.exception.ManagementError; +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; + +/** + * EdgeMachine Job properties. + */ +@Fluent +public class EdgeMachineJobProperties implements JsonSerializable { + /* + * Job Type to support polymorphic resource. + */ + private EdgeMachineJobType jobType = EdgeMachineJobType.fromString("EdgeMachineJobProperties"); + + /* + * 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; + + /* + * error details. + */ + private ManagementError error; + + /** + * Creates an instance of EdgeMachineJobProperties class. + */ + public EdgeMachineJobProperties() { + } + + /** + * Get the jobType property: Job Type to support polymorphic resource. + * + * @return the jobType value. + */ + public EdgeMachineJobType 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 EdgeMachineJobProperties object itself. + */ + public EdgeMachineJobProperties 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 EdgeMachineJobProperties object itself. + */ + EdgeMachineJobProperties 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 EdgeMachineJobProperties object itself. + */ + EdgeMachineJobProperties 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 EdgeMachineJobProperties object itself. + */ + EdgeMachineJobProperties 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 EdgeMachineJobProperties object itself. + */ + EdgeMachineJobProperties 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 EdgeMachineJobProperties object itself. + */ + EdgeMachineJobProperties withStatus(JobStatus status) { + this.status = status; + return this; + } + + /** + * Get the error property: error details. + * + * @return the error value. + */ + public ManagementError error() { + return this.error; + } + + /** + * Set the error property: error details. + * + * @param error the error value to set. + * @return the EdgeMachineJobProperties object itself. + */ + EdgeMachineJobProperties withError(ManagementError error) { + this.error = error; + 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 EdgeMachineJobProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of EdgeMachineJobProperties 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 EdgeMachineJobProperties. + */ + public static EdgeMachineJobProperties 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 ("RemoteSupport".equals(discriminatorValue)) { + return EdgeMachineRemoteSupportJobProperties.fromJson(readerToUse.reset()); + } else if ("ProvisionOs".equals(discriminatorValue)) { + return ProvisionOsJobProperties.fromJson(readerToUse.reset()); + } else if ("DownloadOs".equals(discriminatorValue)) { + return DownloadOsJobProperties.fromJson(readerToUse.reset()); + } else if ("CollectLog".equals(discriminatorValue)) { + return EdgeMachineCollectLogJobProperties.fromJson(readerToUse.reset()); + } else { + return fromJsonKnownDiscriminator(readerToUse.reset()); + } + } + }); + } + + static EdgeMachineJobProperties fromJsonKnownDiscriminator(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + EdgeMachineJobProperties deserializedEdgeMachineJobProperties = new EdgeMachineJobProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("jobType".equals(fieldName)) { + deserializedEdgeMachineJobProperties.jobType = EdgeMachineJobType.fromString(reader.getString()); + } else if ("deploymentMode".equals(fieldName)) { + deserializedEdgeMachineJobProperties.deploymentMode = DeploymentMode.fromString(reader.getString()); + } else if ("provisioningState".equals(fieldName)) { + deserializedEdgeMachineJobProperties.provisioningState + = ProvisioningState.fromString(reader.getString()); + } else if ("jobId".equals(fieldName)) { + deserializedEdgeMachineJobProperties.jobId = reader.getString(); + } else if ("startTimeUtc".equals(fieldName)) { + deserializedEdgeMachineJobProperties.startTimeUtc = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("endTimeUtc".equals(fieldName)) { + deserializedEdgeMachineJobProperties.endTimeUtc = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("status".equals(fieldName)) { + deserializedEdgeMachineJobProperties.status = JobStatus.fromString(reader.getString()); + } else if ("error".equals(fieldName)) { + deserializedEdgeMachineJobProperties.error = ManagementError.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedEdgeMachineJobProperties; + }); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/EdgeMachineJobType.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/EdgeMachineJobType.java new file mode 100644 index 000000000000..41588453f5da --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/EdgeMachineJobType.java @@ -0,0 +1,61 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.azurestackhci.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Job Type supported. + */ +public final class EdgeMachineJobType extends ExpandableStringEnum { + /** + * Job to collect logs from the device. + */ + public static final EdgeMachineJobType COLLECT_LOG = fromString("CollectLog"); + + /** + * Job to provide remote support to the device. + */ + public static final EdgeMachineJobType REMOTE_SUPPORT = fromString("RemoteSupport"); + + /** + * Job to provision operating system in the device. + */ + public static final EdgeMachineJobType PROVISION_OS = fromString("ProvisionOs"); + + /** + * Job to download OS packages on to the device. + */ + public static final EdgeMachineJobType DOWNLOAD_OS = fromString("DownloadOs"); + + /** + * Creates a new instance of EdgeMachineJobType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public EdgeMachineJobType() { + } + + /** + * Creates or finds a EdgeMachineJobType from its string representation. + * + * @param name a name to look for. + * @return the corresponding EdgeMachineJobType. + */ + public static EdgeMachineJobType fromString(String name) { + return fromString(name, EdgeMachineJobType.class); + } + + /** + * Gets known EdgeMachineJobType values. + * + * @return known EdgeMachineJobType values. + */ + public static Collection values() { + return values(EdgeMachineJobType.class); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/EdgeMachineJobs.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/EdgeMachineJobs.java new file mode 100644 index 000000000000..be5d900b3a2e --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/EdgeMachineJobs.java @@ -0,0 +1,144 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.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 EdgeMachineJobs. + */ +public interface EdgeMachineJobs { + /** + * Get a EdgeMachineJob. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param edgeMachineName Name of Device. + * @param jobsName Name of EdgeMachineJob. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a EdgeMachineJob along with {@link Response}. + */ + Response getWithResponse(String resourceGroupName, String edgeMachineName, String jobsName, + Context context); + + /** + * Get a EdgeMachineJob. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param edgeMachineName Name of Device. + * @param jobsName Name of EdgeMachineJob. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a EdgeMachineJob. + */ + EdgeMachineJob get(String resourceGroupName, String edgeMachineName, String jobsName); + + /** + * Delete a EdgeMachineJob. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param edgeMachineName Name of Device. + * @param jobsName Name of EdgeMachineJob. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void delete(String resourceGroupName, String edgeMachineName, String jobsName); + + /** + * Delete a EdgeMachineJob. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param edgeMachineName Name of Device. + * @param jobsName Name of EdgeMachineJob. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void delete(String resourceGroupName, String edgeMachineName, String jobsName, Context context); + + /** + * List EdgeMachineJob resources by EdgeMachines. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param edgeMachineName 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 EdgeMachineJob list operation as paginated response with {@link PagedIterable}. + */ + PagedIterable list(String resourceGroupName, String edgeMachineName); + + /** + * List EdgeMachineJob resources by EdgeMachines. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param edgeMachineName 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 EdgeMachineJob list operation as paginated response with {@link PagedIterable}. + */ + PagedIterable list(String resourceGroupName, String edgeMachineName, Context context); + + /** + * Get a EdgeMachineJob. + * + * @param id the resource ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a EdgeMachineJob along with {@link Response}. + */ + EdgeMachineJob getById(String id); + + /** + * Get a EdgeMachineJob. + * + * @param id the resource ID. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a EdgeMachineJob along with {@link Response}. + */ + Response getByIdWithResponse(String id, Context context); + + /** + * Delete a EdgeMachineJob. + * + * @param id the resource ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void deleteById(String id); + + /** + * Delete a EdgeMachineJob. + * + * @param id the resource ID. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void deleteByIdWithResponse(String id, Context context); + + /** + * Begins definition for a new EdgeMachineJob resource. + * + * @param name resource name. + * @return the first stage of the new EdgeMachineJob definition. + */ + EdgeMachineJob.DefinitionStages.Blank define(String name); +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/EdgeMachineKind.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/EdgeMachineKind.java new file mode 100644 index 000000000000..40fbb65ba8ae --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/EdgeMachineKind.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; + +/** + * Edge Machine Kind. + */ +public final class EdgeMachineKind extends ExpandableStringEnum { + /** + * EdgeMachine resource created using Zero-touch provisioning. + */ + public static final EdgeMachineKind STANDARD = fromString("Standard"); + + /** + * EdgeMachine resource created for brownfield HCI customers without zero touch provisioning. + */ + public static final EdgeMachineKind DEDICATED = fromString("Dedicated"); + + /** + * Creates a new instance of EdgeMachineKind value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public EdgeMachineKind() { + } + + /** + * Creates or finds a EdgeMachineKind from its string representation. + * + * @param name a name to look for. + * @return the corresponding EdgeMachineKind. + */ + public static EdgeMachineKind fromString(String name) { + return fromString(name, EdgeMachineKind.class); + } + + /** + * Gets known EdgeMachineKind values. + * + * @return known EdgeMachineKind values. + */ + public static Collection values() { + return values(EdgeMachineKind.class); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/EdgeMachineNetworkProfile.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/EdgeMachineNetworkProfile.java new file mode 100644 index 000000000000..3414abd08edc --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/EdgeMachineNetworkProfile.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; + +/** + * NetworkProfile of edge machine. + */ +@Immutable +public final class EdgeMachineNetworkProfile implements JsonSerializable { + /* + * List of Network Interface Card (NIC) Details of edge machine. + */ + private List nicDetails; + + /* + * List of switch Details of edge machine. + */ + private List switchDetails; + + /** + * Creates an instance of EdgeMachineNetworkProfile class. + */ + private EdgeMachineNetworkProfile() { + } + + /** + * Get the nicDetails property: List of Network Interface Card (NIC) Details of edge machine. + * + * @return the nicDetails value. + */ + public List nicDetails() { + return this.nicDetails; + } + + /** + * Get the switchDetails property: List of switch Details of edge machine. + * + * @return the switchDetails value. + */ + public List switchDetails() { + return this.switchDetails; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of EdgeMachineNetworkProfile from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of EdgeMachineNetworkProfile 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 EdgeMachineNetworkProfile. + */ + public static EdgeMachineNetworkProfile fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + EdgeMachineNetworkProfile deserializedEdgeMachineNetworkProfile = new EdgeMachineNetworkProfile(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("nicDetails".equals(fieldName)) { + List nicDetails + = reader.readArray(reader1 -> EdgeMachineNicDetail.fromJson(reader1)); + deserializedEdgeMachineNetworkProfile.nicDetails = nicDetails; + } else if ("switchDetails".equals(fieldName)) { + List switchDetails = reader.readArray(reader1 -> SwitchDetail.fromJson(reader1)); + deserializedEdgeMachineNetworkProfile.switchDetails = switchDetails; + } else { + reader.skipChildren(); + } + } + + return deserializedEdgeMachineNetworkProfile; + }); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/EdgeMachineNicDetail.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/EdgeMachineNicDetail.java new file mode 100644 index 000000000000..1f2336b0bdbe --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/EdgeMachineNicDetail.java @@ -0,0 +1,315 @@ +// 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; + +/** + * Network Interface Card (NIC) Details of edge machine. + */ +@Immutable +public final class EdgeMachineNicDetail implements JsonSerializable { + /* + * Adapter Name of NIC + */ + private String adapterName; + + /* + * Interface Description of NIC + */ + private String interfaceDescription; + + /* + * Component Id of NIC + */ + private String componentId; + + /* + * Driver Version of NIC + */ + private String driverVersion; + + /* + * Subnet Mask of NIC + */ + private String ip4Address; + + /* + * Subnet Mask of NIC + */ + private String subnetMask; + + /* + * Default Gateway of NIC + */ + private String defaultGateway; + + /* + * DNS Servers for NIC + */ + private List dnsServers; + + /* + * Default Isolation of Management NIC + */ + private String defaultIsolationId; + + /* + * MAC address information of NIC. + */ + private String macAddress; + + /* + * The slot attached to the NIC. + */ + private String slot; + + /* + * The switch attached to the NIC, if any. + */ + private String switchName; + + /* + * The type of NIC, physical, virtual, management. + */ + private String nicType; + + /* + * The VLAN ID of the physical NIC. + */ + private String vlanId; + + /* + * The status of NIC, up, disconnected. + */ + private String nicStatus; + + /* + * Describes the RDMA capability of the network adapter. + */ + private RdmaCapability rdmaCapability; + + /** + * Creates an instance of EdgeMachineNicDetail class. + */ + private EdgeMachineNicDetail() { + } + + /** + * Get the adapterName property: Adapter Name of NIC. + * + * @return the adapterName value. + */ + public String adapterName() { + return this.adapterName; + } + + /** + * Get the interfaceDescription property: Interface Description of NIC. + * + * @return the interfaceDescription value. + */ + public String interfaceDescription() { + return this.interfaceDescription; + } + + /** + * Get the componentId property: Component Id of NIC. + * + * @return the componentId value. + */ + public String componentId() { + return this.componentId; + } + + /** + * Get the driverVersion property: Driver Version of NIC. + * + * @return the driverVersion value. + */ + public String driverVersion() { + return this.driverVersion; + } + + /** + * Get the ip4Address property: Subnet Mask of NIC. + * + * @return the ip4Address value. + */ + public String ip4Address() { + return this.ip4Address; + } + + /** + * Get the subnetMask property: Subnet Mask of NIC. + * + * @return the subnetMask value. + */ + public String subnetMask() { + return this.subnetMask; + } + + /** + * Get the defaultGateway property: Default Gateway of NIC. + * + * @return the defaultGateway value. + */ + public String defaultGateway() { + return this.defaultGateway; + } + + /** + * Get the dnsServers property: DNS Servers for NIC. + * + * @return the dnsServers value. + */ + public List dnsServers() { + return this.dnsServers; + } + + /** + * Get the defaultIsolationId property: Default Isolation of Management NIC. + * + * @return the defaultIsolationId value. + */ + public String defaultIsolationId() { + return this.defaultIsolationId; + } + + /** + * Get the macAddress property: MAC address information of NIC. + * + * @return the macAddress value. + */ + public String macAddress() { + return this.macAddress; + } + + /** + * Get the slot property: The slot attached to the NIC. + * + * @return the slot value. + */ + public String slot() { + return this.slot; + } + + /** + * Get the switchName property: The switch attached to the NIC, if any. + * + * @return the switchName value. + */ + public String switchName() { + return this.switchName; + } + + /** + * Get the nicType property: The type of NIC, physical, virtual, management. + * + * @return the nicType value. + */ + public String nicType() { + return this.nicType; + } + + /** + * Get the vlanId property: The VLAN ID of the physical NIC. + * + * @return the vlanId value. + */ + public String vlanId() { + return this.vlanId; + } + + /** + * Get the nicStatus property: The status of NIC, up, disconnected. + * + * @return the nicStatus value. + */ + public String nicStatus() { + return this.nicStatus; + } + + /** + * Get the rdmaCapability property: Describes the RDMA capability of the network adapter. + * + * @return the rdmaCapability value. + */ + public RdmaCapability rdmaCapability() { + return this.rdmaCapability; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of EdgeMachineNicDetail from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of EdgeMachineNicDetail 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 EdgeMachineNicDetail. + */ + public static EdgeMachineNicDetail fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + EdgeMachineNicDetail deserializedEdgeMachineNicDetail = new EdgeMachineNicDetail(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("adapterName".equals(fieldName)) { + deserializedEdgeMachineNicDetail.adapterName = reader.getString(); + } else if ("interfaceDescription".equals(fieldName)) { + deserializedEdgeMachineNicDetail.interfaceDescription = reader.getString(); + } else if ("componentId".equals(fieldName)) { + deserializedEdgeMachineNicDetail.componentId = reader.getString(); + } else if ("driverVersion".equals(fieldName)) { + deserializedEdgeMachineNicDetail.driverVersion = reader.getString(); + } else if ("ip4Address".equals(fieldName)) { + deserializedEdgeMachineNicDetail.ip4Address = reader.getString(); + } else if ("subnetMask".equals(fieldName)) { + deserializedEdgeMachineNicDetail.subnetMask = reader.getString(); + } else if ("defaultGateway".equals(fieldName)) { + deserializedEdgeMachineNicDetail.defaultGateway = reader.getString(); + } else if ("dnsServers".equals(fieldName)) { + List dnsServers = reader.readArray(reader1 -> reader1.getString()); + deserializedEdgeMachineNicDetail.dnsServers = dnsServers; + } else if ("defaultIsolationId".equals(fieldName)) { + deserializedEdgeMachineNicDetail.defaultIsolationId = reader.getString(); + } else if ("macAddress".equals(fieldName)) { + deserializedEdgeMachineNicDetail.macAddress = reader.getString(); + } else if ("slot".equals(fieldName)) { + deserializedEdgeMachineNicDetail.slot = reader.getString(); + } else if ("switchName".equals(fieldName)) { + deserializedEdgeMachineNicDetail.switchName = reader.getString(); + } else if ("nicType".equals(fieldName)) { + deserializedEdgeMachineNicDetail.nicType = reader.getString(); + } else if ("vlanId".equals(fieldName)) { + deserializedEdgeMachineNicDetail.vlanId = reader.getString(); + } else if ("nicStatus".equals(fieldName)) { + deserializedEdgeMachineNicDetail.nicStatus = reader.getString(); + } else if ("rdmaCapability".equals(fieldName)) { + deserializedEdgeMachineNicDetail.rdmaCapability = RdmaCapability.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedEdgeMachineNicDetail; + }); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/EdgeMachinePatch.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/EdgeMachinePatch.java new file mode 100644 index 000000000000..f7b23d43b43e --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/EdgeMachinePatch.java @@ -0,0 +1,116 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.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 com.azure.resourcemanager.azurestackhci.fluent.models.ManagedServiceIdentity; +import java.io.IOException; +import java.util.Map; + +/** + * Model for patching edge machine. + */ +@Fluent +public final class EdgeMachinePatch implements JsonSerializable { + /* + * Resource tags. + */ + private Map tags; + + /* + * The managed service identities assigned to this resource. + */ + private ManagedServiceIdentity identity; + + /** + * Creates an instance of EdgeMachinePatch class. + */ + public EdgeMachinePatch() { + } + + /** + * Get the tags property: Resource tags. + * + * @return the tags value. + */ + public Map tags() { + return this.tags; + } + + /** + * Set the tags property: Resource tags. + * + * @param tags the tags value to set. + * @return the EdgeMachinePatch object itself. + */ + public EdgeMachinePatch withTags(Map tags) { + this.tags = tags; + return this; + } + + /** + * Get the identity property: The managed service identities assigned to this resource. + * + * @return the identity value. + */ + public ManagedServiceIdentity identity() { + return this.identity; + } + + /** + * Set the identity property: The managed service identities assigned to this resource. + * + * @param identity the identity value to set. + * @return the EdgeMachinePatch object itself. + */ + public EdgeMachinePatch withIdentity(ManagedServiceIdentity identity) { + this.identity = identity; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeMapField("tags", this.tags, (writer, element) -> writer.writeString(element)); + jsonWriter.writeJsonField("identity", this.identity); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of EdgeMachinePatch from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of EdgeMachinePatch 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 EdgeMachinePatch. + */ + public static EdgeMachinePatch fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + EdgeMachinePatch deserializedEdgeMachinePatch = new EdgeMachinePatch(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("tags".equals(fieldName)) { + Map tags = reader.readMap(reader1 -> reader1.getString()); + deserializedEdgeMachinePatch.tags = tags; + } else if ("identity".equals(fieldName)) { + deserializedEdgeMachinePatch.identity = ManagedServiceIdentity.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedEdgeMachinePatch; + }); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/EdgeMachineProperties.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/EdgeMachineProperties.java new file mode 100644 index 000000000000..e88486d5778f --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/EdgeMachineProperties.java @@ -0,0 +1,408 @@ +// 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; +import java.util.List; + +/** + * Properties for edge machine. + */ +@Fluent +public final class EdgeMachineProperties implements JsonSerializable { + /* + * Edge Machine type. + */ + private EdgeMachineKind edgeMachineKind; + + /* + * The provisioning state of a resource. + */ + private ProvisioningState provisioningState; + + /* + * Unique, immutable resource id. + */ + private String cloudId; + + /* + * Optional property to create arc machine in custom resource group. + */ + private String arcMachineResourceGroupId; + + /* + * Arc machine instance resource id. + */ + private String arcMachineResourceId; + + /* + * Link to Arc Gateway ARM resource Id + */ + private String arcGatewayResourceId; + + /* + * Service fetches common configuration from site. + */ + private SiteDetails siteDetails; + + /* + * Ownership voucher details for provisioned machine. + */ + private OwnershipVoucherDetails ownershipVoucherDetails; + + /* + * Details for device provisioning. + */ + private ProvisioningDetails provisioningDetails; + + /* + * A machine can only be assigned to single device pool + */ + private String devicePoolResourceId; + + /* + * OS configuration status details + */ + private EdgeMachineState machineState; + + /* + * machine connectivity status + */ + private EdgeMachineConnectivityStatus connectivityStatus; + + /* + * Tracks the ID of the consuming resource, setting the machine as in-use. + */ + private String claimedBy; + + /* + * Reported properties for edge machine. + */ + private EdgeMachineReportedProperties reportedProperties; + + /* + * operation status details for edge machine. + */ + private List operationDetails; + + /* + * Last time data updated to service. + */ + private OffsetDateTime lastSyncTimestamp; + + /** + * Creates an instance of EdgeMachineProperties class. + */ + public EdgeMachineProperties() { + } + + /** + * Get the edgeMachineKind property: Edge Machine type. + * + * @return the edgeMachineKind value. + */ + public EdgeMachineKind edgeMachineKind() { + return this.edgeMachineKind; + } + + /** + * Set the edgeMachineKind property: Edge Machine type. + * + * @param edgeMachineKind the edgeMachineKind value to set. + * @return the EdgeMachineProperties object itself. + */ + public EdgeMachineProperties withEdgeMachineKind(EdgeMachineKind edgeMachineKind) { + this.edgeMachineKind = edgeMachineKind; + return this; + } + + /** + * Get the provisioningState property: The provisioning state of a resource. + * + * @return the provisioningState value. + */ + public ProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Get the cloudId property: Unique, immutable resource id. + * + * @return the cloudId value. + */ + public String cloudId() { + return this.cloudId; + } + + /** + * Get the arcMachineResourceGroupId property: Optional property to create arc machine in custom resource group. + * + * @return the arcMachineResourceGroupId value. + */ + public String arcMachineResourceGroupId() { + return this.arcMachineResourceGroupId; + } + + /** + * Set the arcMachineResourceGroupId property: Optional property to create arc machine in custom resource group. + * + * @param arcMachineResourceGroupId the arcMachineResourceGroupId value to set. + * @return the EdgeMachineProperties object itself. + */ + public EdgeMachineProperties withArcMachineResourceGroupId(String arcMachineResourceGroupId) { + this.arcMachineResourceGroupId = arcMachineResourceGroupId; + return this; + } + + /** + * Get the arcMachineResourceId property: Arc machine instance resource id. + * + * @return the arcMachineResourceId value. + */ + public String arcMachineResourceId() { + return this.arcMachineResourceId; + } + + /** + * Set the arcMachineResourceId property: Arc machine instance resource id. + * + * @param arcMachineResourceId the arcMachineResourceId value to set. + * @return the EdgeMachineProperties object itself. + */ + public EdgeMachineProperties withArcMachineResourceId(String arcMachineResourceId) { + this.arcMachineResourceId = arcMachineResourceId; + return this; + } + + /** + * Get the arcGatewayResourceId property: Link to Arc Gateway ARM resource Id. + * + * @return the arcGatewayResourceId value. + */ + public String arcGatewayResourceId() { + return this.arcGatewayResourceId; + } + + /** + * Set the arcGatewayResourceId property: Link to Arc Gateway ARM resource Id. + * + * @param arcGatewayResourceId the arcGatewayResourceId value to set. + * @return the EdgeMachineProperties object itself. + */ + public EdgeMachineProperties withArcGatewayResourceId(String arcGatewayResourceId) { + this.arcGatewayResourceId = arcGatewayResourceId; + return this; + } + + /** + * Get the siteDetails property: Service fetches common configuration from site. + * + * @return the siteDetails value. + */ + public SiteDetails siteDetails() { + return this.siteDetails; + } + + /** + * Set the siteDetails property: Service fetches common configuration from site. + * + * @param siteDetails the siteDetails value to set. + * @return the EdgeMachineProperties object itself. + */ + public EdgeMachineProperties withSiteDetails(SiteDetails siteDetails) { + this.siteDetails = siteDetails; + return this; + } + + /** + * Get the ownershipVoucherDetails property: Ownership voucher details for provisioned machine. + * + * @return the ownershipVoucherDetails value. + */ + public OwnershipVoucherDetails ownershipVoucherDetails() { + return this.ownershipVoucherDetails; + } + + /** + * Set the ownershipVoucherDetails property: Ownership voucher details for provisioned machine. + * + * @param ownershipVoucherDetails the ownershipVoucherDetails value to set. + * @return the EdgeMachineProperties object itself. + */ + public EdgeMachineProperties withOwnershipVoucherDetails(OwnershipVoucherDetails ownershipVoucherDetails) { + this.ownershipVoucherDetails = ownershipVoucherDetails; + return this; + } + + /** + * Get the provisioningDetails property: Details for device provisioning. + * + * @return the provisioningDetails value. + */ + public ProvisioningDetails provisioningDetails() { + return this.provisioningDetails; + } + + /** + * Set the provisioningDetails property: Details for device provisioning. + * + * @param provisioningDetails the provisioningDetails value to set. + * @return the EdgeMachineProperties object itself. + */ + public EdgeMachineProperties withProvisioningDetails(ProvisioningDetails provisioningDetails) { + this.provisioningDetails = provisioningDetails; + return this; + } + + /** + * Get the devicePoolResourceId property: A machine can only be assigned to single device pool. + * + * @return the devicePoolResourceId value. + */ + public String devicePoolResourceId() { + return this.devicePoolResourceId; + } + + /** + * Get the machineState property: OS configuration status details. + * + * @return the machineState value. + */ + public EdgeMachineState machineState() { + return this.machineState; + } + + /** + * Get the connectivityStatus property: machine connectivity status. + * + * @return the connectivityStatus value. + */ + public EdgeMachineConnectivityStatus connectivityStatus() { + return this.connectivityStatus; + } + + /** + * Get the claimedBy property: Tracks the ID of the consuming resource, setting the machine as in-use. + * + * @return the claimedBy value. + */ + public String claimedBy() { + return this.claimedBy; + } + + /** + * Get the reportedProperties property: Reported properties for edge machine. + * + * @return the reportedProperties value. + */ + public EdgeMachineReportedProperties reportedProperties() { + return this.reportedProperties; + } + + /** + * Get the operationDetails property: operation status details for edge machine. + * + * @return the operationDetails value. + */ + public List operationDetails() { + return this.operationDetails; + } + + /** + * Get the lastSyncTimestamp property: Last time data updated to service. + * + * @return the lastSyncTimestamp value. + */ + public OffsetDateTime lastSyncTimestamp() { + return this.lastSyncTimestamp; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("edgeMachineKind", + this.edgeMachineKind == null ? null : this.edgeMachineKind.toString()); + jsonWriter.writeStringField("arcMachineResourceGroupId", this.arcMachineResourceGroupId); + jsonWriter.writeStringField("arcMachineResourceId", this.arcMachineResourceId); + jsonWriter.writeStringField("arcGatewayResourceId", this.arcGatewayResourceId); + jsonWriter.writeJsonField("siteDetails", this.siteDetails); + jsonWriter.writeJsonField("ownershipVoucherDetails", this.ownershipVoucherDetails); + jsonWriter.writeJsonField("provisioningDetails", this.provisioningDetails); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of EdgeMachineProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of EdgeMachineProperties 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 EdgeMachineProperties. + */ + public static EdgeMachineProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + EdgeMachineProperties deserializedEdgeMachineProperties = new EdgeMachineProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("edgeMachineKind".equals(fieldName)) { + deserializedEdgeMachineProperties.edgeMachineKind = EdgeMachineKind.fromString(reader.getString()); + } else if ("provisioningState".equals(fieldName)) { + deserializedEdgeMachineProperties.provisioningState + = ProvisioningState.fromString(reader.getString()); + } else if ("cloudId".equals(fieldName)) { + deserializedEdgeMachineProperties.cloudId = reader.getString(); + } else if ("arcMachineResourceGroupId".equals(fieldName)) { + deserializedEdgeMachineProperties.arcMachineResourceGroupId = reader.getString(); + } else if ("arcMachineResourceId".equals(fieldName)) { + deserializedEdgeMachineProperties.arcMachineResourceId = reader.getString(); + } else if ("arcGatewayResourceId".equals(fieldName)) { + deserializedEdgeMachineProperties.arcGatewayResourceId = reader.getString(); + } else if ("siteDetails".equals(fieldName)) { + deserializedEdgeMachineProperties.siteDetails = SiteDetails.fromJson(reader); + } else if ("ownershipVoucherDetails".equals(fieldName)) { + deserializedEdgeMachineProperties.ownershipVoucherDetails + = OwnershipVoucherDetails.fromJson(reader); + } else if ("provisioningDetails".equals(fieldName)) { + deserializedEdgeMachineProperties.provisioningDetails = ProvisioningDetails.fromJson(reader); + } else if ("devicePoolResourceId".equals(fieldName)) { + deserializedEdgeMachineProperties.devicePoolResourceId = reader.getString(); + } else if ("machineState".equals(fieldName)) { + deserializedEdgeMachineProperties.machineState = EdgeMachineState.fromString(reader.getString()); + } else if ("connectivityStatus".equals(fieldName)) { + deserializedEdgeMachineProperties.connectivityStatus + = EdgeMachineConnectivityStatus.fromString(reader.getString()); + } else if ("claimedBy".equals(fieldName)) { + deserializedEdgeMachineProperties.claimedBy = reader.getString(); + } else if ("reportedProperties".equals(fieldName)) { + deserializedEdgeMachineProperties.reportedProperties + = EdgeMachineReportedProperties.fromJson(reader); + } else if ("operationDetails".equals(fieldName)) { + List operationDetails + = reader.readArray(reader1 -> OperationDetail.fromJson(reader1)); + deserializedEdgeMachineProperties.operationDetails = operationDetails; + } else if ("lastSyncTimestamp".equals(fieldName)) { + deserializedEdgeMachineProperties.lastSyncTimestamp = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else { + reader.skipChildren(); + } + } + + return deserializedEdgeMachineProperties; + }); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/EdgeMachineRemoteSupportJobProperties.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/EdgeMachineRemoteSupportJobProperties.java new file mode 100644 index 000000000000..8cf6a0abe7d4 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/EdgeMachineRemoteSupportJobProperties.java @@ -0,0 +1,217 @@ +// 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.management.exception.ManagementError; +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; + +/** + * Properties for adding a server in the cluster. + */ +@Fluent +public final class EdgeMachineRemoteSupportJobProperties extends EdgeMachineJobProperties { + /* + * Job Type to support polymorphic resource. + */ + private EdgeMachineJobType jobType = EdgeMachineJobType.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 EdgeMachineRemoteSupportJobReportedProperties reportedProperties; + + /** + * Creates an instance of EdgeMachineRemoteSupportJobProperties class. + */ + public EdgeMachineRemoteSupportJobProperties() { + } + + /** + * Get the jobType property: Job Type to support polymorphic resource. + * + * @return the jobType value. + */ + @Override + public EdgeMachineJobType 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 EdgeMachineRemoteSupportJobProperties object itself. + */ + public EdgeMachineRemoteSupportJobProperties 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 EdgeMachineRemoteSupportJobProperties object itself. + */ + public EdgeMachineRemoteSupportJobProperties 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 EdgeMachineRemoteSupportJobProperties object itself. + */ + public EdgeMachineRemoteSupportJobProperties withType(RemoteSupportType type) { + this.type = type; + return this; + } + + /** + * Get the reportedProperties property: log collection job reported properties. + * + * @return the reportedProperties value. + */ + public EdgeMachineRemoteSupportJobReportedProperties reportedProperties() { + return this.reportedProperties; + } + + /** + * {@inheritDoc} + */ + @Override + public EdgeMachineRemoteSupportJobProperties 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 EdgeMachineRemoteSupportJobProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of EdgeMachineRemoteSupportJobProperties 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 EdgeMachineRemoteSupportJobProperties. + */ + public static EdgeMachineRemoteSupportJobProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + EdgeMachineRemoteSupportJobProperties deserializedEdgeMachineRemoteSupportJobProperties + = new EdgeMachineRemoteSupportJobProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("deploymentMode".equals(fieldName)) { + deserializedEdgeMachineRemoteSupportJobProperties + .withDeploymentMode(DeploymentMode.fromString(reader.getString())); + } else if ("provisioningState".equals(fieldName)) { + deserializedEdgeMachineRemoteSupportJobProperties + .withProvisioningState(ProvisioningState.fromString(reader.getString())); + } else if ("jobId".equals(fieldName)) { + deserializedEdgeMachineRemoteSupportJobProperties.withJobId(reader.getString()); + } else if ("startTimeUtc".equals(fieldName)) { + deserializedEdgeMachineRemoteSupportJobProperties.withStartTimeUtc(reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString()))); + } else if ("endTimeUtc".equals(fieldName)) { + deserializedEdgeMachineRemoteSupportJobProperties.withEndTimeUtc(reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString()))); + } else if ("status".equals(fieldName)) { + deserializedEdgeMachineRemoteSupportJobProperties + .withStatus(JobStatus.fromString(reader.getString())); + } else if ("error".equals(fieldName)) { + deserializedEdgeMachineRemoteSupportJobProperties.withError(ManagementError.fromJson(reader)); + } else if ("accessLevel".equals(fieldName)) { + deserializedEdgeMachineRemoteSupportJobProperties.accessLevel + = RemoteSupportAccessLevel.fromString(reader.getString()); + } else if ("expirationTimestamp".equals(fieldName)) { + deserializedEdgeMachineRemoteSupportJobProperties.expirationTimestamp = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("type".equals(fieldName)) { + deserializedEdgeMachineRemoteSupportJobProperties.type + = RemoteSupportType.fromString(reader.getString()); + } else if ("jobType".equals(fieldName)) { + deserializedEdgeMachineRemoteSupportJobProperties.jobType + = EdgeMachineJobType.fromString(reader.getString()); + } else if ("reportedProperties".equals(fieldName)) { + deserializedEdgeMachineRemoteSupportJobProperties.reportedProperties + = EdgeMachineRemoteSupportJobReportedProperties.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedEdgeMachineRemoteSupportJobProperties; + }); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/EdgeMachineRemoteSupportJobReportedProperties.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/EdgeMachineRemoteSupportJobReportedProperties.java new file mode 100644 index 000000000000..648d16a81cfc --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/EdgeMachineRemoteSupportJobReportedProperties.java @@ -0,0 +1,146 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.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 EdgeMachineRemoteSupportJobReportedProperties + 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 EdgeMachineRemoteSupportNodeSettings nodeSettings; + + /* + * Details of the remote support session. + */ + private List sessionDetails; + + /** + * Creates an instance of EdgeMachineRemoteSupportJobReportedProperties class. + */ + private EdgeMachineRemoteSupportJobReportedProperties() { + } + + /** + * 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 EdgeMachineRemoteSupportNodeSettings 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 EdgeMachineRemoteSupportJobReportedProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of EdgeMachineRemoteSupportJobReportedProperties 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 EdgeMachineRemoteSupportJobReportedProperties. + */ + public static EdgeMachineRemoteSupportJobReportedProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + EdgeMachineRemoteSupportJobReportedProperties deserializedEdgeMachineRemoteSupportJobReportedProperties + = new EdgeMachineRemoteSupportJobReportedProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("percentComplete".equals(fieldName)) { + deserializedEdgeMachineRemoteSupportJobReportedProperties.percentComplete + = reader.getNullable(JsonReader::getInt); + } else if ("validationStatus".equals(fieldName)) { + deserializedEdgeMachineRemoteSupportJobReportedProperties.validationStatus + = EceActionStatus.fromJson(reader); + } else if ("deploymentStatus".equals(fieldName)) { + deserializedEdgeMachineRemoteSupportJobReportedProperties.deploymentStatus + = EceActionStatus.fromJson(reader); + } else if ("nodeSettings".equals(fieldName)) { + deserializedEdgeMachineRemoteSupportJobReportedProperties.nodeSettings + = EdgeMachineRemoteSupportNodeSettings.fromJson(reader); + } else if ("sessionDetails".equals(fieldName)) { + List sessionDetails + = reader.readArray(reader1 -> RemoteSupportSession.fromJson(reader1)); + deserializedEdgeMachineRemoteSupportJobReportedProperties.sessionDetails = sessionDetails; + } else { + reader.skipChildren(); + } + } + + return deserializedEdgeMachineRemoteSupportJobReportedProperties; + }); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/EdgeMachineRemoteSupportNodeSettings.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/EdgeMachineRemoteSupportNodeSettings.java new file mode 100644 index 000000000000..237a131105f0 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/EdgeMachineRemoteSupportNodeSettings.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.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 EdgeMachineRemoteSupportNodeSettings + 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 EdgeMachineRemoteSupportNodeSettings class. + */ + private EdgeMachineRemoteSupportNodeSettings() { + } + + /** + * 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 EdgeMachineRemoteSupportNodeSettings from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of EdgeMachineRemoteSupportNodeSettings 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 EdgeMachineRemoteSupportNodeSettings. + */ + public static EdgeMachineRemoteSupportNodeSettings fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + EdgeMachineRemoteSupportNodeSettings deserializedEdgeMachineRemoteSupportNodeSettings + = new EdgeMachineRemoteSupportNodeSettings(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("state".equals(fieldName)) { + deserializedEdgeMachineRemoteSupportNodeSettings.state = reader.getString(); + } else if ("createdAt".equals(fieldName)) { + deserializedEdgeMachineRemoteSupportNodeSettings.createdAt = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("updatedAt".equals(fieldName)) { + deserializedEdgeMachineRemoteSupportNodeSettings.updatedAt = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("connectionStatus".equals(fieldName)) { + deserializedEdgeMachineRemoteSupportNodeSettings.connectionStatus = reader.getString(); + } else if ("connectionErrorMessage".equals(fieldName)) { + deserializedEdgeMachineRemoteSupportNodeSettings.connectionErrorMessage = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedEdgeMachineRemoteSupportNodeSettings; + }); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/EdgeMachineReportedProperties.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/EdgeMachineReportedProperties.java new file mode 100644 index 000000000000..e067c662c1b2 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/EdgeMachineReportedProperties.java @@ -0,0 +1,175 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.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; + +/** + * Reported properties for edge machine. + */ +@Immutable +public final class EdgeMachineReportedProperties implements JsonSerializable { + /* + * Last time data reported. + */ + private OffsetDateTime lastUpdated; + + /* + * Network details for edge machine. + */ + private EdgeMachineNetworkProfile networkProfile; + + /* + * OS Properties for edge machine. + */ + private OsProfile osProfile; + + /* + * Hardware related information for edge machine. + */ + private HardwareProfile hardwareProfile; + + /* + * Storage related information for edge machine. + */ + private StorageProfile storageProfile; + + /* + * Solution builder extension (SBE) deployment package information. + */ + private SbeDeploymentPackageInfo sbeDeploymentPackageInfo; + + /* + * Extension details for edge machine. + */ + private ExtensionProfile extensionProfile; + + /** + * Creates an instance of EdgeMachineReportedProperties class. + */ + private EdgeMachineReportedProperties() { + } + + /** + * Get the lastUpdated property: Last time data reported. + * + * @return the lastUpdated value. + */ + public OffsetDateTime lastUpdated() { + return this.lastUpdated; + } + + /** + * Get the networkProfile property: Network details for edge machine. + * + * @return the networkProfile value. + */ + public EdgeMachineNetworkProfile networkProfile() { + return this.networkProfile; + } + + /** + * Get the osProfile property: OS Properties for edge machine. + * + * @return the osProfile value. + */ + public OsProfile osProfile() { + return this.osProfile; + } + + /** + * Get the hardwareProfile property: Hardware related information for edge machine. + * + * @return the hardwareProfile value. + */ + public HardwareProfile hardwareProfile() { + return this.hardwareProfile; + } + + /** + * Get the storageProfile property: Storage related information for edge machine. + * + * @return the storageProfile value. + */ + public StorageProfile storageProfile() { + return this.storageProfile; + } + + /** + * Get the sbeDeploymentPackageInfo property: Solution builder extension (SBE) deployment package information. + * + * @return the sbeDeploymentPackageInfo value. + */ + public SbeDeploymentPackageInfo sbeDeploymentPackageInfo() { + return this.sbeDeploymentPackageInfo; + } + + /** + * Get the extensionProfile property: Extension details for edge machine. + * + * @return the extensionProfile value. + */ + public ExtensionProfile extensionProfile() { + return this.extensionProfile; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of EdgeMachineReportedProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of EdgeMachineReportedProperties 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 EdgeMachineReportedProperties. + */ + public static EdgeMachineReportedProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + EdgeMachineReportedProperties deserializedEdgeMachineReportedProperties + = new EdgeMachineReportedProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("lastUpdated".equals(fieldName)) { + deserializedEdgeMachineReportedProperties.lastUpdated = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("networkProfile".equals(fieldName)) { + deserializedEdgeMachineReportedProperties.networkProfile + = EdgeMachineNetworkProfile.fromJson(reader); + } else if ("osProfile".equals(fieldName)) { + deserializedEdgeMachineReportedProperties.osProfile = OsProfile.fromJson(reader); + } else if ("hardwareProfile".equals(fieldName)) { + deserializedEdgeMachineReportedProperties.hardwareProfile = HardwareProfile.fromJson(reader); + } else if ("storageProfile".equals(fieldName)) { + deserializedEdgeMachineReportedProperties.storageProfile = StorageProfile.fromJson(reader); + } else if ("sbeDeploymentPackageInfo".equals(fieldName)) { + deserializedEdgeMachineReportedProperties.sbeDeploymentPackageInfo + = SbeDeploymentPackageInfo.fromJson(reader); + } else if ("extensionProfile".equals(fieldName)) { + deserializedEdgeMachineReportedProperties.extensionProfile = ExtensionProfile.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedEdgeMachineReportedProperties; + }); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/EdgeMachineState.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/EdgeMachineState.java new file mode 100644 index 000000000000..cf9b3e920b58 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/EdgeMachineState.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.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * OS State. + */ +public final class EdgeMachineState extends ExpandableStringEnum { + /** + * Created when EdgeMachine resource created. + */ + public static final EdgeMachineState CREATED = fromString("Created"); + + /** + * EdgeMachine state during device discovery and registration. + */ + public static final EdgeMachineState REGISTERING = fromString("Registering"); + + /** + * EdgeMachine state when machine configured with restricted OS and not provisioned to deploy workloads. + */ + public static final EdgeMachineState UNPURPOSED = fromString("Unpurposed"); + + /** + * EdgeMachine state when transitioning from initial OS to target OS. + */ + public static final EdgeMachineState TRANSITIONING = fromString("Transitioning"); + + /** + * EdgeMachine state when machine configured with target OS to deploy workloads. + */ + public static final EdgeMachineState PURPOSED = fromString("Purposed"); + + /** + * EdgeMachine state when OS updates are in-progress. + */ + public static final EdgeMachineState UPDATING = fromString("Updating"); + + /** + * EdgeMachine state when transitioning from target OS to restricted OS. + */ + public static final EdgeMachineState RESETTING = fromString("Resetting"); + + /** + * EdgeMachine failed state and only option to recover is to re-provisioning machine. + */ + public static final EdgeMachineState FAILED = fromString("Failed"); + + /** + * Preparing EdgeMachine. + */ + public static final EdgeMachineState PREPARING = fromString("Preparing"); + + /** + * Creates a new instance of EdgeMachineState value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public EdgeMachineState() { + } + + /** + * Creates or finds a EdgeMachineState from its string representation. + * + * @param name a name to look for. + * @return the corresponding EdgeMachineState. + */ + public static EdgeMachineState fromString(String name) { + return fromString(name, EdgeMachineState.class); + } + + /** + * Gets known EdgeMachineState values. + * + * @return known EdgeMachineState values. + */ + public static Collection values() { + return values(EdgeMachineState.class); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/EdgeMachines.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/EdgeMachines.java new file mode 100644 index 000000000000..73bd2ee4c34c --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/EdgeMachines.java @@ -0,0 +1,158 @@ +// 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 EdgeMachines. + */ +public interface EdgeMachines { + /** + * Get an edge machine. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param edgeMachineName 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 an edge machine along with {@link Response}. + */ + Response getByResourceGroupWithResponse(String resourceGroupName, String edgeMachineName, + Context context); + + /** + * Get an edge machine. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param edgeMachineName 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 an edge machine. + */ + EdgeMachine getByResourceGroup(String resourceGroupName, String edgeMachineName); + + /** + * Delete an edge machine. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param edgeMachineName 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. + */ + void deleteByResourceGroup(String resourceGroupName, String edgeMachineName); + + /** + * Delete an edge machine. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param edgeMachineName 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. + */ + void delete(String resourceGroupName, String edgeMachineName, Context context); + + /** + * List all edge machines 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 the response of a EdgeMachine list operation as paginated response with {@link PagedIterable}. + */ + PagedIterable listByResourceGroup(String resourceGroupName); + + /** + * List all edge machines 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 the response of a EdgeMachine list operation as paginated response with {@link PagedIterable}. + */ + PagedIterable listByResourceGroup(String resourceGroupName, Context context); + + /** + * List all edge machines 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 the response of a EdgeMachine list operation as paginated response with {@link PagedIterable}. + */ + PagedIterable list(); + + /** + * List all edge machines 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 the response of a EdgeMachine list operation as paginated response with {@link PagedIterable}. + */ + PagedIterable list(Context context); + + /** + * Get an edge machine. + * + * @param id the resource ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an edge machine along with {@link Response}. + */ + EdgeMachine getById(String id); + + /** + * Get an edge machine. + * + * @param id the resource ID. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an edge machine along with {@link Response}. + */ + Response getByIdWithResponse(String id, Context context); + + /** + * Delete an edge machine. + * + * @param id the resource ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void deleteById(String id); + + /** + * Delete an edge machine. + * + * @param id the resource ID. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void deleteByIdWithResponse(String id, Context context); + + /** + * Begins definition for a new EdgeMachine resource. + * + * @param name resource name. + * @return the first stage of the new EdgeMachine definition. + */ + EdgeMachine.DefinitionStages.Blank define(String name); +} 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/HardwareProfile.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/HardwareProfile.java new file mode 100644 index 000000000000..b8aa26933480 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/HardwareProfile.java @@ -0,0 +1,169 @@ +// 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 profile for the machine. + */ +@Immutable +public final class HardwareProfile implements JsonSerializable { + /* + * Number of cpu cores in the machine + */ + private Long cpuCores; + + /* + * Number of cpu sockets in the machine + */ + private Long cpuSockets; + + /* + * Memory capacity of the machine + */ + private Long memoryCapacityInGb; + + /* + * Model info of the machine + */ + private String model; + + /* + * manufacturer info of the machine + */ + private String manufacturer; + + /* + * Serial number of the machine + */ + private String serialNumber; + + /* + * Process type of the machine + */ + private String processorType; + + /** + * Creates an instance of HardwareProfile class. + */ + private HardwareProfile() { + } + + /** + * Get the cpuCores property: Number of cpu cores in the machine. + * + * @return the cpuCores value. + */ + public Long cpuCores() { + return this.cpuCores; + } + + /** + * Get the cpuSockets property: Number of cpu sockets in the machine. + * + * @return the cpuSockets value. + */ + public Long cpuSockets() { + return this.cpuSockets; + } + + /** + * Get the memoryCapacityInGb property: Memory capacity of the machine. + * + * @return the memoryCapacityInGb value. + */ + public Long memoryCapacityInGb() { + return this.memoryCapacityInGb; + } + + /** + * Get the model property: Model info of the machine. + * + * @return the model value. + */ + public String model() { + return this.model; + } + + /** + * Get the manufacturer property: manufacturer info of the machine. + * + * @return the manufacturer value. + */ + public String manufacturer() { + return this.manufacturer; + } + + /** + * Get the serialNumber property: Serial number of the machine. + * + * @return the serialNumber value. + */ + public String serialNumber() { + return this.serialNumber; + } + + /** + * Get the processorType property: Process type of the machine. + * + * @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 HardwareProfile from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of HardwareProfile 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 HardwareProfile. + */ + public static HardwareProfile fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + HardwareProfile deserializedHardwareProfile = new HardwareProfile(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("cpuCores".equals(fieldName)) { + deserializedHardwareProfile.cpuCores = reader.getNullable(JsonReader::getLong); + } else if ("cpuSockets".equals(fieldName)) { + deserializedHardwareProfile.cpuSockets = reader.getNullable(JsonReader::getLong); + } else if ("memoryCapacityInGb".equals(fieldName)) { + deserializedHardwareProfile.memoryCapacityInGb = reader.getNullable(JsonReader::getLong); + } else if ("model".equals(fieldName)) { + deserializedHardwareProfile.model = reader.getString(); + } else if ("manufacturer".equals(fieldName)) { + deserializedHardwareProfile.manufacturer = reader.getString(); + } else if ("serialNumber".equals(fieldName)) { + deserializedHardwareProfile.serialNumber = reader.getString(); + } else if ("processorType".equals(fieldName)) { + deserializedHardwareProfile.processorType = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedHardwareProfile; + }); + } +} 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..5eab507678a1 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; @@ -32,10 +32,15 @@ public final class HciNetworkProfile implements JsonSerializable e.validate()); - } - if (switchDetails() != null) { - switchDetails().forEach(e -> e.validate()); - } - if (hostNetwork() != null) { - hostNetwork().validate(); - } + public SdnProperties sdnProperties() { + return this.sdnProperties; } /** @@ -114,6 +111,8 @@ public static HciNetworkProfile fromJson(JsonReader jsonReader) throws IOExcepti deserializedHciNetworkProfile.switchDetails = switchDetails; } else if ("hostNetwork".equals(fieldName)) { deserializedHciNetworkProfile.hostNetwork = HciEdgeDeviceHostNetwork.fromJson(reader); + } else if ("sdnProperties".equals(fieldName)) { + deserializedHciNetworkProfile.sdnProperties = SdnProperties.fromJson(reader); } else { reader.skipChildren(); } 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..7e5d247c719d 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,14 +1,16 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.azurestackhci.models; import com.azure.core.annotation.Immutable; +import com.azure.core.util.CoreUtils; import com.azure.json.JsonReader; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; import java.io.IOException; +import java.time.OffsetDateTime; /** * The device Configuration for HCI device. @@ -31,19 +33,39 @@ 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; + + /* + * CVM support details for edge device. + */ + private ConfidentialVmProfile confidentialVmProfile; + + /* + * Most recent edge device sync timestamp in UTC. + */ + private OffsetDateTime lastSyncTimestamp; /* * 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 +96,41 @@ 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. + */ + 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; + } + + /** + * Get the confidentialVmProfile property: CVM support details for edge device. + * + * @return the confidentialVmProfile value. */ @Override - public DeviceState deviceState() { - return this.deviceState; + public ConfidentialVmProfile confidentialVmProfile() { + return this.confidentialVmProfile; + } + + /** + * Get the lastSyncTimestamp property: Most recent edge device sync timestamp in UTC. + * + * @return the lastSyncTimestamp value. + */ + @Override + public OffsetDateTime lastSyncTimestamp() { + return this.lastSyncTimestamp; } /** @@ -94,22 +144,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; } /** @@ -140,6 +181,11 @@ public static HciReportedProperties fromJson(JsonReader jsonReader) throws IOExc deserializedHciReportedProperties.deviceState = DeviceState.fromString(reader.getString()); } else if ("extensionProfile".equals(fieldName)) { deserializedHciReportedProperties.extensionProfile = ExtensionProfile.fromJson(reader); + } else if ("lastSyncTimestamp".equals(fieldName)) { + deserializedHciReportedProperties.lastSyncTimestamp = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("confidentialVmProfile".equals(fieldName)) { + deserializedHciReportedProperties.confidentialVmProfile = ConfidentialVmProfile.fromJson(reader); } else if ("networkProfile".equals(fieldName)) { deserializedHciReportedProperties.networkProfile = HciNetworkProfile.fromJson(reader); } else if ("osProfile".equals(fieldName)) { @@ -147,6 +193,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/IgvmStatus.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/IgvmStatus.java new file mode 100644 index 000000000000..c3dd10d8ddd4 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/IgvmStatus.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; + +/** + * Represents the IGVM support status for the device. + */ +public final class IgvmStatus extends ExpandableStringEnum { + /** + * The IGVM status could not be determined due to a query failure or inconsistent system state. + */ + public static final IgvmStatus UNKNOWN = fromString("Unknown"); + + /** + * IGVM support is enabled, indicating that confidential VM features are available on this device. + */ + public static final IgvmStatus ENABLED = fromString("Enabled"); + + /** + * IGVM status is disabled, indicating that confidential VM features are not supported on this device. + */ + public static final IgvmStatus DISABLED = fromString("Disabled"); + + /** + * Creates a new instance of IgvmStatus value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public IgvmStatus() { + } + + /** + * Creates or finds a IgvmStatus from its string representation. + * + * @param name a name to look for. + * @return the corresponding IgvmStatus. + */ + public static IgvmStatus fromString(String name) { + return fromString(name, IgvmStatus.class); + } + + /** + * Gets known IgvmStatus values. + * + * @return known IgvmStatus values. + */ + public static Collection values() { + return values(IgvmStatus.class); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/IgvmStatusDetail.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/IgvmStatusDetail.java new file mode 100644 index 000000000000..894bc520980d --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/IgvmStatusDetail.java @@ -0,0 +1,91 @@ +// 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; + +/** + * Provides component-level status information related to IGVM enablement on the device. + */ +@Immutable +public final class IgvmStatusDetail implements JsonSerializable { + /* + * A machine-readable status code indicating the result or condition of a specific IGVM-related check or operation. + */ + private String code; + + /* + * A human-readable message providing context or explanation for the associated status code. + */ + private String message; + + /** + * Creates an instance of IgvmStatusDetail class. + */ + private IgvmStatusDetail() { + } + + /** + * Get the code property: A machine-readable status code indicating the result or condition of a specific + * IGVM-related check or operation. + * + * @return the code value. + */ + public String code() { + return this.code; + } + + /** + * Get the message property: A human-readable message providing context or explanation for the associated status + * code. + * + * @return the message value. + */ + public String message() { + return this.message; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of IgvmStatusDetail from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of IgvmStatusDetail 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 IgvmStatusDetail. + */ + public static IgvmStatusDetail fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + IgvmStatusDetail deserializedIgvmStatusDetail = new IgvmStatusDetail(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("code".equals(fieldName)) { + deserializedIgvmStatusDetail.code = reader.getString(); + } else if ("message".equals(fieldName)) { + deserializedIgvmStatusDetail.message = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedIgvmStatusDetail; + }); + } +} 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/IpAddressRange.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/IpAddressRange.java new file mode 100644 index 000000000000..0966e0fd8b75 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/IpAddressRange.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; + +/** + * IP address range configuration. + */ +@Fluent +public final class IpAddressRange implements JsonSerializable { + /* + * Start IP address. + */ + private String startIp; + + /* + * End IP address. + */ + private String endIp; + + /** + * Creates an instance of IpAddressRange class. + */ + public IpAddressRange() { + } + + /** + * Get the startIp property: Start IP address. + * + * @return the startIp value. + */ + public String startIp() { + return this.startIp; + } + + /** + * Set the startIp property: Start IP address. + * + * @param startIp the startIp value to set. + * @return the IpAddressRange object itself. + */ + public IpAddressRange withStartIp(String startIp) { + this.startIp = startIp; + return this; + } + + /** + * Get the endIp property: End IP address. + * + * @return the endIp value. + */ + public String endIp() { + return this.endIp; + } + + /** + * Set the endIp property: End IP address. + * + * @param endIp the endIp value to set. + * @return the IpAddressRange object itself. + */ + public IpAddressRange withEndIp(String endIp) { + this.endIp = endIp; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("startIp", this.startIp); + jsonWriter.writeStringField("endIp", this.endIp); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of IpAddressRange from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of IpAddressRange 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 IpAddressRange. + */ + public static IpAddressRange fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + IpAddressRange deserializedIpAddressRange = new IpAddressRange(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("startIp".equals(fieldName)) { + deserializedIpAddressRange.startIp = reader.getString(); + } else if ("endIp".equals(fieldName)) { + deserializedIpAddressRange.endIp = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedIpAddressRange; + }); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/IpAssignmentType.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/IpAssignmentType.java new file mode 100644 index 000000000000..c1c69b174f89 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/IpAssignmentType.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; + +/** + * IP assignment types. + */ +public final class IpAssignmentType extends ExpandableStringEnum { + /** + * Automatic IP assignment. + */ + public static final IpAssignmentType AUTOMATIC = fromString("Automatic"); + + /** + * Manual IP assignment. + */ + public static final IpAssignmentType MANUAL = fromString("Manual"); + + /** + * Creates a new instance of IpAssignmentType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public IpAssignmentType() { + } + + /** + * Creates or finds a IpAssignmentType from its string representation. + * + * @param name a name to look for. + * @return the corresponding IpAssignmentType. + */ + public static IpAssignmentType fromString(String name) { + return fromString(name, IpAssignmentType.class); + } + + /** + * Gets known IpAssignmentType values. + * + * @return known IpAssignmentType values. + */ + public static Collection values() { + return values(IpAssignmentType.class); + } +} 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/KubernetesVersion.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/KubernetesVersion.java new file mode 100644 index 000000000000..92b84cb92b6a --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/KubernetesVersion.java @@ -0,0 +1,55 @@ +// 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.KubernetesVersionInner; + +/** + * An immutable client-side representation of KubernetesVersion. + */ +public interface KubernetesVersion { + /** + * Gets the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + String id(); + + /** + * Gets the name property: The name of the resource. + * + * @return the name value. + */ + String name(); + + /** + * Gets the type property: The type of the resource. + * + * @return the type value. + */ + String type(); + + /** + * Gets the properties property: The resource-specific properties for this resource. + * + * @return the properties value. + */ + KubernetesVersionProperties properties(); + + /** + * 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.KubernetesVersionInner object. + * + * @return the inner object. + */ + KubernetesVersionInner innerModel(); +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/KubernetesVersionProperties.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/KubernetesVersionProperties.java new file mode 100644 index 000000000000..15d63decddea --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/KubernetesVersionProperties.java @@ -0,0 +1,75 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.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 kubernetes version. + */ +@Immutable +public final class KubernetesVersionProperties implements JsonSerializable { + /* + * Represents kubernetes version. + */ + private String version; + + /** + * Creates an instance of KubernetesVersionProperties class. + */ + private KubernetesVersionProperties() { + } + + /** + * Get the version property: Represents kubernetes version. + * + * @return the version value. + */ + public String version() { + return this.version; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("version", this.version); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of KubernetesVersionProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of KubernetesVersionProperties 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 KubernetesVersionProperties. + */ + public static KubernetesVersionProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + KubernetesVersionProperties deserializedKubernetesVersionProperties = new KubernetesVersionProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("version".equals(fieldName)) { + deserializedKubernetesVersionProperties.version = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedKubernetesVersionProperties; + }); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/KubernetesVersions.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/KubernetesVersions.java new file mode 100644 index 000000000000..bbe213daa4bd --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/KubernetesVersions.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.models; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.util.Context; + +/** + * Resource collection API of KubernetesVersions. + */ +public interface KubernetesVersions { + /** + * List all kubernetes versions. + * + * @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 KubernetesVersion list operation as paginated response with {@link PagedIterable}. + */ + PagedIterable listBySubscriptionLocationResource(String location); + + /** + * List all kubernetes versions. + * + * @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 KubernetesVersion 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/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/NetworkAdapter.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/NetworkAdapter.java new file mode 100644 index 000000000000..1ad84fa40a58 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/NetworkAdapter.java @@ -0,0 +1,314 @@ +// 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; + +/** + * Network adapter configuration. + */ +@Fluent +public final class NetworkAdapter implements JsonSerializable { + /* + * Type of IP assignment. + */ + private IpAssignmentType ipAssignmentType; + + /* + * IP address. + */ + private String ipAddress; + + /* + * Adapter Name. + */ + private String adapterName; + + /* + * MAC address. + */ + private String macAddress; + + /* + * IP address range. + */ + private IpAddressRange ipAddressRange; + + /* + * Gateway id. + */ + private String gateway; + + /* + * Subnet mask. + */ + private String subnetMask; + + /* + * Array of DNS addresses. + */ + private List dnsAddressArray; + + /* + * VLAN ID for the network setup. + */ + private String vlanId; + + /** + * Creates an instance of NetworkAdapter class. + */ + public NetworkAdapter() { + } + + /** + * Get the ipAssignmentType property: Type of IP assignment. + * + * @return the ipAssignmentType value. + */ + public IpAssignmentType ipAssignmentType() { + return this.ipAssignmentType; + } + + /** + * Set the ipAssignmentType property: Type of IP assignment. + * + * @param ipAssignmentType the ipAssignmentType value to set. + * @return the NetworkAdapter object itself. + */ + public NetworkAdapter withIpAssignmentType(IpAssignmentType ipAssignmentType) { + this.ipAssignmentType = ipAssignmentType; + return this; + } + + /** + * Get the ipAddress property: IP address. + * + * @return the ipAddress value. + */ + public String ipAddress() { + return this.ipAddress; + } + + /** + * Set the ipAddress property: IP address. + * + * @param ipAddress the ipAddress value to set. + * @return the NetworkAdapter object itself. + */ + public NetworkAdapter withIpAddress(String ipAddress) { + this.ipAddress = ipAddress; + return this; + } + + /** + * Get the adapterName property: Adapter Name. + * + * @return the adapterName value. + */ + public String adapterName() { + return this.adapterName; + } + + /** + * Set the adapterName property: Adapter Name. + * + * @param adapterName the adapterName value to set. + * @return the NetworkAdapter object itself. + */ + public NetworkAdapter withAdapterName(String adapterName) { + this.adapterName = adapterName; + return this; + } + + /** + * Get the macAddress property: MAC address. + * + * @return the macAddress value. + */ + public String macAddress() { + return this.macAddress; + } + + /** + * Set the macAddress property: MAC address. + * + * @param macAddress the macAddress value to set. + * @return the NetworkAdapter object itself. + */ + public NetworkAdapter withMacAddress(String macAddress) { + this.macAddress = macAddress; + return this; + } + + /** + * Get the ipAddressRange property: IP address range. + * + * @return the ipAddressRange value. + */ + public IpAddressRange ipAddressRange() { + return this.ipAddressRange; + } + + /** + * Set the ipAddressRange property: IP address range. + * + * @param ipAddressRange the ipAddressRange value to set. + * @return the NetworkAdapter object itself. + */ + public NetworkAdapter withIpAddressRange(IpAddressRange ipAddressRange) { + this.ipAddressRange = ipAddressRange; + return this; + } + + /** + * Get the gateway property: Gateway id. + * + * @return the gateway value. + */ + public String gateway() { + return this.gateway; + } + + /** + * Set the gateway property: Gateway id. + * + * @param gateway the gateway value to set. + * @return the NetworkAdapter object itself. + */ + public NetworkAdapter withGateway(String gateway) { + this.gateway = gateway; + return this; + } + + /** + * Get the subnetMask property: Subnet mask. + * + * @return the subnetMask value. + */ + public String subnetMask() { + return this.subnetMask; + } + + /** + * Set the subnetMask property: Subnet mask. + * + * @param subnetMask the subnetMask value to set. + * @return the NetworkAdapter object itself. + */ + public NetworkAdapter withSubnetMask(String subnetMask) { + this.subnetMask = subnetMask; + return this; + } + + /** + * Get the dnsAddressArray property: Array of DNS addresses. + * + * @return the dnsAddressArray value. + */ + public List dnsAddressArray() { + return this.dnsAddressArray; + } + + /** + * Set the dnsAddressArray property: Array of DNS addresses. + * + * @param dnsAddressArray the dnsAddressArray value to set. + * @return the NetworkAdapter object itself. + */ + public NetworkAdapter withDnsAddressArray(List dnsAddressArray) { + this.dnsAddressArray = dnsAddressArray; + return this; + } + + /** + * Get the vlanId property: VLAN ID for the network setup. + * + * @return the vlanId value. + */ + public String vlanId() { + return this.vlanId; + } + + /** + * Set the vlanId property: VLAN ID for the network setup. + * + * @param vlanId the vlanId value to set. + * @return the NetworkAdapter object itself. + */ + public NetworkAdapter withVlanId(String vlanId) { + this.vlanId = vlanId; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("ipAssignmentType", + this.ipAssignmentType == null ? null : this.ipAssignmentType.toString()); + jsonWriter.writeStringField("ipAddress", this.ipAddress); + jsonWriter.writeStringField("adapterName", this.adapterName); + jsonWriter.writeStringField("macAddress", this.macAddress); + jsonWriter.writeJsonField("ipAddressRange", this.ipAddressRange); + jsonWriter.writeStringField("gateway", this.gateway); + jsonWriter.writeStringField("subnetMask", this.subnetMask); + jsonWriter.writeArrayField("dnsAddressArray", this.dnsAddressArray, + (writer, element) -> writer.writeString(element)); + jsonWriter.writeStringField("vlanId", this.vlanId); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of NetworkAdapter from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of NetworkAdapter 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 NetworkAdapter. + */ + public static NetworkAdapter fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + NetworkAdapter deserializedNetworkAdapter = new NetworkAdapter(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("ipAssignmentType".equals(fieldName)) { + deserializedNetworkAdapter.ipAssignmentType = IpAssignmentType.fromString(reader.getString()); + } else if ("ipAddress".equals(fieldName)) { + deserializedNetworkAdapter.ipAddress = reader.getString(); + } else if ("adapterName".equals(fieldName)) { + deserializedNetworkAdapter.adapterName = reader.getString(); + } else if ("macAddress".equals(fieldName)) { + deserializedNetworkAdapter.macAddress = reader.getString(); + } else if ("ipAddressRange".equals(fieldName)) { + deserializedNetworkAdapter.ipAddressRange = IpAddressRange.fromJson(reader); + } else if ("gateway".equals(fieldName)) { + deserializedNetworkAdapter.gateway = reader.getString(); + } else if ("subnetMask".equals(fieldName)) { + deserializedNetworkAdapter.subnetMask = reader.getString(); + } else if ("dnsAddressArray".equals(fieldName)) { + List dnsAddressArray = reader.readArray(reader1 -> reader1.getString()); + deserializedNetworkAdapter.dnsAddressArray = dnsAddressArray; + } else if ("vlanId".equals(fieldName)) { + deserializedNetworkAdapter.vlanId = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedNetworkAdapter; + }); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/NetworkConfiguration.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/NetworkConfiguration.java new file mode 100644 index 000000000000..eac07a0b35a0 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/NetworkConfiguration.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; + +/** + * Network configuration. + */ +@Fluent +public final class NetworkConfiguration implements JsonSerializable { + /* + * List of network adapters. + */ + private List networkAdapters; + + /** + * Creates an instance of NetworkConfiguration class. + */ + public NetworkConfiguration() { + } + + /** + * Get the networkAdapters property: List of network adapters. + * + * @return the networkAdapters value. + */ + public List networkAdapters() { + return this.networkAdapters; + } + + /** + * Set the networkAdapters property: List of network adapters. + * + * @param networkAdapters the networkAdapters value to set. + * @return the NetworkConfiguration object itself. + */ + public NetworkConfiguration withNetworkAdapters(List networkAdapters) { + this.networkAdapters = networkAdapters; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("networkAdapters", this.networkAdapters, + (writer, element) -> writer.writeJson(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of NetworkConfiguration from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of NetworkConfiguration 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 NetworkConfiguration. + */ + public static NetworkConfiguration fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + NetworkConfiguration deserializedNetworkConfiguration = new NetworkConfiguration(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("networkAdapters".equals(fieldName)) { + List networkAdapters + = reader.readArray(reader1 -> NetworkAdapter.fromJson(reader1)); + deserializedNetworkConfiguration.networkAdapters = networkAdapters; + } else { + reader.skipChildren(); + } + } + + return deserializedNetworkConfiguration; + }); + } +} 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/OSOperationType.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/OSOperationType.java new file mode 100644 index 000000000000..53241bc54cf8 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/OSOperationType.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; + +/** + * OS Provision Operation type. + */ +public final class OSOperationType extends ExpandableStringEnum { + /** + * OS Provisioning operation. + */ + public static final OSOperationType PROVISION = fromString("Provision"); + + /** + * OS Update operation. + */ + public static final OSOperationType UPDATE = fromString("Update"); + + /** + * OS ReImage operation. + */ + public static final OSOperationType RE_IMAGE = fromString("ReImage"); + + /** + * Creates a new instance of OSOperationType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public OSOperationType() { + } + + /** + * Creates or finds a OSOperationType from its string representation. + * + * @param name a name to look for. + * @return the corresponding OSOperationType. + */ + public static OSOperationType fromString(String name) { + return fromString(name, OSOperationType.class); + } + + /** + * Gets known OSOperationType values. + * + * @return known OSOperationType values. + */ + public static Collection values() { + return values(OSOperationType.class); + } +} 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/OnboardingConfiguration.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/OnboardingConfiguration.java new file mode 100644 index 000000000000..fbe4d3c8dea9 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/OnboardingConfiguration.java @@ -0,0 +1,197 @@ +// 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; + +/** + * Onboarding configuration. + */ +@Fluent +public final class OnboardingConfiguration implements JsonSerializable { + /* + * Type of the onboarding resource to support polymorphic resource. + */ + private OnboardingResourceType type; + + /* + * Resource ID. + */ + private String resourceId; + + /* + * Location of the resource. + */ + private String location; + + /* + * Tenant ID of the resource. + */ + private String tenantId; + + /* + * Azure Arc virtual machine ID. + */ + private String arcVirtualMachineId; + + /** + * Creates an instance of OnboardingConfiguration class. + */ + public OnboardingConfiguration() { + } + + /** + * Get the type property: Type of the onboarding resource to support polymorphic resource. + * + * @return the type value. + */ + public OnboardingResourceType type() { + return this.type; + } + + /** + * Set the type property: Type of the onboarding resource to support polymorphic resource. + * + * @param type the type value to set. + * @return the OnboardingConfiguration object itself. + */ + public OnboardingConfiguration withType(OnboardingResourceType type) { + this.type = type; + return this; + } + + /** + * Get the resourceId property: Resource ID. + * + * @return the resourceId value. + */ + public String resourceId() { + return this.resourceId; + } + + /** + * Set the resourceId property: Resource ID. + * + * @param resourceId the resourceId value to set. + * @return the OnboardingConfiguration object itself. + */ + public OnboardingConfiguration withResourceId(String resourceId) { + this.resourceId = resourceId; + return this; + } + + /** + * Get the location property: Location of the resource. + * + * @return the location value. + */ + public String location() { + return this.location; + } + + /** + * Set the location property: Location of the resource. + * + * @param location the location value to set. + * @return the OnboardingConfiguration object itself. + */ + public OnboardingConfiguration withLocation(String location) { + this.location = location; + return this; + } + + /** + * Get the tenantId property: Tenant ID of the resource. + * + * @return the tenantId value. + */ + public String tenantId() { + return this.tenantId; + } + + /** + * Set the tenantId property: Tenant ID of the resource. + * + * @param tenantId the tenantId value to set. + * @return the OnboardingConfiguration object itself. + */ + public OnboardingConfiguration withTenantId(String tenantId) { + this.tenantId = tenantId; + return this; + } + + /** + * Get the arcVirtualMachineId property: Azure Arc virtual machine ID. + * + * @return the arcVirtualMachineId value. + */ + public String arcVirtualMachineId() { + return this.arcVirtualMachineId; + } + + /** + * Set the arcVirtualMachineId property: Azure Arc virtual machine ID. + * + * @param arcVirtualMachineId the arcVirtualMachineId value to set. + * @return the OnboardingConfiguration object itself. + */ + public OnboardingConfiguration withArcVirtualMachineId(String arcVirtualMachineId) { + this.arcVirtualMachineId = arcVirtualMachineId; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("type", this.type == null ? null : this.type.toString()); + jsonWriter.writeStringField("resourceId", this.resourceId); + jsonWriter.writeStringField("location", this.location); + jsonWriter.writeStringField("tenantId", this.tenantId); + jsonWriter.writeStringField("arcVirtualMachineId", this.arcVirtualMachineId); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of OnboardingConfiguration from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of OnboardingConfiguration 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 OnboardingConfiguration. + */ + public static OnboardingConfiguration fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + OnboardingConfiguration deserializedOnboardingConfiguration = new OnboardingConfiguration(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("type".equals(fieldName)) { + deserializedOnboardingConfiguration.type = OnboardingResourceType.fromString(reader.getString()); + } else if ("resourceId".equals(fieldName)) { + deserializedOnboardingConfiguration.resourceId = reader.getString(); + } else if ("location".equals(fieldName)) { + deserializedOnboardingConfiguration.location = reader.getString(); + } else if ("tenantId".equals(fieldName)) { + deserializedOnboardingConfiguration.tenantId = reader.getString(); + } else if ("arcVirtualMachineId".equals(fieldName)) { + deserializedOnboardingConfiguration.arcVirtualMachineId = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedOnboardingConfiguration; + }); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/OnboardingResourceType.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/OnboardingResourceType.java new file mode 100644 index 000000000000..f53bdad5b6cd --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/OnboardingResourceType.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; + +/** + * Onboarding resource type. + */ +public final class OnboardingResourceType extends ExpandableStringEnum { + /** + * Hybrid Compute Machine. + */ + public static final OnboardingResourceType HYBRID_COMPUTE_MACHINE = fromString("HybridComputeMachine"); + + /** + * Creates a new instance of OnboardingResourceType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public OnboardingResourceType() { + } + + /** + * Creates or finds a OnboardingResourceType from its string representation. + * + * @param name a name to look for. + * @return the corresponding OnboardingResourceType. + */ + public static OnboardingResourceType fromString(String name) { + return fromString(name, OnboardingResourceType.class); + } + + /** + * Gets known OnboardingResourceType values. + * + * @return known OnboardingResourceType values. + */ + public static Collection values() { + return values(OnboardingResourceType.class); + } +} 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/OperationDetail.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/OperationDetail.java new file mode 100644 index 000000000000..9c25f3aa5320 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/OperationDetail.java @@ -0,0 +1,170 @@ +// 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.management.exception.ManagementError; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * operation detail. + */ +@Immutable +public final class OperationDetail implements JsonSerializable { + /* + * operation name. + */ + private String name; + + /* + * operation id. + */ + private String id; + + /* + * operation type. + */ + private String type; + + /* + * operation resource id. + */ + private String resourceId; + + /* + * operation description. + */ + private String description; + + /* + * operation status. + */ + private String status; + + /* + * error details. + */ + private ManagementError error; + + /** + * Creates an instance of OperationDetail class. + */ + private OperationDetail() { + } + + /** + * Get the name property: operation name. + * + * @return the name value. + */ + public String name() { + return this.name; + } + + /** + * Get the id property: operation id. + * + * @return the id value. + */ + public String id() { + return this.id; + } + + /** + * Get the type property: operation type. + * + * @return the type value. + */ + public String type() { + return this.type; + } + + /** + * Get the resourceId property: operation resource id. + * + * @return the resourceId value. + */ + public String resourceId() { + return this.resourceId; + } + + /** + * Get the description property: operation description. + * + * @return the description value. + */ + public String description() { + return this.description; + } + + /** + * Get the status property: operation status. + * + * @return the status value. + */ + public String status() { + return this.status; + } + + /** + * Get the error property: error details. + * + * @return the error value. + */ + public ManagementError error() { + return this.error; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of OperationDetail from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of OperationDetail 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 OperationDetail. + */ + public static OperationDetail fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + OperationDetail deserializedOperationDetail = new OperationDetail(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("name".equals(fieldName)) { + deserializedOperationDetail.name = reader.getString(); + } else if ("id".equals(fieldName)) { + deserializedOperationDetail.id = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedOperationDetail.type = reader.getString(); + } else if ("resourceId".equals(fieldName)) { + deserializedOperationDetail.resourceId = reader.getString(); + } else if ("description".equals(fieldName)) { + deserializedOperationDetail.description = reader.getString(); + } else if ("status".equals(fieldName)) { + deserializedOperationDetail.status = reader.getString(); + } else if ("error".equals(fieldName)) { + deserializedOperationDetail.error = ManagementError.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedOperationDetail; + }); + } +} 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..51ad5cabbd7a 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 and 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/OsImage.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/OsImage.java new file mode 100644 index 000000000000..3a1b241cb3a7 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/OsImage.java @@ -0,0 +1,55 @@ +// 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.OsImageInner; + +/** + * An immutable client-side representation of OsImage. + */ +public interface OsImage { + /** + * Gets the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + String id(); + + /** + * Gets the name property: The name of the resource. + * + * @return the name value. + */ + String name(); + + /** + * Gets the type property: The type of the resource. + * + * @return the type value. + */ + String type(); + + /** + * Gets the properties property: The resource-specific properties for this resource. + * + * @return the properties value. + */ + OsImageProperties properties(); + + /** + * 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.OsImageInner object. + * + * @return the inner object. + */ + OsImageInner innerModel(); +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/OsImageProperties.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/OsImageProperties.java new file mode 100644 index 000000000000..05821d89410d --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/OsImageProperties.java @@ -0,0 +1,125 @@ +// 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 os image resource. + */ +@Immutable +public final class OsImageProperties implements JsonSerializable { + /* + * Represents validated solution recipe version of a os image. + */ + private String validatedSolutionRecipeVersion; + + /* + * Represents composed image version of a os image. + */ + private String composedImageVersion; + + /* + * Represents composed image iso download url of a os image. + */ + private String composedImageIsoUrl; + + /* + * Represents composed image iso hash of a os image. + */ + private String composedImageIsoHash; + + /** + * Creates an instance of OsImageProperties class. + */ + private OsImageProperties() { + } + + /** + * Get the validatedSolutionRecipeVersion property: Represents validated solution recipe version of a os image. + * + * @return the validatedSolutionRecipeVersion value. + */ + public String validatedSolutionRecipeVersion() { + return this.validatedSolutionRecipeVersion; + } + + /** + * Get the composedImageVersion property: Represents composed image version of a os image. + * + * @return the composedImageVersion value. + */ + public String composedImageVersion() { + return this.composedImageVersion; + } + + /** + * Get the composedImageIsoUrl property: Represents composed image iso download url of a os image. + * + * @return the composedImageIsoUrl value. + */ + public String composedImageIsoUrl() { + return this.composedImageIsoUrl; + } + + /** + * Get the composedImageIsoHash property: Represents composed image iso hash of a os image. + * + * @return the composedImageIsoHash value. + */ + public String composedImageIsoHash() { + return this.composedImageIsoHash; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("validatedSolutionRecipeVersion", this.validatedSolutionRecipeVersion); + jsonWriter.writeStringField("composedImageVersion", this.composedImageVersion); + jsonWriter.writeStringField("composedImageIsoUrl", this.composedImageIsoUrl); + jsonWriter.writeStringField("composedImageIsoHash", this.composedImageIsoHash); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of OsImageProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of OsImageProperties 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 OsImageProperties. + */ + public static OsImageProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + OsImageProperties deserializedOsImageProperties = new OsImageProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("validatedSolutionRecipeVersion".equals(fieldName)) { + deserializedOsImageProperties.validatedSolutionRecipeVersion = reader.getString(); + } else if ("composedImageVersion".equals(fieldName)) { + deserializedOsImageProperties.composedImageVersion = reader.getString(); + } else if ("composedImageIsoUrl".equals(fieldName)) { + deserializedOsImageProperties.composedImageIsoUrl = reader.getString(); + } else if ("composedImageIsoHash".equals(fieldName)) { + deserializedOsImageProperties.composedImageIsoHash = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedOsImageProperties; + }); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/OsImages.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/OsImages.java new file mode 100644 index 000000000000..9e536d5f131c --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/OsImages.java @@ -0,0 +1,62 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.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 OsImages. + */ +public interface OsImages { + /** + * Get a os image. + * + * @param location The name of the Azure region. + * @param osImageName The name of the OsImage. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a os image along with {@link Response}. + */ + Response getWithResponse(String location, String osImageName, Context context); + + /** + * Get a os image. + * + * @param location The name of the Azure region. + * @param osImageName The name of the OsImage. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a os image. + */ + OsImage get(String location, String osImageName); + + /** + * List all os images. + * + * @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 OsImage list operation as paginated response with {@link PagedIterable}. + */ + PagedIterable listBySubscriptionLocationResource(String location); + + /** + * List all os images. + * + * @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 OsImage 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/OsProfile.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/OsProfile.java new file mode 100644 index 000000000000..ae501c4d5575 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/OsProfile.java @@ -0,0 +1,186 @@ +// 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; + +/** + * OS configurations for HCI device. + */ +@Immutable +public final class OsProfile implements JsonSerializable { + /* + * The boot type of the device. e.g. UEFI, Legacy etc + */ + private String bootType; + + /* + * Version of assembly present on device + */ + private String assemblyVersion; + + /* + * OS type (“windows", “linux”) + */ + private String osType; + + /* + * OS SKU (e.g., “ Microsoft Azure Linux ROE“, “Azure Stack HCI", "Microsoft Azure Linux 3.0") + */ + private String osSku; + + /* + * OS Version + */ + private String osVersion; + + /* + * OS Build Number + */ + private String buildNumber; + + /* + * OS Base Image Version + */ + private String baseImageVersion; + + /* + * OS Image Version + */ + private String imageVersion; + + /** + * Creates an instance of OsProfile class. + */ + private OsProfile() { + } + + /** + * Get the bootType property: The boot type of the device. e.g. UEFI, Legacy etc. + * + * @return the bootType value. + */ + public String bootType() { + return this.bootType; + } + + /** + * Get the assemblyVersion property: Version of assembly present on device. + * + * @return the assemblyVersion value. + */ + public String assemblyVersion() { + return this.assemblyVersion; + } + + /** + * Get the osType property: OS type (“windows", “linux”). + * + * @return the osType value. + */ + public String osType() { + return this.osType; + } + + /** + * Get the osSku property: OS SKU (e.g., “ Microsoft Azure Linux ROE“, “Azure Stack HCI", "Microsoft Azure Linux + * 3.0"). + * + * @return the osSku value. + */ + public String osSku() { + return this.osSku; + } + + /** + * Get the osVersion property: OS Version. + * + * @return the osVersion value. + */ + public String osVersion() { + return this.osVersion; + } + + /** + * Get the buildNumber property: OS Build Number. + * + * @return the buildNumber value. + */ + public String buildNumber() { + return this.buildNumber; + } + + /** + * Get the baseImageVersion property: OS Base Image Version. + * + * @return the baseImageVersion value. + */ + public String baseImageVersion() { + return this.baseImageVersion; + } + + /** + * Get the imageVersion property: OS Image Version. + * + * @return the imageVersion value. + */ + public String imageVersion() { + return this.imageVersion; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of OsProfile from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of OsProfile 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 OsProfile. + */ + public static OsProfile fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + OsProfile deserializedOsProfile = new OsProfile(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("bootType".equals(fieldName)) { + deserializedOsProfile.bootType = reader.getString(); + } else if ("assemblyVersion".equals(fieldName)) { + deserializedOsProfile.assemblyVersion = reader.getString(); + } else if ("osType".equals(fieldName)) { + deserializedOsProfile.osType = reader.getString(); + } else if ("osSku".equals(fieldName)) { + deserializedOsProfile.osSku = reader.getString(); + } else if ("osVersion".equals(fieldName)) { + deserializedOsProfile.osVersion = reader.getString(); + } else if ("buildNumber".equals(fieldName)) { + deserializedOsProfile.buildNumber = reader.getString(); + } else if ("baseImageVersion".equals(fieldName)) { + deserializedOsProfile.baseImageVersion = reader.getString(); + } else if ("imageVersion".equals(fieldName)) { + deserializedOsProfile.imageVersion = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedOsProfile; + }); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/OsProvisionProfile.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/OsProvisionProfile.java new file mode 100644 index 000000000000..fb789f3eaf72 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/OsProvisionProfile.java @@ -0,0 +1,281 @@ +// 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; + +/** + * Operating system profile. + */ +@Fluent +public final class OsProvisionProfile implements JsonSerializable { + /* + * Name of the operating system. + */ + private String osName; + + /* + * Type of the operating system. + */ + private String osType; + + /* + * Version of the operating system. + */ + private String osVersion; + + /* + * Location of the operating system image. + */ + private String osImageLocation; + + /* + * Validated Solution Recipe version to be used for the job + */ + private String vsrVersion; + + /* + * Hash of the OS package downloaded + */ + private String imageHash; + + /* + * GPG Public Key used for package verification + */ + private String gpgPubKey; + + /* + * Operation sub type of OS Provisioning + */ + private OSOperationType operationType; + + /** + * Creates an instance of OsProvisionProfile class. + */ + public OsProvisionProfile() { + } + + /** + * Get the osName property: Name of the operating system. + * + * @return the osName value. + */ + public String osName() { + return this.osName; + } + + /** + * Set the osName property: Name of the operating system. + * + * @param osName the osName value to set. + * @return the OsProvisionProfile object itself. + */ + public OsProvisionProfile withOsName(String osName) { + this.osName = osName; + return this; + } + + /** + * Get the osType property: Type of the operating system. + * + * @return the osType value. + */ + public String osType() { + return this.osType; + } + + /** + * Set the osType property: Type of the operating system. + * + * @param osType the osType value to set. + * @return the OsProvisionProfile object itself. + */ + public OsProvisionProfile withOsType(String osType) { + this.osType = osType; + return this; + } + + /** + * Get the osVersion property: Version of the operating system. + * + * @return the osVersion value. + */ + public String osVersion() { + return this.osVersion; + } + + /** + * Set the osVersion property: Version of the operating system. + * + * @param osVersion the osVersion value to set. + * @return the OsProvisionProfile object itself. + */ + public OsProvisionProfile withOsVersion(String osVersion) { + this.osVersion = osVersion; + return this; + } + + /** + * Get the osImageLocation property: Location of the operating system image. + * + * @return the osImageLocation value. + */ + public String osImageLocation() { + return this.osImageLocation; + } + + /** + * Set the osImageLocation property: Location of the operating system image. + * + * @param osImageLocation the osImageLocation value to set. + * @return the OsProvisionProfile object itself. + */ + public OsProvisionProfile withOsImageLocation(String osImageLocation) { + this.osImageLocation = osImageLocation; + return this; + } + + /** + * Get the vsrVersion property: Validated Solution Recipe version to be used for the job. + * + * @return the vsrVersion value. + */ + public String vsrVersion() { + return this.vsrVersion; + } + + /** + * Set the vsrVersion property: Validated Solution Recipe version to be used for the job. + * + * @param vsrVersion the vsrVersion value to set. + * @return the OsProvisionProfile object itself. + */ + public OsProvisionProfile withVsrVersion(String vsrVersion) { + this.vsrVersion = vsrVersion; + return this; + } + + /** + * Get the imageHash property: Hash of the OS package downloaded. + * + * @return the imageHash value. + */ + public String imageHash() { + return this.imageHash; + } + + /** + * Set the imageHash property: Hash of the OS package downloaded. + * + * @param imageHash the imageHash value to set. + * @return the OsProvisionProfile object itself. + */ + public OsProvisionProfile withImageHash(String imageHash) { + this.imageHash = imageHash; + return this; + } + + /** + * Get the gpgPubKey property: GPG Public Key used for package verification. + * + * @return the gpgPubKey value. + */ + public String gpgPubKey() { + return this.gpgPubKey; + } + + /** + * Set the gpgPubKey property: GPG Public Key used for package verification. + * + * @param gpgPubKey the gpgPubKey value to set. + * @return the OsProvisionProfile object itself. + */ + public OsProvisionProfile withGpgPubKey(String gpgPubKey) { + this.gpgPubKey = gpgPubKey; + return this; + } + + /** + * Get the operationType property: Operation sub type of OS Provisioning. + * + * @return the operationType value. + */ + public OSOperationType operationType() { + return this.operationType; + } + + /** + * Set the operationType property: Operation sub type of OS Provisioning. + * + * @param operationType the operationType value to set. + * @return the OsProvisionProfile object itself. + */ + public OsProvisionProfile withOperationType(OSOperationType operationType) { + this.operationType = operationType; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("osName", this.osName); + jsonWriter.writeStringField("osType", this.osType); + jsonWriter.writeStringField("osVersion", this.osVersion); + jsonWriter.writeStringField("osImageLocation", this.osImageLocation); + jsonWriter.writeStringField("vsrVersion", this.vsrVersion); + jsonWriter.writeStringField("imageHash", this.imageHash); + jsonWriter.writeStringField("gpgPubKey", this.gpgPubKey); + jsonWriter.writeStringField("operationType", this.operationType == null ? null : this.operationType.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of OsProvisionProfile from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of OsProvisionProfile 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 OsProvisionProfile. + */ + public static OsProvisionProfile fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + OsProvisionProfile deserializedOsProvisionProfile = new OsProvisionProfile(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("osName".equals(fieldName)) { + deserializedOsProvisionProfile.osName = reader.getString(); + } else if ("osType".equals(fieldName)) { + deserializedOsProvisionProfile.osType = reader.getString(); + } else if ("osVersion".equals(fieldName)) { + deserializedOsProvisionProfile.osVersion = reader.getString(); + } else if ("osImageLocation".equals(fieldName)) { + deserializedOsProvisionProfile.osImageLocation = reader.getString(); + } else if ("vsrVersion".equals(fieldName)) { + deserializedOsProvisionProfile.vsrVersion = reader.getString(); + } else if ("imageHash".equals(fieldName)) { + deserializedOsProvisionProfile.imageHash = reader.getString(); + } else if ("gpgPubKey".equals(fieldName)) { + deserializedOsProvisionProfile.gpgPubKey = reader.getString(); + } else if ("operationType".equals(fieldName)) { + deserializedOsProvisionProfile.operationType = OSOperationType.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedOsProvisionProfile; + }); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/OwnerKeyType.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/OwnerKeyType.java new file mode 100644 index 000000000000..f4bc7645ac2d --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/OwnerKeyType.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 owner key in the voucher. + */ +public final class OwnerKeyType extends ExpandableStringEnum { + /** + * Owner is Microsoft managed key. + */ + public static final OwnerKeyType MICROSOFT_MANAGED = fromString("MicrosoftManaged"); + + /** + * Creates a new instance of OwnerKeyType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public OwnerKeyType() { + } + + /** + * Creates or finds a OwnerKeyType from its string representation. + * + * @param name a name to look for. + * @return the corresponding OwnerKeyType. + */ + public static OwnerKeyType fromString(String name) { + return fromString(name, OwnerKeyType.class); + } + + /** + * Gets known OwnerKeyType values. + * + * @return known OwnerKeyType values. + */ + public static Collection values() { + return values(OwnerKeyType.class); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/OwnershipVoucherDetails.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/OwnershipVoucherDetails.java new file mode 100644 index 000000000000..a9cf694f47f6 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/OwnershipVoucherDetails.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; + +/** + * Details for ownership voucher. + */ +@Fluent +public final class OwnershipVoucherDetails implements JsonSerializable { + /* + * Ownership voucher in base64 encoded format + */ + private String ownershipVoucher; + + /* + * Owner key type + */ + private OwnerKeyType ownerKeyType; + + /** + * Creates an instance of OwnershipVoucherDetails class. + */ + public OwnershipVoucherDetails() { + } + + /** + * Get the ownershipVoucher property: Ownership voucher in base64 encoded format. + * + * @return the ownershipVoucher value. + */ + public String ownershipVoucher() { + return this.ownershipVoucher; + } + + /** + * Set the ownershipVoucher property: Ownership voucher in base64 encoded format. + * + * @param ownershipVoucher the ownershipVoucher value to set. + * @return the OwnershipVoucherDetails object itself. + */ + public OwnershipVoucherDetails withOwnershipVoucher(String ownershipVoucher) { + this.ownershipVoucher = ownershipVoucher; + return this; + } + + /** + * Get the ownerKeyType property: Owner key type. + * + * @return the ownerKeyType value. + */ + public OwnerKeyType ownerKeyType() { + return this.ownerKeyType; + } + + /** + * Set the ownerKeyType property: Owner key type. + * + * @param ownerKeyType the ownerKeyType value to set. + * @return the OwnershipVoucherDetails object itself. + */ + public OwnershipVoucherDetails withOwnerKeyType(OwnerKeyType ownerKeyType) { + this.ownerKeyType = ownerKeyType; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("ownershipVoucher", this.ownershipVoucher); + jsonWriter.writeStringField("ownerKeyType", this.ownerKeyType == null ? null : this.ownerKeyType.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of OwnershipVoucherDetails from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of OwnershipVoucherDetails 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 OwnershipVoucherDetails. + */ + public static OwnershipVoucherDetails fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + OwnershipVoucherDetails deserializedOwnershipVoucherDetails = new OwnershipVoucherDetails(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("ownershipVoucher".equals(fieldName)) { + deserializedOwnershipVoucherDetails.ownershipVoucher = reader.getString(); + } else if ("ownerKeyType".equals(fieldName)) { + deserializedOwnershipVoucherDetails.ownerKeyType = OwnerKeyType.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedOwnershipVoucherDetails; + }); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/OwnershipVoucherValidationDetails.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/OwnershipVoucherValidationDetails.java new file mode 100644 index 000000000000..1867a0d2a6f5 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/OwnershipVoucherValidationDetails.java @@ -0,0 +1,197 @@ +// 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.management.exception.ManagementError; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Ownership Voucher Validation Details. + */ +@Immutable +public final class OwnershipVoucherValidationDetails implements JsonSerializable { + /* + * The ownership voucher validation status. + */ + private OwnershipVoucherValidationStatus validationStatus; + + /* + * Serial number of the device. + */ + private String serialNumber; + + /* + * FDO guid of the Ownership Voucher. + */ + private String id; + + /* + * Name of the manufacturer. + */ + private String manufacturer; + + /* + * Name of the model. + */ + private String modelName; + + /* + * Version of the Ownership Voucher format + */ + private String version; + + /* + * Azure Machine Id of the Ownership voucher + */ + private String azureMachineId; + + /* + * Error details if the validation failed. + */ + private ManagementError error; + + /** + * Creates an instance of OwnershipVoucherValidationDetails class. + */ + private OwnershipVoucherValidationDetails() { + } + + /** + * Get the validationStatus property: The ownership voucher validation status. + * + * @return the validationStatus value. + */ + public OwnershipVoucherValidationStatus validationStatus() { + return this.validationStatus; + } + + /** + * Get the serialNumber property: Serial number of the device. + * + * @return the serialNumber value. + */ + public String serialNumber() { + return this.serialNumber; + } + + /** + * Get the id property: FDO guid of the Ownership Voucher. + * + * @return the id value. + */ + public String id() { + return this.id; + } + + /** + * Get the manufacturer property: Name of the manufacturer. + * + * @return the manufacturer value. + */ + public String manufacturer() { + return this.manufacturer; + } + + /** + * Get the modelName property: Name of the model. + * + * @return the modelName value. + */ + public String modelName() { + return this.modelName; + } + + /** + * Get the version property: Version of the Ownership Voucher format. + * + * @return the version value. + */ + public String version() { + return this.version; + } + + /** + * Get the azureMachineId property: Azure Machine Id of the Ownership voucher. + * + * @return the azureMachineId value. + */ + public String azureMachineId() { + return this.azureMachineId; + } + + /** + * Get the error property: Error details if the validation failed. + * + * @return the error value. + */ + public ManagementError error() { + return this.error; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("validationStatus", + this.validationStatus == null ? null : this.validationStatus.toString()); + jsonWriter.writeStringField("serialNumber", this.serialNumber); + jsonWriter.writeStringField("id", this.id); + jsonWriter.writeStringField("manufacturer", this.manufacturer); + jsonWriter.writeStringField("modelName", this.modelName); + jsonWriter.writeStringField("version", this.version); + jsonWriter.writeStringField("azureMachineId", this.azureMachineId); + jsonWriter.writeJsonField("error", this.error); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of OwnershipVoucherValidationDetails from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of OwnershipVoucherValidationDetails 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 OwnershipVoucherValidationDetails. + */ + public static OwnershipVoucherValidationDetails fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + OwnershipVoucherValidationDetails deserializedOwnershipVoucherValidationDetails + = new OwnershipVoucherValidationDetails(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("validationStatus".equals(fieldName)) { + deserializedOwnershipVoucherValidationDetails.validationStatus + = OwnershipVoucherValidationStatus.fromString(reader.getString()); + } else if ("serialNumber".equals(fieldName)) { + deserializedOwnershipVoucherValidationDetails.serialNumber = reader.getString(); + } else if ("id".equals(fieldName)) { + deserializedOwnershipVoucherValidationDetails.id = reader.getString(); + } else if ("manufacturer".equals(fieldName)) { + deserializedOwnershipVoucherValidationDetails.manufacturer = reader.getString(); + } else if ("modelName".equals(fieldName)) { + deserializedOwnershipVoucherValidationDetails.modelName = reader.getString(); + } else if ("version".equals(fieldName)) { + deserializedOwnershipVoucherValidationDetails.version = reader.getString(); + } else if ("azureMachineId".equals(fieldName)) { + deserializedOwnershipVoucherValidationDetails.azureMachineId = reader.getString(); + } else if ("error".equals(fieldName)) { + deserializedOwnershipVoucherValidationDetails.error = ManagementError.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedOwnershipVoucherValidationDetails; + }); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/OwnershipVoucherValidationStatus.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/OwnershipVoucherValidationStatus.java new file mode 100644 index 000000000000..e93605db9ba2 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/OwnershipVoucherValidationStatus.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; + +/** + * Ownership Voucher validation Status. + */ +public final class OwnershipVoucherValidationStatus extends ExpandableStringEnum { + /** + * Voucher evaluated as valid. + */ + public static final OwnershipVoucherValidationStatus VALID = fromString("Valid"); + + /** + * Voucher evaluated as invalid. + */ + public static final OwnershipVoucherValidationStatus INVALID = fromString("Invalid"); + + /** + * Creates a new instance of OwnershipVoucherValidationStatus value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public OwnershipVoucherValidationStatus() { + } + + /** + * Creates or finds a OwnershipVoucherValidationStatus from its string representation. + * + * @param name a name to look for. + * @return the corresponding OwnershipVoucherValidationStatus. + */ + public static OwnershipVoucherValidationStatus fromString(String name) { + return fromString(name, OwnershipVoucherValidationStatus.class); + } + + /** + * Gets known OwnershipVoucherValidationStatus values. + * + * @return known OwnershipVoucherValidationStatus values. + */ + public static Collection values() { + return values(OwnershipVoucherValidationStatus.class); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/OwnershipVouchers.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/OwnershipVouchers.java new file mode 100644 index 000000000000..38a4e4ae8f5b --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/OwnershipVouchers.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.models; + +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; + +/** + * Resource collection API of OwnershipVouchers. + */ +public interface OwnershipVouchers { + /** + * Validates ownership vouchers. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param location The name of the Azure region. + * @param validationRequest Ownership vouchers to be validated. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return validate Ownership Voucher Response along with {@link Response}. + */ + Response validateWithResponse(String resourceGroupName, String location, + ValidateOwnershipVouchersRequest validationRequest, Context context); + + /** + * Validates ownership vouchers. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param location The name of the Azure region. + * @param validationRequest Ownership vouchers to be validated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return validate Ownership Voucher Response. + */ + ValidateOwnershipVouchersResponse validate(String resourceGroupName, String location, + ValidateOwnershipVouchersRequest validationRequest); +} 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/PlatformPayload.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/PlatformPayload.java new file mode 100644 index 000000000000..fc7c8b094978 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/PlatformPayload.java @@ -0,0 +1,125 @@ +// 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 details of a specific platform update payload. + */ +@Immutable +public final class PlatformPayload implements JsonSerializable { + /* + * Represents url of a platform update payload. + */ + private String payloadUrl; + + /* + * Represents hash of a platform update payload. + */ + private String payloadHash; + + /* + * Represents size in bytes of a platform update payload. + */ + private String payloadPackageSizeInBytes; + + /* + * Represents identifier of a platform update payload. + */ + private String payloadIdentifier; + + /** + * Creates an instance of PlatformPayload class. + */ + private PlatformPayload() { + } + + /** + * Get the payloadUrl property: Represents url of a platform update payload. + * + * @return the payloadUrl value. + */ + public String payloadUrl() { + return this.payloadUrl; + } + + /** + * Get the payloadHash property: Represents hash of a platform update payload. + * + * @return the payloadHash value. + */ + public String payloadHash() { + return this.payloadHash; + } + + /** + * Get the payloadPackageSizeInBytes property: Represents size in bytes of a platform update payload. + * + * @return the payloadPackageSizeInBytes value. + */ + public String payloadPackageSizeInBytes() { + return this.payloadPackageSizeInBytes; + } + + /** + * Get the payloadIdentifier property: Represents identifier of a platform update payload. + * + * @return the payloadIdentifier value. + */ + public String payloadIdentifier() { + return this.payloadIdentifier; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("payloadUrl", this.payloadUrl); + jsonWriter.writeStringField("payloadHash", this.payloadHash); + jsonWriter.writeStringField("payloadPackageSizeInBytes", this.payloadPackageSizeInBytes); + jsonWriter.writeStringField("payloadIdentifier", this.payloadIdentifier); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of PlatformPayload from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of PlatformPayload 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 PlatformPayload. + */ + public static PlatformPayload fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + PlatformPayload deserializedPlatformPayload = new PlatformPayload(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("payloadUrl".equals(fieldName)) { + deserializedPlatformPayload.payloadUrl = reader.getString(); + } else if ("payloadHash".equals(fieldName)) { + deserializedPlatformPayload.payloadHash = reader.getString(); + } else if ("payloadPackageSizeInBytes".equals(fieldName)) { + deserializedPlatformPayload.payloadPackageSizeInBytes = reader.getString(); + } else if ("payloadIdentifier".equals(fieldName)) { + deserializedPlatformPayload.payloadIdentifier = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedPlatformPayload; + }); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/PlatformUpdate.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/PlatformUpdate.java new file mode 100644 index 000000000000..1bc94bfdf27e --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/PlatformUpdate.java @@ -0,0 +1,55 @@ +// 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.PlatformUpdateInner; + +/** + * An immutable client-side representation of PlatformUpdate. + */ +public interface PlatformUpdate { + /** + * Gets the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + String id(); + + /** + * Gets the name property: The name of the resource. + * + * @return the name value. + */ + String name(); + + /** + * Gets the type property: The type of the resource. + * + * @return the type value. + */ + String type(); + + /** + * Gets the properties property: The resource-specific properties for this resource. + * + * @return the properties value. + */ + PlatformUpdateProperties properties(); + + /** + * 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.PlatformUpdateInner object. + * + * @return the inner object. + */ + PlatformUpdateInner innerModel(); +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/PlatformUpdateDetails.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/PlatformUpdateDetails.java new file mode 100644 index 000000000000..dfa1c60227d7 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/PlatformUpdateDetails.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 details of a specific platform update. + */ +@Immutable +public final class PlatformUpdateDetails implements JsonSerializable { + /* + * Represents validated solution recipe version of a platform update. + */ + private String validatedSolutionRecipeVersion; + + /* + * Represents version of a platform update. + */ + private String platformVersion; + + /* + * Represents the platform payloads of a platform update. + */ + private List platformPayloads; + + /** + * Creates an instance of PlatformUpdateDetails class. + */ + private PlatformUpdateDetails() { + } + + /** + * Get the validatedSolutionRecipeVersion property: Represents validated solution recipe version of a platform + * update. + * + * @return the validatedSolutionRecipeVersion value. + */ + public String validatedSolutionRecipeVersion() { + return this.validatedSolutionRecipeVersion; + } + + /** + * Get the platformVersion property: Represents version of a platform update. + * + * @return the platformVersion value. + */ + public String platformVersion() { + return this.platformVersion; + } + + /** + * Get the platformPayloads property: Represents the platform payloads of a platform update. + * + * @return the platformPayloads value. + */ + public List platformPayloads() { + return this.platformPayloads; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("platformPayloads", this.platformPayloads, + (writer, element) -> writer.writeJson(element)); + jsonWriter.writeStringField("validatedSolutionRecipeVersion", this.validatedSolutionRecipeVersion); + jsonWriter.writeStringField("platformVersion", this.platformVersion); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of PlatformUpdateDetails from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of PlatformUpdateDetails 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 PlatformUpdateDetails. + */ + public static PlatformUpdateDetails fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + PlatformUpdateDetails deserializedPlatformUpdateDetails = new PlatformUpdateDetails(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("platformPayloads".equals(fieldName)) { + List platformPayloads + = reader.readArray(reader1 -> PlatformPayload.fromJson(reader1)); + deserializedPlatformUpdateDetails.platformPayloads = platformPayloads; + } else if ("validatedSolutionRecipeVersion".equals(fieldName)) { + deserializedPlatformUpdateDetails.validatedSolutionRecipeVersion = reader.getString(); + } else if ("platformVersion".equals(fieldName)) { + deserializedPlatformUpdateDetails.platformVersion = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedPlatformUpdateDetails; + }); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/PlatformUpdateProperties.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/PlatformUpdateProperties.java new file mode 100644 index 000000000000..126439a9a655 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/PlatformUpdateProperties.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.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 properties of a platform update resource. + */ +@Immutable +public final class PlatformUpdateProperties implements JsonSerializable { + /* + * Represents applicable platform updates. + */ + private List platformUpdateDetails; + + /** + * Creates an instance of PlatformUpdateProperties class. + */ + private PlatformUpdateProperties() { + } + + /** + * Get the platformUpdateDetails property: Represents applicable platform updates. + * + * @return the platformUpdateDetails value. + */ + public List platformUpdateDetails() { + return this.platformUpdateDetails; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("platformUpdateDetails", this.platformUpdateDetails, + (writer, element) -> writer.writeJson(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of PlatformUpdateProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of PlatformUpdateProperties 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 PlatformUpdateProperties. + */ + public static PlatformUpdateProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + PlatformUpdateProperties deserializedPlatformUpdateProperties = new PlatformUpdateProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("platformUpdateDetails".equals(fieldName)) { + List platformUpdateDetails + = reader.readArray(reader1 -> PlatformUpdateDetails.fromJson(reader1)); + deserializedPlatformUpdateProperties.platformUpdateDetails = platformUpdateDetails; + } else { + reader.skipChildren(); + } + } + + return deserializedPlatformUpdateProperties; + }); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/PlatformUpdates.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/PlatformUpdates.java new file mode 100644 index 000000000000..aa05adfea868 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/PlatformUpdates.java @@ -0,0 +1,62 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.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 PlatformUpdates. + */ +public interface PlatformUpdates { + /** + * Get a platform update. + * + * @param location The name of the Azure region. + * @param platformUpdateName The name of the PlatformUpdate. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a platform update along with {@link Response}. + */ + Response getWithResponse(String location, String platformUpdateName, Context context); + + /** + * Get a platform update. + * + * @param location The name of the Azure region. + * @param platformUpdateName The name of the PlatformUpdate. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a platform update. + */ + PlatformUpdate get(String location, String platformUpdateName); + + /** + * List all platform updates. + * + * @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 PlatformUpdate list operation as paginated response with {@link PagedIterable}. + */ + PagedIterable list(String location); + + /** + * List all platform updates. + * + * @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 PlatformUpdate list operation as paginated response with {@link PagedIterable}. + */ + PagedIterable list(String location, Context context); +} 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/ProvisionOsJobProperties.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/ProvisionOsJobProperties.java new file mode 100644 index 000000000000..b2a597f7dc01 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/ProvisionOsJobProperties.java @@ -0,0 +1,162 @@ +// 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.management.exception.ManagementError; +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; + +/** + * Represents the properties of an Azure Linux restricted operating environment Provision Os job. + */ +@Fluent +public final class ProvisionOsJobProperties extends EdgeMachineJobProperties { + /* + * Job Type to support polymorphic resource. + */ + private EdgeMachineJobType jobType = EdgeMachineJobType.PROVISION_OS; + + /* + * Os Provisioning request. + */ + private ProvisioningRequest provisioningRequest; + + /* + * Reported Properties for Provision Os job + */ + private ProvisionOsReportedProperties reportedProperties; + + /** + * Creates an instance of ProvisionOsJobProperties class. + */ + public ProvisionOsJobProperties() { + } + + /** + * Get the jobType property: Job Type to support polymorphic resource. + * + * @return the jobType value. + */ + @Override + public EdgeMachineJobType jobType() { + return this.jobType; + } + + /** + * Get the provisioningRequest property: Os Provisioning request. + * + * @return the provisioningRequest value. + */ + public ProvisioningRequest provisioningRequest() { + return this.provisioningRequest; + } + + /** + * Set the provisioningRequest property: Os Provisioning request. + * + * @param provisioningRequest the provisioningRequest value to set. + * @return the ProvisionOsJobProperties object itself. + */ + public ProvisionOsJobProperties withProvisioningRequest(ProvisioningRequest provisioningRequest) { + this.provisioningRequest = provisioningRequest; + return this; + } + + /** + * Get the reportedProperties property: Reported Properties for Provision Os job. + * + * @return the reportedProperties value. + */ + public ProvisionOsReportedProperties reportedProperties() { + return this.reportedProperties; + } + + /** + * Set the reportedProperties property: Reported Properties for Provision Os job. + * + * @param reportedProperties the reportedProperties value to set. + * @return the ProvisionOsJobProperties object itself. + */ + public ProvisionOsJobProperties withReportedProperties(ProvisionOsReportedProperties reportedProperties) { + this.reportedProperties = reportedProperties; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public ProvisionOsJobProperties 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.writeJsonField("provisioningRequest", this.provisioningRequest); + jsonWriter.writeStringField("jobType", this.jobType == null ? null : this.jobType.toString()); + jsonWriter.writeJsonField("reportedProperties", this.reportedProperties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ProvisionOsJobProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ProvisionOsJobProperties 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 ProvisionOsJobProperties. + */ + public static ProvisionOsJobProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ProvisionOsJobProperties deserializedProvisionOsJobProperties = new ProvisionOsJobProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("deploymentMode".equals(fieldName)) { + deserializedProvisionOsJobProperties + .withDeploymentMode(DeploymentMode.fromString(reader.getString())); + } else if ("provisioningState".equals(fieldName)) { + deserializedProvisionOsJobProperties + .withProvisioningState(ProvisioningState.fromString(reader.getString())); + } else if ("jobId".equals(fieldName)) { + deserializedProvisionOsJobProperties.withJobId(reader.getString()); + } else if ("startTimeUtc".equals(fieldName)) { + deserializedProvisionOsJobProperties.withStartTimeUtc(reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString()))); + } else if ("endTimeUtc".equals(fieldName)) { + deserializedProvisionOsJobProperties.withEndTimeUtc(reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString()))); + } else if ("status".equals(fieldName)) { + deserializedProvisionOsJobProperties.withStatus(JobStatus.fromString(reader.getString())); + } else if ("error".equals(fieldName)) { + deserializedProvisionOsJobProperties.withError(ManagementError.fromJson(reader)); + } else if ("provisioningRequest".equals(fieldName)) { + deserializedProvisionOsJobProperties.provisioningRequest = ProvisioningRequest.fromJson(reader); + } else if ("jobType".equals(fieldName)) { + deserializedProvisionOsJobProperties.jobType = EdgeMachineJobType.fromString(reader.getString()); + } else if ("reportedProperties".equals(fieldName)) { + deserializedProvisionOsJobProperties.reportedProperties + = ProvisionOsReportedProperties.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedProvisionOsJobProperties; + }); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/ProvisionOsReportedProperties.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/ProvisionOsReportedProperties.java new file mode 100644 index 000000000000..20a3a079733c --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/ProvisionOsReportedProperties.java @@ -0,0 +1,106 @@ +// 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; + +/** + * Reported Properties for Provision Os job. + */ +@Immutable +public final class ProvisionOsReportedProperties 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; + + /** + * Creates an instance of ProvisionOsReportedProperties class. + */ + public ProvisionOsReportedProperties() { + } + + /** + * 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; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ProvisionOsReportedProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ProvisionOsReportedProperties 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 ProvisionOsReportedProperties. + */ + public static ProvisionOsReportedProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ProvisionOsReportedProperties deserializedProvisionOsReportedProperties + = new ProvisionOsReportedProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("percentComplete".equals(fieldName)) { + deserializedProvisionOsReportedProperties.percentComplete = reader.getNullable(JsonReader::getInt); + } else if ("validationStatus".equals(fieldName)) { + deserializedProvisionOsReportedProperties.validationStatus = EceActionStatus.fromJson(reader); + } else if ("deploymentStatus".equals(fieldName)) { + deserializedProvisionOsReportedProperties.deploymentStatus = EceActionStatus.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedProvisionOsReportedProperties; + }); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/ProvisioningDetails.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/ProvisioningDetails.java new file mode 100644 index 000000000000..69bc3b9e7e00 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/ProvisioningDetails.java @@ -0,0 +1,116 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.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 for device provisioning. + */ +@Fluent +public final class ProvisioningDetails implements JsonSerializable { + /* + * Operating system profile. + */ + private OsProvisionProfile osProfile; + + /* + * User configuration. + */ + private List userDetails; + + /** + * Creates an instance of ProvisioningDetails class. + */ + public ProvisioningDetails() { + } + + /** + * Get the osProfile property: Operating system profile. + * + * @return the osProfile value. + */ + public OsProvisionProfile osProfile() { + return this.osProfile; + } + + /** + * Set the osProfile property: Operating system profile. + * + * @param osProfile the osProfile value to set. + * @return the ProvisioningDetails object itself. + */ + public ProvisioningDetails withOsProfile(OsProvisionProfile osProfile) { + this.osProfile = osProfile; + return this; + } + + /** + * Get the userDetails property: User configuration. + * + * @return the userDetails value. + */ + public List userDetails() { + return this.userDetails; + } + + /** + * Set the userDetails property: User configuration. + * + * @param userDetails the userDetails value to set. + * @return the ProvisioningDetails object itself. + */ + public ProvisioningDetails withUserDetails(List userDetails) { + this.userDetails = userDetails; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("osProfile", this.osProfile); + jsonWriter.writeArrayField("userDetails", this.userDetails, (writer, element) -> writer.writeJson(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ProvisioningDetails from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ProvisioningDetails 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 ProvisioningDetails. + */ + public static ProvisioningDetails fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ProvisioningDetails deserializedProvisioningDetails = new ProvisioningDetails(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("osProfile".equals(fieldName)) { + deserializedProvisioningDetails.osProfile = OsProvisionProfile.fromJson(reader); + } else if ("userDetails".equals(fieldName)) { + List userDetails = reader.readArray(reader1 -> UserDetails.fromJson(reader1)); + deserializedProvisioningDetails.userDetails = userDetails; + } else { + reader.skipChildren(); + } + } + + return deserializedProvisioningDetails; + }); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/ProvisioningOsType.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/ProvisioningOsType.java new file mode 100644 index 000000000000..35618903fe82 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/ProvisioningOsType.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; + +/** + * Represents the provisioning operating system type. + */ +public final class ProvisioningOsType extends ExpandableStringEnum { + /** + * AzureLinux OS. + */ + public static final ProvisioningOsType AZURE_LINUX = fromString("AzureLinux"); + + /** + * HCI OS. + */ + public static final ProvisioningOsType HCI = fromString("HCI"); + + /** + * Creates a new instance of ProvisioningOsType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public ProvisioningOsType() { + } + + /** + * Creates or finds a ProvisioningOsType from its string representation. + * + * @param name a name to look for. + * @return the corresponding ProvisioningOsType. + */ + public static ProvisioningOsType fromString(String name) { + return fromString(name, ProvisioningOsType.class); + } + + /** + * Gets known ProvisioningOsType values. + * + * @return known ProvisioningOsType values. + */ + public static Collection values() { + return values(ProvisioningOsType.class); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/ProvisioningRequest.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/ProvisioningRequest.java new file mode 100644 index 000000000000..769f87636400 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/ProvisioningRequest.java @@ -0,0 +1,228 @@ +// 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; + +/** + * Represents a provisioning request. + */ +@Fluent +public final class ProvisioningRequest implements JsonSerializable { + /* + * Target operating system to support polymorphic resource. + */ + private ProvisioningOsType target; + + /* + * Operating system profile. + */ + private OsProvisionProfile osProfile; + + /* + * User configuration. + */ + private List userDetails; + + /* + * Onboarding configuration. + */ + private OnboardingConfiguration onboardingConfiguration; + + /* + * Device configuration. + */ + private TargetDeviceConfiguration deviceConfiguration; + + /* + * Base64 encoded custom configuration for CAPI to use + */ + private String customConfiguration; + + /** + * Creates an instance of ProvisioningRequest class. + */ + public ProvisioningRequest() { + } + + /** + * Get the target property: Target operating system to support polymorphic resource. + * + * @return the target value. + */ + public ProvisioningOsType target() { + return this.target; + } + + /** + * Set the target property: Target operating system to support polymorphic resource. + * + * @param target the target value to set. + * @return the ProvisioningRequest object itself. + */ + public ProvisioningRequest withTarget(ProvisioningOsType target) { + this.target = target; + return this; + } + + /** + * Get the osProfile property: Operating system profile. + * + * @return the osProfile value. + */ + public OsProvisionProfile osProfile() { + return this.osProfile; + } + + /** + * Set the osProfile property: Operating system profile. + * + * @param osProfile the osProfile value to set. + * @return the ProvisioningRequest object itself. + */ + public ProvisioningRequest withOsProfile(OsProvisionProfile osProfile) { + this.osProfile = osProfile; + return this; + } + + /** + * Get the userDetails property: User configuration. + * + * @return the userDetails value. + */ + public List userDetails() { + return this.userDetails; + } + + /** + * Set the userDetails property: User configuration. + * + * @param userDetails the userDetails value to set. + * @return the ProvisioningRequest object itself. + */ + public ProvisioningRequest withUserDetails(List userDetails) { + this.userDetails = userDetails; + return this; + } + + /** + * Get the onboardingConfiguration property: Onboarding configuration. + * + * @return the onboardingConfiguration value. + */ + public OnboardingConfiguration onboardingConfiguration() { + return this.onboardingConfiguration; + } + + /** + * Set the onboardingConfiguration property: Onboarding configuration. + * + * @param onboardingConfiguration the onboardingConfiguration value to set. + * @return the ProvisioningRequest object itself. + */ + public ProvisioningRequest withOnboardingConfiguration(OnboardingConfiguration onboardingConfiguration) { + this.onboardingConfiguration = onboardingConfiguration; + return this; + } + + /** + * Get the deviceConfiguration property: Device configuration. + * + * @return the deviceConfiguration value. + */ + public TargetDeviceConfiguration deviceConfiguration() { + return this.deviceConfiguration; + } + + /** + * Set the deviceConfiguration property: Device configuration. + * + * @param deviceConfiguration the deviceConfiguration value to set. + * @return the ProvisioningRequest object itself. + */ + public ProvisioningRequest withDeviceConfiguration(TargetDeviceConfiguration deviceConfiguration) { + this.deviceConfiguration = deviceConfiguration; + return this; + } + + /** + * Get the customConfiguration property: Base64 encoded custom configuration for CAPI to use. + * + * @return the customConfiguration value. + */ + public String customConfiguration() { + return this.customConfiguration; + } + + /** + * Set the customConfiguration property: Base64 encoded custom configuration for CAPI to use. + * + * @param customConfiguration the customConfiguration value to set. + * @return the ProvisioningRequest object itself. + */ + public ProvisioningRequest withCustomConfiguration(String customConfiguration) { + this.customConfiguration = customConfiguration; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("target", this.target == null ? null : this.target.toString()); + jsonWriter.writeJsonField("osProfile", this.osProfile); + jsonWriter.writeArrayField("userDetails", this.userDetails, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeJsonField("onboardingConfiguration", this.onboardingConfiguration); + jsonWriter.writeJsonField("deviceConfiguration", this.deviceConfiguration); + jsonWriter.writeStringField("customConfiguration", this.customConfiguration); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ProvisioningRequest from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ProvisioningRequest 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 ProvisioningRequest. + */ + public static ProvisioningRequest fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ProvisioningRequest deserializedProvisioningRequest = new ProvisioningRequest(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("target".equals(fieldName)) { + deserializedProvisioningRequest.target = ProvisioningOsType.fromString(reader.getString()); + } else if ("osProfile".equals(fieldName)) { + deserializedProvisioningRequest.osProfile = OsProvisionProfile.fromJson(reader); + } else if ("userDetails".equals(fieldName)) { + List userDetails = reader.readArray(reader1 -> UserDetails.fromJson(reader1)); + deserializedProvisioningRequest.userDetails = userDetails; + } else if ("onboardingConfiguration".equals(fieldName)) { + deserializedProvisioningRequest.onboardingConfiguration = OnboardingConfiguration.fromJson(reader); + } else if ("deviceConfiguration".equals(fieldName)) { + deserializedProvisioningRequest.deviceConfiguration = TargetDeviceConfiguration.fromJson(reader); + } else if ("customConfiguration".equals(fieldName)) { + deserializedProvisioningRequest.customConfiguration = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedProvisioningRequest; + }); + } +} 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/Publisher.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/Publisher.java index 89707328f490..c2f512c419d6 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/Publisher.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under 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/Publishers.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/Publishers.java index e948fc8e2997..bdcb7f110357 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under 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,55 +13,55 @@ */ public interface Publishers { /** - * List Publishers available for the HCI Cluster. + * 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 list of Publisher proxy resources for the HCI cluster as paginated response with {@link PagedIterable}. + * @return publisher resource details of HCI Cluster along with {@link Response}. */ - PagedIterable listByCluster(String resourceGroupName, String clusterName); + Response getWithResponse(String resourceGroupName, String clusterName, String publisherName, + Context context); /** - * List Publishers available for the HCI Cluster. + * 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 context The context to associate with this operation. + * @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 Publisher proxy resources for the HCI cluster as paginated response with {@link PagedIterable}. + * @return publisher resource details of HCI Cluster. */ - PagedIterable listByCluster(String resourceGroupName, String clusterName, Context context); + Publisher get(String resourceGroupName, String clusterName, String publisherName); /** - * Get Publisher resource details of HCI Cluster. + * 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 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}. + * @return list of Publisher proxy resources for the HCI cluster as paginated response with {@link PagedIterable}. */ - Response getWithResponse(String resourceGroupName, String clusterName, String publisherName, - Context context); + PagedIterable listByCluster(String resourceGroupName, String clusterName); /** - * Get Publisher resource details of HCI Cluster. + * 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 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. + * @return list of Publisher proxy resources for the HCI cluster as paginated response with {@link PagedIterable}. */ - Publisher get(String resourceGroupName, String clusterName, String publisherName); + PagedIterable listByCluster(String resourceGroupName, String clusterName, Context context); } 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..e0e5fb97fbe8 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,15 +1,17 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.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; /** * Reported properties pushed from edge device. @@ -26,10 +28,20 @@ public class ReportedProperties implements JsonSerializable */ private ExtensionProfile extensionProfile; + /* + * Most recent edge device sync timestamp in UTC. + */ + private OffsetDateTime lastSyncTimestamp; + + /* + * CVM support details for edge device. + */ + private ConfidentialVmProfile confidentialVmProfile; + /** * Creates an instance of ReportedProperties class. */ - public ReportedProperties() { + protected ReportedProperties() { } /** @@ -73,14 +85,43 @@ ReportedProperties withExtensionProfile(ExtensionProfile extensionProfile) { } /** - * Validates the instance. + * Get the lastSyncTimestamp property: Most recent edge device sync timestamp in UTC. * - * @throws IllegalArgumentException thrown if the instance is not valid. + * @return the lastSyncTimestamp value. */ - public void validate() { - if (extensionProfile() != null) { - extensionProfile().validate(); - } + public OffsetDateTime lastSyncTimestamp() { + return this.lastSyncTimestamp; + } + + /** + * Set the lastSyncTimestamp property: Most recent edge device sync timestamp in UTC. + * + * @param lastSyncTimestamp the lastSyncTimestamp value to set. + * @return the ReportedProperties object itself. + */ + ReportedProperties withLastSyncTimestamp(OffsetDateTime lastSyncTimestamp) { + this.lastSyncTimestamp = lastSyncTimestamp; + return this; + } + + /** + * Get the confidentialVmProfile property: CVM support details for edge device. + * + * @return the confidentialVmProfile value. + */ + public ConfidentialVmProfile confidentialVmProfile() { + return this.confidentialVmProfile; + } + + /** + * Set the confidentialVmProfile property: CVM support details for edge device. + * + * @param confidentialVmProfile the confidentialVmProfile value to set. + * @return the ReportedProperties object itself. + */ + ReportedProperties withConfidentialVmProfile(ConfidentialVmProfile confidentialVmProfile) { + this.confidentialVmProfile = confidentialVmProfile; + return this; } /** @@ -111,6 +152,11 @@ public static ReportedProperties fromJson(JsonReader jsonReader) throws IOExcept deserializedReportedProperties.deviceState = DeviceState.fromString(reader.getString()); } else if ("extensionProfile".equals(fieldName)) { deserializedReportedProperties.extensionProfile = ExtensionProfile.fromJson(reader); + } else if ("lastSyncTimestamp".equals(fieldName)) { + deserializedReportedProperties.lastSyncTimestamp = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("confidentialVmProfile".equals(fieldName)) { + deserializedReportedProperties.confidentialVmProfile = ConfidentialVmProfile.fromJson(reader); } else { reader.skipChildren(); } 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/SdnIntegrationIntent.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/SdnIntegrationIntent.java new file mode 100644 index 000000000000..9b5e3d6d75e3 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/SdnIntegrationIntent.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; + +/** + * Indicates whether Software Defined Networking (SDN) integration should be enabled or disabled for this deployment. + */ +public final class SdnIntegrationIntent extends ExpandableStringEnum { + /** + * Enable SDN integration for the deployment. + */ + public static final SdnIntegrationIntent ENABLE = fromString("Enable"); + + /** + * Disable SDN integration for the deployment. + */ + public static final SdnIntegrationIntent DISABLE = fromString("Disable"); + + /** + * Creates a new instance of SdnIntegrationIntent value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public SdnIntegrationIntent() { + } + + /** + * Creates or finds a SdnIntegrationIntent from its string representation. + * + * @param name a name to look for. + * @return the corresponding SdnIntegrationIntent. + */ + public static SdnIntegrationIntent fromString(String name) { + return fromString(name, SdnIntegrationIntent.class); + } + + /** + * Gets known SdnIntegrationIntent values. + * + * @return known SdnIntegrationIntent values. + */ + public static Collection values() { + return values(SdnIntegrationIntent.class); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/SdnProperties.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/SdnProperties.java new file mode 100644 index 000000000000..38ad94612ccc --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/SdnProperties.java @@ -0,0 +1,149 @@ +// 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 the Software Defined Networking (SDN) configuration state. + */ +@Immutable +public class SdnProperties implements JsonSerializable { + /* + * Indicates the current Software Defined Networking (SDN) status of the resource, which may be an individual device + * or a cluster. + */ + private SdnStatus sdnStatus; + + /* + * The fully qualified domain name (FQDN) associated with the SDN deployment. This value is propagated from the + * Device Management Extension to the cluster resource. It is typically in the format `-nc.` when + * SDN is enabled. May be null or absent in unsupported or disabled states. + */ + private String sdnDomainName; + + /* + * Represents the API address for the SDN deployment. + */ + private String sdnApiAddress; + + /** + * Creates an instance of SdnProperties class. + */ + protected SdnProperties() { + } + + /** + * Get the sdnStatus property: Indicates the current Software Defined Networking (SDN) status of the resource, which + * may be an individual device or a cluster. + * + * @return the sdnStatus value. + */ + public SdnStatus sdnStatus() { + return this.sdnStatus; + } + + /** + * Set the sdnStatus property: Indicates the current Software Defined Networking (SDN) status of the resource, which + * may be an individual device or a cluster. + * + * @param sdnStatus the sdnStatus value to set. + * @return the SdnProperties object itself. + */ + SdnProperties withSdnStatus(SdnStatus sdnStatus) { + this.sdnStatus = sdnStatus; + return this; + } + + /** + * Get the sdnDomainName property: The fully qualified domain name (FQDN) associated with the SDN deployment. This + * value is propagated from the Device Management Extension to the cluster resource. It is typically in the format + * `<sdnPrefix>-nc.<domain>` when SDN is enabled. May be null or absent in unsupported or disabled + * states. + * + * @return the sdnDomainName value. + */ + public String sdnDomainName() { + return this.sdnDomainName; + } + + /** + * Set the sdnDomainName property: The fully qualified domain name (FQDN) associated with the SDN deployment. This + * value is propagated from the Device Management Extension to the cluster resource. It is typically in the format + * `<sdnPrefix>-nc.<domain>` when SDN is enabled. May be null or absent in unsupported or disabled + * states. + * + * @param sdnDomainName the sdnDomainName value to set. + * @return the SdnProperties object itself. + */ + SdnProperties withSdnDomainName(String sdnDomainName) { + this.sdnDomainName = sdnDomainName; + return this; + } + + /** + * Get the sdnApiAddress property: Represents the API address for the SDN deployment. + * + * @return the sdnApiAddress value. + */ + public String sdnApiAddress() { + return this.sdnApiAddress; + } + + /** + * Set the sdnApiAddress property: Represents the API address for the SDN deployment. + * + * @param sdnApiAddress the sdnApiAddress value to set. + * @return the SdnProperties object itself. + */ + SdnProperties withSdnApiAddress(String sdnApiAddress) { + this.sdnApiAddress = sdnApiAddress; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of SdnProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of SdnProperties 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 SdnProperties. + */ + public static SdnProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + SdnProperties deserializedSdnProperties = new SdnProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("sdnStatus".equals(fieldName)) { + deserializedSdnProperties.sdnStatus = SdnStatus.fromString(reader.getString()); + } else if ("sdnDomainName".equals(fieldName)) { + deserializedSdnProperties.sdnDomainName = reader.getString(); + } else if ("sdnApiAddress".equals(fieldName)) { + deserializedSdnProperties.sdnApiAddress = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedSdnProperties; + }); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/SdnStatus.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/SdnStatus.java new file mode 100644 index 000000000000..c845e20f33b4 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/SdnStatus.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.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Indicates the current Software Defined Networking (SDN) status of the resource, which may be an individual device or + * a cluster. + */ +public final class SdnStatus extends ExpandableStringEnum { + /** + * The SDN status could not be determined due to a failure in querying the SDN API service. This may occur if the + * query script fails or if the system is in an inconsistent state. The domain name will be null in this case. + */ + public static final SdnStatus UNKNOWN = fromString("Unknown"); + + /** + * SDN is not enabled on the resource. The domain name will be null. This is the default state when SDN has not been + * configured. + */ + public static final SdnStatus DISABLED = fromString("Disabled"); + + /** + * SDN is successfully enabled on the resource. The domain name will be populated in the format + * `<sdnPrefix>-nc.<domain>`. Customers may need to manage DNS settings to ensure proper resolution. + */ + public static final SdnStatus ENABLED = fromString("Enabled"); + + /** + * Creates a new instance of SdnStatus value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public SdnStatus() { + } + + /** + * Creates or finds a SdnStatus from its string representation. + * + * @param name a name to look for. + * @return the corresponding SdnStatus. + */ + public static SdnStatus fromString(String name) { + return fromString(name, SdnStatus.class); + } + + /** + * Gets known SdnStatus values. + * + * @return known SdnStatus values. + */ + public static Collection values() { + return values(SdnStatus.class); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/SecretType.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/SecretType.java new file mode 100644 index 000000000000..98b6da2623c9 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/SecretType.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; + +/** + * Type of secret used for authentication. + */ +public final class SecretType extends ExpandableStringEnum { + /** + * Key Vault based authentication. + */ + public static final SecretType KEY_VAULT = fromString("KeyVault"); + + /** + * SSH Public Key based authentication. + */ + public static final SecretType SSH_PUB_KEY = fromString("SshPubKey"); + + /** + * Creates a new instance of SecretType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public SecretType() { + } + + /** + * Creates or finds a SecretType from its string representation. + * + * @param name a name to look for. + * @return the corresponding SecretType. + */ + public static SecretType fromString(String name) { + return fromString(name, SecretType.class); + } + + /** + * Gets known SecretType values. + * + * @return known SecretType values. + */ + public static Collection values() { + return values(SecretType.class); + } +} 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/SiteDetails.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/SiteDetails.java new file mode 100644 index 000000000000..d2461455ef66 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/SiteDetails.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; + +/** + * Site Details consists of common configurations. + */ +@Fluent +public final class SiteDetails implements JsonSerializable { + /* + * Site resource Id to be set during Edge Machine resource creation. + */ + private String siteResourceId; + + /* + * Edge Device configuration received from site common configuration. + */ + private DeviceConfiguration deviceConfiguration; + + /** + * Creates an instance of SiteDetails class. + */ + public SiteDetails() { + } + + /** + * Get the siteResourceId property: Site resource Id to be set during Edge Machine resource creation. + * + * @return the siteResourceId value. + */ + public String siteResourceId() { + return this.siteResourceId; + } + + /** + * Set the siteResourceId property: Site resource Id to be set during Edge Machine resource creation. + * + * @param siteResourceId the siteResourceId value to set. + * @return the SiteDetails object itself. + */ + public SiteDetails withSiteResourceId(String siteResourceId) { + this.siteResourceId = siteResourceId; + return this; + } + + /** + * Get the deviceConfiguration property: Edge Device configuration received from site common configuration. + * + * @return the deviceConfiguration value. + */ + public DeviceConfiguration deviceConfiguration() { + return this.deviceConfiguration; + } + + /** + * Set the deviceConfiguration property: Edge Device configuration received from site common configuration. + * + * @param deviceConfiguration the deviceConfiguration value to set. + * @return the SiteDetails object itself. + */ + public SiteDetails withDeviceConfiguration(DeviceConfiguration deviceConfiguration) { + this.deviceConfiguration = deviceConfiguration; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("siteResourceId", this.siteResourceId); + jsonWriter.writeJsonField("deviceConfiguration", this.deviceConfiguration); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of SiteDetails from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of SiteDetails 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 SiteDetails. + */ + public static SiteDetails fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + SiteDetails deserializedSiteDetails = new SiteDetails(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("siteResourceId".equals(fieldName)) { + deserializedSiteDetails.siteResourceId = reader.getString(); + } else if ("deviceConfiguration".equals(fieldName)) { + deserializedSiteDetails.deviceConfiguration = DeviceConfiguration.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedSiteDetails; + }); + } +} 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/StorageConfiguration.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/StorageConfiguration.java new file mode 100644 index 000000000000..9fe0f05de3f1 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/StorageConfiguration.java @@ -0,0 +1,85 @@ +// 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; + +/** + * Storage configuration. + */ +@Fluent +public final class StorageConfiguration implements JsonSerializable { + /* + * Partition size. + */ + private String partitionSize; + + /** + * Creates an instance of StorageConfiguration class. + */ + public StorageConfiguration() { + } + + /** + * Get the partitionSize property: Partition size. + * + * @return the partitionSize value. + */ + public String partitionSize() { + return this.partitionSize; + } + + /** + * Set the partitionSize property: Partition size. + * + * @param partitionSize the partitionSize value to set. + * @return the StorageConfiguration object itself. + */ + public StorageConfiguration withPartitionSize(String partitionSize) { + this.partitionSize = partitionSize; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("partitionSize", this.partitionSize); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of StorageConfiguration from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of StorageConfiguration 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 StorageConfiguration. + */ + public static StorageConfiguration fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + StorageConfiguration deserializedStorageConfiguration = new StorageConfiguration(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("partitionSize".equals(fieldName)) { + deserializedStorageConfiguration.partitionSize = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedStorageConfiguration; + }); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/StorageProfile.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/StorageProfile.java new file mode 100644 index 000000000000..fb76aab102fc --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/StorageProfile.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; + +/** + * StorageProfile of edge machine. + */ +@Immutable +public final class StorageProfile implements JsonSerializable { + /* + * Number of storage disks in the device with $CanPool as true. + */ + private Long poolableDisksCount; + + /** + * Creates an instance of StorageProfile class. + */ + private StorageProfile() { + } + + /** + * 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 StorageProfile from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of StorageProfile 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 StorageProfile. + */ + public static StorageProfile fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + StorageProfile deserializedStorageProfile = new StorageProfile(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("poolableDisksCount".equals(fieldName)) { + deserializedStorageProfile.poolableDisksCount = reader.getNullable(JsonReader::getLong); + } else { + reader.skipChildren(); + } + } + + return deserializedStorageProfile; + }); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/SupportStatus.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/SupportStatus.java new file mode 100644 index 000000000000..5eea8378c77c --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/SupportStatus.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; + +/** + * Indicates whether the cluster is under support. + */ +public final class SupportStatus extends ExpandableStringEnum { + /** + * The cluster is under support. + */ + public static final SupportStatus IN_SUPPORT = fromString("InSupport"); + + /** + * The cluster is out of support. + */ + public static final SupportStatus OUT_OF_SUPPORT = fromString("OutOfSupport"); + + /** + * The support status is not specified. + */ + public static final SupportStatus NOT_SPECIFIED = fromString("NotSpecified"); + + /** + * Creates a new instance of SupportStatus value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public SupportStatus() { + } + + /** + * Creates or finds a SupportStatus from its string representation. + * + * @param name a name to look for. + * @return the corresponding SupportStatus. + */ + public static SupportStatus fromString(String name) { + return fromString(name, SupportStatus.class); + } + + /** + * Gets known SupportStatus values. + * + * @return known SupportStatus values. + */ + public static Collection values() { + return values(SupportStatus.class); + } +} 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/TargetDeviceConfiguration.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/TargetDeviceConfiguration.java new file mode 100644 index 000000000000..683f7ef1efb7 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/TargetDeviceConfiguration.java @@ -0,0 +1,197 @@ +// 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; + +/** + * Device configuration. + */ +@Fluent +public final class TargetDeviceConfiguration implements JsonSerializable { + /* + * Network configuration. + */ + private NetworkConfiguration network; + + /* + * Hostname of the device. + */ + private String hostName; + + /* + * Web proxy configuration. + */ + private WebProxyConfiguration webProxy; + + /* + * Time configuration. + */ + private TimeConfiguration time; + + /* + * Storage configuration. + */ + private StorageConfiguration storage; + + /** + * Creates an instance of TargetDeviceConfiguration class. + */ + public TargetDeviceConfiguration() { + } + + /** + * Get the network property: Network configuration. + * + * @return the network value. + */ + public NetworkConfiguration network() { + return this.network; + } + + /** + * Set the network property: Network configuration. + * + * @param network the network value to set. + * @return the TargetDeviceConfiguration object itself. + */ + public TargetDeviceConfiguration withNetwork(NetworkConfiguration network) { + this.network = network; + return this; + } + + /** + * Get the hostName property: Hostname of the device. + * + * @return the hostName value. + */ + public String hostName() { + return this.hostName; + } + + /** + * Set the hostName property: Hostname of the device. + * + * @param hostName the hostName value to set. + * @return the TargetDeviceConfiguration object itself. + */ + public TargetDeviceConfiguration withHostName(String hostName) { + this.hostName = hostName; + return this; + } + + /** + * Get the webProxy property: Web proxy configuration. + * + * @return the webProxy value. + */ + public WebProxyConfiguration webProxy() { + return this.webProxy; + } + + /** + * Set the webProxy property: Web proxy configuration. + * + * @param webProxy the webProxy value to set. + * @return the TargetDeviceConfiguration object itself. + */ + public TargetDeviceConfiguration withWebProxy(WebProxyConfiguration webProxy) { + this.webProxy = webProxy; + return this; + } + + /** + * Get the time property: Time configuration. + * + * @return the time value. + */ + public TimeConfiguration time() { + return this.time; + } + + /** + * Set the time property: Time configuration. + * + * @param time the time value to set. + * @return the TargetDeviceConfiguration object itself. + */ + public TargetDeviceConfiguration withTime(TimeConfiguration time) { + this.time = time; + return this; + } + + /** + * Get the storage property: Storage configuration. + * + * @return the storage value. + */ + public StorageConfiguration storage() { + return this.storage; + } + + /** + * Set the storage property: Storage configuration. + * + * @param storage the storage value to set. + * @return the TargetDeviceConfiguration object itself. + */ + public TargetDeviceConfiguration withStorage(StorageConfiguration storage) { + this.storage = storage; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("network", this.network); + jsonWriter.writeStringField("hostName", this.hostName); + jsonWriter.writeJsonField("webProxy", this.webProxy); + jsonWriter.writeJsonField("time", this.time); + jsonWriter.writeJsonField("storage", this.storage); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of TargetDeviceConfiguration from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of TargetDeviceConfiguration 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 TargetDeviceConfiguration. + */ + public static TargetDeviceConfiguration fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + TargetDeviceConfiguration deserializedTargetDeviceConfiguration = new TargetDeviceConfiguration(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("network".equals(fieldName)) { + deserializedTargetDeviceConfiguration.network = NetworkConfiguration.fromJson(reader); + } else if ("hostName".equals(fieldName)) { + deserializedTargetDeviceConfiguration.hostName = reader.getString(); + } else if ("webProxy".equals(fieldName)) { + deserializedTargetDeviceConfiguration.webProxy = WebProxyConfiguration.fromJson(reader); + } else if ("time".equals(fieldName)) { + deserializedTargetDeviceConfiguration.time = TimeConfiguration.fromJson(reader); + } else if ("storage".equals(fieldName)) { + deserializedTargetDeviceConfiguration.storage = StorageConfiguration.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedTargetDeviceConfiguration; + }); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/TimeConfiguration.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/TimeConfiguration.java new file mode 100644 index 000000000000..916e1c602a68 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/TimeConfiguration.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.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; + +/** + * Time configuration. + */ +@Fluent +public final class TimeConfiguration implements JsonSerializable { + /* + * Primary NTP server. + */ + private String primaryTimeServer; + + /* + * Secondary NTP server. + */ + private String secondaryTimeServer; + + /* + * Time zone. + */ + private String timeZone; + + /** + * Creates an instance of TimeConfiguration class. + */ + public TimeConfiguration() { + } + + /** + * Get the primaryTimeServer property: Primary NTP server. + * + * @return the primaryTimeServer value. + */ + public String primaryTimeServer() { + return this.primaryTimeServer; + } + + /** + * Set the primaryTimeServer property: Primary NTP server. + * + * @param primaryTimeServer the primaryTimeServer value to set. + * @return the TimeConfiguration object itself. + */ + public TimeConfiguration withPrimaryTimeServer(String primaryTimeServer) { + this.primaryTimeServer = primaryTimeServer; + return this; + } + + /** + * Get the secondaryTimeServer property: Secondary NTP server. + * + * @return the secondaryTimeServer value. + */ + public String secondaryTimeServer() { + return this.secondaryTimeServer; + } + + /** + * Set the secondaryTimeServer property: Secondary NTP server. + * + * @param secondaryTimeServer the secondaryTimeServer value to set. + * @return the TimeConfiguration object itself. + */ + public TimeConfiguration withSecondaryTimeServer(String secondaryTimeServer) { + this.secondaryTimeServer = secondaryTimeServer; + return this; + } + + /** + * Get the timeZone property: Time zone. + * + * @return the timeZone value. + */ + public String timeZone() { + return this.timeZone; + } + + /** + * Set the timeZone property: Time zone. + * + * @param timeZone the timeZone value to set. + * @return the TimeConfiguration object itself. + */ + public TimeConfiguration withTimeZone(String timeZone) { + this.timeZone = timeZone; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("primaryTimeServer", this.primaryTimeServer); + jsonWriter.writeStringField("secondaryTimeServer", this.secondaryTimeServer); + jsonWriter.writeStringField("timeZone", this.timeZone); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of TimeConfiguration from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of TimeConfiguration 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 TimeConfiguration. + */ + public static TimeConfiguration fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + TimeConfiguration deserializedTimeConfiguration = new TimeConfiguration(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("primaryTimeServer".equals(fieldName)) { + deserializedTimeConfiguration.primaryTimeServer = reader.getString(); + } else if ("secondaryTimeServer".equals(fieldName)) { + deserializedTimeConfiguration.secondaryTimeServer = reader.getString(); + } else if ("timeZone".equals(fieldName)) { + deserializedTimeConfiguration.timeZone = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedTimeConfiguration; + }); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/UpdateContent.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/UpdateContent.java new file mode 100644 index 000000000000..8081f1e97787 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/UpdateContent.java @@ -0,0 +1,55 @@ +// 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.UpdateContentInner; + +/** + * An immutable client-side representation of UpdateContent. + */ +public interface UpdateContent { + /** + * Gets the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + String id(); + + /** + * Gets the name property: The name of the resource. + * + * @return the name value. + */ + String name(); + + /** + * Gets the type property: The type of the resource. + * + * @return the type value. + */ + String type(); + + /** + * Gets the properties property: The resource-specific properties for this resource. + * + * @return the properties value. + */ + UpdateContentProperties properties(); + + /** + * 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.UpdateContentInner object. + * + * @return the inner object. + */ + UpdateContentInner innerModel(); +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/UpdateContentProperties.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/UpdateContentProperties.java new file mode 100644 index 000000000000..0ada3a801f9a --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/UpdateContentProperties.java @@ -0,0 +1,78 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.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 properties of a update content resource. + */ +@Immutable +public final class UpdateContentProperties implements JsonSerializable { + /* + * Represents the payloads of a update content resource. + */ + private List updatePayloads; + + /** + * Creates an instance of UpdateContentProperties class. + */ + private UpdateContentProperties() { + } + + /** + * Get the updatePayloads property: Represents the payloads of a update content resource. + * + * @return the updatePayloads value. + */ + public List updatePayloads() { + return this.updatePayloads; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("updatePayloads", this.updatePayloads, + (writer, element) -> writer.writeJson(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of UpdateContentProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of UpdateContentProperties 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 UpdateContentProperties. + */ + public static UpdateContentProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + UpdateContentProperties deserializedUpdateContentProperties = new UpdateContentProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("updatePayloads".equals(fieldName)) { + List updatePayloads = reader.readArray(reader1 -> ContentPayload.fromJson(reader1)); + deserializedUpdateContentProperties.updatePayloads = updatePayloads; + } else { + reader.skipChildren(); + } + } + + return deserializedUpdateContentProperties; + }); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/UpdateContents.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/UpdateContents.java new file mode 100644 index 000000000000..54c786a8b501 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/UpdateContents.java @@ -0,0 +1,62 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.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 UpdateContents. + */ +public interface UpdateContents { + /** + * Gets content for an update. + * + * @param location The name of the Azure region. + * @param updateContentName The name of the UpdateContent. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return content for an update along with {@link Response}. + */ + Response getWithResponse(String location, String updateContentName, Context context); + + /** + * Gets content for an update. + * + * @param location The name of the Azure region. + * @param updateContentName The name of the UpdateContent. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return content for an update. + */ + UpdateContent get(String location, String updateContentName); + + /** + * List all update contents. + * + * @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 UpdateContent list operation as paginated response with {@link PagedIterable}. + */ + PagedIterable list(String location); + + /** + * List all update contents. + * + * @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 UpdateContent list operation as paginated response with {@link PagedIterable}. + */ + PagedIterable list(String location, Context context); +} 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/UserDetails.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/UserDetails.java new file mode 100644 index 000000000000..72b170626c87 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/UserDetails.java @@ -0,0 +1,172 @@ +// 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; + +/** + * User configuration. + */ +@Fluent +public final class UserDetails implements JsonSerializable { + /* + * Name of the user. + */ + private String userName; + + /* + * Type of the secret used for authentication. + */ + private SecretType secretType; + + /* + * Location of the secret used for authentication. + */ + private String secretLocation; + + /* + * SSH Public Key for the user. + */ + private List sshPubKey; + + /** + * Creates an instance of UserDetails class. + */ + public UserDetails() { + } + + /** + * Get the userName property: Name of the user. + * + * @return the userName value. + */ + public String userName() { + return this.userName; + } + + /** + * Set the userName property: Name of the user. + * + * @param userName the userName value to set. + * @return the UserDetails object itself. + */ + public UserDetails withUserName(String userName) { + this.userName = userName; + return this; + } + + /** + * Get the secretType property: Type of the secret used for authentication. + * + * @return the secretType value. + */ + public SecretType secretType() { + return this.secretType; + } + + /** + * Set the secretType property: Type of the secret used for authentication. + * + * @param secretType the secretType value to set. + * @return the UserDetails object itself. + */ + public UserDetails withSecretType(SecretType secretType) { + this.secretType = secretType; + return this; + } + + /** + * Get the secretLocation property: Location of the secret used for authentication. + * + * @return the secretLocation value. + */ + public String secretLocation() { + return this.secretLocation; + } + + /** + * Set the secretLocation property: Location of the secret used for authentication. + * + * @param secretLocation the secretLocation value to set. + * @return the UserDetails object itself. + */ + public UserDetails withSecretLocation(String secretLocation) { + this.secretLocation = secretLocation; + return this; + } + + /** + * Get the sshPubKey property: SSH Public Key for the user. + * + * @return the sshPubKey value. + */ + public List sshPubKey() { + return this.sshPubKey; + } + + /** + * Set the sshPubKey property: SSH Public Key for the user. + * + * @param sshPubKey the sshPubKey value to set. + * @return the UserDetails object itself. + */ + public UserDetails withSshPubKey(List sshPubKey) { + this.sshPubKey = sshPubKey; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("userName", this.userName); + jsonWriter.writeStringField("secretType", this.secretType == null ? null : this.secretType.toString()); + jsonWriter.writeStringField("secretLocation", this.secretLocation); + jsonWriter.writeArrayField("sshPubKey", this.sshPubKey, (writer, element) -> writer.writeString(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of UserDetails from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of UserDetails 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 UserDetails. + */ + public static UserDetails fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + UserDetails deserializedUserDetails = new UserDetails(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("userName".equals(fieldName)) { + deserializedUserDetails.userName = reader.getString(); + } else if ("secretType".equals(fieldName)) { + deserializedUserDetails.secretType = SecretType.fromString(reader.getString()); + } else if ("secretLocation".equals(fieldName)) { + deserializedUserDetails.secretLocation = reader.getString(); + } else if ("sshPubKey".equals(fieldName)) { + List sshPubKey = reader.readArray(reader1 -> reader1.getString()); + deserializedUserDetails.sshPubKey = sshPubKey; + } else { + reader.skipChildren(); + } + } + + return deserializedUserDetails; + }); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/ValidateOwnershipVouchersRequest.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/ValidateOwnershipVouchersRequest.java new file mode 100644 index 000000000000..ae29eb8e5080 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/ValidateOwnershipVouchersRequest.java @@ -0,0 +1,92 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.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; + +/** + * Validate Ownership Voucher Request. + */ +@Fluent +public final class ValidateOwnershipVouchersRequest implements JsonSerializable { + /* + * Ownership Voucher Details. + */ + private List ownershipVoucherDetails; + + /** + * Creates an instance of ValidateOwnershipVouchersRequest class. + */ + public ValidateOwnershipVouchersRequest() { + } + + /** + * Get the ownershipVoucherDetails property: Ownership Voucher Details. + * + * @return the ownershipVoucherDetails value. + */ + public List ownershipVoucherDetails() { + return this.ownershipVoucherDetails; + } + + /** + * Set the ownershipVoucherDetails property: Ownership Voucher Details. + * + * @param ownershipVoucherDetails the ownershipVoucherDetails value to set. + * @return the ValidateOwnershipVouchersRequest object itself. + */ + public ValidateOwnershipVouchersRequest + withOwnershipVoucherDetails(List ownershipVoucherDetails) { + this.ownershipVoucherDetails = ownershipVoucherDetails; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("ownershipVoucherDetails", this.ownershipVoucherDetails, + (writer, element) -> writer.writeJson(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ValidateOwnershipVouchersRequest from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ValidateOwnershipVouchersRequest 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 ValidateOwnershipVouchersRequest. + */ + public static ValidateOwnershipVouchersRequest fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ValidateOwnershipVouchersRequest deserializedValidateOwnershipVouchersRequest + = new ValidateOwnershipVouchersRequest(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("ownershipVoucherDetails".equals(fieldName)) { + List ownershipVoucherDetails + = reader.readArray(reader1 -> OwnershipVoucherDetails.fromJson(reader1)); + deserializedValidateOwnershipVouchersRequest.ownershipVoucherDetails = ownershipVoucherDetails; + } else { + reader.skipChildren(); + } + } + + return deserializedValidateOwnershipVouchersRequest; + }); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/ValidateOwnershipVouchersResponse.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/ValidateOwnershipVouchersResponse.java new file mode 100644 index 000000000000..2ce0e36a8171 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/ValidateOwnershipVouchersResponse.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.models; + +import com.azure.resourcemanager.azurestackhci.fluent.models.ValidateOwnershipVouchersResponseInner; +import java.util.List; + +/** + * An immutable client-side representation of ValidateOwnershipVouchersResponse. + */ +public interface ValidateOwnershipVouchersResponse { + /** + * Gets the ownershipVoucherValidationDetails property: Ownership Voucher Validation Details. + * + * @return the ownershipVoucherValidationDetails value. + */ + List ownershipVoucherValidationDetails(); + + /** + * Gets the inner com.azure.resourcemanager.azurestackhci.fluent.models.ValidateOwnershipVouchersResponseInner + * object. + * + * @return the inner object. + */ + ValidateOwnershipVouchersResponseInner innerModel(); +} 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/ValidatedSolutionRecipe.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/ValidatedSolutionRecipe.java new file mode 100644 index 000000000000..6399904d3327 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/ValidatedSolutionRecipe.java @@ -0,0 +1,55 @@ +// 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.ValidatedSolutionRecipeInner; + +/** + * An immutable client-side representation of ValidatedSolutionRecipe. + */ +public interface ValidatedSolutionRecipe { + /** + * Gets the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + String id(); + + /** + * Gets the name property: The name of the resource. + * + * @return the name value. + */ + String name(); + + /** + * Gets the type property: The type of the resource. + * + * @return the type value. + */ + String type(); + + /** + * Gets the properties property: The resource-specific properties for this resource. + * + * @return the properties value. + */ + ValidatedSolutionRecipeProperties properties(); + + /** + * 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.ValidatedSolutionRecipeInner object. + * + * @return the inner object. + */ + 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/WebProxyConfiguration.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/WebProxyConfiguration.java new file mode 100644 index 000000000000..d1ae95de76d6 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/WebProxyConfiguration.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.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; + +/** + * Web proxy configuration. + */ +@Fluent +public final class WebProxyConfiguration implements JsonSerializable { + /* + * Connection URI of the web proxy. + */ + private String connectionUri; + + /* + * Port of the web proxy. + */ + private String port; + + /* + * Bypass list for the web proxy. + */ + private List bypassList; + + /** + * Creates an instance of WebProxyConfiguration class. + */ + public WebProxyConfiguration() { + } + + /** + * Get the connectionUri property: Connection URI of the web proxy. + * + * @return the connectionUri value. + */ + public String connectionUri() { + return this.connectionUri; + } + + /** + * Set the connectionUri property: Connection URI of the web proxy. + * + * @param connectionUri the connectionUri value to set. + * @return the WebProxyConfiguration object itself. + */ + public WebProxyConfiguration withConnectionUri(String connectionUri) { + this.connectionUri = connectionUri; + return this; + } + + /** + * Get the port property: Port of the web proxy. + * + * @return the port value. + */ + public String port() { + return this.port; + } + + /** + * Set the port property: Port of the web proxy. + * + * @param port the port value to set. + * @return the WebProxyConfiguration object itself. + */ + public WebProxyConfiguration withPort(String port) { + this.port = port; + return this; + } + + /** + * Get the bypassList property: Bypass list for the web proxy. + * + * @return the bypassList value. + */ + public List bypassList() { + return this.bypassList; + } + + /** + * Set the bypassList property: Bypass list for the web proxy. + * + * @param bypassList the bypassList value to set. + * @return the WebProxyConfiguration object itself. + */ + public WebProxyConfiguration withBypassList(List bypassList) { + this.bypassList = bypassList; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("connectionUri", this.connectionUri); + jsonWriter.writeStringField("port", this.port); + jsonWriter.writeArrayField("bypassList", this.bypassList, (writer, element) -> writer.writeString(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of WebProxyConfiguration from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of WebProxyConfiguration 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 WebProxyConfiguration. + */ + public static WebProxyConfiguration fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + WebProxyConfiguration deserializedWebProxyConfiguration = new WebProxyConfiguration(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("connectionUri".equals(fieldName)) { + deserializedWebProxyConfiguration.connectionUri = reader.getString(); + } else if ("port".equals(fieldName)) { + deserializedWebProxyConfiguration.port = reader.getString(); + } else if ("bypassList".equals(fieldName)) { + List bypassList = reader.readArray(reader1 -> reader1.getString()); + deserializedWebProxyConfiguration.bypassList = bypassList; + } else { + reader.skipChildren(); + } + } + + return deserializedWebProxyConfiguration; + }); + } +} 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..c29f5fbf850c --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/resources/META-INF/azure-resourcemanager-azurestackhci_apiview_properties.json @@ -0,0 +1,480 @@ +{ + "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.beginChangeRing": "Microsoft.AzureStackHCI.Clusters.changeRing", + "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.changeRing": "Microsoft.AzureStackHCI.Clusters.changeRing", + "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.EdgeMachineJobsClient": "Microsoft.AzureStackHCI.EdgeMachineJobs", + "com.azure.resourcemanager.azurestackhci.fluent.EdgeMachineJobsClient.beginCreateOrUpdate": "Microsoft.AzureStackHCI.EdgeMachineJobs.createOrUpdate", + "com.azure.resourcemanager.azurestackhci.fluent.EdgeMachineJobsClient.beginDelete": "Microsoft.AzureStackHCI.EdgeMachineJobs.delete", + "com.azure.resourcemanager.azurestackhci.fluent.EdgeMachineJobsClient.createOrUpdate": "Microsoft.AzureStackHCI.EdgeMachineJobs.createOrUpdate", + "com.azure.resourcemanager.azurestackhci.fluent.EdgeMachineJobsClient.delete": "Microsoft.AzureStackHCI.EdgeMachineJobs.delete", + "com.azure.resourcemanager.azurestackhci.fluent.EdgeMachineJobsClient.get": "Microsoft.AzureStackHCI.EdgeMachineJobs.get", + "com.azure.resourcemanager.azurestackhci.fluent.EdgeMachineJobsClient.getWithResponse": "Microsoft.AzureStackHCI.EdgeMachineJobs.get", + "com.azure.resourcemanager.azurestackhci.fluent.EdgeMachineJobsClient.list": "Microsoft.AzureStackHCI.EdgeMachineJobs.list", + "com.azure.resourcemanager.azurestackhci.fluent.EdgeMachinesClient": "Microsoft.AzureStackHCI.EdgeMachines", + "com.azure.resourcemanager.azurestackhci.fluent.EdgeMachinesClient.beginCreateOrUpdate": "Microsoft.AzureStackHCI.EdgeMachines.createOrUpdate", + "com.azure.resourcemanager.azurestackhci.fluent.EdgeMachinesClient.beginDelete": "Microsoft.AzureStackHCI.EdgeMachines.delete", + "com.azure.resourcemanager.azurestackhci.fluent.EdgeMachinesClient.beginUpdate": "Microsoft.AzureStackHCI.EdgeMachines.update", + "com.azure.resourcemanager.azurestackhci.fluent.EdgeMachinesClient.createOrUpdate": "Microsoft.AzureStackHCI.EdgeMachines.createOrUpdate", + "com.azure.resourcemanager.azurestackhci.fluent.EdgeMachinesClient.delete": "Microsoft.AzureStackHCI.EdgeMachines.delete", + "com.azure.resourcemanager.azurestackhci.fluent.EdgeMachinesClient.getByResourceGroup": "Microsoft.AzureStackHCI.EdgeMachines.get", + "com.azure.resourcemanager.azurestackhci.fluent.EdgeMachinesClient.getByResourceGroupWithResponse": "Microsoft.AzureStackHCI.EdgeMachines.get", + "com.azure.resourcemanager.azurestackhci.fluent.EdgeMachinesClient.list": "Microsoft.AzureStackHCI.EdgeMachines.listBySubscription", + "com.azure.resourcemanager.azurestackhci.fluent.EdgeMachinesClient.listByResourceGroup": "Microsoft.AzureStackHCI.EdgeMachines.listByResourceGroup", + "com.azure.resourcemanager.azurestackhci.fluent.EdgeMachinesClient.update": "Microsoft.AzureStackHCI.EdgeMachines.update", + "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.KubernetesVersionsClient": "Microsoft.AzureStackHCI.KubernetesVersions", + "com.azure.resourcemanager.azurestackhci.fluent.KubernetesVersionsClient.listBySubscriptionLocationResource": "Microsoft.AzureStackHCI.KubernetesVersions.listBySubscriptionLocationResource", + "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.OsImagesClient": "Microsoft.AzureStackHCI.OsImages", + "com.azure.resourcemanager.azurestackhci.fluent.OsImagesClient.get": "Microsoft.AzureStackHCI.OsImages.get", + "com.azure.resourcemanager.azurestackhci.fluent.OsImagesClient.getWithResponse": "Microsoft.AzureStackHCI.OsImages.get", + "com.azure.resourcemanager.azurestackhci.fluent.OsImagesClient.listBySubscriptionLocationResource": "Microsoft.AzureStackHCI.OsImages.listBySubscriptionLocationResource", + "com.azure.resourcemanager.azurestackhci.fluent.OwnershipVouchersClient": "Microsoft.AzureStackHCI.OwnershipVouchers", + "com.azure.resourcemanager.azurestackhci.fluent.OwnershipVouchersClient.validate": "Microsoft.AzureStackHCI.OwnershipVouchers.validate", + "com.azure.resourcemanager.azurestackhci.fluent.OwnershipVouchersClient.validateWithResponse": "Microsoft.AzureStackHCI.OwnershipVouchers.validate", + "com.azure.resourcemanager.azurestackhci.fluent.PlatformUpdatesClient": "Microsoft.AzureStackHCI.PlatformUpdates", + "com.azure.resourcemanager.azurestackhci.fluent.PlatformUpdatesClient.get": "Microsoft.AzureStackHCI.PlatformUpdates.get", + "com.azure.resourcemanager.azurestackhci.fluent.PlatformUpdatesClient.getWithResponse": "Microsoft.AzureStackHCI.PlatformUpdates.get", + "com.azure.resourcemanager.azurestackhci.fluent.PlatformUpdatesClient.list": "Microsoft.AzureStackHCI.PlatformUpdates.list", + "com.azure.resourcemanager.azurestackhci.fluent.PublishersClient": "Microsoft.AzureStackHCI.Publishers", + "com.azure.resourcemanager.azurestackhci.fluent.PublishersClient.get": "Microsoft.AzureStackHCI.Publishers.get", + "com.azure.resourcemanager.azurestackhci.fluent.PublishersClient.getWithResponse": "Microsoft.AzureStackHCI.Publishers.get", + "com.azure.resourcemanager.azurestackhci.fluent.PublishersClient.listByCluster": "Microsoft.AzureStackHCI.Publishers.listByCluster", + "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.UpdateContentsClient": "Microsoft.AzureStackHCI.UpdateContents", + "com.azure.resourcemanager.azurestackhci.fluent.UpdateContentsClient.get": "Microsoft.AzureStackHCI.UpdateContents.get", + "com.azure.resourcemanager.azurestackhci.fluent.UpdateContentsClient.getWithResponse": "Microsoft.AzureStackHCI.UpdateContents.get", + "com.azure.resourcemanager.azurestackhci.fluent.UpdateContentsClient.list": "Microsoft.AzureStackHCI.UpdateContents.list", + "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.EdgeMachineInner": "Microsoft.AzureStackHCI.EdgeMachine", + "com.azure.resourcemanager.azurestackhci.fluent.models.EdgeMachineJobInner": "Microsoft.AzureStackHCI.EdgeMachineJob", + "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.KubernetesVersionInner": "Microsoft.AzureStackHCI.KubernetesVersion", + "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.OsImageInner": "Microsoft.AzureStackHCI.OsImage", + "com.azure.resourcemanager.azurestackhci.fluent.models.PasswordCredentialInner": "Microsoft.AzureStackHCI.PasswordCredential", + "com.azure.resourcemanager.azurestackhci.fluent.models.PlatformUpdateInner": "Microsoft.AzureStackHCI.PlatformUpdate", + "com.azure.resourcemanager.azurestackhci.fluent.models.PublisherInner": "Microsoft.AzureStackHCI.Publisher", + "com.azure.resourcemanager.azurestackhci.fluent.models.PublisherProperties": "Microsoft.AzureStackHCI.PublisherProperties", + "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.UpdateContentInner": "Microsoft.AzureStackHCI.UpdateContent", + "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.ValidateOwnershipVouchersResponseInner": "Microsoft.AzureStackHCI.ValidateOwnershipVouchersResponse", + "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.EdgeMachineJobListResult": "Azure.ResourceManager.ResourceListResult", + "com.azure.resourcemanager.azurestackhci.implementation.models.EdgeMachineListResult": "Azure.ResourceManager.ResourceListResult", + "com.azure.resourcemanager.azurestackhci.implementation.models.ExtensionList": "Microsoft.AzureStackHCI.ExtensionList", + "com.azure.resourcemanager.azurestackhci.implementation.models.KubernetesVersionListResult": "Azure.ResourceManager.ResourceListResult", + "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.OsImageListResult": "Azure.ResourceManager.ResourceListResult", + "com.azure.resourcemanager.azurestackhci.implementation.models.PlatformUpdateListResult": "Azure.ResourceManager.ResourceListResult", + "com.azure.resourcemanager.azurestackhci.implementation.models.PublisherList": "Microsoft.AzureStackHCI.PublisherList", + "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.UpdateContentListResult": "Azure.ResourceManager.ResourceListResult", + "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.ChangeRingRequest": "Microsoft.AzureStackHCI.ChangeRingRequest", + "com.azure.resourcemanager.azurestackhci.models.ChangeRingRequestProperties": "Microsoft.AzureStackHCI.ChangeRingRequestProperties", + "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.ClusterSdnProperties": "Microsoft.AzureStackHCI.ClusterSdnProperties", + "com.azure.resourcemanager.azurestackhci.models.ComplianceAssignmentType": "Microsoft.AzureStackHCI.ComplianceAssignmentType", + "com.azure.resourcemanager.azurestackhci.models.ComplianceStatus": "Microsoft.AzureStackHCI.ComplianceStatus", + "com.azure.resourcemanager.azurestackhci.models.ConfidentialVmIntent": "Microsoft.AzureStackHCI.ConfidentialVmIntent", + "com.azure.resourcemanager.azurestackhci.models.ConfidentialVmProfile": "Microsoft.AzureStackHCI.ConfidentialVmProfile", + "com.azure.resourcemanager.azurestackhci.models.ConfidentialVmProperties": "Microsoft.AzureStackHCI.ConfidentialVmProperties", + "com.azure.resourcemanager.azurestackhci.models.ConfidentialVmStatus": "Microsoft.AzureStackHCI.ConfidentialVmStatus", + "com.azure.resourcemanager.azurestackhci.models.ConnectivityStatus": "Microsoft.AzureStackHCI.ConnectivityStatus", + "com.azure.resourcemanager.azurestackhci.models.ContentPayload": "Microsoft.AzureStackHCI.ContentPayload", + "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.DownloadOsJobProperties": "Microsoft.AzureStackHCI.DownloadOsJobProperties", + "com.azure.resourcemanager.azurestackhci.models.DownloadOsProfile": "Microsoft.AzureStackHCI.DownloadOsProfile", + "com.azure.resourcemanager.azurestackhci.models.DownloadRequest": "Microsoft.AzureStackHCI.DownloadRequest", + "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.EdgeMachineCollectLogJobProperties": "Microsoft.AzureStackHCI.EdgeMachineCollectLogJobProperties", + "com.azure.resourcemanager.azurestackhci.models.EdgeMachineCollectLogJobReportedProperties": "Microsoft.AzureStackHCI.EdgeMachineCollectLogJobReportedProperties", + "com.azure.resourcemanager.azurestackhci.models.EdgeMachineConnectivityStatus": "Microsoft.AzureStackHCI.EdgeMachineConnectivityStatus", + "com.azure.resourcemanager.azurestackhci.models.EdgeMachineJobProperties": "Microsoft.AzureStackHCI.EdgeMachineJobProperties", + "com.azure.resourcemanager.azurestackhci.models.EdgeMachineJobType": "Microsoft.AzureStackHCI.EdgeMachineJobType", + "com.azure.resourcemanager.azurestackhci.models.EdgeMachineKind": "Microsoft.AzureStackHCI.EdgeMachineKind", + "com.azure.resourcemanager.azurestackhci.models.EdgeMachineNetworkProfile": "Microsoft.AzureStackHCI.EdgeMachineNetworkProfile", + "com.azure.resourcemanager.azurestackhci.models.EdgeMachineNicDetail": "Microsoft.AzureStackHCI.EdgeMachineNicDetail", + "com.azure.resourcemanager.azurestackhci.models.EdgeMachinePatch": "Microsoft.AzureStackHCI.EdgeMachinePatch", + "com.azure.resourcemanager.azurestackhci.models.EdgeMachineProperties": "Microsoft.AzureStackHCI.EdgeMachineProperties", + "com.azure.resourcemanager.azurestackhci.models.EdgeMachineRemoteSupportJobProperties": "Microsoft.AzureStackHCI.EdgeMachineRemoteSupportJobProperties", + "com.azure.resourcemanager.azurestackhci.models.EdgeMachineRemoteSupportJobReportedProperties": "Microsoft.AzureStackHCI.EdgeMachineRemoteSupportJobReportedProperties", + "com.azure.resourcemanager.azurestackhci.models.EdgeMachineRemoteSupportNodeSettings": "Microsoft.AzureStackHCI.EdgeMachineRemoteSupportNodeSettings", + "com.azure.resourcemanager.azurestackhci.models.EdgeMachineReportedProperties": "Microsoft.AzureStackHCI.EdgeMachineReportedProperties", + "com.azure.resourcemanager.azurestackhci.models.EdgeMachineState": "Microsoft.AzureStackHCI.EdgeMachineState", + "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.HardwareProfile": "Microsoft.AzureStackHCI.HardwareProfile", + "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.IgvmStatus": "Microsoft.AzureStackHCI.IgvmStatus", + "com.azure.resourcemanager.azurestackhci.models.IgvmStatusDetail": "Microsoft.AzureStackHCI.IgvmStatusDetail", + "com.azure.resourcemanager.azurestackhci.models.ImdsAttestation": "Microsoft.AzureStackHCI.ImdsAttestation", + "com.azure.resourcemanager.azurestackhci.models.InfrastructureNetwork": "Microsoft.AzureStackHCI.InfrastructureNetwork", + "com.azure.resourcemanager.azurestackhci.models.IpAddressRange": "Microsoft.AzureStackHCI.IpAddressRange", + "com.azure.resourcemanager.azurestackhci.models.IpAssignmentType": "Microsoft.AzureStackHCI.IpAssignmentType", + "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.KubernetesVersionProperties": "Microsoft.AzureStackHCI.KubernetesVersionProperties", + "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.NetworkAdapter": "Microsoft.AzureStackHCI.NetworkAdapter", + "com.azure.resourcemanager.azurestackhci.models.NetworkConfiguration": "Microsoft.AzureStackHCI.NetworkConfiguration", + "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.OSOperationType": "Microsoft.AzureStackHCI.OSOperationType", + "com.azure.resourcemanager.azurestackhci.models.Observability": "Microsoft.AzureStackHCI.Observability", + "com.azure.resourcemanager.azurestackhci.models.OemActivation": "Microsoft.AzureStackHCI.OemActivation", + "com.azure.resourcemanager.azurestackhci.models.OnboardingConfiguration": "Microsoft.AzureStackHCI.OnboardingConfiguration", + "com.azure.resourcemanager.azurestackhci.models.OnboardingResourceType": "Microsoft.AzureStackHCI.OnboardingResourceType", + "com.azure.resourcemanager.azurestackhci.models.OperationDetail": "Microsoft.AzureStackHCI.OperationDetail", + "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.OsImageProperties": "Microsoft.AzureStackHCI.OsImageProperties", + "com.azure.resourcemanager.azurestackhci.models.OsProfile": "Microsoft.AzureStackHCI.OsProfile", + "com.azure.resourcemanager.azurestackhci.models.OsProvisionProfile": "Microsoft.AzureStackHCI.OsProvisionProfile", + "com.azure.resourcemanager.azurestackhci.models.OwnerKeyType": "Microsoft.AzureStackHCI.OwnerKeyType", + "com.azure.resourcemanager.azurestackhci.models.OwnershipVoucherDetails": "Microsoft.AzureStackHCI.OwnershipVoucherDetails", + "com.azure.resourcemanager.azurestackhci.models.OwnershipVoucherValidationDetails": "Microsoft.AzureStackHCI.OwnershipVoucherValidationDetails", + "com.azure.resourcemanager.azurestackhci.models.OwnershipVoucherValidationStatus": "Microsoft.AzureStackHCI.OwnershipVoucherValidationStatus", + "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.PlatformPayload": "Microsoft.AzureStackHCI.PlatformPayload", + "com.azure.resourcemanager.azurestackhci.models.PlatformUpdateDetails": "Microsoft.AzureStackHCI.PlatformUpdateDetails", + "com.azure.resourcemanager.azurestackhci.models.PlatformUpdateProperties": "Microsoft.AzureStackHCI.PlatformUpdateProperties", + "com.azure.resourcemanager.azurestackhci.models.PrecheckResult": "Microsoft.AzureStackHCI.PrecheckResult", + "com.azure.resourcemanager.azurestackhci.models.PrecheckResultTags": "Microsoft.AzureStackHCI.PrecheckResultTags", + "com.azure.resourcemanager.azurestackhci.models.ProvisionOsJobProperties": "Microsoft.AzureStackHCI.ProvisionOsJobProperties", + "com.azure.resourcemanager.azurestackhci.models.ProvisionOsReportedProperties": "Microsoft.AzureStackHCI.ProvisionOsReportedProperties", + "com.azure.resourcemanager.azurestackhci.models.ProvisioningDetails": "Microsoft.AzureStackHCI.ProvisioningDetails", + "com.azure.resourcemanager.azurestackhci.models.ProvisioningOsType": "Microsoft.AzureStackHCI.ProvisioningOsType", + "com.azure.resourcemanager.azurestackhci.models.ProvisioningRequest": "Microsoft.AzureStackHCI.ProvisioningRequest", + "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.SdnIntegrationIntent": "Microsoft.AzureStackHCI.SdnIntegrationIntent", + "com.azure.resourcemanager.azurestackhci.models.SdnProperties": "Microsoft.AzureStackHCI.SdnProperties", + "com.azure.resourcemanager.azurestackhci.models.SdnStatus": "Microsoft.AzureStackHCI.SdnStatus", + "com.azure.resourcemanager.azurestackhci.models.SecretType": "Microsoft.AzureStackHCI.SecretType", + "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.SiteDetails": "Microsoft.AzureStackHCI.SiteDetails", + "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.StorageConfiguration": "Microsoft.AzureStackHCI.StorageConfiguration", + "com.azure.resourcemanager.azurestackhci.models.StorageProfile": "Microsoft.AzureStackHCI.StorageProfile", + "com.azure.resourcemanager.azurestackhci.models.SupportStatus": "Microsoft.AzureStackHCI.SupportStatus", + "com.azure.resourcemanager.azurestackhci.models.SwitchDetail": "Microsoft.AzureStackHCI.SwitchDetail", + "com.azure.resourcemanager.azurestackhci.models.SwitchExtension": "Microsoft.AzureStackHCI.SwitchExtension", + "com.azure.resourcemanager.azurestackhci.models.TargetDeviceConfiguration": "Microsoft.AzureStackHCI.TargetDeviceConfiguration", + "com.azure.resourcemanager.azurestackhci.models.TimeConfiguration": "Microsoft.AzureStackHCI.TimeConfiguration", + "com.azure.resourcemanager.azurestackhci.models.UpdateContentProperties": "Microsoft.AzureStackHCI.UpdateContentProperties", + "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.UserDetails": "Microsoft.AzureStackHCI.UserDetails", + "com.azure.resourcemanager.azurestackhci.models.ValidateOwnershipVouchersRequest": "Microsoft.AzureStackHCI.ValidateOwnershipVouchersRequest", + "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.WebProxyConfiguration": "Microsoft.AzureStackHCI.WebProxyConfiguration", + "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..57049e114dac --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/resources/META-INF/azure-resourcemanager-azurestackhci_metadata.json @@ -0,0 +1 @@ +{"flavor":"azure","apiVersion":"2025-12-01-preview","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.beginChangeRing":"Microsoft.AzureStackHCI.Clusters.changeRing","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.changeRing":"Microsoft.AzureStackHCI.Clusters.changeRing","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.EdgeMachineJobsClient":"Microsoft.AzureStackHCI.EdgeMachineJobs","com.azure.resourcemanager.azurestackhci.fluent.EdgeMachineJobsClient.beginCreateOrUpdate":"Microsoft.AzureStackHCI.EdgeMachineJobs.createOrUpdate","com.azure.resourcemanager.azurestackhci.fluent.EdgeMachineJobsClient.beginDelete":"Microsoft.AzureStackHCI.EdgeMachineJobs.delete","com.azure.resourcemanager.azurestackhci.fluent.EdgeMachineJobsClient.createOrUpdate":"Microsoft.AzureStackHCI.EdgeMachineJobs.createOrUpdate","com.azure.resourcemanager.azurestackhci.fluent.EdgeMachineJobsClient.delete":"Microsoft.AzureStackHCI.EdgeMachineJobs.delete","com.azure.resourcemanager.azurestackhci.fluent.EdgeMachineJobsClient.get":"Microsoft.AzureStackHCI.EdgeMachineJobs.get","com.azure.resourcemanager.azurestackhci.fluent.EdgeMachineJobsClient.getWithResponse":"Microsoft.AzureStackHCI.EdgeMachineJobs.get","com.azure.resourcemanager.azurestackhci.fluent.EdgeMachineJobsClient.list":"Microsoft.AzureStackHCI.EdgeMachineJobs.list","com.azure.resourcemanager.azurestackhci.fluent.EdgeMachinesClient":"Microsoft.AzureStackHCI.EdgeMachines","com.azure.resourcemanager.azurestackhci.fluent.EdgeMachinesClient.beginCreateOrUpdate":"Microsoft.AzureStackHCI.EdgeMachines.createOrUpdate","com.azure.resourcemanager.azurestackhci.fluent.EdgeMachinesClient.beginDelete":"Microsoft.AzureStackHCI.EdgeMachines.delete","com.azure.resourcemanager.azurestackhci.fluent.EdgeMachinesClient.beginUpdate":"Microsoft.AzureStackHCI.EdgeMachines.update","com.azure.resourcemanager.azurestackhci.fluent.EdgeMachinesClient.createOrUpdate":"Microsoft.AzureStackHCI.EdgeMachines.createOrUpdate","com.azure.resourcemanager.azurestackhci.fluent.EdgeMachinesClient.delete":"Microsoft.AzureStackHCI.EdgeMachines.delete","com.azure.resourcemanager.azurestackhci.fluent.EdgeMachinesClient.getByResourceGroup":"Microsoft.AzureStackHCI.EdgeMachines.get","com.azure.resourcemanager.azurestackhci.fluent.EdgeMachinesClient.getByResourceGroupWithResponse":"Microsoft.AzureStackHCI.EdgeMachines.get","com.azure.resourcemanager.azurestackhci.fluent.EdgeMachinesClient.list":"Microsoft.AzureStackHCI.EdgeMachines.listBySubscription","com.azure.resourcemanager.azurestackhci.fluent.EdgeMachinesClient.listByResourceGroup":"Microsoft.AzureStackHCI.EdgeMachines.listByResourceGroup","com.azure.resourcemanager.azurestackhci.fluent.EdgeMachinesClient.update":"Microsoft.AzureStackHCI.EdgeMachines.update","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.KubernetesVersionsClient":"Microsoft.AzureStackHCI.KubernetesVersions","com.azure.resourcemanager.azurestackhci.fluent.KubernetesVersionsClient.listBySubscriptionLocationResource":"Microsoft.AzureStackHCI.KubernetesVersions.listBySubscriptionLocationResource","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.OsImagesClient":"Microsoft.AzureStackHCI.OsImages","com.azure.resourcemanager.azurestackhci.fluent.OsImagesClient.get":"Microsoft.AzureStackHCI.OsImages.get","com.azure.resourcemanager.azurestackhci.fluent.OsImagesClient.getWithResponse":"Microsoft.AzureStackHCI.OsImages.get","com.azure.resourcemanager.azurestackhci.fluent.OsImagesClient.listBySubscriptionLocationResource":"Microsoft.AzureStackHCI.OsImages.listBySubscriptionLocationResource","com.azure.resourcemanager.azurestackhci.fluent.OwnershipVouchersClient":"Microsoft.AzureStackHCI.OwnershipVouchers","com.azure.resourcemanager.azurestackhci.fluent.OwnershipVouchersClient.validate":"Microsoft.AzureStackHCI.OwnershipVouchers.validate","com.azure.resourcemanager.azurestackhci.fluent.OwnershipVouchersClient.validateWithResponse":"Microsoft.AzureStackHCI.OwnershipVouchers.validate","com.azure.resourcemanager.azurestackhci.fluent.PlatformUpdatesClient":"Microsoft.AzureStackHCI.PlatformUpdates","com.azure.resourcemanager.azurestackhci.fluent.PlatformUpdatesClient.get":"Microsoft.AzureStackHCI.PlatformUpdates.get","com.azure.resourcemanager.azurestackhci.fluent.PlatformUpdatesClient.getWithResponse":"Microsoft.AzureStackHCI.PlatformUpdates.get","com.azure.resourcemanager.azurestackhci.fluent.PlatformUpdatesClient.list":"Microsoft.AzureStackHCI.PlatformUpdates.list","com.azure.resourcemanager.azurestackhci.fluent.PublishersClient":"Microsoft.AzureStackHCI.Publishers","com.azure.resourcemanager.azurestackhci.fluent.PublishersClient.get":"Microsoft.AzureStackHCI.Publishers.get","com.azure.resourcemanager.azurestackhci.fluent.PublishersClient.getWithResponse":"Microsoft.AzureStackHCI.Publishers.get","com.azure.resourcemanager.azurestackhci.fluent.PublishersClient.listByCluster":"Microsoft.AzureStackHCI.Publishers.listByCluster","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.UpdateContentsClient":"Microsoft.AzureStackHCI.UpdateContents","com.azure.resourcemanager.azurestackhci.fluent.UpdateContentsClient.get":"Microsoft.AzureStackHCI.UpdateContents.get","com.azure.resourcemanager.azurestackhci.fluent.UpdateContentsClient.getWithResponse":"Microsoft.AzureStackHCI.UpdateContents.get","com.azure.resourcemanager.azurestackhci.fluent.UpdateContentsClient.list":"Microsoft.AzureStackHCI.UpdateContents.list","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.EdgeMachineInner":"Microsoft.AzureStackHCI.EdgeMachine","com.azure.resourcemanager.azurestackhci.fluent.models.EdgeMachineJobInner":"Microsoft.AzureStackHCI.EdgeMachineJob","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.KubernetesVersionInner":"Microsoft.AzureStackHCI.KubernetesVersion","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.OsImageInner":"Microsoft.AzureStackHCI.OsImage","com.azure.resourcemanager.azurestackhci.fluent.models.PasswordCredentialInner":"Microsoft.AzureStackHCI.PasswordCredential","com.azure.resourcemanager.azurestackhci.fluent.models.PlatformUpdateInner":"Microsoft.AzureStackHCI.PlatformUpdate","com.azure.resourcemanager.azurestackhci.fluent.models.PublisherInner":"Microsoft.AzureStackHCI.Publisher","com.azure.resourcemanager.azurestackhci.fluent.models.PublisherProperties":"Microsoft.AzureStackHCI.PublisherProperties","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.UpdateContentInner":"Microsoft.AzureStackHCI.UpdateContent","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.ValidateOwnershipVouchersResponseInner":"Microsoft.AzureStackHCI.ValidateOwnershipVouchersResponse","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.EdgeMachineJobListResult":"Azure.ResourceManager.ResourceListResult","com.azure.resourcemanager.azurestackhci.implementation.models.EdgeMachineListResult":"Azure.ResourceManager.ResourceListResult","com.azure.resourcemanager.azurestackhci.implementation.models.ExtensionList":"Microsoft.AzureStackHCI.ExtensionList","com.azure.resourcemanager.azurestackhci.implementation.models.KubernetesVersionListResult":"Azure.ResourceManager.ResourceListResult","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.OsImageListResult":"Azure.ResourceManager.ResourceListResult","com.azure.resourcemanager.azurestackhci.implementation.models.PlatformUpdateListResult":"Azure.ResourceManager.ResourceListResult","com.azure.resourcemanager.azurestackhci.implementation.models.PublisherList":"Microsoft.AzureStackHCI.PublisherList","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.UpdateContentListResult":"Azure.ResourceManager.ResourceListResult","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.ChangeRingRequest":"Microsoft.AzureStackHCI.ChangeRingRequest","com.azure.resourcemanager.azurestackhci.models.ChangeRingRequestProperties":"Microsoft.AzureStackHCI.ChangeRingRequestProperties","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.ClusterSdnProperties":"Microsoft.AzureStackHCI.ClusterSdnProperties","com.azure.resourcemanager.azurestackhci.models.ComplianceAssignmentType":"Microsoft.AzureStackHCI.ComplianceAssignmentType","com.azure.resourcemanager.azurestackhci.models.ComplianceStatus":"Microsoft.AzureStackHCI.ComplianceStatus","com.azure.resourcemanager.azurestackhci.models.ConfidentialVmIntent":"Microsoft.AzureStackHCI.ConfidentialVmIntent","com.azure.resourcemanager.azurestackhci.models.ConfidentialVmProfile":"Microsoft.AzureStackHCI.ConfidentialVmProfile","com.azure.resourcemanager.azurestackhci.models.ConfidentialVmProperties":"Microsoft.AzureStackHCI.ConfidentialVmProperties","com.azure.resourcemanager.azurestackhci.models.ConfidentialVmStatus":"Microsoft.AzureStackHCI.ConfidentialVmStatus","com.azure.resourcemanager.azurestackhci.models.ConnectivityStatus":"Microsoft.AzureStackHCI.ConnectivityStatus","com.azure.resourcemanager.azurestackhci.models.ContentPayload":"Microsoft.AzureStackHCI.ContentPayload","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.DownloadOsJobProperties":"Microsoft.AzureStackHCI.DownloadOsJobProperties","com.azure.resourcemanager.azurestackhci.models.DownloadOsProfile":"Microsoft.AzureStackHCI.DownloadOsProfile","com.azure.resourcemanager.azurestackhci.models.DownloadRequest":"Microsoft.AzureStackHCI.DownloadRequest","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.EdgeMachineCollectLogJobProperties":"Microsoft.AzureStackHCI.EdgeMachineCollectLogJobProperties","com.azure.resourcemanager.azurestackhci.models.EdgeMachineCollectLogJobReportedProperties":"Microsoft.AzureStackHCI.EdgeMachineCollectLogJobReportedProperties","com.azure.resourcemanager.azurestackhci.models.EdgeMachineConnectivityStatus":"Microsoft.AzureStackHCI.EdgeMachineConnectivityStatus","com.azure.resourcemanager.azurestackhci.models.EdgeMachineJobProperties":"Microsoft.AzureStackHCI.EdgeMachineJobProperties","com.azure.resourcemanager.azurestackhci.models.EdgeMachineJobType":"Microsoft.AzureStackHCI.EdgeMachineJobType","com.azure.resourcemanager.azurestackhci.models.EdgeMachineKind":"Microsoft.AzureStackHCI.EdgeMachineKind","com.azure.resourcemanager.azurestackhci.models.EdgeMachineNetworkProfile":"Microsoft.AzureStackHCI.EdgeMachineNetworkProfile","com.azure.resourcemanager.azurestackhci.models.EdgeMachineNicDetail":"Microsoft.AzureStackHCI.EdgeMachineNicDetail","com.azure.resourcemanager.azurestackhci.models.EdgeMachinePatch":"Microsoft.AzureStackHCI.EdgeMachinePatch","com.azure.resourcemanager.azurestackhci.models.EdgeMachineProperties":"Microsoft.AzureStackHCI.EdgeMachineProperties","com.azure.resourcemanager.azurestackhci.models.EdgeMachineRemoteSupportJobProperties":"Microsoft.AzureStackHCI.EdgeMachineRemoteSupportJobProperties","com.azure.resourcemanager.azurestackhci.models.EdgeMachineRemoteSupportJobReportedProperties":"Microsoft.AzureStackHCI.EdgeMachineRemoteSupportJobReportedProperties","com.azure.resourcemanager.azurestackhci.models.EdgeMachineRemoteSupportNodeSettings":"Microsoft.AzureStackHCI.EdgeMachineRemoteSupportNodeSettings","com.azure.resourcemanager.azurestackhci.models.EdgeMachineReportedProperties":"Microsoft.AzureStackHCI.EdgeMachineReportedProperties","com.azure.resourcemanager.azurestackhci.models.EdgeMachineState":"Microsoft.AzureStackHCI.EdgeMachineState","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.HardwareProfile":"Microsoft.AzureStackHCI.HardwareProfile","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.IgvmStatus":"Microsoft.AzureStackHCI.IgvmStatus","com.azure.resourcemanager.azurestackhci.models.IgvmStatusDetail":"Microsoft.AzureStackHCI.IgvmStatusDetail","com.azure.resourcemanager.azurestackhci.models.ImdsAttestation":"Microsoft.AzureStackHCI.ImdsAttestation","com.azure.resourcemanager.azurestackhci.models.InfrastructureNetwork":"Microsoft.AzureStackHCI.InfrastructureNetwork","com.azure.resourcemanager.azurestackhci.models.IpAddressRange":"Microsoft.AzureStackHCI.IpAddressRange","com.azure.resourcemanager.azurestackhci.models.IpAssignmentType":"Microsoft.AzureStackHCI.IpAssignmentType","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.KubernetesVersionProperties":"Microsoft.AzureStackHCI.KubernetesVersionProperties","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.NetworkAdapter":"Microsoft.AzureStackHCI.NetworkAdapter","com.azure.resourcemanager.azurestackhci.models.NetworkConfiguration":"Microsoft.AzureStackHCI.NetworkConfiguration","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.OSOperationType":"Microsoft.AzureStackHCI.OSOperationType","com.azure.resourcemanager.azurestackhci.models.Observability":"Microsoft.AzureStackHCI.Observability","com.azure.resourcemanager.azurestackhci.models.OemActivation":"Microsoft.AzureStackHCI.OemActivation","com.azure.resourcemanager.azurestackhci.models.OnboardingConfiguration":"Microsoft.AzureStackHCI.OnboardingConfiguration","com.azure.resourcemanager.azurestackhci.models.OnboardingResourceType":"Microsoft.AzureStackHCI.OnboardingResourceType","com.azure.resourcemanager.azurestackhci.models.OperationDetail":"Microsoft.AzureStackHCI.OperationDetail","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.OsImageProperties":"Microsoft.AzureStackHCI.OsImageProperties","com.azure.resourcemanager.azurestackhci.models.OsProfile":"Microsoft.AzureStackHCI.OsProfile","com.azure.resourcemanager.azurestackhci.models.OsProvisionProfile":"Microsoft.AzureStackHCI.OsProvisionProfile","com.azure.resourcemanager.azurestackhci.models.OwnerKeyType":"Microsoft.AzureStackHCI.OwnerKeyType","com.azure.resourcemanager.azurestackhci.models.OwnershipVoucherDetails":"Microsoft.AzureStackHCI.OwnershipVoucherDetails","com.azure.resourcemanager.azurestackhci.models.OwnershipVoucherValidationDetails":"Microsoft.AzureStackHCI.OwnershipVoucherValidationDetails","com.azure.resourcemanager.azurestackhci.models.OwnershipVoucherValidationStatus":"Microsoft.AzureStackHCI.OwnershipVoucherValidationStatus","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.PlatformPayload":"Microsoft.AzureStackHCI.PlatformPayload","com.azure.resourcemanager.azurestackhci.models.PlatformUpdateDetails":"Microsoft.AzureStackHCI.PlatformUpdateDetails","com.azure.resourcemanager.azurestackhci.models.PlatformUpdateProperties":"Microsoft.AzureStackHCI.PlatformUpdateProperties","com.azure.resourcemanager.azurestackhci.models.PrecheckResult":"Microsoft.AzureStackHCI.PrecheckResult","com.azure.resourcemanager.azurestackhci.models.PrecheckResultTags":"Microsoft.AzureStackHCI.PrecheckResultTags","com.azure.resourcemanager.azurestackhci.models.ProvisionOsJobProperties":"Microsoft.AzureStackHCI.ProvisionOsJobProperties","com.azure.resourcemanager.azurestackhci.models.ProvisionOsReportedProperties":"Microsoft.AzureStackHCI.ProvisionOsReportedProperties","com.azure.resourcemanager.azurestackhci.models.ProvisioningDetails":"Microsoft.AzureStackHCI.ProvisioningDetails","com.azure.resourcemanager.azurestackhci.models.ProvisioningOsType":"Microsoft.AzureStackHCI.ProvisioningOsType","com.azure.resourcemanager.azurestackhci.models.ProvisioningRequest":"Microsoft.AzureStackHCI.ProvisioningRequest","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.SdnIntegrationIntent":"Microsoft.AzureStackHCI.SdnIntegrationIntent","com.azure.resourcemanager.azurestackhci.models.SdnProperties":"Microsoft.AzureStackHCI.SdnProperties","com.azure.resourcemanager.azurestackhci.models.SdnStatus":"Microsoft.AzureStackHCI.SdnStatus","com.azure.resourcemanager.azurestackhci.models.SecretType":"Microsoft.AzureStackHCI.SecretType","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.SiteDetails":"Microsoft.AzureStackHCI.SiteDetails","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.StorageConfiguration":"Microsoft.AzureStackHCI.StorageConfiguration","com.azure.resourcemanager.azurestackhci.models.StorageProfile":"Microsoft.AzureStackHCI.StorageProfile","com.azure.resourcemanager.azurestackhci.models.SupportStatus":"Microsoft.AzureStackHCI.SupportStatus","com.azure.resourcemanager.azurestackhci.models.SwitchDetail":"Microsoft.AzureStackHCI.SwitchDetail","com.azure.resourcemanager.azurestackhci.models.SwitchExtension":"Microsoft.AzureStackHCI.SwitchExtension","com.azure.resourcemanager.azurestackhci.models.TargetDeviceConfiguration":"Microsoft.AzureStackHCI.TargetDeviceConfiguration","com.azure.resourcemanager.azurestackhci.models.TimeConfiguration":"Microsoft.AzureStackHCI.TimeConfiguration","com.azure.resourcemanager.azurestackhci.models.UpdateContentProperties":"Microsoft.AzureStackHCI.UpdateContentProperties","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.UserDetails":"Microsoft.AzureStackHCI.UserDetails","com.azure.resourcemanager.azurestackhci.models.ValidateOwnershipVouchersRequest":"Microsoft.AzureStackHCI.ValidateOwnershipVouchersRequest","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.WebProxyConfiguration":"Microsoft.AzureStackHCI.WebProxyConfiguration","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/EdgeMachineJobsClient.java","src/main/java/com/azure/resourcemanager/azurestackhci/fluent/EdgeMachinesClient.java","src/main/java/com/azure/resourcemanager/azurestackhci/fluent/ExtensionsClient.java","src/main/java/com/azure/resourcemanager/azurestackhci/fluent/KubernetesVersionsClient.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/OsImagesClient.java","src/main/java/com/azure/resourcemanager/azurestackhci/fluent/OwnershipVouchersClient.java","src/main/java/com/azure/resourcemanager/azurestackhci/fluent/PlatformUpdatesClient.java","src/main/java/com/azure/resourcemanager/azurestackhci/fluent/PublishersClient.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/UpdateContentsClient.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/EdgeMachineInner.java","src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/EdgeMachineJobInner.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/KubernetesVersionInner.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/OsImageInner.java","src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/PasswordCredentialInner.java","src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/PlatformUpdateInner.java","src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/PublisherInner.java","src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/PublisherProperties.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/UpdateContentInner.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/ValidateOwnershipVouchersResponseInner.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/EdgeMachineImpl.java","src/main/java/com/azure/resourcemanager/azurestackhci/implementation/EdgeMachineJobImpl.java","src/main/java/com/azure/resourcemanager/azurestackhci/implementation/EdgeMachineJobsClientImpl.java","src/main/java/com/azure/resourcemanager/azurestackhci/implementation/EdgeMachineJobsImpl.java","src/main/java/com/azure/resourcemanager/azurestackhci/implementation/EdgeMachinesClientImpl.java","src/main/java/com/azure/resourcemanager/azurestackhci/implementation/EdgeMachinesImpl.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/KubernetesVersionImpl.java","src/main/java/com/azure/resourcemanager/azurestackhci/implementation/KubernetesVersionsClientImpl.java","src/main/java/com/azure/resourcemanager/azurestackhci/implementation/KubernetesVersionsImpl.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/OsImageImpl.java","src/main/java/com/azure/resourcemanager/azurestackhci/implementation/OsImagesClientImpl.java","src/main/java/com/azure/resourcemanager/azurestackhci/implementation/OsImagesImpl.java","src/main/java/com/azure/resourcemanager/azurestackhci/implementation/OwnershipVouchersClientImpl.java","src/main/java/com/azure/resourcemanager/azurestackhci/implementation/OwnershipVouchersImpl.java","src/main/java/com/azure/resourcemanager/azurestackhci/implementation/PasswordCredentialImpl.java","src/main/java/com/azure/resourcemanager/azurestackhci/implementation/PlatformUpdateImpl.java","src/main/java/com/azure/resourcemanager/azurestackhci/implementation/PlatformUpdatesClientImpl.java","src/main/java/com/azure/resourcemanager/azurestackhci/implementation/PlatformUpdatesImpl.java","src/main/java/com/azure/resourcemanager/azurestackhci/implementation/PublisherImpl.java","src/main/java/com/azure/resourcemanager/azurestackhci/implementation/PublishersClientImpl.java","src/main/java/com/azure/resourcemanager/azurestackhci/implementation/PublishersImpl.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/UpdateContentImpl.java","src/main/java/com/azure/resourcemanager/azurestackhci/implementation/UpdateContentsClientImpl.java","src/main/java/com/azure/resourcemanager/azurestackhci/implementation/UpdateContentsImpl.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/ValidateOwnershipVouchersResponseImpl.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/EdgeMachineJobListResult.java","src/main/java/com/azure/resourcemanager/azurestackhci/implementation/models/EdgeMachineListResult.java","src/main/java/com/azure/resourcemanager/azurestackhci/implementation/models/ExtensionList.java","src/main/java/com/azure/resourcemanager/azurestackhci/implementation/models/KubernetesVersionListResult.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/OsImageListResult.java","src/main/java/com/azure/resourcemanager/azurestackhci/implementation/models/PlatformUpdateListResult.java","src/main/java/com/azure/resourcemanager/azurestackhci/implementation/models/PublisherList.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/UpdateContentListResult.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/ChangeRingRequest.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/ChangeRingRequestProperties.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/ClusterSdnProperties.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/ConfidentialVmIntent.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/ConfidentialVmProfile.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/ConfidentialVmProperties.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/ConfidentialVmStatus.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/ConnectivityStatus.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/ContentPayload.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/DownloadOsJobProperties.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/DownloadOsProfile.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/DownloadRequest.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/EdgeMachine.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/EdgeMachineCollectLogJobProperties.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/EdgeMachineCollectLogJobReportedProperties.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/EdgeMachineConnectivityStatus.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/EdgeMachineJob.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/EdgeMachineJobProperties.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/EdgeMachineJobType.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/EdgeMachineJobs.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/EdgeMachineKind.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/EdgeMachineNetworkProfile.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/EdgeMachineNicDetail.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/EdgeMachinePatch.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/EdgeMachineProperties.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/EdgeMachineRemoteSupportJobProperties.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/EdgeMachineRemoteSupportJobReportedProperties.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/EdgeMachineRemoteSupportNodeSettings.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/EdgeMachineReportedProperties.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/EdgeMachineState.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/EdgeMachines.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/HardwareProfile.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/IgvmStatus.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/IgvmStatusDetail.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/IpAddressRange.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/IpAssignmentType.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/KubernetesVersion.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/KubernetesVersionProperties.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/KubernetesVersions.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/NetworkAdapter.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/NetworkConfiguration.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/OSOperationType.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/OnboardingConfiguration.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/OnboardingResourceType.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/Operation.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/OperationDetail.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/OsImage.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/OsImageProperties.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/OsImages.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/OsProfile.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/OsProvisionProfile.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/OwnerKeyType.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/OwnershipVoucherDetails.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/OwnershipVoucherValidationDetails.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/OwnershipVoucherValidationStatus.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/OwnershipVouchers.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/PlatformPayload.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/PlatformUpdate.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/PlatformUpdateDetails.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/PlatformUpdateProperties.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/PlatformUpdates.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/ProvisionOsJobProperties.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/ProvisionOsReportedProperties.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/ProvisioningDetails.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/ProvisioningOsType.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/ProvisioningRequest.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/ProvisioningState.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/Publisher.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/Publishers.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/SdnIntegrationIntent.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/SdnProperties.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/SdnStatus.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/SecretType.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/SiteDetails.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/StorageConfiguration.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/StorageProfile.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/SupportStatus.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/TargetDeviceConfiguration.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/TimeConfiguration.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/UpdateContent.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/UpdateContentProperties.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/UpdateContents.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/UserDetails.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/ValidateOwnershipVouchersRequest.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/ValidateOwnershipVouchersResponse.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/WebProxyConfiguration.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..d99f1215c715 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.EdgeMachineJobsClientImpl$EdgeMachineJobsService"],["com.azure.resourcemanager.azurestackhci.implementation.EdgeMachinesClientImpl$EdgeMachinesService"],["com.azure.resourcemanager.azurestackhci.implementation.ExtensionsClientImpl$ExtensionsService"],["com.azure.resourcemanager.azurestackhci.implementation.KubernetesVersionsClientImpl$KubernetesVersionsService"],["com.azure.resourcemanager.azurestackhci.implementation.OffersClientImpl$OffersService"],["com.azure.resourcemanager.azurestackhci.implementation.OperationsClientImpl$OperationsService"],["com.azure.resourcemanager.azurestackhci.implementation.OsImagesClientImpl$OsImagesService"],["com.azure.resourcemanager.azurestackhci.implementation.OwnershipVouchersClientImpl$OwnershipVouchersService"],["com.azure.resourcemanager.azurestackhci.implementation.PlatformUpdatesClientImpl$PlatformUpdatesService"],["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.UpdateContentsClientImpl$UpdateContentsService"],["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..0c8094f3f11b 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: 2025-12-01-preview/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..98f8d5b09dee 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: 2025-12-01-preview/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..5a6cc493a297 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: 2025-12-01-preview/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..854e1e5edc11 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: 2025-12-01-preview/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..cf9c90184377 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: 2025-12-01-preview/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..77c70b417f55 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: 2025-12-01-preview/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..e98d8d11f3e7 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: 2025-12-01-preview/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..5eef97e5f2bb 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: 2025-12-01-preview/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..dab69cbb3e30 --- /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: 2025-12-01-preview/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..4204374f914d 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: 2025-12-01-preview/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/ClustersChangeRingSamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/ClustersChangeRingSamples.java new file mode 100644 index 000000000000..727c6c723dc4 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/ClustersChangeRingSamples.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.resourcemanager.azurestackhci.models.ChangeRingRequest; +import com.azure.resourcemanager.azurestackhci.models.ChangeRingRequestProperties; + +/** + * Samples for Clusters ChangeRing. + */ +public final class ClustersChangeRingSamples { + /* + * x-ms-original-file: 2025-12-01-preview/ChangeClusterRing.json + */ + /** + * Sample code: Change cluster ring. + * + * @param manager Entry point to AzureStackHciManager. + */ + public static void changeClusterRing(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { + manager.clusters() + .changeRing("test-rg", "myCluster", + new ChangeRingRequest().withProperties(new ChangeRingRequestProperties().withTargetRing("Insider")), + com.azure.core.util.Context.NONE); + } +} 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..39488fa31edd 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: 2025-12-01-preview/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..03e3f162175c 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: 2025-12-01-preview/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..a29a22e727df 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: 2025-12-01-preview/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..f99a01b1cfff 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: 2025-12-01-preview/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..9b6842f03668 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: 2025-12-01-preview/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..1d9f37cc4adb 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: 2025-12-01-preview/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..2353e076b942 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: 2025-12-01-preview/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..44b1a513ddf0 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: 2025-12-01-preview/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..2a2ecb82e371 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: 2025-12-01-preview/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..64d93b7b41da 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: 2025-12-01-preview/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..4b198b799328 --- /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: 2025-12-01-preview/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..ad248da5ebbf 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: 2025-12-01-preview/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..47aab4735c02 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: 2025-12-01-preview/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: 2025-12-01-preview/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..abe7927cfd50 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: 2025-12-01-preview/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..1478147a179c 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: 2025-12-01-preview/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..9aac9dd5f802 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: 2025-12-01-preview/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..e23b60cd0ada --- /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: 2025-12-01-preview/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: 2025-12-01-preview/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..45f3d4d7e914 --- /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: 2025-12-01-preview/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..8f2978f6692f --- /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: 2025-12-01-preview/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..2fa0101cc75f --- /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: 2025-12-01-preview/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..87474baed34d 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: 2025-12-01-preview/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..4cf536eeb765 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: 2025-12-01-preview/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..264252141d6e 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: 2025-12-01-preview/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..032c94323cc1 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: 2025-12-01-preview/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..3654cf88190c 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: 2025-12-01-preview/ValidateEdgeDevices.json */ /** * Sample code: Validate Edge Devices. diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/EdgeMachineJobsCreateOrUpdateSamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/EdgeMachineJobsCreateOrUpdateSamples.java new file mode 100644 index 000000000000..f069a854f842 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/EdgeMachineJobsCreateOrUpdateSamples.java @@ -0,0 +1,211 @@ +// 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.DeploymentMode; +import com.azure.resourcemanager.azurestackhci.models.DownloadOsJobProperties; +import com.azure.resourcemanager.azurestackhci.models.DownloadOsProfile; +import com.azure.resourcemanager.azurestackhci.models.DownloadRequest; +import com.azure.resourcemanager.azurestackhci.models.EdgeMachineJobProperties; +import com.azure.resourcemanager.azurestackhci.models.EdgeMachineRemoteSupportJobProperties; +import com.azure.resourcemanager.azurestackhci.models.IpAddressRange; +import com.azure.resourcemanager.azurestackhci.models.IpAssignmentType; +import com.azure.resourcemanager.azurestackhci.models.NetworkAdapter; +import com.azure.resourcemanager.azurestackhci.models.NetworkConfiguration; +import com.azure.resourcemanager.azurestackhci.models.OSOperationType; +import com.azure.resourcemanager.azurestackhci.models.OnboardingConfiguration; +import com.azure.resourcemanager.azurestackhci.models.OnboardingResourceType; +import com.azure.resourcemanager.azurestackhci.models.OsProvisionProfile; +import com.azure.resourcemanager.azurestackhci.models.ProvisionOsJobProperties; +import com.azure.resourcemanager.azurestackhci.models.ProvisioningOsType; +import com.azure.resourcemanager.azurestackhci.models.ProvisioningRequest; +import com.azure.resourcemanager.azurestackhci.models.RemoteSupportAccessLevel; +import com.azure.resourcemanager.azurestackhci.models.RemoteSupportType; +import com.azure.resourcemanager.azurestackhci.models.SecretType; +import com.azure.resourcemanager.azurestackhci.models.StorageConfiguration; +import com.azure.resourcemanager.azurestackhci.models.TargetDeviceConfiguration; +import com.azure.resourcemanager.azurestackhci.models.TimeConfiguration; +import com.azure.resourcemanager.azurestackhci.models.UserDetails; +import com.azure.resourcemanager.azurestackhci.models.WebProxyConfiguration; +import java.time.OffsetDateTime; +import java.util.Arrays; + +/** + * Samples for EdgeMachineJobs CreateOrUpdate. + */ +public final class EdgeMachineJobsCreateOrUpdateSamples { + /* + * x-ms-original-file: 2025-12-01-preview/EdgeMachineJobs_CreateOrUpdate_DownloadOs.json + */ + /** + * Sample code: EdgeMachineJobs_CreateOrUpdate_DownloadOs. + * + * @param manager Entry point to AzureStackHciManager. + */ + public static void + edgeMachineJobsCreateOrUpdateDownloadOs(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { + manager.edgeMachineJobs() + .define("DownloadOs") + .withExistingEdgeMachine("ArcInstance-rg", "machine1") + .withProperties(new DownloadOsJobProperties().withDeploymentMode(DeploymentMode.DEPLOY) + .withDownloadRequest(new DownloadRequest().withTarget(ProvisioningOsType.AZURE_LINUX) + .withOsProfile(new DownloadOsProfile().withOsName("AzureLinux") + .withOsType("AzureLinux") + .withOsVersion("3.0") + .withOsImageLocation("https://aka.ms/aep/azlinux3.0") + .withVsrVersion("1.0.0") + .withImageHash("sha256:a8b1c2d3e4f5a6b7c8d9e0f1a2b3c4d5e6f7a8b9c0d1e2f3a4b5c6d7e8f9a0b1") + .withGpgPubKey("fakeTokenPlaceholder")))) + .create(); + } + + /* + * x-ms-original-file: 2025-12-01-preview/EdgeMachineJobs_CreateOrUpdate_ProvisionOs.json + */ + /** + * Sample code: EdgeMachineJobs_CreateOrUpdate_ProvisionOs. + * + * @param manager Entry point to AzureStackHciManager. + */ + public static void + edgeMachineJobsCreateOrUpdateProvisionOs(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { + manager.edgeMachineJobs() + .define("ProvisionOs") + .withExistingEdgeMachine("ArcInstance-rg", "machine1") + .withProperties(new ProvisionOsJobProperties().withDeploymentMode(DeploymentMode.DEPLOY) + .withProvisioningRequest(new ProvisioningRequest().withTarget(ProvisioningOsType.AZURE_LINUX) + .withOsProfile(new OsProvisionProfile().withOsName("AzureLinux") + .withOsType("AzureLinux") + .withOsVersion("3.0") + .withOsImageLocation("https://aka.ms/aep/azlinux3.0") + .withVsrVersion("1.0.0") + .withImageHash("sha256:a1b2c3d4e5f6789012345678901234567890abcdef1234567890abcdef123456") + .withGpgPubKey("fakeTokenPlaceholder") + .withOperationType(OSOperationType.PROVISION)) + .withUserDetails(Arrays.asList(new UserDetails().withUserName("edgeuser") + .withSecretType(SecretType.KEY_VAULT) + .withSecretLocation("fakeTokenPlaceholder") + .withSshPubKey( + Arrays.asList("ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC7... edgeuser@example.com")))) + .withOnboardingConfiguration(new OnboardingConfiguration() + .withType(OnboardingResourceType.HYBRID_COMPUTE_MACHINE) + .withResourceId( + "/subscriptions/ff0aa6da-20f8-44fe-9aee-381c8e8a4aeb/resourceGroups/bhukumar-test-rg/providers/Microsoft.HybridCompute/machines/bkumar-t1") + .withLocation("eastus") + .withTenantId("72f988bf-86f1-41af-91ab-2d7cd011db47") + .withArcVirtualMachineId("634b9db8-83e1-46ed-b391-c1614e2d0097")) + .withDeviceConfiguration(new TargetDeviceConfiguration() + .withNetwork(new NetworkConfiguration().withNetworkAdapters( + Arrays.asList(new NetworkAdapter().withIpAssignmentType(IpAssignmentType.AUTOMATIC) + .withIpAddress("") + .withIpAddressRange(new IpAddressRange().withStartIp("").withEndIp("")) + .withGateway("") + .withSubnetMask("") + .withDnsAddressArray(Arrays.asList("8.8.8.8")) + .withVlanId("0")))) + .withHostName("634b9db8-83e1-46ed-b391-c1614e2d0097") + .withWebProxy(new WebProxyConfiguration().withConnectionUri("https://microsoft.com/a") + .withPort("") + .withBypassList(Arrays.asList())) + .withTime(new TimeConfiguration().withPrimaryTimeServer("") + .withSecondaryTimeServer("") + .withTimeZone("UTC")) + .withStorage(new StorageConfiguration().withPartitionSize("30GB"))) + .withCustomConfiguration("eyJjdXN0b21Db25maWciOiAiZXhhbXBsZSBiYXNlNjQgZW5jb2RlZCBjb25maWcifQ=="))) + .create(); + } + + /* + * x-ms-original-file: 2025-12-01-preview/EdgeMachineJobs_CreateOrUpdate_UpdateOs.json + */ + /** + * Sample code: EdgeMachineJobs_CreateOrUpdate_UpdateOs. + * + * @param manager Entry point to AzureStackHciManager. + */ + public static void + edgeMachineJobsCreateOrUpdateUpdateOs(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { + manager.edgeMachineJobs() + .define("UpdateOs") + .withExistingEdgeMachine("ArcInstance-rg", "machine1") + .withProperties(new ProvisionOsJobProperties().withDeploymentMode(DeploymentMode.DEPLOY) + .withProvisioningRequest(new ProvisioningRequest().withTarget(ProvisioningOsType.AZURE_LINUX) + .withOsProfile(new OsProvisionProfile().withOsName("AzureLinux") + .withOsType("AzureLinux") + .withOsVersion("3.1") + .withOsImageLocation("https://aka.ms/aep/azlinux3.1") + .withVsrVersion("1.1.0") + .withImageHash("sha256:b2c3d4e5f6789012345678901234567890abcdef1234567890abcdef12345678") + .withGpgPubKey("fakeTokenPlaceholder") + .withOperationType(OSOperationType.UPDATE)) + .withUserDetails(Arrays.asList(new UserDetails().withUserName("edgeuser") + .withSecretType(SecretType.KEY_VAULT) + .withSecretLocation("fakeTokenPlaceholder") + .withSshPubKey( + Arrays.asList("ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC7... edgeuser@example.com")))) + .withOnboardingConfiguration(new OnboardingConfiguration() + .withType(OnboardingResourceType.HYBRID_COMPUTE_MACHINE) + .withResourceId( + "/subscriptions/ff0aa6da-20f8-44fe-9aee-381c8e8a4aeb/resourceGroups/bhukumar-test-rg/providers/Microsoft.HybridCompute/machines/bkumar-t1") + .withLocation("eastus") + .withTenantId("72f988bf-86f1-41af-91ab-2d7cd011db47") + .withArcVirtualMachineId("634b9db8-83e1-46ed-b391-c1614e2d0097")) + .withDeviceConfiguration(new TargetDeviceConfiguration() + .withNetwork(new NetworkConfiguration().withNetworkAdapters( + Arrays.asList(new NetworkAdapter().withIpAssignmentType(IpAssignmentType.AUTOMATIC) + .withIpAddress("") + .withIpAddressRange(new IpAddressRange().withStartIp("").withEndIp("")) + .withGateway("") + .withSubnetMask("") + .withDnsAddressArray(Arrays.asList("8.8.8.8")) + .withVlanId("0")))) + .withHostName("634b9db8-83e1-46ed-b391-c1614e2d0097") + .withWebProxy(new WebProxyConfiguration().withConnectionUri("https://microsoft.com/a") + .withPort("") + .withBypassList(Arrays.asList())) + .withTime(new TimeConfiguration().withPrimaryTimeServer("") + .withSecondaryTimeServer("") + .withTimeZone("UTC"))) + .withCustomConfiguration("eyJjdXN0b21Db25maWciOiAiZXhhbXBsZSBiYXNlNjQgZW5jb2RlZCBjb25maWcifQ=="))) + .create(); + } + + /* + * x-ms-original-file: 2025-12-01-preview/EdgeMachineJobs_CreateOrUpdate_CollectLog.json + */ + /** + * Sample code: EdgeMachineJobs_CreateOrUpdate_CollectLog. + * + * @param manager Entry point to AzureStackHciManager. + */ + public static void + edgeMachineJobsCreateOrUpdateCollectLog(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { + manager.edgeMachineJobs() + .define("triggerLogCollection") + .withExistingEdgeMachine("ArcInstance-rg", "machine1") + .withProperties(new EdgeMachineJobProperties().withDeploymentMode(DeploymentMode.VALIDATE)) + .create(); + } + + /* + * x-ms-original-file: 2025-12-01-preview/EdgeMachineJobs_CreateOrUpdate_RemoteSupport.json + */ + /** + * Sample code: EdgeMachineJobs_CreateOrUpdate_RemoteSupport. + * + * @param manager Entry point to AzureStackHciManager. + */ + public static void edgeMachineJobsCreateOrUpdateRemoteSupport( + com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { + manager.edgeMachineJobs() + .define("RemoteSupport") + .withExistingEdgeMachine("ArcInstance-rg", "machine1") + .withProperties( + new EdgeMachineRemoteSupportJobProperties().withAccessLevel(RemoteSupportAccessLevel.DIAGNOSTICS) + .withExpirationTimestamp(OffsetDateTime.parse("2024-01-29T10:43:27.9471574Z")) + .withType(RemoteSupportType.ENABLE)) + .create(); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/EdgeMachineJobsDeleteSamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/EdgeMachineJobsDeleteSamples.java new file mode 100644 index 000000000000..99c8cb08a026 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/EdgeMachineJobsDeleteSamples.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 EdgeMachineJobs Delete. + */ +public final class EdgeMachineJobsDeleteSamples { + /* + * x-ms-original-file: 2025-12-01-preview/EdgeMachineJobs_Delete_MaximumSet_Gen.json + */ + /** + * Sample code: EdgeMachineJobs_Delete_MaximumSet. + * + * @param manager Entry point to AzureStackHciManager. + */ + public static void + edgeMachineJobsDeleteMaximumSet(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { + manager.edgeMachineJobs() + .delete("ArcInstance-rg", "machine1", "triggerLogCollection", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/EdgeMachineJobsGetSamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/EdgeMachineJobsGetSamples.java new file mode 100644 index 000000000000..3adcbebb5555 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/EdgeMachineJobsGetSamples.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.generated; + +/** + * Samples for EdgeMachineJobs Get. + */ +public final class EdgeMachineJobsGetSamples { + /* + * x-ms-original-file: 2025-12-01-preview/EdgeMachineJobs_Get_ProvisionOs.json + */ + /** + * Sample code: EdgeMachineJobs_Get_ProvisionOs. + * + * @param manager Entry point to AzureStackHciManager. + */ + public static void + edgeMachineJobsGetProvisionOs(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { + manager.edgeMachineJobs() + .getWithResponse("ArcInstance-rg", "machine1", "ProvisionOs", com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: 2025-12-01-preview/EdgeMachineJobs_Get_CollectLog.json + */ + /** + * Sample code: EdgeMachineJobs_Get_CollectLog. + * + * @param manager Entry point to AzureStackHciManager. + */ + public static void + edgeMachineJobsGetCollectLog(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { + manager.edgeMachineJobs() + .getWithResponse("ArcInstance-rg", "machine1", "collectLog", com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: 2025-12-01-preview/EdgeMachineJobs_Get_RemoteSupport.json + */ + /** + * Sample code: EdgeMachineJobs_Get_RemoteSupport. + * + * @param manager Entry point to AzureStackHciManager. + */ + public static void + edgeMachineJobsGetRemoteSupport(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { + manager.edgeMachineJobs() + .getWithResponse("ArcInstance-rg", "machine1", "RemoteSupport", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/EdgeMachineJobsListSamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/EdgeMachineJobsListSamples.java new file mode 100644 index 000000000000..621c674b49e3 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/EdgeMachineJobsListSamples.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 EdgeMachineJobs List. + */ +public final class EdgeMachineJobsListSamples { + /* + * x-ms-original-file: 2025-12-01-preview/EdgeMachineJobs_List_MaximumSet_Gen.json + */ + /** + * Sample code: EdgeMachineJobs_List_MaximumSet. + * + * @param manager Entry point to AzureStackHciManager. + */ + public static void + edgeMachineJobsListMaximumSet(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { + manager.edgeMachineJobs().list("ArcInstance-rg", "machine1", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/EdgeMachinesCreateOrUpdateSamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/EdgeMachinesCreateOrUpdateSamples.java new file mode 100644 index 000000000000..e4033e485a1d --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/EdgeMachinesCreateOrUpdateSamples.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.resourcemanager.azurestackhci.models.EdgeMachineProperties; + +/** + * Samples for EdgeMachines CreateOrUpdate. + */ +public final class EdgeMachinesCreateOrUpdateSamples { + /* + * x-ms-original-file: 2025-12-01-preview/EdgeMachines_CreateOrUpdate.json + */ + /** + * Sample code: EdgeMachines_CreateOrUpdate. + * + * @param manager Entry point to AzureStackHciManager. + */ + public static void + edgeMachinesCreateOrUpdate(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { + manager.edgeMachines() + .define("machine-1") + .withRegion("eastus") + .withExistingResourceGroup("ArcInstance-rg") + .withProperties(new EdgeMachineProperties() + .withArcMachineResourceGroupId( + "/subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/ArcInstance-rg") + .withArcMachineResourceId( + "/subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/ArcInstance-rg/providers/Microsoft.HybridCompute/machines/Node-1")) + .create(); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/EdgeMachinesDeleteSamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/EdgeMachinesDeleteSamples.java new file mode 100644 index 000000000000..2f12913d035b --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/EdgeMachinesDeleteSamples.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 EdgeMachines Delete. + */ +public final class EdgeMachinesDeleteSamples { + /* + * x-ms-original-file: 2025-12-01-preview/EdgeMachines_Delete.json + */ + /** + * Sample code: EdgeMachines_Delete_MaximumSet. + * + * @param manager Entry point to AzureStackHciManager. + */ + public static void + edgeMachinesDeleteMaximumSet(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { + manager.edgeMachines().delete("ArcInstance-rg", "machine-1", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/EdgeMachinesGetByResourceGroupSamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/EdgeMachinesGetByResourceGroupSamples.java new file mode 100644 index 000000000000..581df54ce954 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/EdgeMachinesGetByResourceGroupSamples.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 EdgeMachines GetByResourceGroup. + */ +public final class EdgeMachinesGetByResourceGroupSamples { + /* + * x-ms-original-file: 2025-12-01-preview/EdgeMachines_Get.json + */ + /** + * Sample code: EdgeMachines_Get_MaximumSet. + * + * @param manager Entry point to AzureStackHciManager. + */ + public static void edgeMachinesGetMaximumSet(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { + manager.edgeMachines() + .getByResourceGroupWithResponse("ArcInstance-rg", "machine-1", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/EdgeMachinesListByResourceGroupSamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/EdgeMachinesListByResourceGroupSamples.java new file mode 100644 index 000000000000..0d5fe203f53c --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/EdgeMachinesListByResourceGroupSamples.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 EdgeMachines ListByResourceGroup. + */ +public final class EdgeMachinesListByResourceGroupSamples { + /* + * x-ms-original-file: 2025-12-01-preview/EdgeMachines_ListByResourceGroup.json + */ + /** + * Sample code: List edge machines in a given resource group. + * + * @param manager Entry point to AzureStackHciManager. + */ + public static void + listEdgeMachinesInAGivenResourceGroup(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { + manager.edgeMachines().listByResourceGroup("ArcInstance-rg", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/EdgeMachinesListSamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/EdgeMachinesListSamples.java new file mode 100644 index 000000000000..57668c48a019 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/EdgeMachinesListSamples.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 EdgeMachines List. + */ +public final class EdgeMachinesListSamples { + /* + * x-ms-original-file: 2025-12-01-preview/EdgeMachines_ListBySubscription.json + */ + /** + * Sample code: List edge machines in a given subscription. + * + * @param manager Entry point to AzureStackHciManager. + */ + public static void + listEdgeMachinesInAGivenSubscription(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { + manager.edgeMachines().list(com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/EdgeMachinesUpdateSamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/EdgeMachinesUpdateSamples.java new file mode 100644 index 000000000000..2c460c9e8e5d --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/EdgeMachinesUpdateSamples.java @@ -0,0 +1,41 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.azurestackhci.generated; + +import com.azure.resourcemanager.azurestackhci.models.EdgeMachine; +import java.util.HashMap; +import java.util.Map; + +/** + * Samples for EdgeMachines Update. + */ +public final class EdgeMachinesUpdateSamples { + /* + * x-ms-original-file: 2025-12-01-preview/EdgeMachines_Update.json + */ + /** + * Sample code: EdgeMachines_Update. + * + * @param manager Entry point to AzureStackHciManager. + */ + public static void edgeMachinesUpdate(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { + EdgeMachine resource = manager.edgeMachines() + .getByResourceGroupWithResponse("ArcInstance-rg", "machine-1", com.azure.core.util.Context.NONE) + .getValue(); + resource.update().withTags(mapOf("key2335", "fakeTokenPlaceholder")).apply(); + } + + // 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/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..b31561c7b4c5 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: 2025-12-01-preview/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..c26f0d06e216 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: 2025-12-01-preview/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..0df34d9ff98d 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: 2025-12-01-preview/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..6e9bd02e5bf9 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: 2025-12-01-preview/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..0376a90d3f09 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: 2025-12-01-preview/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..8dfaad65f067 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: 2025-12-01-preview/Extensions_Upgrade.json */ /** * Sample code: Upgrade Machine Extensions. diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/KubernetesVersionsListBySubscriptionLocationResourceSamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/KubernetesVersionsListBySubscriptionLocationResourceSamples.java new file mode 100644 index 000000000000..71f4bea1623f --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/KubernetesVersionsListBySubscriptionLocationResourceSamples.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 KubernetesVersions ListBySubscriptionLocationResource. + */ +public final class KubernetesVersionsListBySubscriptionLocationResourceSamples { + /* + * x-ms-original-file: 2025-12-01-preview/KubernetesVersions_ListBySubscriptionLocationResource_MaximumSet_Gen.json + */ + /** + * Sample code: KubernetesVersions_ListBySubscriptionLocationResource_MaximumSet. + * + * @param manager Entry point to AzureStackHciManager. + */ + public static void kubernetesVersionsListBySubscriptionLocationResourceMaximumSet( + com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { + manager.kubernetesVersions().listBySubscriptionLocationResource("westus2", com.azure.core.util.Context.NONE); + } +} 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..fc48780ec1f8 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: 2025-12-01-preview/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..83c71e475b70 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: 2025-12-01-preview/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..8ccf3bc2de50 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: 2025-12-01-preview/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..3664c8c9dcae 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: 2025-12-01-preview/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/OsImagesGetSamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/OsImagesGetSamples.java new file mode 100644 index 000000000000..b3bb70bc02c3 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/OsImagesGetSamples.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; + +/** + * Samples for OsImages Get. + */ +public final class OsImagesGetSamples { + /* + * x-ms-original-file: 2025-12-01-preview/OsImages_Get_MaximumSet_Gen.json + */ + /** + * Sample code: OsImages_Get_MaximumSet. + * + * @param manager Entry point to AzureStackHciManager. + */ + public static void osImagesGetMaximumSet(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { + manager.osImages().getWithResponse("arowdcr", "10.2408.0.1", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/OsImagesListBySubscriptionLocationResourceSamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/OsImagesListBySubscriptionLocationResourceSamples.java new file mode 100644 index 000000000000..d097f2456b72 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/OsImagesListBySubscriptionLocationResourceSamples.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 OsImages ListBySubscriptionLocationResource. + */ +public final class OsImagesListBySubscriptionLocationResourceSamples { + /* + * x-ms-original-file: 2025-12-01-preview/OsImages_ListBySubscriptionLocationResource_MaximumSet_Gen.json + */ + /** + * Sample code: OsImages_ListBySubscriptionLocationResource_MaximumSet. + * + * @param manager Entry point to AzureStackHciManager. + */ + public static void osImagesListBySubscriptionLocationResourceMaximumSet( + com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { + manager.osImages().listBySubscriptionLocationResource("westus2", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/OwnershipVouchersValidateSamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/OwnershipVouchersValidateSamples.java new file mode 100644 index 000000000000..9e42d22282cd --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/OwnershipVouchersValidateSamples.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.OwnerKeyType; +import com.azure.resourcemanager.azurestackhci.models.OwnershipVoucherDetails; +import com.azure.resourcemanager.azurestackhci.models.ValidateOwnershipVouchersRequest; +import java.util.Arrays; + +/** + * Samples for OwnershipVouchers Validate. + */ +public final class OwnershipVouchersValidateSamples { + /* + * x-ms-original-file: 2025-12-01-preview/ValidateOwnershipVouchers_ByResourceGroup.json + */ + /** + * Sample code: Validate ownership vouchers in a given resource group. + * + * @param manager Entry point to AzureStackHciManager. + */ + public static void validateOwnershipVouchersInAGivenResourceGroup( + com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { + manager.ownershipVouchers() + .validateWithResponse("ArcInstance-rg", "westus", + new ValidateOwnershipVouchersRequest().withOwnershipVoucherDetails( + Arrays.asList(new OwnershipVoucherDetails().withOwnershipVoucher("Device Model Ownership content") + .withOwnerKeyType(OwnerKeyType.MICROSOFT_MANAGED))), + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/PlatformUpdatesGetSamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/PlatformUpdatesGetSamples.java new file mode 100644 index 000000000000..17bdebe341dd --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/PlatformUpdatesGetSamples.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 PlatformUpdates Get. + */ +public final class PlatformUpdatesGetSamples { + /* + * x-ms-original-file: 2025-12-01-preview/PlatformUpdates_Get_MaximumSet_Gen.json + */ + /** + * Sample code: PlatformUpdates_Get_MaximumSet. + * + * @param manager Entry point to AzureStackHciManager. + */ + public static void + platformUpdatesGetMaximumSet(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { + manager.platformUpdates().getWithResponse("westus2", "10.2408.0.1", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/PlatformUpdatesListSamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/PlatformUpdatesListSamples.java new file mode 100644 index 000000000000..ed925fec1f0b --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/PlatformUpdatesListSamples.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 PlatformUpdates List. + */ +public final class PlatformUpdatesListSamples { + /* + * x-ms-original-file: 2025-12-01-preview/PlatformUpdates_ListByLocation_MaximumSet_Gen.json + */ + /** + * Sample code: PlatformUpdates_ListByLocation_MaximumSet. + * + * @param manager Entry point to AzureStackHciManager. + */ + public static void + platformUpdatesListByLocationMaximumSet(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { + manager.platformUpdates().list("westus2", 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 index 306ec2b57114..3b9fe93933de 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under 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 PublishersGetSamples { /* - * x-ms-original-file: - * specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/StackHCI/stable/2024-04-01/examples/ - * GetPublisher.json + * x-ms-original-file: 2025-12-01-preview/GetPublisher.json */ /** * Sample code: Get Publisher. 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 index 27fc038234a4..d15f529e2cdd 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under 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 PublishersListByClusterSamples { /* - * x-ms-original-file: - * specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/StackHCI/stable/2024-04-01/examples/ - * ListPublishersByCluster.json + * x-ms-original-file: 2025-12-01-preview/ListPublishersByCluster.json */ /** * Sample code: List Publisher resources by HCI Cluster. 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..57da977341fe 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: 2025-12-01-preview/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..9021282cbe23 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: 2025-12-01-preview/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..1531943b5000 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: 2025-12-01-preview/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..f03866f26d60 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: 2025-12-01-preview/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..ce621f9b0fbe 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: 2025-12-01-preview/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..f53567935491 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: 2025-12-01-preview/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/UpdateContentsGetSamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/UpdateContentsGetSamples.java new file mode 100644 index 000000000000..56950c242a36 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/UpdateContentsGetSamples.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 UpdateContents Get. + */ +public final class UpdateContentsGetSamples { + /* + * x-ms-original-file: 2025-12-01-preview/UpdateContents_Get_MaximumSet_Gen.json + */ + /** + * Sample code: UpdateContents_Get_MaximumSet. + * + * @param manager Entry point to AzureStackHciManager. + */ + public static void + updateContentsGetMaximumSet(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { + manager.updateContents().getWithResponse("westus2", "12.2510.0.1", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/UpdateContentsListSamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/UpdateContentsListSamples.java new file mode 100644 index 000000000000..3b01886c55d7 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/UpdateContentsListSamples.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 UpdateContents List. + */ +public final class UpdateContentsListSamples { + /* + * x-ms-original-file: 2025-12-01-preview/UpdateContents_ListByLocation_MaximumSet_Gen.json + */ + /** + * Sample code: UpdateContents_ListByLocation_MaximumSet. + * + * @param manager Entry point to AzureStackHciManager. + */ + public static void + updateContentsListByLocationMaximumSet(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { + manager.updateContents().list("westus2", com.azure.core.util.Context.NONE); + } +} 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..f13d02d2e0e2 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: 2025-12-01-preview/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..d8fdec8b7e1a 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: 2025-12-01-preview/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..672a5be95e6b 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: 2025-12-01-preview/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..0ff429b92b6f 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: 2025-12-01-preview/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..d02aecab1145 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: 2025-12-01-preview/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..bff2d538da8a 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: 2025-12-01-preview/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..985ab97e209d 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: 2025-12-01-preview/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..1d81bacce094 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: 2025-12-01-preview/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..20ffdf80993c 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: 2025-12-01-preview/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..9b6859136128 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: 2025-12-01-preview/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..67d757c2647c 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: 2025-12-01-preview/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..3d508cbeafb7 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: 2025-12-01-preview/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..6fd135699391 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: 2025-12-01-preview/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..7da0967fb6ce --- /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: 2025-12-01-preview/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..2264a02fbe5e --- /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: 2025-12-01-preview/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..24d540af5a12 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ArcConnectivityPropertiesTests.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.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\":6578204295231408017},{\"serviceName\":\"WAC\",\"port\":3719013093827062278},{\"serviceName\":\"WAC\",\"port\":2245881351334058994},{\"serviceName\":\"WAC\",\"port\":3205247320582775463}]}") + .toObject(ArcConnectivityProperties.class); + Assertions.assertFalse(model.enabled()); + Assertions.assertEquals(ServiceName.WAC, model.serviceConfigurations().get(0).serviceName()); + Assertions.assertEquals(6578204295231408017L, 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(6578204295231408017L), + new ServiceConfiguration().withServiceName(ServiceName.WAC).withPort(3719013093827062278L), + new ServiceConfiguration().withServiceName(ServiceName.WAC).withPort(2245881351334058994L), + new ServiceConfiguration().withServiceName(ServiceName.WAC).withPort(3205247320582775463L))); + model = BinaryData.fromObject(model).toObject(ArcConnectivityProperties.class); + Assertions.assertFalse(model.enabled()); + Assertions.assertEquals(ServiceName.WAC, model.serviceConfigurations().get(0).serviceName()); + Assertions.assertEquals(6578204295231408017L, 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..b9b5db85d19a 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\":\"xnrj\",\"arcApplicationTenantId\":\"gqwgxhniskxfbkp\",\"arcServicePrincipalObjectId\":\"gklwn\",\"arcApplicationObjectId\":\"hjdauwhvylwz\"}}") .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..443e469e6a06 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\":\"dhxujznbmpo\",\"arcApplicationTenantId\":\"wpr\",\"arcServicePrincipalObjectId\":\"lve\",\"arcApplicationObjectId\":\"lupj\"}") .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("dhxujznbmpo", model.arcApplicationClientId()); + Assertions.assertEquals("wpr", model.arcApplicationTenantId()); + Assertions.assertEquals("lve", model.arcServicePrincipalObjectId()); + Assertions.assertEquals("lupj", 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..efc71a6caa10 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\":\"Disconnected\",\"arcInstanceResourceGroup\":\"gidokgjljyoxgvcl\",\"arcApplicationClientId\":\"gsncghkjeszz\",\"arcApplicationTenantId\":\"ijhtxf\",\"arcServicePrincipalObjectId\":\"xbf\",\"arcApplicationObjectId\":\"xnehmpvec\",\"aggregateState\":\"Succeeded\",\"perNodeDetails\":[{\"name\":\"fqkkr\",\"arcInstance\":\"pukgriwflzlfb\",\"arcNodeServicePrincipalObjectId\":\"puz\",\"state\":\"Deleting\"},{\"name\":\"pnq\",\"arcInstance\":\"hmgkbrpyy\",\"arcNodeServicePrincipalObjectId\":\"ibnuqqkpik\",\"state\":\"Moving\"},{\"name\":\"vtq\",\"arcInstance\":\"n\",\"arcNodeServicePrincipalObjectId\":\"ynhijggme\",\"state\":\"PartiallyConnected\"}],\"connectivityProperties\":{\"enabled\":false,\"serviceConfigurations\":[{\"serviceName\":\"WAC\",\"port\":8731208977026157995}]},\"defaultExtensions\":[{\"category\":\"azzmhjrunmpxt\",\"consentTime\":\"2021-10-06T02:07:53Z\"},{\"category\":\"rbnlankxmyskp\",\"consentTime\":\"2021-12-10T04:45:15Z\"}]},\"id\":\"btkcxywnytnrsyn\",\"name\":\"qidybyx\",\"type\":\"zfcl\"}") .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("gidokgjljyoxgvcl", model.arcInstanceResourceGroup()); + Assertions.assertEquals("gsncghkjeszz", model.arcApplicationClientId()); + Assertions.assertEquals("ijhtxf", model.arcApplicationTenantId()); + Assertions.assertEquals("xbf", model.arcServicePrincipalObjectId()); + Assertions.assertEquals("xnehmpvec", model.arcApplicationObjectId()); + Assertions.assertFalse(model.connectivityProperties().enabled()); + Assertions.assertEquals(ServiceName.WAC, + model.connectivityProperties().serviceConfigurations().get(0).serviceName()); + Assertions.assertEquals(8731208977026157995L, + 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("gidokgjljyoxgvcl") + .withArcApplicationClientId("gsncghkjeszz") + .withArcApplicationTenantId("ijhtxf") + .withArcServicePrincipalObjectId("xbf") + .withArcApplicationObjectId("xnehmpvec") + .withConnectivityProperties(new ArcConnectivityProperties().withEnabled(false) + .withServiceConfigurations(Arrays.asList( + new ServiceConfiguration().withServiceName(ServiceName.WAC).withPort(8731208977026157995L)))); 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("gidokgjljyoxgvcl", model.arcInstanceResourceGroup()); + Assertions.assertEquals("gsncghkjeszz", model.arcApplicationClientId()); + Assertions.assertEquals("ijhtxf", model.arcApplicationTenantId()); + Assertions.assertEquals("xbf", model.arcServicePrincipalObjectId()); + Assertions.assertEquals("xnehmpvec", model.arcApplicationObjectId()); + Assertions.assertFalse(model.connectivityProperties().enabled()); + Assertions.assertEquals(ServiceName.WAC, + model.connectivityProperties().serviceConfigurations().get(0).serviceName()); + Assertions.assertEquals(8731208977026157995L, + 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..bced4b582651 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\":\"Accepted\",\"arcInstanceResourceGroup\":\"uscrpabgyepsb\",\"arcApplicationClientId\":\"azqugxywpmueefj\",\"arcApplicationTenantId\":\"fqkquj\",\"arcServicePrincipalObjectId\":\"suyonobglaocq\",\"arcApplicationObjectId\":\"ccm\",\"aggregateState\":\"InProgress\",\"perNodeDetails\":[{\"name\":\"tlmoyrx\",\"arcInstance\":\"fudwpznt\",\"arcNodeServicePrincipalObjectId\":\"dzhlrq\",\"state\":\"Connected\"}],\"connectivityProperties\":{\"enabled\":false,\"serviceConfigurations\":[{\"serviceName\":\"WAC\",\"port\":8781176229641624570},{\"serviceName\":\"WAC\",\"port\":5275318016138914703},{\"serviceName\":\"WAC\",\"port\":1967797899884280622}]},\"defaultExtensions\":[{\"category\":\"n\",\"consentTime\":\"2021-07-01T08:22:45Z\"}]},\"id\":\"zka\",\"name\":\"kuwbcrnwb\",\"type\":\"ehhseyvjusrts\"},{\"properties\":{\"provisioningState\":\"Succeeded\",\"arcInstanceResourceGroup\":\"deemao\",\"arcApplicationClientId\":\"xagkvtmelmqkrh\",\"arcApplicationTenantId\":\"vljua\",\"arcServicePrincipalObjectId\":\"quhcdhmduala\",\"arcApplicationObjectId\":\"qpv\",\"aggregateState\":\"Creating\",\"perNodeDetails\":[{\"name\":\"rcrgvx\",\"arcInstance\":\"gomz\",\"arcNodeServicePrincipalObjectId\":\"misgwbnb\",\"state\":\"Creating\"}],\"connectivityProperties\":{\"enabled\":false,\"serviceConfigurations\":[{\"serviceName\":\"WAC\",\"port\":2514005563573922649},{\"serviceName\":\"WAC\",\"port\":489170478703847309},{\"serviceName\":\"WAC\",\"port\":4089645691345581060}]},\"defaultExtensions\":[{\"category\":\"uhashsfwx\",\"consentTime\":\"2021-10-19T13:09:56Z\"},{\"category\":\"z\",\"consentTime\":\"2021-01-09T15:25:04Z\"},{\"category\":\"i\",\"consentTime\":\"2020-12-22T21:46:37Z\"}]},\"id\":\"xdje\",\"name\":\"wpucwwfvovbv\",\"type\":\"euecivyhzceuoj\"}],\"nextLink\":\"rw\"}") .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("uscrpabgyepsb", model.value().get(0).arcInstanceResourceGroup()); + Assertions.assertEquals("azqugxywpmueefj", model.value().get(0).arcApplicationClientId()); + Assertions.assertEquals("fqkquj", model.value().get(0).arcApplicationTenantId()); + Assertions.assertEquals("suyonobglaocq", model.value().get(0).arcServicePrincipalObjectId()); + Assertions.assertEquals("ccm", 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(8781176229641624570L, + model.value().get(0).connectivityProperties().serviceConfigurations().get(0).port()); + Assertions.assertEquals("rw", 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..8f9fdb198f43 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,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.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\":\"Creating\",\"arcInstanceResourceGroup\":\"dbabp\",\"arcApplicationClientId\":\"wrqlfktsthsuco\",\"arcApplicationTenantId\":\"nyyazttbtwwrqpue\",\"arcServicePrincipalObjectId\":\"kzywbiex\",\"arcApplicationObjectId\":\"eyueaxibxujwb\",\"aggregateState\":\"Succeeded\",\"perNodeDetails\":[{\"name\":\"uzyoxaep\",\"arcInstance\":\"zjancuxr\",\"arcNodeServicePrincipalObjectId\":\"wbavxbniwdj\",\"state\":\"Provisioning\"},{\"name\":\"s\",\"arcInstance\":\"pgn\",\"arcNodeServicePrincipalObjectId\":\"txhp\",\"state\":\"DisableInProgress\"}],\"connectivityProperties\":{\"enabled\":false,\"serviceConfigurations\":[{\"serviceName\":\"WAC\",\"port\":4699400425607352245}]},\"defaultExtensions\":[{\"category\":\"xwtctyqiklbbovpl\",\"consentTime\":\"2021-08-16T02:09:31Z\"},{\"category\":\"vgyuguos\",\"consentTime\":\"2021-10-31T02:07:56Z\"},{\"category\":\"ss\",\"consentTime\":\"2021-06-19T09:22Z\"},{\"category\":\"kfplgmgsxnk\",\"consentTime\":\"2021-07-28T04:14:11Z\"}]}") .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("dbabp", model.arcInstanceResourceGroup()); + Assertions.assertEquals("wrqlfktsthsuco", model.arcApplicationClientId()); + Assertions.assertEquals("nyyazttbtwwrqpue", model.arcApplicationTenantId()); + Assertions.assertEquals("kzywbiex", model.arcServicePrincipalObjectId()); + Assertions.assertEquals("eyueaxibxujwb", model.arcApplicationObjectId()); + Assertions.assertFalse(model.connectivityProperties().enabled()); + Assertions.assertEquals(ServiceName.WAC, + model.connectivityProperties().serviceConfigurations().get(0).serviceName()); + Assertions.assertEquals(4699400425607352245L, + 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("dbabp") + .withArcApplicationClientId("wrqlfktsthsuco") + .withArcApplicationTenantId("nyyazttbtwwrqpue") + .withArcServicePrincipalObjectId("kzywbiex") + .withArcApplicationObjectId("eyueaxibxujwb") + .withConnectivityProperties(new ArcConnectivityProperties().withEnabled(false) + .withServiceConfigurations(Arrays.asList( + new ServiceConfiguration().withServiceName(ServiceName.WAC).withPort(4699400425607352245L)))); 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("dbabp", model.arcInstanceResourceGroup()); + Assertions.assertEquals("wrqlfktsthsuco", model.arcApplicationClientId()); + Assertions.assertEquals("nyyazttbtwwrqpue", model.arcApplicationTenantId()); + Assertions.assertEquals("kzywbiex", model.arcServicePrincipalObjectId()); + Assertions.assertEquals("eyueaxibxujwb", model.arcApplicationObjectId()); + Assertions.assertFalse(model.connectivityProperties().enabled()); + Assertions.assertEquals(ServiceName.WAC, + model.connectivityProperties().serviceConfigurations().get(0).serviceName()); + Assertions.assertEquals(4699400425607352245L, + 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..ad08b58e5c93 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\":\"Deleting\",\"arcInstanceResourceGroup\":\"ucpxpyafr\",\"arcApplicationClientId\":\"gorogeuvmk\",\"arcApplicationTenantId\":\"pnr\",\"arcServicePrincipalObjectId\":\"semlzofrsnq\",\"arcApplicationObjectId\":\"jp\",\"aggregateState\":\"Deleted\",\"perNodeDetails\":[{\"name\":\"ikelpmwgr\",\"arcInstance\":\"bwudhvosgjzs\",\"arcNodeServicePrincipalObjectId\":\"ezalivdfwg\",\"state\":\"Accepted\"},{\"name\":\"wc\",\"arcInstance\":\"rxggezkhzp\",\"arcNodeServicePrincipalObjectId\":\"qissen\",\"state\":\"Moving\"},{\"name\":\"syzaivnp\",\"arcInstance\":\"n\",\"arcNodeServicePrincipalObjectId\":\"kplujyduon\",\"state\":\"Error\"},{\"name\":\"saoplvvmnbkxja\",\"arcInstance\":\"bbdddwokqx\",\"arcNodeServicePrincipalObjectId\":\"lxqk\",\"state\":\"Deleting\"}],\"connectivityProperties\":{\"enabled\":true,\"serviceConfigurations\":[{\"serviceName\":\"WAC\",\"port\":5703604950892360807}]},\"defaultExtensions\":[{\"category\":\"esfkqqxuhv\",\"consentTime\":\"2021-05-11T07:56:17Z\"},{\"category\":\"rouszxacdwukokgo\",\"consentTime\":\"2021-01-19T15:22:21Z\"},{\"category\":\"uktubcmunhgbtzv\",\"consentTime\":\"2021-10-12T20:35:01Z\"}]},\"id\":\"bcuufkrfn\",\"name\":\"cnihkswxmfurqmw\",\"type\":\"wwp\"}"; 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("bsyogjmqjhgcyd", "jnmcvjbssfcriqx", "ixtdlxw", + 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("ucpxpyafr", response.arcInstanceResourceGroup()); + Assertions.assertEquals("gorogeuvmk", response.arcApplicationClientId()); + Assertions.assertEquals("pnr", response.arcApplicationTenantId()); + Assertions.assertEquals("semlzofrsnq", response.arcServicePrincipalObjectId()); + Assertions.assertEquals("jp", response.arcApplicationObjectId()); + Assertions.assertTrue(response.connectivityProperties().enabled()); + Assertions.assertEquals(ServiceName.WAC, + response.connectivityProperties().serviceConfigurations().get(0).serviceName()); + Assertions.assertEquals(5703604950892360807L, + 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..ae085a8fa2d8 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\":\"t\",\"arcApplicationTenantId\":\"phqeofy\",\"arcServicePrincipalObjectId\":\"snlow\",\"arcApplicationObjectId\":\"mcqixuanccqvjf\"}}"; 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); + ArcIdentityResponse response = manager.arcSettings() + .createIdentity("chdwyqqidqi", "lgbbfjmdgjvxlh", "pm", 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..24a8072bcdfd 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,39 @@ 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\":\"Provisioning\",\"arcInstanceResourceGroup\":\"tihtgrafjajvkyxm\",\"arcApplicationClientId\":\"czvogtd\",\"arcApplicationTenantId\":\"j\",\"arcServicePrincipalObjectId\":\"nmkvaeu\",\"arcApplicationObjectId\":\"dwxhhlbm\",\"aggregateState\":\"Moving\",\"perNodeDetails\":[{\"name\":\"rpdhewokyqs\",\"arcInstance\":\"xfsyw\",\"arcNodeServicePrincipalObjectId\":\"hqbtodjfyxbvkv\",\"state\":\"Deleted\"}],\"connectivityProperties\":{\"enabled\":true,\"serviceConfigurations\":[{\"serviceName\":\"WAC\",\"port\":1260682804531563957},{\"serviceName\":\"WAC\",\"port\":1043776632442140432}]},\"defaultExtensions\":[{\"category\":\"za\",\"consentTime\":\"2021-01-06T19:14:41Z\"},{\"category\":\"vvlrhocrkk\",\"consentTime\":\"2021-06-15T17:19:19Z\"},{\"category\":\"dqzbvbpsuvqhx\",\"consentTime\":\"2021-08-12T00:54:04Z\"},{\"category\":\"gdkwbkurklpiigfu\",\"consentTime\":\"2021-04-17T12:41:42Z\"}]},\"id\":\"tuipjclzjwaqdzq\",\"name\":\"dewuwxyl\",\"type\":\"zzzevtzqwczoc\"}"; 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("zmiemqyftgp") + .withExistingCluster("gc", "myrhkvx") + .withArcInstanceResourceGroup("fqvjmghpakbqyhls") + .withArcApplicationClientId("nfbmeqagkncjm") + .withArcApplicationTenantId("nyevztnjawrhule") + .withArcServicePrincipalObjectId("qmbwppxi") + .withArcApplicationObjectId("b") + .withConnectivityProperties(new ArcConnectivityProperties().withEnabled(false) + .withServiceConfigurations(Arrays.asList( + new ServiceConfiguration().withServiceName(ServiceName.WAC).withPort(6846341808718075075L), + new ServiceConfiguration().withServiceName(ServiceName.WAC).withPort(2584496480188556017L), + new ServiceConfiguration().withServiceName(ServiceName.WAC).withPort(3007941654353494934L)))) .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("tihtgrafjajvkyxm", response.arcInstanceResourceGroup()); + Assertions.assertEquals("czvogtd", response.arcApplicationClientId()); + Assertions.assertEquals("j", response.arcApplicationTenantId()); + Assertions.assertEquals("nmkvaeu", response.arcServicePrincipalObjectId()); + Assertions.assertEquals("dwxhhlbm", response.arcApplicationObjectId()); + Assertions.assertTrue(response.connectivityProperties().enabled()); + Assertions.assertEquals(ServiceName.WAC, + response.connectivityProperties().serviceConfigurations().get(0).serviceName()); + Assertions.assertEquals(1260682804531563957L, + 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..ac2fbe699bdd 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("xgkrswksykkbxk", "xbbwlmnwz", "knv", 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..4bc257187f71 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\":\"Canceled\",\"arcInstanceResourceGroup\":\"gpruccwme\",\"arcApplicationClientId\":\"txsytrtexegwmrq\",\"arcApplicationTenantId\":\"wi\",\"arcServicePrincipalObjectId\":\"vycfjncindi\",\"arcApplicationObjectId\":\"q\",\"aggregateState\":\"Creating\",\"perNodeDetails\":[{\"name\":\"riarsbcl\",\"arcInstance\":\"nhzcknjxizb\",\"arcNodeServicePrincipalObjectId\":\"dygzkztxfexwac\",\"state\":\"Provisioning\"},{\"name\":\"lxppd\",\"arcInstance\":\"zkf\",\"arcNodeServicePrincipalObjectId\":\"uiiu\",\"state\":\"Failed\"},{\"name\":\"kcj\",\"arcInstance\":\"qdcizeqqfopvnopm\",\"arcNodeServicePrincipalObjectId\":\"ds\",\"state\":\"Moving\"}],\"connectivityProperties\":{\"enabled\":false,\"serviceConfigurations\":[{\"serviceName\":\"WAC\",\"port\":7762273698216743718},{\"serviceName\":\"WAC\",\"port\":9162683594704695862}]},\"defaultExtensions\":[{\"category\":\"dzmxojzsvmaigbqk\",\"consentTime\":\"2021-09-24T09:54:25Z\"},{\"category\":\"jthgeecbpe\",\"consentTime\":\"2021-06-18T02:03:50Z\"},{\"category\":\"ck\",\"consentTime\":\"2021-01-18T09:34:07Z\"}]},\"id\":\"myqsokk\",\"name\":\"pugzjwdi\",\"type\":\"crjixiujzkcs\"}"; 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("rclbl", "bhpwachyeur", "wmvwryvdi", 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("gpruccwme", response.arcInstanceResourceGroup()); + Assertions.assertEquals("txsytrtexegwmrq", response.arcApplicationClientId()); + Assertions.assertEquals("wi", response.arcApplicationTenantId()); + Assertions.assertEquals("vycfjncindi", response.arcServicePrincipalObjectId()); + Assertions.assertEquals("q", response.arcApplicationObjectId()); + Assertions.assertFalse(response.connectivityProperties().enabled()); + Assertions.assertEquals(ServiceName.WAC, + response.connectivityProperties().serviceConfigurations().get(0).serviceName()); + Assertions.assertEquals(7762273698216743718L, + 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..5e5e2b2a6840 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("t", "motahbqsvnk", "mytzuaedrlh", 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..5239c1992c1f 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\":\"Disconnected\",\"arcInstanceResourceGroup\":\"nsffetp\",\"arcApplicationClientId\":\"ixwewzlscgsmep\",\"arcApplicationTenantId\":\"vxgv\",\"arcServicePrincipalObjectId\":\"dbthhxmoevv\",\"arcApplicationObjectId\":\"eepfh\",\"aggregateState\":\"PartiallySucceeded\",\"perNodeDetails\":[{\"name\":\"xqhpjhuboh\",\"arcInstance\":\"zgaybvr\",\"arcNodeServicePrincipalObjectId\":\"og\",\"state\":\"PartiallyConnected\"},{\"name\":\"nwfmzvzt\",\"arcInstance\":\"ebpamq\",\"arcNodeServicePrincipalObjectId\":\"cssanybzzghv\",\"state\":\"Deleted\"},{\"name\":\"myjsvcdhly\",\"arcInstance\":\"hookju\",\"arcNodeServicePrincipalObjectId\":\"xezriw\",\"state\":\"Provisioning\"}],\"connectivityProperties\":{\"enabled\":false,\"serviceConfigurations\":[{\"serviceName\":\"WAC\",\"port\":3603613470883180564}]},\"defaultExtensions\":[{\"category\":\"xjhcitibenws\",\"consentTime\":\"2021-11-15T20:45:11Z\"}]},\"id\":\"daah\",\"name\":\"frcqkl\",\"type\":\"mvzpire\"}]}"; 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("qddlggbq", "olgzubakdlkv", 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("nsffetp", response.iterator().next().arcInstanceResourceGroup()); + Assertions.assertEquals("ixwewzlscgsmep", response.iterator().next().arcApplicationClientId()); + Assertions.assertEquals("vxgv", response.iterator().next().arcApplicationTenantId()); + Assertions.assertEquals("dbthhxmoevv", response.iterator().next().arcServicePrincipalObjectId()); + Assertions.assertEquals("eepfh", 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(3603613470883180564L, + 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..539af8f1101e 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,43 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.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\":6718667665096544770},{\"serviceName\":\"WAC\",\"port\":6306167539521806768},{\"serviceName\":\"WAC\",\"port\":2840285264321299730}]}}") .toObject(ArcSettingsPatchProperties.class); + Assertions.assertFalse(model.connectivityProperties().enabled()); + Assertions.assertEquals(ServiceName.WAC, + model.connectivityProperties().serviceConfigurations().get(0).serviceName()); + Assertions.assertEquals(6718667665096544770L, + 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(6718667665096544770L), + new ServiceConfiguration().withServiceName(ServiceName.WAC).withPort(6306167539521806768L), + new ServiceConfiguration().withServiceName(ServiceName.WAC).withPort(2840285264321299730L)))); model = BinaryData.fromObject(model).toObject(ArcSettingsPatchProperties.class); + Assertions.assertFalse(model.connectivityProperties().enabled()); + Assertions.assertEquals(ServiceName.WAC, + model.connectivityProperties().serviceConfigurations().get(0).serviceName()); + Assertions.assertEquals(6718667665096544770L, + 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..8d7526286773 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,33 @@ 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\":{\"rdqmhjjdhtldwkyz\":\"fhvpesaps\",\"cwsvlxotog\":\"uutkncw\",\"o\":\"wrupqsxvnmicykvc\",\"vnotyfjfcnj\":\"eil\"},\"properties\":{\"connectivityProperties\":{\"enabled\":false,\"serviceConfigurations\":[{\"serviceName\":\"WAC\",\"port\":9006034643564809106},{\"serviceName\":\"WAC\",\"port\":8193047899870499227},{\"serviceName\":\"WAC\",\"port\":3389150411931097384}]}}}") .toObject(ArcSettingsPatch.class); - Assertions.assertEquals("hsgcbacphejkot", model.tags().get("nqgoulzndli")); + Assertions.assertEquals("fhvpesaps", model.tags().get("rdqmhjjdhtldwkyz")); + Assertions.assertFalse(model.connectivityProperties().enabled()); + Assertions.assertEquals(ServiceName.WAC, + model.connectivityProperties().serviceConfigurations().get(0).serviceName()); + Assertions.assertEquals(9006034643564809106L, + 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("rdqmhjjdhtldwkyz", "fhvpesaps", "cwsvlxotog", "uutkncw", "o", "wrupqsxvnmicykvc", + "vnotyfjfcnj", "eil")) + .withConnectivityProperties(new ArcConnectivityProperties().withEnabled(false) + .withServiceConfigurations(Arrays.asList( + new ServiceConfiguration().withServiceName(ServiceName.WAC).withPort(9006034643564809106L), + new ServiceConfiguration().withServiceName(ServiceName.WAC).withPort(8193047899870499227L), + new ServiceConfiguration().withServiceName(ServiceName.WAC).withPort(3389150411931097384L)))); model = BinaryData.fromObject(model).toObject(ArcSettingsPatch.class); - Assertions.assertEquals("hsgcbacphejkot", model.tags().get("nqgoulzndli")); + Assertions.assertEquals("fhvpesaps", model.tags().get("rdqmhjjdhtldwkyz")); + Assertions.assertFalse(model.connectivityProperties().enabled()); + Assertions.assertEquals(ServiceName.WAC, + model.connectivityProperties().serviceConfigurations().get(0).serviceName()); + Assertions.assertEquals(9006034643564809106L, + 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..b1d91bb2944b --- /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\":\"otbptg\",\"arcApplicationClientId\":\"manxx\",\"arcApplicationTenantId\":\"qfmdqecvtam\",\"arcServicePrincipalObjectId\":\"zmnobfeww\",\"arcApplicationObjectId\":\"ibxovu\",\"aggregateState\":\"Succeeded\",\"perNodeDetails\":[{\"name\":\"blndycl\",\"arcInstance\":\"ycvtqnzjcy\",\"arcNodeServicePrincipalObjectId\":\"zhemb\",\"state\":\"Deleted\"},{\"name\":\"alb\",\"arcInstance\":\"pisjdleajv\",\"arcNodeServicePrincipalObjectId\":\"vl\",\"state\":\"Disconnected\"},{\"name\":\"sfxipjeop\",\"arcInstance\":\"gocjomlu\",\"arcNodeServicePrincipalObjectId\":\"azusjcd\",\"state\":\"Failed\"}],\"connectivityProperties\":{\"enabled\":true,\"serviceConfigurations\":[{\"serviceName\":\"WAC\",\"port\":8110983421039938588},{\"serviceName\":\"WAC\",\"port\":5009247710212909564},{\"serviceName\":\"WAC\",\"port\":601598338806514107}]},\"defaultExtensions\":[{\"category\":\"cavqcwyzoqzkmqcw\",\"consentTime\":\"2021-07-16T22:37:08Z\"},{\"category\":\"kiixepbntqqwwgfg\",\"consentTime\":\"2021-01-11T19:16:54Z\"}]},\"id\":\"lefejs\",\"name\":\"wrznequ\",\"type\":\"ynttwknhajk\"}"; + + 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("gfqpmq", "xpjhcfaaradci", "vmufzgug", + new ReconcileArcSettingsRequest().withProperties( + new ReconcileArcSettingsRequestProperties().withClusterNodes(Arrays.asList("alaoss"))), + com.azure.core.util.Context.NONE); + + Assertions.assertEquals("otbptg", response.arcInstanceResourceGroup()); + Assertions.assertEquals("manxx", response.arcApplicationClientId()); + Assertions.assertEquals("qfmdqecvtam", response.arcApplicationTenantId()); + Assertions.assertEquals("zmnobfeww", response.arcServicePrincipalObjectId()); + Assertions.assertEquals("ibxovu", response.arcApplicationObjectId()); + Assertions.assertTrue(response.connectivityProperties().enabled()); + Assertions.assertEquals(ServiceName.WAC, + response.connectivityProperties().serviceConfigurations().get(0).serviceName()); + Assertions.assertEquals(8110983421039938588L, + 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..09356e31f820 --- /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\":\"havgrvk\",\"hash\":\"ovjzhpjbibgjmfx\",\"fileName\":\"vfcluyovwxnbkfe\",\"url\":\"xscyhwzdgirujbz\"}") + .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..74fd213545df --- /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\":\"rpdsof\",\"payload\":[{\"identifier\":\"nsvbuswdv\",\"hash\":\"ybycnunvj\",\"fileName\":\"tkfa\",\"url\":\"opqgikyzirtxdyux\"},{\"identifier\":\"jntpsewgioilqu\",\"hash\":\"ydxtqm\",\"fileName\":\"ox\",\"url\":\"ggufhyaomtb\"}]}") + .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/ChangeRingRequestPropertiesTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ChangeRingRequestPropertiesTests.java new file mode 100644 index 000000000000..0d39de487be3 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ChangeRingRequestPropertiesTests.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; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.azurestackhci.models.ChangeRingRequestProperties; +import org.junit.jupiter.api.Assertions; + +public final class ChangeRingRequestPropertiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ChangeRingRequestProperties model + = BinaryData.fromString("{\"targetRing\":\"hmk\"}").toObject(ChangeRingRequestProperties.class); + Assertions.assertEquals("hmk", model.targetRing()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + ChangeRingRequestProperties model = new ChangeRingRequestProperties().withTargetRing("hmk"); + model = BinaryData.fromObject(model).toObject(ChangeRingRequestProperties.class); + Assertions.assertEquals("hmk", model.targetRing()); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ChangeRingRequestTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ChangeRingRequestTests.java new file mode 100644 index 000000000000..3d8ce142b639 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ChangeRingRequestTests.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.ChangeRingRequest; +import com.azure.resourcemanager.azurestackhci.models.ChangeRingRequestProperties; +import org.junit.jupiter.api.Assertions; + +public final class ChangeRingRequestTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ChangeRingRequest model = BinaryData.fromString("{\"properties\":{\"targetRing\":\"vsaznqntorudsg\"}}") + .toObject(ChangeRingRequest.class); + Assertions.assertEquals("vsaznqntorudsg", model.properties().targetRing()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + ChangeRingRequest model = new ChangeRingRequest() + .withProperties(new ChangeRingRequestProperties().withTargetRing("vsaznqntorudsg")); + model = BinaryData.fromObject(model).toObject(ChangeRingRequest.class); + Assertions.assertEquals("vsaznqntorudsg", model.properties().targetRing()); + } +} 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..526bf728c549 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\":\"Off\"}") .toObject(ClusterDesiredProperties.class); Assertions.assertEquals(WindowsServerSubscription.DISABLED, model.windowsServerSubscription()); - Assertions.assertEquals(DiagnosticLevel.ENHANCED, model.diagnosticLevel()); + Assertions.assertEquals(DiagnosticLevel.OFF, model.diagnosticLevel()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { ClusterDesiredProperties model = new ClusterDesiredProperties().withWindowsServerSubscription(WindowsServerSubscription.DISABLED) - .withDiagnosticLevel(DiagnosticLevel.ENHANCED); + .withDiagnosticLevel(DiagnosticLevel.OFF); model = BinaryData.fromObject(model).toObject(ClusterDesiredProperties.class); Assertions.assertEquals(WindowsServerSubscription.DISABLED, model.windowsServerSubscription()); - Assertions.assertEquals(DiagnosticLevel.ENHANCED, model.diagnosticLevel()); + Assertions.assertEquals(DiagnosticLevel.OFF, 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..f45efe2ae3d1 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\":\"qwhxxbuyqaxzfeqz\",\"aadTenantId\":\"priolx\",\"aadServicePrincipalObjectId\":\"jaltolmnc\",\"aadApplicationObjectId\":\"obqwcsdbnwdcfh\"}}") .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..0d0aed803e11 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\":\"qdpfuvglsbjjca\",\"aadTenantId\":\"xbvtvudu\",\"aadServicePrincipalObjectId\":\"cormr\",\"aadApplicationObjectId\":\"qtvcofudflvkgj\"}") .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("qdpfuvglsbjjca", model.aadClientId()); + Assertions.assertEquals("xbvtvudu", model.aadTenantId()); + Assertions.assertEquals("cormr", model.aadServicePrincipalObjectId()); + Assertions.assertEquals("qtvcofudflvkgj", 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..b16744ec21a3 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\":\"fpubjibwwi\",\"id\":86.60929341951214,\"windowsServerSubscription\":\"Enabled\",\"nodeType\":\"FirstParty\",\"ehcResourceId\":\"vksgplsaknynfsy\",\"manufacturer\":\"jphuopxodlqi\",\"model\":\"torzih\",\"osName\":\"osjswsr\",\"osVersion\":\"lyzrpzbchckqqzqi\",\"osDisplayVersion\":\"iysui\",\"serialNumber\":\"ynkedyatrwyhqmib\",\"coreCount\":20.76805853657423,\"memoryInGiB\":70.79321524067235,\"lastLicensingTimestamp\":\"2021-01-19T20:22:32Z\",\"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..6e4c2661d531 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,11 +15,11 @@ 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\":\"oadsuvar\",\"aadClientId\":\"wdmjsjqbjhhyx\",\"aadTenantId\":\"wlycoduhpkxkg\",\"desiredProperties\":{\"windowsServerSubscription\":\"Disabled\",\"diagnosticLevel\":\"Enhanced\"}}") .toObject(ClusterPatchProperties.class); - Assertions.assertEquals("laexqp", model.cloudManagementEndpoint()); - Assertions.assertEquals("adm", model.aadClientId()); - Assertions.assertEquals("rcrgvx", model.aadTenantId()); + Assertions.assertEquals("oadsuvar", model.cloudManagementEndpoint()); + Assertions.assertEquals("wdmjsjqbjhhyx", model.aadClientId()); + Assertions.assertEquals("wlycoduhpkxkg", model.aadTenantId()); Assertions.assertEquals(WindowsServerSubscription.DISABLED, model.desiredProperties().windowsServerSubscription()); Assertions.assertEquals(DiagnosticLevel.ENHANCED, model.desiredProperties().diagnosticLevel()); @@ -27,16 +27,16 @@ public void testDeserialize() throws Exception { @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("oadsuvar") + .withAadClientId("wdmjsjqbjhhyx") + .withAadTenantId("wlycoduhpkxkg") .withDesiredProperties( new ClusterDesiredProperties().withWindowsServerSubscription(WindowsServerSubscription.DISABLED) .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("oadsuvar", model.cloudManagementEndpoint()); + Assertions.assertEquals("wdmjsjqbjhhyx", model.aadClientId()); + Assertions.assertEquals("wlycoduhpkxkg", model.aadTenantId()); Assertions.assertEquals(WindowsServerSubscription.DISABLED, 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..94fe4ffb4623 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\":{\"foqreyfkzik\":\"zk\",\"wczelpci\":\"jawneaiv\",\"abfatkl\":\"elsfeaen\"},\"identity\":{\"principalId\":\"bjhwuaan\",\"tenantId\":\"jos\",\"type\":\"SystemAssigned\",\"userAssignedIdentities\":{\"xitc\":{\"principalId\":\"l\",\"clientId\":\"rvxaglrvimjwosy\"},\"yf\":{\"principalId\":\"fcktqumiekke\",\"clientId\":\"ikh\"}}},\"properties\":{\"cloudManagementEndpoint\":\"gqggebdunygae\",\"aadClientId\":\"db\",\"aadTenantId\":\"atpxl\",\"desiredProperties\":{\"windowsServerSubscription\":\"Enabled\",\"diagnosticLevel\":\"Enhanced\"}}}") .toObject(ClusterPatch.class); - Assertions.assertEquals("obglaocqxtcc", model.tags().get("g")); - Assertions.assertEquals(ManagedServiceIdentityType.USER_ASSIGNED, model.type()); - Assertions.assertEquals("lhspkdee", model.cloudManagementEndpoint()); - Assertions.assertEquals("ofmxagkvtmelmqkr", model.aadClientId()); - Assertions.assertEquals("hvljuahaquh", model.aadTenantId()); - Assertions.assertEquals(WindowsServerSubscription.DISABLED, + Assertions.assertEquals("zk", model.tags().get("foqreyfkzik")); + Assertions.assertEquals(ManagedServiceIdentityType.SYSTEM_ASSIGNED, model.type()); + Assertions.assertEquals("gqggebdunygae", model.cloudManagementEndpoint()); + Assertions.assertEquals("db", model.aadClientId()); + Assertions.assertEquals("atpxl", model.aadTenantId()); + Assertions.assertEquals(WindowsServerSubscription.ENABLED, model.desiredProperties().windowsServerSubscription()); - Assertions.assertEquals(DiagnosticLevel.BASIC, model.desiredProperties().diagnosticLevel()); + Assertions.assertEquals(DiagnosticLevel.ENHANCED, 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")) - .withType(ManagedServiceIdentityType.USER_ASSIGNED) - .withUserAssignedIdentities(mapOf("n", new UserAssignedIdentity(), "p", new UserAssignedIdentity(), - "fkuwbcrnwbmehhse", new UserAssignedIdentity(), "us", new UserAssignedIdentity())) - .withCloudManagementEndpoint("lhspkdee") - .withAadClientId("ofmxagkvtmelmqkr") - .withAadTenantId("hvljuahaquh") - .withDesiredProperties( - new ClusterDesiredProperties().withWindowsServerSubscription(WindowsServerSubscription.DISABLED) - .withDiagnosticLevel(DiagnosticLevel.BASIC)); + ClusterPatch model + = new ClusterPatch().withTags(mapOf("foqreyfkzik", "zk", "wczelpci", "jawneaiv", "abfatkl", "elsfeaen")) + .withType(ManagedServiceIdentityType.SYSTEM_ASSIGNED) + .withUserAssignedIdentities(mapOf("xitc", new UserAssignedIdentity(), "yf", new UserAssignedIdentity())) + .withCloudManagementEndpoint("gqggebdunygae") + .withAadClientId("db") + .withAadTenantId("atpxl") + .withDesiredProperties( + new ClusterDesiredProperties().withWindowsServerSubscription(WindowsServerSubscription.ENABLED) + .withDiagnosticLevel(DiagnosticLevel.ENHANCED)); model = BinaryData.fromObject(model).toObject(ClusterPatch.class); - Assertions.assertEquals("obglaocqxtcc", model.tags().get("g")); - Assertions.assertEquals(ManagedServiceIdentityType.USER_ASSIGNED, model.type()); - Assertions.assertEquals("lhspkdee", model.cloudManagementEndpoint()); - Assertions.assertEquals("ofmxagkvtmelmqkr", model.aadClientId()); - Assertions.assertEquals("hvljuahaquh", model.aadTenantId()); - Assertions.assertEquals(WindowsServerSubscription.DISABLED, + Assertions.assertEquals("zk", model.tags().get("foqreyfkzik")); + Assertions.assertEquals(ManagedServiceIdentityType.SYSTEM_ASSIGNED, model.type()); + Assertions.assertEquals("gqggebdunygae", model.cloudManagementEndpoint()); + Assertions.assertEquals("db", model.aadClientId()); + Assertions.assertEquals("atpxl", model.aadTenantId()); + Assertions.assertEquals(WindowsServerSubscription.ENABLED, model.desiredProperties().windowsServerSubscription()); - Assertions.assertEquals(DiagnosticLevel.BASIC, model.desiredProperties().diagnosticLevel()); + Assertions.assertEquals(DiagnosticLevel.ENHANCED, 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..573d35697b6a 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\":\"vo\",\"clusterId\":\"sotbob\",\"clusterVersion\":\"opcjwvnhd\",\"nodes\":[{\"name\":\"gx\",\"id\":73.7496547822332,\"windowsServerSubscription\":\"Disabled\",\"nodeType\":\"FirstParty\",\"ehcResourceId\":\"wuoegrpk\",\"manufacturer\":\"wniyqsluicpd\",\"model\":\"kzzlvmbmpaxmodf\",\"osName\":\"efyw\",\"osVersion\":\"pfvmwyhrfou\",\"osDisplayVersion\":\"taakc\",\"serialNumber\":\"iyzvqtmnub\",\"coreCount\":71.15051622852103,\"memoryInGiB\":36.857460874430835,\"lastLicensingTimestamp\":\"2021-03-02T10:38:26Z\",\"oemActivation\":\"Disabled\"},{\"name\":\"mquxvypo\",\"id\":92.8143106094022,\"windowsServerSubscription\":\"Enabled\",\"nodeType\":\"ThirdParty\",\"ehcResourceId\":\"jvp\",\"manufacturer\":\"qgxy\",\"model\":\"ocmbqfqvmkcxoza\",\"osName\":\"helxprglya\",\"osVersion\":\"dckcbc\",\"osDisplayVersion\":\"jrjxgciqibrhosx\",\"serialNumber\":\"qrhzoymibmrqyib\",\"coreCount\":46.294295013819244,\"memoryInGiB\":70.92327274648386,\"lastLicensingTimestamp\":\"2021-01-14T17:23:07Z\",\"oemActivation\":\"Enabled\"},{\"name\":\"rkwofyyvoqa\",\"id\":69.7619622142573,\"windowsServerSubscription\":\"Disabled\",\"nodeType\":\"FirstParty\",\"ehcResourceId\":\"iwbwoenwashrtdtk\",\"manufacturer\":\"qxwbpokulpiu\",\"model\":\"aasipqi\",\"osName\":\"byuqerpqlp\",\"osVersion\":\"cciuqgbdbutau\",\"osDisplayVersion\":\"btkuwhh\",\"serialNumber\":\"ykojoxafnndlpic\",\"coreCount\":3.988522951890272,\"memoryInGiB\":45.1856164357858,\"lastLicensingTimestamp\":\"2021-01-02T23:27:33Z\",\"oemActivation\":\"Enabled\"}],\"lastUpdated\":\"2021-05-25T06:23:15Z\",\"msiExpirationTimeStamp\":\"2021-04-02T15:09:08Z\",\"imdsAttestation\":\"Enabled\",\"diagnosticLevel\":\"Off\",\"supportedCapabilities\":[\"ovvqfovljxywsu\",\"syrsndsytgadgvra\",\"aeneqnzarrwl\"],\"clusterType\":\"FirstParty\",\"manufacturer\":\"jfqka\",\"oemActivation\":\"Disabled\",\"hardwareClass\":\"Large\"}") .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()); - } } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ClusterSdnPropertiesTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ClusterSdnPropertiesTests.java new file mode 100644 index 000000000000..e854e76c4656 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ClusterSdnPropertiesTests.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.ClusterSdnProperties; + +public final class ClusterSdnPropertiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ClusterSdnProperties model = BinaryData.fromString( + "{\"sdnIntegrationIntent\":\"Disable\",\"sdnStatus\":\"Disabled\",\"sdnDomainName\":\"otllxdyhgsyo\",\"sdnApiAddress\":\"gjltdtbnnhado\"}") + .toObject(ClusterSdnProperties.class); + } +} 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..3cab10973d3b 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\":\"srkixy\",\"aadTenantId\":\"hw\",\"aadServicePrincipalObjectId\":\"qomaqsyilpzzbrw\",\"aadApplicationObjectId\":\"zozsxag\"}}"; 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("xwhcvasy", "hgqok", 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..d88d5ff07aac 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("ksinpa", "m", 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/ConfidentialVmPropertiesTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ConfidentialVmPropertiesTests.java new file mode 100644 index 000000000000..fdf2f3de9ae2 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ConfidentialVmPropertiesTests.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.ConfidentialVmProperties; + +public final class ConfidentialVmPropertiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ConfidentialVmProperties model = BinaryData.fromString( + "{\"confidentialVmIntent\":\"Disable\",\"confidentialVmStatus\":\"Enabled\",\"confidentialVmStatusSummary\":\"m\"}") + .toObject(ConfidentialVmProperties.class); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ContentPayloadTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ContentPayloadTests.java new file mode 100644 index 000000000000..e2748f92e5e7 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ContentPayloadTests.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; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.azurestackhci.models.ContentPayload; +import org.junit.jupiter.api.Assertions; + +public final class ContentPayloadTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ContentPayload model = BinaryData.fromString( + "{\"url\":\"gpphrcgyn\",\"hash\":\"cpecfvmmcoofs\",\"hashAlgorithm\":\"zevgb\",\"identifier\":\"jqabcypmivkwlzuv\",\"packageSizeInBytes\":\"fwnfnb\",\"group\":\"fionl\",\"fileName\":\"x\"}") + .toObject(ContentPayload.class); + Assertions.assertEquals("gpphrcgyn", model.url()); + Assertions.assertEquals("cpecfvmmcoofs", model.hash()); + Assertions.assertEquals("zevgb", model.hashAlgorithm()); + Assertions.assertEquals("jqabcypmivkwlzuv", model.identifier()); + Assertions.assertEquals("fwnfnb", model.packageSizeInBytes()); + Assertions.assertEquals("fionl", model.group()); + Assertions.assertEquals("x", model.fileName()); + } +} 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..06c96fdfa66a 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\":\"txp\",\"consentTime\":\"2021-09-04T06:17:20Z\"}") .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..c5d6a619b571 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\":\"yzkoowtlmngu\",\"witnessType\":\"wqaldsyu\",\"witnessPath\":\"imerqfobwyznk\",\"cloudAccountName\":\"kutwpf\",\"azureServiceEndpoint\":\"a\",\"hardwareClass\":\"Medium\",\"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("yzkoowtlmngu", model.name()); + Assertions.assertEquals("wqaldsyu", model.witnessType()); + Assertions.assertEquals("imerqfobwyznk", model.witnessPath()); + Assertions.assertEquals("kutwpf", model.cloudAccountName()); + Assertions.assertEquals("a", 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("yzkoowtlmngu") + .withWitnessType("wqaldsyu") + .withWitnessPath("imerqfobwyznk") + .withCloudAccountName("kutwpf") + .withAzureServiceEndpoint("a") + .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("yzkoowtlmngu", model.name()); + Assertions.assertEquals("wqaldsyu", model.witnessType()); + Assertions.assertEquals("imerqfobwyznk", model.witnessPath()); + Assertions.assertEquals("kutwpf", model.cloudAccountName()); + Assertions.assertEquals("a", 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..682a2c567404 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\":\"otxhojujby\",\"networkDirect\":\"lmcuvhixb\",\"networkDirectTechnology\":\"yfwnylr\"}") .toObject(DeploymentSettingAdapterPropertyOverrides.class); - Assertions.assertEquals("fikdowwqu", model.jumboPacket()); - Assertions.assertEquals("xzxcl", model.networkDirect()); - Assertions.assertEquals("thhqzonosggbh", model.networkDirectTechnology()); + Assertions.assertEquals("otxhojujby", model.jumboPacket()); + Assertions.assertEquals("lmcuvhixb", model.networkDirect()); + Assertions.assertEquals("yfwnylr", 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("otxhojujby") + .withNetworkDirect("lmcuvhixb") + .withNetworkDirectTechnology("yfwnylr"); model = BinaryData.fromObject(model).toObject(DeploymentSettingAdapterPropertyOverrides.class); - Assertions.assertEquals("fikdowwqu", model.jumboPacket()); - Assertions.assertEquals("xzxcl", model.networkDirect()); - Assertions.assertEquals("thhqzonosggbh", model.networkDirectTechnology()); + Assertions.assertEquals("otxhojujby", model.jumboPacket()); + Assertions.assertEquals("lmcuvhixb", model.networkDirect()); + Assertions.assertEquals("yfwnylr", 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..963d36d4c6a9 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,176 @@ 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\":\"swibyr\",\"trafficType\":[\"bhshfwpracstwity\"],\"adapter\":[\"vxccedcp\",\"md\",\"odn\"],\"overrideVirtualSwitchConfiguration\":true,\"virtualSwitchConfigurationOverrides\":{\"enableIov\":\"jc\",\"loadBalancingAlgorithm\":\"hlt\"},\"overrideQosPolicy\":false,\"qosPolicyOverrides\":{\"priorityValue8021Action_Cluster\":\"navvwx\",\"priorityValue8021Action_SMB\":\"byqunyow\",\"bandwidthPercentage_SMB\":\"lmdjrkvfgbvfvpdb\"},\"overrideAdapterProperty\":true,\"adapterPropertyOverrides\":{\"jumboPacket\":\"zsjqlh\",\"networkDirect\":\"r\",\"networkDirectTechnology\":\"deibqip\"}},{\"name\":\"ghvxndzwmkrefa\",\"trafficType\":[\"orwkqnyh\",\"b\",\"j\",\"jivfxzsjabib\"],\"adapter\":[\"tawfsdjpvkvp\",\"jxbkzbzkdvn\",\"jabudurgkakmo\"],\"overrideVirtualSwitchConfiguration\":false,\"virtualSwitchConfigurationOverrides\":{\"enableIov\":\"klff\",\"loadBalancingAlgorithm\":\"ouw\"},\"overrideQosPolicy\":false,\"qosPolicyOverrides\":{\"priorityValue8021Action_Cluster\":\"fzeeyebizik\",\"priorityValue8021Action_SMB\":\"uhqlbjbsybbqwrvt\",\"bandwidthPercentage_SMB\":\"gmfpgvmp\"},\"overrideAdapterProperty\":false,\"adapterPropertyOverrides\":{\"jumboPacket\":\"thaqfxssmwu\",\"networkDirect\":\"bdsrez\",\"networkDirectTechnology\":\"rhneuyowq\"}},{\"name\":\"wyt\",\"trafficType\":[\"bi\"],\"adapter\":[\"pikpz\",\"mejzanlfzxia\",\"rmbzo\"],\"overrideVirtualSwitchConfiguration\":false,\"virtualSwitchConfigurationOverrides\":{\"enableIov\":\"rjqc\",\"loadBalancingAlgorithm\":\"gzpfrla\"},\"overrideQosPolicy\":false,\"qosPolicyOverrides\":{\"priorityValue8021Action_Cluster\":\"woiindf\",\"priorityValue8021Action_SMB\":\"pj\",\"bandwidthPercentage_SMB\":\"wbtlhflsjcdh\"},\"overrideAdapterProperty\":true,\"adapterPropertyOverrides\":{\"jumboPacket\":\"fbgofeljagrqmqh\",\"networkDirect\":\"vriiio\",\"networkDirectTechnology\":\"al\"}},{\"name\":\"fk\",\"trafficType\":[\"sexso\",\"ueluqhhahhxvrhmz\",\"wpjgwws\"],\"adapter\":[\"hftqsxhqxujxukn\",\"xdigrjg\",\"ufzdmsyq\",\"fi\"],\"overrideVirtualSwitchConfiguration\":true,\"virtualSwitchConfigurationOverrides\":{\"enableIov\":\"tzingamvpph\",\"loadBalancingAlgorithm\":\"zqzudph\"},\"overrideQosPolicy\":false,\"qosPolicyOverrides\":{\"priorityValue8021Action_Cluster\":\"kfwynw\",\"priorityValue8021Action_SMB\":\"tbvkayhmtnvyq\",\"bandwidthPercentage_SMB\":\"tkzwpcnpwzc\"},\"overrideAdapterProperty\":true,\"adapterPropertyOverrides\":{\"jumboPacket\":\"vvsccyajguq\",\"networkDirect\":\"wygzlvdnkfxusem\",\"networkDirectTechnology\":\"zrmuhapfcqdps\"}}],\"storageNetworks\":[{\"name\":\"psvuoymgc\",\"networkAdapterName\":\"lvez\",\"vlanId\":\"pqlmfe\",\"storageAdapterIPInfo\":[{\"physicalNode\":\"qwkyhkobop\",\"ipv4Address\":\"edkowepbqpcrfk\",\"subnetMask\":\"ccsnjvcdwxlpq\"},{\"physicalNode\":\"ftnkhtj\",\"ipv4Address\":\"i\",\"subnetMask\":\"wfqatmtd\"},{\"physicalNode\":\"mdvy\",\"ipv4Address\":\"ikdgszywkbir\",\"subnetMask\":\"uzhlhkjoqrv\"},{\"physicalNode\":\"aatjinrvgoupmfi\",\"ipv4Address\":\"fggjioolvr\",\"subnetMask\":\"kvtkkg\"}]},{\"name\":\"qwjygvja\",\"networkAdapterName\":\"blmhvkzuhb\",\"vlanId\":\"vyhgs\",\"storageAdapterIPInfo\":[{\"physicalNode\":\"rqufegxuvwz\",\"ipv4Address\":\"nhlmctlpdng\",\"subnetMask\":\"vgbmhr\"},{\"physicalNode\":\"kw\",\"ipv4Address\":\"ijejvegrhbpn\",\"subnetMask\":\"xexccbdreaxhcexd\"}]},{\"name\":\"vqahqkghtpwi\",\"networkAdapterName\":\"hyjsvfycx\",\"vlanId\":\"fvoow\",\"storageAdapterIPInfo\":[{\"physicalNode\":\"t\",\"ipv4Address\":\"qp\",\"subnetMask\":\"ostronz\"},{\"physicalNode\":\"hgfipnsxkmcw\",\"ipv4Address\":\"krrjrea\",\"subnetMask\":\"tsgumhj\"},{\"physicalNode\":\"ikkx\",\"ipv4Address\":\"lo\",\"subnetMask\":\"qpvuzlmvfelf\"}]}],\"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("swibyr", model.intents().get(0).name()); + Assertions.assertEquals("bhshfwpracstwity", model.intents().get(0).trafficType().get(0)); + Assertions.assertEquals("vxccedcp", model.intents().get(0).adapter().get(0)); + Assertions.assertTrue(model.intents().get(0).overrideVirtualSwitchConfiguration()); + Assertions.assertEquals("jc", model.intents().get(0).virtualSwitchConfigurationOverrides().enableIov()); + Assertions.assertEquals("hlt", model.intents().get(0).virtualSwitchConfigurationOverrides().loadBalancingAlgorithm()); - Assertions.assertEquals(false, model.intents().get(0).overrideQosPolicy()); - Assertions.assertEquals("auvjfdxxivet", - 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", + Assertions.assertFalse(model.intents().get(0).overrideQosPolicy()); + Assertions.assertEquals("navvwx", model.intents().get(0).qosPolicyOverrides().priorityValue8021ActionCluster()); + Assertions.assertEquals("byqunyow", model.intents().get(0).qosPolicyOverrides().priorityValue8021ActionSmb()); + Assertions.assertEquals("lmdjrkvfgbvfvpdb", + model.intents().get(0).qosPolicyOverrides().bandwidthPercentageSmb()); + Assertions.assertTrue(model.intents().get(0).overrideAdapterProperty()); + Assertions.assertEquals("zsjqlh", model.intents().get(0).adapterPropertyOverrides().jumboPacket()); + Assertions.assertEquals("r", model.intents().get(0).adapterPropertyOverrides().networkDirect()); + Assertions.assertEquals("deibqip", model.intents().get(0).adapterPropertyOverrides().networkDirectTechnology()); + Assertions.assertEquals("psvuoymgc", model.storageNetworks().get(0).name()); + Assertions.assertEquals("lvez", model.storageNetworks().get(0).networkAdapterName()); + Assertions.assertEquals("pqlmfe", model.storageNetworks().get(0).vlanId()); + Assertions.assertEquals("qwkyhkobop", + model.storageNetworks().get(0).storageAdapterIpInfo().get(0).physicalNode()); + Assertions.assertEquals("edkowepbqpcrfk", model.storageNetworks().get(0).storageAdapterIpInfo().get(0).ipv4Address()); - Assertions.assertEquals("dvxzbncblylpst", + Assertions.assertEquals("ccsnjvcdwxlpq", model.storageNetworks().get(0).storageAdapterIpInfo().get(0).subnetMask()); - Assertions.assertEquals(true, model.storageConnectivitySwitchless()); - Assertions.assertEquals(true, model.enableStorageAutoIp()); + 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("swibyr") + .withTrafficType(Arrays.asList("bhshfwpracstwity")) + .withAdapter(Arrays.asList("vxccedcp", "md", "odn")) + .withOverrideVirtualSwitchConfiguration(true) + .withVirtualSwitchConfigurationOverrides( + new DeploymentSettingVirtualSwitchConfigurationOverrides().withEnableIov("jc") + .withLoadBalancingAlgorithm("hlt")) + .withOverrideQosPolicy(false) + .withQosPolicyOverrides(new QosPolicyOverrides().withPriorityValue8021ActionCluster("navvwx") + .withPriorityValue8021ActionSmb("byqunyow") + .withBandwidthPercentageSmb("lmdjrkvfgbvfvpdb")) + .withOverrideAdapterProperty(true) + .withAdapterPropertyOverrides(new DeploymentSettingAdapterPropertyOverrides() + .withJumboPacket("zsjqlh") + .withNetworkDirect("r") + .withNetworkDirectTechnology("deibqip")), + new DeploymentSettingIntents().withName("ghvxndzwmkrefa") + .withTrafficType(Arrays.asList("orwkqnyh", "b", "j", "jivfxzsjabib")) + .withAdapter(Arrays.asList("tawfsdjpvkvp", "jxbkzbzkdvn", "jabudurgkakmo")) + .withOverrideVirtualSwitchConfiguration(false) + .withVirtualSwitchConfigurationOverrides( + new DeploymentSettingVirtualSwitchConfigurationOverrides().withEnableIov("klff") + .withLoadBalancingAlgorithm("ouw")) + .withOverrideQosPolicy(false) + .withQosPolicyOverrides( + new QosPolicyOverrides().withPriorityValue8021ActionCluster("fzeeyebizik") + .withPriorityValue8021ActionSmb("uhqlbjbsybbqwrvt") + .withBandwidthPercentageSmb("gmfpgvmp")) + .withOverrideAdapterProperty(false) + .withAdapterPropertyOverrides( + new DeploymentSettingAdapterPropertyOverrides().withJumboPacket("thaqfxssmwu") + .withNetworkDirect("bdsrez") + .withNetworkDirectTechnology("rhneuyowq")), + new DeploymentSettingIntents().withName("wyt") + .withTrafficType(Arrays.asList("bi")) + .withAdapter(Arrays.asList("pikpz", "mejzanlfzxia", "rmbzo")) + .withOverrideVirtualSwitchConfiguration(false) + .withVirtualSwitchConfigurationOverrides( + new DeploymentSettingVirtualSwitchConfigurationOverrides().withEnableIov("rjqc") + .withLoadBalancingAlgorithm("gzpfrla")) + .withOverrideQosPolicy(false) + .withQosPolicyOverrides(new QosPolicyOverrides().withPriorityValue8021ActionCluster("woiindf") + .withPriorityValue8021ActionSmb("pj") + .withBandwidthPercentageSmb("wbtlhflsjcdh")) + .withOverrideAdapterProperty(true) + .withAdapterPropertyOverrides( + new DeploymentSettingAdapterPropertyOverrides().withJumboPacket("fbgofeljagrqmqh") + .withNetworkDirect("vriiio") + .withNetworkDirectTechnology("al")), + new DeploymentSettingIntents().withName("fk") + .withTrafficType(Arrays.asList("sexso", "ueluqhhahhxvrhmz", "wpjgwws")) + .withAdapter(Arrays.asList("hftqsxhqxujxukn", "xdigrjg", "ufzdmsyq", "fi")) + .withOverrideVirtualSwitchConfiguration(true) + .withVirtualSwitchConfigurationOverrides( + new DeploymentSettingVirtualSwitchConfigurationOverrides().withEnableIov("tzingamvpph") + .withLoadBalancingAlgorithm("zqzudph")) + .withOverrideQosPolicy(false) + .withQosPolicyOverrides(new QosPolicyOverrides().withPriorityValue8021ActionCluster("kfwynw") + .withPriorityValue8021ActionSmb("tbvkayhmtnvyq") + .withBandwidthPercentageSmb("tkzwpcnpwzc")) + .withOverrideAdapterProperty(true) + .withAdapterPropertyOverrides( + new DeploymentSettingAdapterPropertyOverrides().withJumboPacket("vvsccyajguq") + .withNetworkDirect("wygzlvdnkfxusem") + .withNetworkDirectTechnology("zrmuhapfcqdps")))) + .withStorageNetworks(Arrays.asList( + new DeploymentSettingStorageNetworks().withName("psvuoymgc") + .withNetworkAdapterName("lvez") + .withVlanId("pqlmfe") + .withStorageAdapterIpInfo(Arrays.asList( + new DeploymentSettingStorageAdapterIpInfo().withPhysicalNode("qwkyhkobop") + .withIpv4Address("edkowepbqpcrfk") + .withSubnetMask("ccsnjvcdwxlpq"), + new DeploymentSettingStorageAdapterIpInfo().withPhysicalNode("ftnkhtj") + .withIpv4Address("i") + .withSubnetMask("wfqatmtd"), + new DeploymentSettingStorageAdapterIpInfo().withPhysicalNode("mdvy") + .withIpv4Address("ikdgszywkbir") + .withSubnetMask("uzhlhkjoqrv"), + new DeploymentSettingStorageAdapterIpInfo().withPhysicalNode("aatjinrvgoupmfi") + .withIpv4Address("fggjioolvr") + .withSubnetMask("kvtkkg"))), + new DeploymentSettingStorageNetworks().withName("qwjygvja") + .withNetworkAdapterName("blmhvkzuhb") + .withVlanId("vyhgs") + .withStorageAdapterIpInfo(Arrays.asList( + new DeploymentSettingStorageAdapterIpInfo().withPhysicalNode("rqufegxuvwz") + .withIpv4Address("nhlmctlpdng") + .withSubnetMask("vgbmhr"), + new DeploymentSettingStorageAdapterIpInfo().withPhysicalNode("kw") + .withIpv4Address("ijejvegrhbpn") + .withSubnetMask("xexccbdreaxhcexd"))), + new DeploymentSettingStorageNetworks().withName("vqahqkghtpwi") + .withNetworkAdapterName("hyjsvfycx") + .withVlanId("fvoow") + .withStorageAdapterIpInfo(Arrays.asList( + new DeploymentSettingStorageAdapterIpInfo().withPhysicalNode("t") + .withIpv4Address("qp") + .withSubnetMask("ostronz"), + new DeploymentSettingStorageAdapterIpInfo().withPhysicalNode("hgfipnsxkmcw") + .withIpv4Address("krrjrea") + .withSubnetMask("tsgumhj"), + new DeploymentSettingStorageAdapterIpInfo().withPhysicalNode("ikkx") + .withIpv4Address("lo") + .withSubnetMask("qpvuzlmvfelf"))))) + .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("swibyr", model.intents().get(0).name()); + Assertions.assertEquals("bhshfwpracstwity", model.intents().get(0).trafficType().get(0)); + Assertions.assertEquals("vxccedcp", model.intents().get(0).adapter().get(0)); + Assertions.assertTrue(model.intents().get(0).overrideVirtualSwitchConfiguration()); + Assertions.assertEquals("jc", model.intents().get(0).virtualSwitchConfigurationOverrides().enableIov()); + Assertions.assertEquals("hlt", model.intents().get(0).virtualSwitchConfigurationOverrides().loadBalancingAlgorithm()); - Assertions.assertEquals(false, model.intents().get(0).overrideQosPolicy()); - Assertions.assertEquals("auvjfdxxivet", - 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", + Assertions.assertFalse(model.intents().get(0).overrideQosPolicy()); + Assertions.assertEquals("navvwx", model.intents().get(0).qosPolicyOverrides().priorityValue8021ActionCluster()); + Assertions.assertEquals("byqunyow", model.intents().get(0).qosPolicyOverrides().priorityValue8021ActionSmb()); + Assertions.assertEquals("lmdjrkvfgbvfvpdb", + model.intents().get(0).qosPolicyOverrides().bandwidthPercentageSmb()); + Assertions.assertTrue(model.intents().get(0).overrideAdapterProperty()); + Assertions.assertEquals("zsjqlh", model.intents().get(0).adapterPropertyOverrides().jumboPacket()); + Assertions.assertEquals("r", model.intents().get(0).adapterPropertyOverrides().networkDirect()); + Assertions.assertEquals("deibqip", model.intents().get(0).adapterPropertyOverrides().networkDirectTechnology()); + Assertions.assertEquals("psvuoymgc", model.storageNetworks().get(0).name()); + Assertions.assertEquals("lvez", model.storageNetworks().get(0).networkAdapterName()); + Assertions.assertEquals("pqlmfe", model.storageNetworks().get(0).vlanId()); + Assertions.assertEquals("qwkyhkobop", + model.storageNetworks().get(0).storageAdapterIpInfo().get(0).physicalNode()); + Assertions.assertEquals("edkowepbqpcrfk", model.storageNetworks().get(0).storageAdapterIpInfo().get(0).ipv4Address()); - Assertions.assertEquals("dvxzbncblylpst", + Assertions.assertEquals("ccsnjvcdwxlpq", model.storageNetworks().get(0).storageAdapterIpInfo().get(0).subnetMask()); - Assertions.assertEquals(true, model.storageConnectivitySwitchless()); - Assertions.assertEquals(true, model.enableStorageAutoIp()); + 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..d6c68d1096dc 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\":\"rpw\",\"trafficType\":[\"znoigbrn\",\"w\"],\"adapter\":[\"pn\"],\"overrideVirtualSwitchConfiguration\":false,\"virtualSwitchConfigurationOverrides\":{\"enableIov\":\"jjoqkagf\",\"loadBalancingAlgorithm\":\"xttaugzxnfaaz\"},\"overrideQosPolicy\":false,\"qosPolicyOverrides\":{\"priorityValue8021Action_Cluster\":\"kdmkqjjlwuenvrkp\",\"priorityValue8021Action_SMB\":\"uaibrebqaaysj\",\"bandwidthPercentage_SMB\":\"xqtnq\"},\"overrideAdapterProperty\":false,\"adapterPropertyOverrides\":{\"jumboPacket\":\"wfff\",\"networkDirect\":\"kpj\",\"networkDirectTechnology\":\"qmt\"}}") .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("rpw", model.name()); + Assertions.assertEquals("znoigbrn", model.trafficType().get(0)); + Assertions.assertEquals("pn", model.adapter().get(0)); + Assertions.assertFalse(model.overrideVirtualSwitchConfiguration()); + Assertions.assertEquals("jjoqkagf", model.virtualSwitchConfigurationOverrides().enableIov()); + Assertions.assertEquals("xttaugzxnfaaz", model.virtualSwitchConfigurationOverrides().loadBalancingAlgorithm()); + Assertions.assertFalse(model.overrideQosPolicy()); + Assertions.assertEquals("kdmkqjjlwuenvrkp", model.qosPolicyOverrides().priorityValue8021ActionCluster()); + Assertions.assertEquals("uaibrebqaaysj", model.qosPolicyOverrides().priorityValue8021ActionSmb()); + Assertions.assertEquals("xqtnq", model.qosPolicyOverrides().bandwidthPercentageSmb()); + Assertions.assertFalse(model.overrideAdapterProperty()); + Assertions.assertEquals("wfff", model.adapterPropertyOverrides().jumboPacket()); + Assertions.assertEquals("kpj", model.adapterPropertyOverrides().networkDirect()); + Assertions.assertEquals("qmt", 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")) - .withOverrideVirtualSwitchConfiguration(true) + DeploymentSettingIntents model = new DeploymentSettingIntents().withName("rpw") + .withTrafficType(Arrays.asList("znoigbrn", "w")) + .withAdapter(Arrays.asList("pn")) + .withOverrideVirtualSwitchConfiguration(false) .withVirtualSwitchConfigurationOverrides( - new DeploymentSettingVirtualSwitchConfigurationOverrides().withEnableIov("obdagxtibqdxb") - .withLoadBalancingAlgorithm("akbogqxndlkzgxh")) - .withOverrideQosPolicy(true) - .withQosPolicyOverrides(new QosPolicyOverrides().withPriorityValue8021ActionCluster("bpodxunkbebxm") - .withPriorityValue8021ActionSmb("yyntwl") - .withBandwidthPercentageSmb("qtkoievs")) + new DeploymentSettingVirtualSwitchConfigurationOverrides().withEnableIov("jjoqkagf") + .withLoadBalancingAlgorithm("xttaugzxnfaaz")) + .withOverrideQosPolicy(false) + .withQosPolicyOverrides(new QosPolicyOverrides().withPriorityValue8021ActionCluster("kdmkqjjlwuenvrkp") + .withPriorityValue8021ActionSmb("uaibrebqaaysj") + .withBandwidthPercentageSmb("xqtnq")) .withOverrideAdapterProperty(false) - .withAdapterPropertyOverrides( - new DeploymentSettingAdapterPropertyOverrides().withJumboPacket("rlltmuwlauwzizx") - .withNetworkDirect("pgcjefuzmuvp") - .withNetworkDirectTechnology("tdum")); + .withAdapterPropertyOverrides(new DeploymentSettingAdapterPropertyOverrides().withJumboPacket("wfff") + .withNetworkDirect("kpj") + .withNetworkDirectTechnology("qmt")); 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("rpw", model.name()); + Assertions.assertEquals("znoigbrn", model.trafficType().get(0)); + Assertions.assertEquals("pn", model.adapter().get(0)); + Assertions.assertFalse(model.overrideVirtualSwitchConfiguration()); + Assertions.assertEquals("jjoqkagf", model.virtualSwitchConfigurationOverrides().enableIov()); + Assertions.assertEquals("xttaugzxnfaaz", model.virtualSwitchConfigurationOverrides().loadBalancingAlgorithm()); + Assertions.assertFalse(model.overrideQosPolicy()); + Assertions.assertEquals("kdmkqjjlwuenvrkp", model.qosPolicyOverrides().priorityValue8021ActionCluster()); + Assertions.assertEquals("uaibrebqaaysj", model.qosPolicyOverrides().priorityValue8021ActionSmb()); + Assertions.assertEquals("xqtnq", model.qosPolicyOverrides().bandwidthPercentageSmb()); + Assertions.assertFalse(model.overrideAdapterProperty()); + Assertions.assertEquals("wfff", model.adapterPropertyOverrides().jumboPacket()); + Assertions.assertEquals("kpj", model.adapterPropertyOverrides().networkDirect()); + Assertions.assertEquals("qmt", 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..764f5c01da1d 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\":\"Disconnected\",\"arcNodeResourceIds\":[\"zhvfcibyfmowuxr\"],\"deploymentMode\":\"Validate\",\"operationType\":\"ClusterProvisioning\",\"deploymentConfiguration\":{\"version\":\"w\",\"scaleUnits\":[{\"deploymentData\":{}},{\"deploymentData\":{}},{\"deploymentData\":{}},{\"deploymentData\":{}}]},\"reportedProperties\":{\"validationStatus\":{\"status\":\"ivwzjbhyzs\",\"steps\":[{},{}]},\"deploymentStatus\":{\"status\":\"mbtrnegvmnvu\",\"steps\":[{},{},{},{}]}}},\"id\":\"lds\",\"name\":\"astjbkkdmflvestm\",\"type\":\"lx\"},{\"properties\":{\"provisioningState\":\"InProgress\",\"arcNodeResourceIds\":[\"zapeewchpx\",\"ktwkuziyc\"],\"deploymentMode\":\"Deploy\",\"operationType\":\"ClusterProvisioning\",\"deploymentConfiguration\":{\"version\":\"f\",\"scaleUnits\":[{\"deploymentData\":{}},{\"deploymentData\":{}}]},\"reportedProperties\":{\"validationStatus\":{\"status\":\"tyh\",\"steps\":[{},{},{}]},\"deploymentStatus\":{\"status\":\"cgzulwmmrqzzr\",\"steps\":[{},{}]}}},\"id\":\"gl\",\"name\":\"dzgkr\",\"type\":\"qeevt\"},{\"properties\":{\"provisioningState\":\"Error\",\"arcNodeResourceIds\":[\"utnwytpzdmovzvf\",\"aawzqadfl\",\"z\",\"riglaec\"],\"deploymentMode\":\"Validate\",\"operationType\":\"ClusterProvisioning\",\"deploymentConfiguration\":{\"version\":\"cokpv\",\"scaleUnits\":[{\"deploymentData\":{}},{\"deploymentData\":{}},{\"deploymentData\":{}}]},\"reportedProperties\":{\"validationStatus\":{\"status\":\"mldgxobfirc\",\"steps\":[{}]},\"deploymentStatus\":{\"status\":\"iayz\",\"steps\":[{},{},{},{}]}}},\"id\":\"hya\",\"name\":\"fvjlboxqvkjlmx\",\"type\":\"omdynhdwdigum\"},{\"properties\":{\"provisioningState\":\"Deleted\",\"arcNodeResourceIds\":[\"uzzptjazysdz\",\"ezwwv\",\"iqyuvvfo\"],\"deploymentMode\":\"Validate\",\"operationType\":\"ClusterProvisioning\",\"deploymentConfiguration\":{\"version\":\"qyikvy\",\"scaleUnits\":[{\"deploymentData\":{}}]},\"reportedProperties\":{\"validationStatus\":{\"status\":\"vluwmncsttij\",\"steps\":[{},{},{},{}]},\"deploymentStatus\":{\"status\":\"o\",\"steps\":[{}]}}},\"id\":\"gsgbdhuzq\",\"name\":\"njdgkynscliq\",\"type\":\"zvhxnk\"}],\"nextLink\":\"tkubotppn\"}") .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("zhvfcibyfmowuxr", 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("w", model.value().get(0).deploymentConfiguration().version()); + Assertions.assertEquals("tkubotppn", 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..db6c0b7df14a 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\":\"ufxqknpirgnepttw\",\"ipv4Address\":\"sniffc\",\"subnetMask\":\"qnrojlpijnkrxfrd\"}") + .toObject(DeploymentSettingStorageAdapterIpInfo.class); + Assertions.assertEquals("ufxqknpirgnepttw", model.physicalNode()); + Assertions.assertEquals("sniffc", model.ipv4Address()); + Assertions.assertEquals("qnrojlpijnkrxfrd", 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("ufxqknpirgnepttw") + .withIpv4Address("sniffc") + .withSubnetMask("qnrojlpijnkrxfrd"); model = BinaryData.fromObject(model).toObject(DeploymentSettingStorageAdapterIpInfo.class); - Assertions.assertEquals("ld", model.physicalNode()); - Assertions.assertEquals("gx", model.ipv4Address()); - Assertions.assertEquals("rslpmutwuoeg", model.subnetMask()); + Assertions.assertEquals("ufxqknpirgnepttw", model.physicalNode()); + Assertions.assertEquals("sniffc", model.ipv4Address()); + Assertions.assertEquals("qnrojlpijnkrxfrd", 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..eb3eebb3398b 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,37 @@ 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\":\"o\",\"networkAdapterName\":\"ttpkiwkkbnujrywv\",\"vlanId\":\"lbfpncurd\",\"storageAdapterIPInfo\":[{\"physicalNode\":\"ithtywu\",\"ipv4Address\":\"cbihwqk\",\"subnetMask\":\"dntwjchrdgo\"},{\"physicalNode\":\"xum\",\"ipv4Address\":\"ton\",\"subnetMask\":\"jl\"},{\"physicalNode\":\"dfdlwggyts\",\"ipv4Address\":\"tov\",\"subnetMask\":\"gseinq\"}]}") .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("o", model.name()); + Assertions.assertEquals("ttpkiwkkbnujrywv", model.networkAdapterName()); + Assertions.assertEquals("lbfpncurd", model.vlanId()); + Assertions.assertEquals("ithtywu", model.storageAdapterIpInfo().get(0).physicalNode()); + Assertions.assertEquals("cbihwqk", model.storageAdapterIpInfo().get(0).ipv4Address()); + Assertions.assertEquals("dntwjchrdgo", 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("o") + .withNetworkAdapterName("ttpkiwkkbnujrywv") + .withVlanId("lbfpncurd") .withStorageAdapterIpInfo(Arrays.asList( - new DeploymentSettingStorageAdapterIpInfo().withPhysicalNode("rwdmhdlxyjrxsa") - .withIpv4Address("fcnihgwq") - .withSubnetMask("nedgfbc"), - new DeploymentSettingStorageAdapterIpInfo().withPhysicalNode("cvqvpkeqdcv") - .withIpv4Address("hvoodsotbobzd") - .withSubnetMask("cjwvn"))); + new DeploymentSettingStorageAdapterIpInfo().withPhysicalNode("ithtywu") + .withIpv4Address("cbihwqk") + .withSubnetMask("dntwjchrdgo"), + new DeploymentSettingStorageAdapterIpInfo().withPhysicalNode("xum") + .withIpv4Address("ton") + .withSubnetMask("jl"), + new DeploymentSettingStorageAdapterIpInfo().withPhysicalNode("dfdlwggyts") + .withIpv4Address("tov") + .withSubnetMask("gseinq"))); 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("o", model.name()); + Assertions.assertEquals("ttpkiwkkbnujrywv", model.networkAdapterName()); + Assertions.assertEquals("lbfpncurd", model.vlanId()); + Assertions.assertEquals("ithtywu", model.storageAdapterIpInfo().get(0).physicalNode()); + Assertions.assertEquals("cbihwqk", model.storageAdapterIpInfo().get(0).ipv4Address()); + Assertions.assertEquals("dntwjchrdgo", 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..a3a1040a01b8 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\":\"ltmm\",\"loadBalancingAlgorithm\":\"hyeozphvwau\"}") .toObject(DeploymentSettingVirtualSwitchConfigurationOverrides.class); - Assertions.assertEquals("p", model.enableIov()); - Assertions.assertEquals("ebmnzbtbhjpglk", model.loadBalancingAlgorithm()); + Assertions.assertEquals("ltmm", model.enableIov()); + Assertions.assertEquals("hyeozphvwau", model.loadBalancingAlgorithm()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { DeploymentSettingVirtualSwitchConfigurationOverrides model - = new DeploymentSettingVirtualSwitchConfigurationOverrides().withEnableIov("p") - .withLoadBalancingAlgorithm("ebmnzbtbhjpglk"); + = new DeploymentSettingVirtualSwitchConfigurationOverrides().withEnableIov("ltmm") + .withLoadBalancingAlgorithm("hyeozphvwau"); model = BinaryData.fromObject(model).toObject(DeploymentSettingVirtualSwitchConfigurationOverrides.class); - Assertions.assertEquals("p", model.enableIov()); - Assertions.assertEquals("ebmnzbtbhjpglk", model.loadBalancingAlgorithm()); + Assertions.assertEquals("ltmm", model.enableIov()); + Assertions.assertEquals("hyeozphvwau", 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..757371e8da52 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,33 @@ 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\":[\"empupbscboxra\"],\"deploymentMode\":\"Deploy\",\"operationType\":\"ClusterProvisioning\",\"deploymentConfiguration\":{\"version\":\"rjgobekxeheowsec\",\"scaleUnits\":[{\"deploymentData\":{},\"sbePartnerInfo\":{}}]},\"reportedProperties\":{\"validationStatus\":{\"status\":\"bskiwrj\",\"steps\":[{}]},\"deploymentStatus\":{\"status\":\"seesacuicnvq\",\"steps\":[{},{}]}}},\"id\":\"ivmrfap\",\"name\":\"ndrmmnlhnkmx\",\"type\":\"qkekcd\"}"; 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") - .withScaleUnits(Arrays.asList(new ScaleUnits().withDeploymentData(new DeploymentData()) - .withSbePartnerInfo(new SbePartnerInfo())))) + .define("c") + .withExistingCluster("bcerfcvcpvfqj", "kmpwyvlhnh") + .withArcNodeResourceIds(Arrays.asList("bgjgylsacag", "flrcygotoh")) + .withDeploymentMode(DeploymentMode.VALIDATE) + .withOperationType(OperationType.CLUSTER_UPGRADE) + .withDeploymentConfiguration(new DeploymentConfiguration().withVersion("dhbxitrapwzhl") + .withScaleUnits(Arrays.asList( + new ScaleUnits().withDeploymentData(new DeploymentData()).withSbePartnerInfo(new SbePartnerInfo()), + new ScaleUnits().withDeploymentData(new DeploymentData()).withSbePartnerInfo(new SbePartnerInfo()), + new ScaleUnits().withDeploymentData(new DeploymentData()).withSbePartnerInfo(new SbePartnerInfo()), + new ScaleUnits().withDeploymentData(new DeploymentData()) + .withSbePartnerInfo(new SbePartnerInfo())))) .create(); - Assertions.assertEquals("tclhuulriqbyokv", response.arcNodeResourceIds().get(0)); + Assertions.assertEquals("empupbscboxra", response.arcNodeResourceIds().get(0)); Assertions.assertEquals(DeploymentMode.DEPLOY, response.deploymentMode()); - Assertions.assertEquals(OperationType.CLUSTER_UPGRADE, response.operationType()); - Assertions.assertEquals("pufpbpgnrholhu", response.deploymentConfiguration().version()); + Assertions.assertEquals(OperationType.CLUSTER_PROVISIONING, response.operationType()); + Assertions.assertEquals("rjgobekxeheowsec", 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..0e3bb80ccde2 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\":\"Canceled\",\"arcNodeResourceIds\":[\"xuktdrsjtmnkxjou\",\"fzcfdtstiax\",\"yrnuhcfhepisqb\",\"mlroiommemsoqgb\"],\"deploymentMode\":\"Validate\",\"operationType\":\"ClusterProvisioning\",\"deploymentConfiguration\":{\"version\":\"dobobaq\",\"scaleUnits\":[{\"deploymentData\":{},\"sbePartnerInfo\":{}},{\"deploymentData\":{},\"sbePartnerInfo\":{}}]},\"reportedProperties\":{\"validationStatus\":{\"status\":\"ces\",\"steps\":[{},{},{}]},\"deploymentStatus\":{\"status\":\"nl\",\"steps\":[{},{},{},{}]}}},\"id\":\"bjgfmyqyy\",\"name\":\"rridzfps\",\"type\":\"y\"}"; 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("jthlokmx", "awfubkngejjxu", "owynj", com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("yies", response.arcNodeResourceIds().get(0)); + Assertions.assertEquals("xuktdrsjtmnkxjou", 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(OperationType.CLUSTER_PROVISIONING, response.operationType()); + Assertions.assertEquals("dobobaq", 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..77056d1882b8 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\":\"Deleting\",\"arcNodeResourceIds\":[\"qpsrcekd\",\"voydwedggwgc\"],\"deploymentMode\":\"Validate\",\"operationType\":\"ClusterUpgrade\",\"deploymentConfiguration\":{\"version\":\"tzadrjbjngoarsr\",\"scaleUnits\":[{\"deploymentData\":{},\"sbePartnerInfo\":{}},{\"deploymentData\":{},\"sbePartnerInfo\":{}},{\"deploymentData\":{},\"sbePartnerInfo\":{}}]},\"reportedProperties\":{\"validationStatus\":{\"status\":\"yniapypimr\",\"steps\":[{}]},\"deploymentStatus\":{\"status\":\"ipzesstu\",\"steps\":[{},{},{}]}}},\"id\":\"kmlf\",\"name\":\"pjzcxxvzjoyx\",\"type\":\"gahxuerrdaktnyt\"}]}"; 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); + PagedIterable response = manager.deploymentSettings() + .listByClusters("kidfhmlxrqkeknu", "kqafzvptriysjrgt", com.azure.core.util.Context.NONE); - Assertions.assertEquals("kipfsdyepf", response.iterator().next().arcNodeResourceIds().get(0)); + Assertions.assertEquals("qpsrcekd", response.iterator().next().arcNodeResourceIds().get(0)); Assertions.assertEquals(DeploymentMode.VALIDATE, response.iterator().next().deploymentMode()); Assertions.assertEquals(OperationType.CLUSTER_UPGRADE, response.iterator().next().operationType()); - Assertions.assertEquals("gaaokctgkp", response.iterator().next().deploymentConfiguration().version()); + Assertions.assertEquals("tzadrjbjngoarsr", 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..eee2b6d8efc0 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\":\"pjui\",\"description\":\"vokqdzfv\",\"fullStepIndex\":\"ivjlfrqttbajlka\",\"startTimeUtc\":\"wxyiopidkqq\",\"endTimeUtc\":\"uvscxkdmligov\",\"status\":\"rxkpmloazuruoc\",\"steps\":[{\"name\":\"rb\",\"description\":\"oybfhjxakvvj\",\"fullStepIndex\":\"lordilmywwtkgkxn\",\"startTimeUtc\":\"dabg\",\"endTimeUtc\":\"udtjuewbc\",\"status\":\"xuuwhcj\",\"steps\":[{\"name\":\"ybvpay\",\"description\":\"kudzpxgwj\",\"fullStepIndex\":\"mag\",\"startTimeUtc\":\"cyohpfkyrkdbd\",\"endTimeUtc\":\"ogsjkmnwqjno\",\"status\":\"iyhddvi\",\"steps\":[{},{},{},{}],\"exception\":[\"n\",\"ntfpmvmemfnc\",\"dwvvba\",\"xlllchp\"]},{\"name\":\"bzevwrd\",\"description\":\"fukuvsjcswsmystu\",\"fullStepIndex\":\"qypfcv\",\"startTimeUtc\":\"rchpqbmfpjbabwid\",\"endTimeUtc\":\"xsspuunnoxyhk\",\"status\":\"qddrihpfhoqcaae\",\"steps\":[{},{},{}],\"exception\":[\"djvlpj\",\"xkzb\"]}],\"exception\":[\"geivsiykzkdncj\",\"xonbzoggculapz\"]}],\"exception\":[\"pgogtqxepny\",\"b\",\"uajlyj\"]}") .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..abd7e06cea77 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,42 @@ 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\":\"hvcta\",\"interfaceDescription\":\"rbxrblmliowxihsp\",\"componentId\":\"wqagnepzwa\",\"driverVersion\":\"sbs\",\"ip4Address\":\"qqagwwr\",\"subnetMask\":\"omzisglrrcz\",\"defaultGateway\":\"k\",\"dnsServers\":[\"tnjadhq\"],\"defaultIsolationId\":\"wjqo\"}],\"deviceMetadata\":\"eayfbpcmspl\"}") .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("hvcta", model.nicDetails().get(0).adapterName()); + Assertions.assertEquals("rbxrblmliowxihsp", model.nicDetails().get(0).interfaceDescription()); + Assertions.assertEquals("wqagnepzwa", model.nicDetails().get(0).componentId()); + Assertions.assertEquals("sbs", model.nicDetails().get(0).driverVersion()); + Assertions.assertEquals("qqagwwr", model.nicDetails().get(0).ip4Address()); + Assertions.assertEquals("omzisglrrcz", model.nicDetails().get(0).subnetMask()); + Assertions.assertEquals("k", model.nicDetails().get(0).defaultGateway()); + Assertions.assertEquals("tnjadhq", model.nicDetails().get(0).dnsServers().get(0)); + Assertions.assertEquals("wjqo", model.nicDetails().get(0).defaultIsolationId()); + Assertions.assertEquals("eayfbpcmspl", 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"); + = new DeviceConfiguration().withNicDetails(Arrays.asList(new NicDetail().withAdapterName("hvcta") + .withInterfaceDescription("rbxrblmliowxihsp") + .withComponentId("wqagnepzwa") + .withDriverVersion("sbs") + .withIp4Address("qqagwwr") + .withSubnetMask("omzisglrrcz") + .withDefaultGateway("k") + .withDnsServers(Arrays.asList("tnjadhq")) + .withDefaultIsolationId("wjqo"))).withDeviceMetadata("eayfbpcmspl"); 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("hvcta", model.nicDetails().get(0).adapterName()); + Assertions.assertEquals("rbxrblmliowxihsp", model.nicDetails().get(0).interfaceDescription()); + Assertions.assertEquals("wqagnepzwa", model.nicDetails().get(0).componentId()); + Assertions.assertEquals("sbs", model.nicDetails().get(0).driverVersion()); + Assertions.assertEquals("qqagwwr", model.nicDetails().get(0).ip4Address()); + Assertions.assertEquals("omzisglrrcz", model.nicDetails().get(0).subnetMask()); + Assertions.assertEquals("k", model.nicDetails().get(0).defaultGateway()); + Assertions.assertEquals("tnjadhq", model.nicDetails().get(0).dnsServers().get(0)); + Assertions.assertEquals("wjqo", model.nicDetails().get(0).defaultIsolationId()); + Assertions.assertEquals("eayfbpcmspl", 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..f13550bb2871 --- /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\":\"ypbsfgytguslfead\",\"dnsForwarder\":[\"qukyhejhzi\"]}") + .toObject(DnsZones.class); + Assertions.assertEquals("ypbsfgytguslfead", model.dnsZoneName()); + Assertions.assertEquals("qukyhejhzi", model.dnsForwarder().get(0)); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + DnsZones model + = new DnsZones().withDnsZoneName("ypbsfgytguslfead").withDnsForwarder(Arrays.asList("qukyhejhzi")); + model = BinaryData.fromObject(model).toObject(DnsZones.class); + Assertions.assertEquals("ypbsfgytguslfead", model.dnsZoneName()); + Assertions.assertEquals("qukyhejhzi", 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..41ffda08012b 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\":\"ozauorsukokwb\",\"steps\":[{\"name\":\"lvnuuepzlrph\",\"description\":\"soldweyuqdunv\",\"fullStepIndex\":\"nrwrbiork\",\"startTimeUtc\":\"lywjhh\",\"endTimeUtc\":\"nhxmsi\",\"status\":\"omi\",\"steps\":[{\"name\":\"gdufiqnd\",\"description\":\"uzaofjchvcyyy\",\"fullStepIndex\":\"gdotcubiipuipwo\",\"startTimeUtc\":\"nmacj\",\"endTimeUtc\":\"nizshqvcim\",\"status\":\"vfgmblrrilby\",\"steps\":[{},{},{},{}],\"exception\":[\"icc\",\"rwfscjfnynszquj\",\"zdvoqytibyowbb\",\"gyavu\"]},{\"name\":\"thjoxoism\",\"description\":\"sbpimlq\",\"fullStepIndex\":\"jxkcgxxlxsff\",\"startTimeUtc\":\"vizqzdwl\",\"endTimeUtc\":\"lyoupfgfbkju\",\"status\":\"yhgk\",\"steps\":[{}],\"exception\":[\"g\"]}],\"exception\":[\"fttsttk\",\"lahb\",\"actxtgzukxitm\",\"qtgqqqxhrnxr\"]}]}") .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..a9e9be747995 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\":\"fqntcyp\",\"steps\":[{\"name\":\"foimwkslircizjxv\",\"description\":\"fceacvlhvygd\",\"fullStepIndex\":\"t\",\"startTimeUtc\":\"rtwnawjslbi\",\"endTimeUtc\":\"ojgcyzt\",\"status\":\"mznbaeqphch\",\"steps\":[{\"name\":\"rpxeh\",\"description\":\"rykqgaifmvikl\",\"fullStepIndex\":\"dvk\",\"startTimeUtc\":\"ejd\",\"endTimeUtc\":\"xcv\",\"status\":\"rhnj\",\"steps\":[{},{},{}],\"exception\":[\"tnovqfzgemjdftul\"]}],\"exception\":[\"duceamtmc\",\"u\"]}]},\"deploymentStatus\":{\"status\":\"jw\",\"steps\":[{\"name\":\"ioknssxmoj\",\"description\":\"vpkjpr\",\"fullStepIndex\":\"wcfzqljyxgt\",\"startTimeUtc\":\"heyd\",\"endTimeUtc\":\"dshmkxmaehvbbx\",\"status\":\"iplt\",\"steps\":[{\"name\":\"baxk\",\"description\":\"ywrckp\",\"fullStepIndex\":\"lyhpluodpvruud\",\"startTimeUtc\":\"zibt\",\"endTimeUtc\":\"stgktst\",\"status\":\"xeclzedqbcvhzlhp\",\"steps\":[{},{},{}],\"exception\":[\"dlwwqfbumlkxt\"]}],\"exception\":[\"fsmlmbtxhwgfw\",\"rtawcoezb\",\"hubskhudygooo\",\"kqfqjbvl\"]},{\"name\":\"rfmluiqtq\",\"description\":\"avyvnqqyba\",\"fullStepIndex\":\"euayjkqabqgzsles\",\"startTimeUtc\":\"bhernntiew\",\"endTimeUtc\":\"cv\",\"status\":\"uwrbehwagoh\",\"steps\":[{\"name\":\"kmr\",\"description\":\"mvvhmxtdrjfuta\",\"fullStepIndex\":\"ebjvewzcjzn\",\"startTimeUtc\":\"cpmguaadraufact\",\"endTimeUtc\":\"hzovaj\",\"status\":\"iuxxpshneekulfg\",\"steps\":[{},{}],\"exception\":[\"kwdlenrdsutujba\",\"pjuohminyfl\",\"orwmduvwpklv\"]}],\"exception\":[\"ygdxpgpqchis\",\"epn\",\"bjcrxgibbdaxco\"]}]}}") .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..d6472921410b 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\":\"xxewu\",\"name\":\"invudbch\",\"type\":\"qdtvqecrqctmxx\"}") .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..46feb3e3818e --- /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\":\"xz\",\"name\":\"hihfrbbcevqagtlt\",\"type\":\"hlfkqojpy\"}") + .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..2ffb61125199 --- /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\":\"ntacn\",\"name\":\"qwtehtuevr\",\"type\":\"rljyoogwxhnsdu\"},{\"kind\":\"EdgeDeviceJob\",\"id\":\"wbsreur\",\"name\":\"q\",\"type\":\"fuarenlvhht\"},{\"kind\":\"EdgeDeviceJob\",\"id\":\"nvnaf\",\"name\":\"vkyfedevjbosl\",\"type\":\"qxypokkhminq\"}],\"nextLink\":\"mczngn\"}") + .toObject(EdgeDeviceJobListResult.class); + Assertions.assertEquals("mczngn", model.nextLink()); + } +} 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/EdgeDeviceJobsCreateOrUpdateMockTests.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/EdgeDeviceJobsCreateOrUpdateMockTests.java index d81214e5d119..c10ed21786eb 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/EdgeDeviceJobsCreateOrUpdateMockTests.java @@ -1,36 +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.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.OperationListResult; +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 OperationsListWithResponseMockTests { +public final class EdgeDeviceJobsCreateOrUpdateMockTests { @Test - public void testListWithResponse() throws Exception { + public void testCreateOrUpdate() throws Exception { String responseStr - = "{\"value\":[{\"name\":\"wp\",\"isDataAction\":true,\"display\":{\"provider\":\"doejtighsxjpyt\",\"resource\":\"qbalahovuuwxhme\",\"operation\":\"nhjiotiffb\",\"description\":\"ngkegxcypxbbfe\"},\"origin\":\"system\",\"actionType\":\"Internal\"}],\"nextLink\":\"zox\"}"; + = "{\"kind\":\"EdgeDeviceJob\",\"id\":\"gbsdz\",\"name\":\"gcvypjhu\",\"type\":\"dmgobxehujcqg\"}"; 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(); + EdgeDeviceJob response = manager.edgeDeviceJobs() + .createOrUpdate("layynoyjy", "l", "msbnlyoifg", new EdgeDeviceJobInner(), com.azure.core.util.Context.NONE); } } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/EdgeDeviceJobsGetWithResponseMockTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/EdgeDeviceJobsGetWithResponseMockTests.java new file mode 100644 index 000000000000..79f76dbad510 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/EdgeDeviceJobsGetWithResponseMockTests.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.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 EdgeDeviceJobsGetWithResponseMockTests { + @Test + public void testGetWithResponse() throws Exception { + String responseStr + = "{\"kind\":\"EdgeDeviceJob\",\"id\":\"zgkuorwpqbstw\",\"name\":\"obptscruy\",\"type\":\"ki\"}"; + + 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() + .getWithResponse("viiebe", "rfzav", "ymcwtsiucepl", com.azure.core.util.Context.NONE) + .getValue(); + + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/EdgeDeviceJobsListByEdgeDeviceMockTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/EdgeDeviceJobsListByEdgeDeviceMockTests.java new file mode 100644 index 000000000000..47884ed7532f --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/EdgeDeviceJobsListByEdgeDeviceMockTests.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.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.EdgeDeviceJob; +import java.nio.charset.StandardCharsets; +import java.time.OffsetDateTime; +import org.junit.jupiter.api.Test; +import reactor.core.publisher.Mono; + +public final class EdgeDeviceJobsListByEdgeDeviceMockTests { + @Test + public void testListByEdgeDevice() throws Exception { + String responseStr + = "{\"value\":[{\"kind\":\"EdgeDeviceJob\",\"id\":\"rljd\",\"name\":\"uky\",\"type\":\"ax\"}]}"; + + 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.edgeDeviceJobs().listByEdgeDevice("wvxwi", "aoibmjk", 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..0d893ee168ca 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\":\"nsmjkwynqxaekqs\",\"name\":\"kvwjtqpkevmy\",\"type\":\"tjcrspxklurccl\"},{\"kind\":\"EdgeDevice\",\"id\":\"xa\",\"name\":\"n\",\"type\":\"oytzpose\"}],\"nextLink\":\"igpxvkq\"}") .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("igpxvkq", 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..2fb6f5ffb0fd 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,55 @@ 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\":\"oaedsxjwuivedwcg\",\"interfaceDescription\":\"ewxeiqbpsm\",\"componentId\":\"mguaml\",\"driverVersion\":\"l\",\"ip4Address\":\"msplzgaufcshhvn\",\"subnetMask\":\"gnxkympqan\",\"defaultGateway\":\"jk\",\"dnsServers\":[\"wbtaoyp\"],\"defaultIsolationId\":\"ghshxcylhkgmnsg\"},{\"adapterName\":\"xycphdrwjjkh\",\"interfaceDescription\":\"omacluzvxnqmhr\",\"componentId\":\"pd\",\"driverVersion\":\"mkoisqcssf\",\"ip4Address\":\"uifmc\",\"subnetMask\":\"p\",\"defaultGateway\":\"kdqzrdzsylo\",\"dnsServers\":[\"trczzydmxzjijp\",\"uaurkihcir\",\"defxrdc\",\"xnbkkj\"],\"defaultIsolationId\":\"urnnqbnqbpiz\"}],\"deviceMetadata\":\"ltgrdogypxrxv\"},\"provisioningState\":\"Updating\"}") .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("oaedsxjwuivedwcg", model.deviceConfiguration().nicDetails().get(0).adapterName()); + Assertions.assertEquals("ewxeiqbpsm", model.deviceConfiguration().nicDetails().get(0).interfaceDescription()); + Assertions.assertEquals("mguaml", model.deviceConfiguration().nicDetails().get(0).componentId()); + Assertions.assertEquals("l", model.deviceConfiguration().nicDetails().get(0).driverVersion()); + Assertions.assertEquals("msplzgaufcshhvn", model.deviceConfiguration().nicDetails().get(0).ip4Address()); + Assertions.assertEquals("gnxkympqan", model.deviceConfiguration().nicDetails().get(0).subnetMask()); + Assertions.assertEquals("jk", model.deviceConfiguration().nicDetails().get(0).defaultGateway()); + Assertions.assertEquals("wbtaoyp", model.deviceConfiguration().nicDetails().get(0).dnsServers().get(0)); + Assertions.assertEquals("ghshxcylhkgmnsg", + model.deviceConfiguration().nicDetails().get(0).defaultIsolationId()); + Assertions.assertEquals("ltgrdogypxrxv", 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")); + EdgeDeviceProperties model + = new EdgeDeviceProperties().withDeviceConfiguration(new DeviceConfiguration().withNicDetails(Arrays.asList( + new NicDetail().withAdapterName("oaedsxjwuivedwcg") + .withInterfaceDescription("ewxeiqbpsm") + .withComponentId("mguaml") + .withDriverVersion("l") + .withIp4Address("msplzgaufcshhvn") + .withSubnetMask("gnxkympqan") + .withDefaultGateway("jk") + .withDnsServers(Arrays.asList("wbtaoyp")) + .withDefaultIsolationId("ghshxcylhkgmnsg"), + new NicDetail().withAdapterName("xycphdrwjjkh") + .withInterfaceDescription("omacluzvxnqmhr") + .withComponentId("pd") + .withDriverVersion("mkoisqcssf") + .withIp4Address("uifmc") + .withSubnetMask("p") + .withDefaultGateway("kdqzrdzsylo") + .withDnsServers(Arrays.asList("trczzydmxzjijp", "uaurkihcir", "defxrdc", "xnbkkj")) + .withDefaultIsolationId("urnnqbnqbpiz"))) + .withDeviceMetadata("ltgrdogypxrxv")); 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("oaedsxjwuivedwcg", model.deviceConfiguration().nicDetails().get(0).adapterName()); + Assertions.assertEquals("ewxeiqbpsm", model.deviceConfiguration().nicDetails().get(0).interfaceDescription()); + Assertions.assertEquals("mguaml", model.deviceConfiguration().nicDetails().get(0).componentId()); + Assertions.assertEquals("l", model.deviceConfiguration().nicDetails().get(0).driverVersion()); + Assertions.assertEquals("msplzgaufcshhvn", model.deviceConfiguration().nicDetails().get(0).ip4Address()); + Assertions.assertEquals("gnxkympqan", model.deviceConfiguration().nicDetails().get(0).subnetMask()); + Assertions.assertEquals("jk", model.deviceConfiguration().nicDetails().get(0).defaultGateway()); + Assertions.assertEquals("wbtaoyp", model.deviceConfiguration().nicDetails().get(0).dnsServers().get(0)); + Assertions.assertEquals("ghshxcylhkgmnsg", + model.deviceConfiguration().nicDetails().get(0).defaultIsolationId()); + Assertions.assertEquals("ltgrdogypxrxv", 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..99c91613c89b 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\":\"nf\",\"name\":\"fnhcg\",\"type\":\"aqsr\"}"; 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("jzebp", "cciyoypoedks", 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..94334ec0e6f7 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,17 +19,17 @@ 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\":\"cy\",\"name\":\"ruvumry\",\"type\":\"dnqivahfcqw\"}"; 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) + .getWithResponse("jiqoq", "vqhgphgxuwu", 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..eb358d870c74 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,16 @@ 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\":\"krgsdcob\",\"name\":\"mgqlwyqznbbyzpo\",\"type\":\"zfutgpbygbnb\"}]}"; 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); + PagedIterable response = manager.edgeDevices().list("rfqd", 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..bacad0b56b67 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,20 @@ public final class EdgeDevicesValidateMockTests { @Test public void testValidate() throws Exception { - String responseStr = "{\"status\":\"ybnxgztlcgc\"}"; + String responseStr = "{\"status\":\"rppww\"}"; 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("moiqg", "zpvqewflwzhxzuxe", + new ValidateRequest() + .withEdgeDeviceIds(Arrays.asList("hywlrkqsq", "vdkfpfjdajd", "xymxxyfrd", "idcetfvgwfwsldi")) + .withAdditionalInfo("ouppvyddqsvclrsn"), com.azure.core.util.Context.NONE); } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/EdgeMachineCollectLogJobReportedPropertiesTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/EdgeMachineCollectLogJobReportedPropertiesTests.java new file mode 100644 index 000000000000..219e5c2e725f --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/EdgeMachineCollectLogJobReportedPropertiesTests.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.EdgeMachineCollectLogJobReportedProperties; + +public final class EdgeMachineCollectLogJobReportedPropertiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + EdgeMachineCollectLogJobReportedProperties model = BinaryData.fromString( + "{\"percentComplete\":1950118982,\"validationStatus\":{\"status\":\"wifhbksldttohq\",\"steps\":[{\"name\":\"ihtgsiqikvllrht\",\"description\":\"glxkoikmtrawrqk\",\"fullStepIndex\":\"wb\",\"startTimeUtc\":\"mpa\",\"endTimeUtc\":\"wzlweeprn\",\"status\":\"zltkaszfj\",\"steps\":[{\"name\":\"bduxapgrcq\",\"description\":\"mvrdjomlnwsbv\",\"fullStepIndex\":\"lsflxk\",\"startTimeUtc\":\"sdfedsbgzancoin\",\"endTimeUtc\":\"hymcq\",\"status\":\"kltvdhqnufbx\",\"steps\":[{},{}],\"exception\":[\"ntojovfnybydhuih\",\"ouwudhuaorh\",\"kehwvumosqirca\"]},{\"name\":\"prlobrugejcvjkjy\",\"description\":\"cmtagelajdyo\",\"fullStepIndex\":\"eqyxqfmzsiz\",\"startTimeUtc\":\"ravrcjkjymg\",\"endTimeUtc\":\"gcxhnqxgzxl\",\"status\":\"mkmergh\",\"steps\":[{},{},{},{}],\"exception\":[\"npupkcbkfuk\"]},{\"name\":\"jqnvtsdyd\",\"description\":\"kpafyaloowwziz\",\"fullStepIndex\":\"yuf\",\"startTimeUtc\":\"zstifgufyj\",\"endTimeUtc\":\"kqiyvnd\",\"status\":\"kgwesy\",\"steps\":[{}],\"exception\":[\"qpfzlpejtznxlue\",\"ujqbbgsimwejl\"]},{\"name\":\"kbpjzobdwbcpra\",\"description\":\"kuhydtnaczkfwfat\",\"fullStepIndex\":\"wphn\",\"startTimeUtc\":\"ivdwgtqc\",\"endTimeUtc\":\"ecsaaqgoqbdiu\",\"status\":\"sbskowkrbhz\",\"steps\":[{},{},{}],\"exception\":[\"tmqowiuasfgqg\",\"cyhfaimqvdru\"]}],\"exception\":[\"gyfpeoehgfmqmsk\",\"ixvlz\",\"xplhpeva\",\"yntvzjyielbq\"]},{\"name\":\"vbqv\",\"description\":\"mpe\",\"fullStepIndex\":\"xgiqasifubn\",\"startTimeUtc\":\"stlpwqp\",\"endTimeUtc\":\"xjkhtupsv\",\"status\":\"uweuiy\",\"steps\":[{\"name\":\"ztsm\",\"description\":\"b\",\"fullStepIndex\":\"yllznfhkqytkztad\",\"startTimeUtc\":\"gfzdgjfcycrsvl\",\"endTimeUtc\":\"yhigqkzjuqwqaj\",\"status\":\"zxpixhyo\",\"steps\":[{},{},{},{}],\"exception\":[\"bgsosc\",\"enezfvbennmfkbpj\"]},{\"name\":\"tekwwnthropm\",\"description\":\"d\",\"fullStepIndex\":\"iurztv\",\"startTimeUtc\":\"jhf\",\"endTimeUtc\":\"cqkoqyouerg\",\"status\":\"hpuzxkpye\",\"steps\":[{},{},{}],\"exception\":[\"ldhg\",\"edzfzqiyuqhtdere\"]},{\"name\":\"oka\",\"description\":\"whpjlw\",\"fullStepIndex\":\"edznmxrfomckewv\",\"startTimeUtc\":\"ifopxfjjtpdyz\",\"endTimeUtc\":\"txfp\",\"status\":\"fhgnuywezygv\",\"steps\":[{},{}],\"exception\":[\"qwvkgjpytpmpv\",\"nogehlufbort\",\"nukkfaxzsvb\",\"xyji\"]},{\"name\":\"kobqoclflioe\",\"description\":\"hxessmvrk\",\"fullStepIndex\":\"sqeq\",\"startTimeUtc\":\"dxmdses\",\"endTimeUtc\":\"ujbjppp\",\"status\":\"lpdib\",\"steps\":[{}],\"exception\":[\"eatnejrnminzq\"]}],\"exception\":[\"tkihonikzs\",\"zfffjilzfbpnt\",\"gkensckhbmcarmo\"]},{\"name\":\"xxkwykuqdndx\",\"description\":\"kh\",\"fullStepIndex\":\"gapvdgtfpeerscdx\",\"startTimeUtc\":\"rnjr\",\"endTimeUtc\":\"fmbgacn\",\"status\":\"fdtncmspsanma\",\"steps\":[{\"name\":\"kqiq\",\"description\":\"fv\",\"fullStepIndex\":\"qcs\",\"startTimeUtc\":\"qjmxpt\",\"endTimeUtc\":\"ipuugkwdrqmr\",\"status\":\"huuonjkkxukg\",\"steps\":[{},{}],\"exception\":[\"pxjoegcjojll\",\"uidpmtonvhg\",\"htmep\"]},{\"name\":\"bpjbapm\",\"description\":\"mmkvav\",\"fullStepIndex\":\"gjiuaiqpmnufzhrc\",\"startTimeUtc\":\"wwuzd\",\"endTimeUtc\":\"vwlvivjmxmlit\",\"status\":\"sjipdviscot\",\"steps\":[{}],\"exception\":[\"ifefndslv\",\"qoemwsi\"]}],\"exception\":[\"ilwdqmqfy\",\"eotmf\",\"lkdlgwgna\"]},{\"name\":\"uuyiuy\",\"description\":\"fi\",\"fullStepIndex\":\"xicwgpthdcfmfzc\",\"startTimeUtc\":\"sfodropalvng\",\"endTimeUtc\":\"yuskwgqrntaumdr\",\"status\":\"lv\",\"steps\":[{\"name\":\"gtyczuppi\",\"description\":\"lzmiyddeeq\",\"fullStepIndex\":\"vab\",\"startTimeUtc\":\"vsexduetb\",\"endTimeUtc\":\"fcze\",\"status\":\"trlq\",\"steps\":[{},{},{}],\"exception\":[\"zkjp\"]},{\"name\":\"gzxvbczw\",\"description\":\"egbthm\",\"fullStepIndex\":\"i\",\"startTimeUtc\":\"buiggrunozf\",\"endTimeUtc\":\"aljthoivsdwsn\",\"status\":\"rfihscj\",\"steps\":[{},{}],\"exception\":[\"zbhwahfb\",\"i\",\"bnnxem\"]}],\"exception\":[\"u\",\"qkotauratn\",\"cppfzsclefyrle\",\"ndqlmfdggnbbuy\"]}]},\"deploymentStatus\":{\"status\":\"vvv\",\"steps\":[{\"name\":\"evnoqayrehjuqwva\",\"description\":\"rlzh\",\"fullStepIndex\":\"ihace\",\"startTimeUtc\":\"qzlxn\",\"endTimeUtc\":\"ubfonfdbgmkf\",\"status\":\"jcw\",\"steps\":[{\"name\":\"hxwyrkbrehzlryn\",\"description\":\"chamkaeplraju\",\"fullStepIndex\":\"wuyw\",\"startTimeUtc\":\"tjrieikm\",\"endTimeUtc\":\"aoklfnis\",\"status\":\"gucbmt\",\"steps\":[{},{}],\"exception\":[\"nn\",\"tjcyyuv\",\"zrxzhc\"]},{\"name\":\"cwwtzqzclo\",\"description\":\"yup\",\"fullStepIndex\":\"dhz\",\"startTimeUtc\":\"re\",\"endTimeUtc\":\"zsdtm\",\"status\":\"yorjplbchych\",\"steps\":[{},{},{}],\"exception\":[\"fbqvumkxqj\",\"iuepmaxfnzlpqmp\",\"t\",\"efvulblmr\"]},{\"name\":\"xyprhfcaeooifqdy\",\"description\":\"flobhahq\",\"fullStepIndex\":\"mfecorkfrocgbmxl\",\"startTimeUtc\":\"mzezbjesylslu\",\"endTimeUtc\":\"qfygpny\",\"status\":\"dzuqscag\",\"steps\":[{},{}],\"exception\":[\"prsytqz\",\"slhmgw\",\"nivrxpfduio\",\"hgyqvpbfj\"]}],\"exception\":[\"z\",\"cfzlu\",\"zdquurbo\",\"mvhvz\"]}]},\"logCollectionSessionDetails\":[{\"startTime\":\"prnquj\",\"endTime\":\"zcqyg\",\"timeCollected\":\"nwsvhbngqiwye\",\"logSize\":327660202,\"status\":\"Failed\",\"correlationId\":\"rpnrehkunsbfjh\"}]}") + .toObject(EdgeMachineCollectLogJobReportedProperties.class); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/EdgeMachineNetworkProfileTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/EdgeMachineNetworkProfileTests.java new file mode 100644 index 000000000000..35004fd3c3fb --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/EdgeMachineNetworkProfileTests.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.EdgeMachineNetworkProfile; + +public final class EdgeMachineNetworkProfileTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + EdgeMachineNetworkProfile model = BinaryData.fromString( + "{\"nicDetails\":[{\"adapterName\":\"gxkydpm\",\"interfaceDescription\":\"gfqvmtywhlakx\",\"componentId\":\"jpewpyjlfx\",\"driverVersion\":\"pqcrzgeuqxbpiat\",\"ip4Address\":\"aujegqdtadra\",\"subnetMask\":\"ddhjkr\",\"defaultGateway\":\"izyh\",\"dnsServers\":[\"tnqsktx\",\"fpjbqggwe\",\"iwdhdmncgbfzu\"],\"defaultIsolationId\":\"stunmlh\",\"macAddress\":\"fbklciichgjsysmv\",\"slot\":\"dgwxfkzsifcu\",\"switchName\":\"dujgcwxve\",\"nicType\":\"bwjtrdx\",\"vlanId\":\"zagbbgiarksykp\",\"nicStatus\":\"qxwabzrwiqrxh\",\"rdmaCapability\":\"Disabled\"},{\"adapterName\":\"dosqkptjqg\",\"interfaceDescription\":\"fmmainwhedxkpbq\",\"componentId\":\"ntobu\",\"driverVersion\":\"azz\",\"ip4Address\":\"wgvydjufb\",\"subnetMask\":\"lblaxpegj\",\"defaultGateway\":\"abalfdxaglz\",\"dnsServers\":[\"lbtlqhopxo\",\"vmrsiflikyyp\"],\"defaultIsolationId\":\"gxfx\",\"macAddress\":\"yrqsdbpokszanm\",\"slot\":\"gpterdiu\",\"switchName\":\"i\",\"nicType\":\"skw\",\"vlanId\":\"sdetjygowifcqpol\",\"nicStatus\":\"gysdgzyyb\",\"rdmaCapability\":\"Disabled\"}],\"switchDetails\":[{\"switchName\":\"cptvdxxheig\",\"switchType\":\"ilwzghj\",\"extensions\":[{\"switchId\":\"abzzbwaybfmdafb\",\"extensionName\":\"mqtnap\",\"extensionEnabled\":true},{\"switchId\":\"xrjnbsconxav\",\"extensionName\":\"neychbjizq\",\"extensionEnabled\":false},{\"switchId\":\"w\",\"extensionName\":\"zed\",\"extensionEnabled\":false},{\"switchId\":\"fb\",\"extensionName\":\"xi\",\"extensionEnabled\":false}]}]}") + .toObject(EdgeMachineNetworkProfile.class); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/EdgeMachineNicDetailTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/EdgeMachineNicDetailTests.java new file mode 100644 index 000000000000..7e0d639c0c54 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/EdgeMachineNicDetailTests.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.EdgeMachineNicDetail; + +public final class EdgeMachineNicDetailTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + EdgeMachineNicDetail model = BinaryData.fromString( + "{\"adapterName\":\"fyzavfrbypicdb\",\"interfaceDescription\":\"dj\",\"componentId\":\"qh\",\"driverVersion\":\"q\",\"ip4Address\":\"pdgonjhxs\",\"subnetMask\":\"hmgpczqulpt\",\"defaultGateway\":\"vcpxtzhigqqbtimp\",\"dnsServers\":[\"lornsihqh\",\"dsmusuaawjakxwj\"],\"defaultIsolationId\":\"czmnniixy\",\"macAddress\":\"qban\",\"slot\":\"jtgirnb\",\"switchName\":\"gm\",\"nicType\":\"orgmynltwmpftm\",\"vlanId\":\"e\",\"nicStatus\":\"og\",\"rdmaCapability\":\"Enabled\"}") + .toObject(EdgeMachineNicDetail.class); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/EdgeMachinePatchTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/EdgeMachinePatchTests.java new file mode 100644 index 000000000000..5d5fb957163f --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/EdgeMachinePatchTests.java @@ -0,0 +1,49 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.azurestackhci.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.azurestackhci.fluent.models.ManagedServiceIdentity; +import com.azure.resourcemanager.azurestackhci.models.EdgeMachinePatch; +import com.azure.resourcemanager.azurestackhci.models.ManagedServiceIdentityType; +import com.azure.resourcemanager.azurestackhci.models.UserAssignedIdentity; +import java.util.HashMap; +import java.util.Map; +import org.junit.jupiter.api.Assertions; + +public final class EdgeMachinePatchTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + EdgeMachinePatch model = BinaryData.fromString( + "{\"tags\":{\"fhxrzfr\":\"wennin\",\"rcqxgcbvzarmqc\":\"vztiucwviqllukh\",\"stsinvag\":\"po\"},\"identity\":{\"principalId\":\"yhdrxb\",\"tenantId\":\"vcehqw\",\"type\":\"UserAssigned\",\"userAssignedIdentities\":{\"tqstqkqsygxiyne\":{\"principalId\":\"mxgnmguzbuwv\",\"clientId\":\"balkjnbkbdhl\"},\"laslgacizux\":{\"principalId\":\"vagzkheuba\",\"clientId\":\"xunpqcckqiawzlz\"},\"pytn\":{\"principalId\":\"arwp\",\"clientId\":\"saudoejtighsx\"}}}}") + .toObject(EdgeMachinePatch.class); + Assertions.assertEquals("wennin", model.tags().get("fhxrzfr")); + Assertions.assertEquals(ManagedServiceIdentityType.USER_ASSIGNED, model.identity().type()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + EdgeMachinePatch model = new EdgeMachinePatch() + .withTags(mapOf("fhxrzfr", "wennin", "rcqxgcbvzarmqc", "vztiucwviqllukh", "stsinvag", "po")) + .withIdentity(new ManagedServiceIdentity().withType(ManagedServiceIdentityType.USER_ASSIGNED) + .withUserAssignedIdentities(mapOf("tqstqkqsygxiyne", new UserAssignedIdentity(), "laslgacizux", + new UserAssignedIdentity(), "pytn", new UserAssignedIdentity()))); + model = BinaryData.fromObject(model).toObject(EdgeMachinePatch.class); + Assertions.assertEquals("wennin", model.tags().get("fhxrzfr")); + Assertions.assertEquals(ManagedServiceIdentityType.USER_ASSIGNED, model.identity().type()); + } + + // 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/EdgeMachineRemoteSupportJobReportedPropertiesTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/EdgeMachineRemoteSupportJobReportedPropertiesTests.java new file mode 100644 index 000000000000..800d370f8c82 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/EdgeMachineRemoteSupportJobReportedPropertiesTests.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.EdgeMachineRemoteSupportJobReportedProperties; + +public final class EdgeMachineRemoteSupportJobReportedPropertiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + EdgeMachineRemoteSupportJobReportedProperties model = BinaryData.fromString( + "{\"percentComplete\":1897615151,\"validationStatus\":{\"status\":\"dbjp\",\"steps\":[{\"name\":\"qpx\",\"description\":\"awkikcdgfh\",\"fullStepIndex\":\"sd\",\"startTimeUtc\":\"ey\",\"endTimeUtc\":\"xdede\",\"status\":\"iwhagxsur\",\"steps\":[{\"name\":\"shzz\",\"description\":\"ullc\",\"fullStepIndex\":\"qqzjkoxdu\",\"startTimeUtc\":\"amglrouig\",\"endTimeUtc\":\"fivjqterdqqigdy\",\"status\":\"ghpcvrwqirvt\",\"steps\":[{},{}],\"exception\":[\"mvfxlapjajod\",\"krrwepgqvqokql\",\"jqgir\",\"bwlyvxc\"]},{\"name\":\"qvctsfa\",\"description\":\"hwwskn\",\"fullStepIndex\":\"vzuzhasupmlppd\",\"startTimeUtc\":\"zvzqazvbkark\",\"endTimeUtc\":\"gongr\",\"status\":\"tsyiys\",\"steps\":[{},{},{},{}],\"exception\":[\"igbeqn\"]},{\"name\":\"ba\",\"description\":\"jdeayscse\",\"fullStepIndex\":\"zjemexmnvkvm\",\"startTimeUtc\":\"rxl\",\"endTimeUtc\":\"wmcpmrrdlhvdvm\",\"status\":\"hbeae\",\"steps\":[{},{},{},{}],\"exception\":[\"kdclacroczf\",\"unerke\"]},{\"name\":\"xzs\",\"description\":\"zezbzu\",\"fullStepIndex\":\"dlevzskejcgw\",\"startTimeUtc\":\"gqkstyecupyu\",\"endTimeUtc\":\"p\",\"status\":\"davsjcfmazpz\",\"steps\":[{},{},{},{}],\"exception\":[\"vcmc\",\"kxizek\",\"vfrjwu\"]}],\"exception\":[\"nzvajbvbnkrdem\"]},{\"name\":\"dack\",\"description\":\"dgzwdyd\",\"fullStepIndex\":\"isvpztdivykpxkqe\",\"startTimeUtc\":\"pjfojiunrls\",\"endTimeUtc\":\"uknsykdtoi\",\"status\":\"ancdrc\",\"steps\":[{\"name\":\"xu\",\"description\":\"xonckbnlblfxlup\",\"fullStepIndex\":\"aqziz\",\"startTimeUtc\":\"pzweghlwwbo\",\"endTimeUtc\":\"gfklqiyndve\",\"status\":\"lsb\",\"steps\":[{},{},{}],\"exception\":[\"rk\",\"xsg\",\"znsvlrd\",\"movpimyndnoxax\"]},{\"name\":\"qaqotnn\",\"description\":\"olousdvrg\",\"fullStepIndex\":\"qmawzjdrpizfu\",\"startTimeUtc\":\"yctsdbtqgkuj\",\"endTimeUtc\":\"ooxrqwoeurb\",\"status\":\"gapdyarikeej\",\"steps\":[{},{},{},{}],\"exception\":[\"twmmkfqbriqu\",\"wwtrjm\",\"qkvyhzokpoyuohu\",\"nsnaajphmp\"]},{\"name\":\"jnglpwsad\",\"description\":\"jsumxpezcoio\",\"fullStepIndex\":\"rmfqzwq\",\"startTimeUtc\":\"xkeedcnwmy\",\"endTimeUtc\":\"fqzkvemyzdpc\",\"status\":\"qpqifdbmptrwtxz\",\"steps\":[{},{}],\"exception\":[\"onatnizexroqsqjg\",\"rmthsplwst\",\"xsrgxfqpan\",\"ceov\"]}],\"exception\":[\"whsxyrujmtikesl\",\"kyohzix\",\"qhfnkvycqqqds\"]},{\"name\":\"pnq\",\"description\":\"zxhrptyodlhkfktl\",\"fullStepIndex\":\"dsobjopnouhbq\",\"startTimeUtc\":\"kqxs\",\"endTimeUtc\":\"uzyigfcvcewbwqhd\",\"status\":\"jsatm\",\"steps\":[{\"name\":\"azdfsqxhyqmrej\",\"description\":\"r\",\"fullStepIndex\":\"vgrszr\",\"startTimeUtc\":\"tdrcwgzwl\",\"endTimeUtc\":\"zlhhfix\",\"status\":\"fculzjrmhpfyw\",\"steps\":[{},{}],\"exception\":[\"pzfzxsoxinunjlz\",\"drocqsxytq\",\"tcmiwd\"]}],\"exception\":[\"vn\",\"eylajamcajyhft\",\"zcrryklleynqa\",\"hkigglclwalhvub\"]},{\"name\":\"zphetxdqcm\",\"description\":\"tajqzj\",\"fullStepIndex\":\"lecxbibiwks\",\"startTimeUtc\":\"gyxs\",\"endTimeUtc\":\"pzvoikv\",\"status\":\"wczfzwushlcx\",\"steps\":[{\"name\":\"lhh\",\"description\":\"p\",\"fullStepIndex\":\"issaidqzsaaoq\",\"startTimeUtc\":\"gpto\",\"endTimeUtc\":\"jq\",\"status\":\"afcnlrtb\",\"steps\":[{},{}],\"exception\":[\"cao\"]},{\"name\":\"olbuauktwieope\",\"description\":\"lxqdwr\",\"fullStepIndex\":\"yil\",\"startTimeUtc\":\"ibkgxyxyau\",\"endTimeUtc\":\"eddobmcnltm\",\"status\":\"tkujsqycm\",\"steps\":[{},{}],\"exception\":[\"bl\",\"gpwb\",\"whrialiwrycgn\",\"plrr\"]},{\"name\":\"hctsbbibti\",\"description\":\"hqvumspbfs\",\"fullStepIndex\":\"qbbewfcuqfpyyxm\",\"startTimeUtc\":\"mtmvwituwey\",\"endTimeUtc\":\"shcybwfuppox\",\"status\":\"cmvouujxdiikmoxr\",\"steps\":[{},{},{},{}],\"exception\":[\"vlrxikjmoywlun\"]},{\"name\":\"pcwybsz\",\"description\":\"cnpatpft\",\"fullStepIndex\":\"ebwf\",\"startTimeUtc\":\"xorpwal\",\"endTimeUtc\":\"wugexojfccyl\",\"status\":\"rh\",\"steps\":[{},{},{}],\"exception\":[\"jpwexcdrz\",\"robzzxezmnrkjgpj\",\"uxsphlokfpm\",\"jpdvzvfbhwbdquf\"]}],\"exception\":[\"nrglaqrwyambhb\",\"febzxf\",\"jqut\",\"bhlenntrvrkpsab\"]}]},\"deploymentStatus\":{\"status\":\"vzm\",\"steps\":[{\"name\":\"ysvlpyeuukppd\",\"description\":\"qb\",\"fullStepIndex\":\"xvhhyqq\",\"startTimeUtc\":\"at\",\"endTimeUtc\":\"rznmginmtsdixc\",\"status\":\"kibmgjymn\",\"steps\":[{\"name\":\"gair\",\"description\":\"qzoof\",\"fullStepIndex\":\"qjsvep\",\"startTimeUtc\":\"htleberpyljek\",\"endTimeUtc\":\"qnwjjq\",\"status\":\"wkdnjrxgkrhwiehy\",\"steps\":[{},{},{},{}],\"exception\":[\"awonoehrguqlhfw\",\"fbjzmpyr\",\"uyfazbkoc\",\"ygvthrmxkbcjw\"]}],\"exception\":[\"omraw\",\"pkeboozflyac\"]},{\"name\":\"aeda\",\"description\":\"qclmgdtwgabd\",\"fullStepIndex\":\"kuz\",\"startTimeUtc\":\"jecooyvhtu\",\"endTimeUtc\":\"pelniibn\",\"status\":\"agdvcdqhftz\",\"steps\":[{\"name\":\"a\",\"description\":\"df\",\"fullStepIndex\":\"tncwmhjobzrfpr\",\"startTimeUtc\":\"dc\",\"endTimeUtc\":\"yftcvbzwgwhg\",\"status\":\"soauoorssatfyb\",\"steps\":[{},{}],\"exception\":[\"mxuqbd\"]},{\"name\":\"as\",\"description\":\"uxvzfqayopbtsi\",\"fullStepIndex\":\"gvbhxmndztgs\",\"startTimeUtc\":\"ayqmarxneibpgbrh\",\"endTimeUtc\":\"dqknh\",\"status\":\"motpuwnnoh\",\"steps\":[{},{},{},{}],\"exception\":[\"ocfrjuypw\",\"iulaynosugk\"]}],\"exception\":[\"xttpfs\",\"wgsghqucumldd\",\"uqmllfeothxu\"]},{\"name\":\"igrjdljlkqhvkrbz\",\"description\":\"astax\",\"fullStepIndex\":\"pruulhg\",\"startTimeUtc\":\"oizwxvs\",\"endTimeUtc\":\"sgfy\",\"status\":\"ky\",\"steps\":[{\"name\":\"fxcz\",\"description\":\"cckwrtwle\",\"fullStepIndex\":\"veszrtlhpdhw\",\"startTimeUtc\":\"ctac\",\"endTimeUtc\":\"njfmbbfnvjxit\",\"status\":\"vnk\",\"steps\":[{},{}],\"exception\":[\"s\",\"n\",\"hql\",\"oqksyiibhyxwbgbu\"]},{\"name\":\"vqdorbccqcd\",\"description\":\"hojvlirkn\",\"fullStepIndex\":\"osa\",\"startTimeUtc\":\"dtnagzlgpyaix\",\"endTimeUtc\":\"zqjjt\",\"status\":\"uy\",\"steps\":[{},{},{}],\"exception\":[\"kacybdueurgmcdcp\",\"shlojermh\",\"icsbfdjhyaakn\",\"ukib\"]}],\"exception\":[\"lhphzwxq\",\"ejp\"]}]},\"nodeSettings\":{\"state\":\"hvtozyagjjnxkb\",\"createdAt\":\"2021-05-26T00:53:31Z\",\"updatedAt\":\"2021-02-06T03:12:40Z\",\"connectionStatus\":\"gffklvqzr\",\"connectionErrorMessage\":\"rdgscnvqeonsgn\"},\"sessionDetails\":[{\"sessionId\":\"mezyo\",\"sessionStartTime\":\"2021-07-25T16:13:33Z\",\"sessionEndTime\":\"2021-10-21T10:44:47Z\",\"accessLevel\":\"DiagnosticsAndRepair\",\"transcriptLocation\":\"pvkvtwf\"},{\"sessionId\":\"sobpbo\",\"sessionStartTime\":\"2021-04-13T06:45:03Z\",\"sessionEndTime\":\"2021-02-06T17:04:46Z\",\"accessLevel\":\"DiagnosticsAndRepair\",\"transcriptLocation\":\"arnggcjfwblqh\"},{\"sessionId\":\"asmcolmugpyvaos\",\"sessionStartTime\":\"2021-10-04T02:15:18Z\",\"sessionEndTime\":\"2021-09-24T23:31:20Z\",\"accessLevel\":\"Diagnostics\",\"transcriptLocation\":\"ygz\"},{\"sessionId\":\"yevjhubnobguq\",\"sessionStartTime\":\"2021-07-18T07:53:36Z\",\"sessionEndTime\":\"2021-08-13T11:53:58Z\",\"accessLevel\":\"DiagnosticsAndRepair\",\"transcriptLocation\":\"mioyjpn\"}]}") + .toObject(EdgeMachineRemoteSupportJobReportedProperties.class); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/EdgeMachineRemoteSupportNodeSettingsTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/EdgeMachineRemoteSupportNodeSettingsTests.java new file mode 100644 index 000000000000..106f948b8069 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/EdgeMachineRemoteSupportNodeSettingsTests.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.EdgeMachineRemoteSupportNodeSettings; + +public final class EdgeMachineRemoteSupportNodeSettingsTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + EdgeMachineRemoteSupportNodeSettings model = BinaryData.fromString( + "{\"state\":\"viqcpszp\",\"createdAt\":\"2021-08-21T05:29:12Z\",\"updatedAt\":\"2021-10-28T20:53:10Z\",\"connectionStatus\":\"rdmvxyrxdhgv\",\"connectionErrorMessage\":\"jbxaotcgbz\"}") + .toObject(EdgeMachineRemoteSupportNodeSettings.class); + } +} 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..7e003aaed5c3 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\":\"DisableInProgress\",\"extensionParameters\":{\"forceUpdateTag\":\"m\",\"publisher\":\"eqvdsm\",\"type\":\"lixqcah\",\"typeHandlerVersion\":\"xalybxawoijpo\",\"autoUpgradeMinorVersion\":true,\"settings\":\"dataxpkk\",\"protectedSettings\":\"datadjodqhy\",\"enableAutomaticUpgrade\":false},\"aggregateState\":\"Provisioning\",\"perNodeExtensionDetails\":[{\"name\":\"ehllizhceum\",\"extension\":\"odkadppyibngq\",\"typeHandlerVersion\":\"d\",\"state\":\"PartiallySucceeded\",\"instanceView\":{}},{\"name\":\"hydt\",\"extension\":\"vvadswzs\",\"typeHandlerVersion\":\"yemlowuowhlxln\",\"state\":\"Deleting\",\"instanceView\":{}},{\"name\":\"uvblg\",\"extension\":\"kzkltrfowt\",\"typeHandlerVersion\":\"rfmvlihcvjdrqcrj\",\"state\":\"Error\",\"instanceView\":{}}],\"managedBy\":\"User\"},\"id\":\"vhdxlwyo\",\"name\":\"bfqz\",\"type\":\"kfnjyixhafrat\"}],\"nextLink\":\"mbjrou\"}") .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("m", model.value().get(0).forceUpdateTag()); + Assertions.assertEquals("eqvdsm", model.value().get(0).publisher()); + Assertions.assertEquals("lixqcah", model.value().get(0).typePropertiesType()); + Assertions.assertEquals("xalybxawoijpo", model.value().get(0).typeHandlerVersion()); + Assertions.assertTrue(model.value().get(0).autoUpgradeMinorVersion()); + Assertions.assertFalse(model.value().get(0).enableAutomaticUpgrade()); + Assertions.assertEquals("mbjrou", 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..2acc179b95d4 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\":\"nqlnfwmyymvqd\",\"publisher\":\"bhfckdvezcrcssb\",\"type\":\"ddubbnqfblhkal\",\"typeHandlerVersion\":\"pavawugiqjtio\",\"autoUpgradeMinorVersion\":false,\"settings\":\"dataminict\",\"protectedSettings\":\"dataaj\",\"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("nqlnfwmyymvqd", model.forceUpdateTag()); + Assertions.assertEquals("bhfckdvezcrcssb", model.publisher()); + Assertions.assertEquals("ddubbnqfblhkal", model.type()); + Assertions.assertEquals("pavawugiqjtio", 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("nqlnfwmyymvqd") + .withPublisher("bhfckdvezcrcssb") + .withType("ddubbnqfblhkal") + .withTypeHandlerVersion("pavawugiqjtio") + .withAutoUpgradeMinorVersion(false) + .withSettings("dataminict") + .withProtectedSettings("dataaj") .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("nqlnfwmyymvqd", model.forceUpdateTag()); + Assertions.assertEquals("bhfckdvezcrcssb", model.publisher()); + Assertions.assertEquals("ddubbnqfblhkal", model.type()); + Assertions.assertEquals("pavawugiqjtio", 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..0981d2e7a1a3 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\":\"grijwaiufanrayb\",\"enableAutomaticUpgrade\":false,\"settings\":\"datafrojsydgr\",\"protectedSettings\":\"datadkygywezski\"}") .toObject(ExtensionPatchParameters.class); - Assertions.assertEquals("dnhfuk", model.typeHandlerVersion()); - Assertions.assertEquals(true, model.enableAutomaticUpgrade()); + Assertions.assertEquals("grijwaiufanrayb", model.typeHandlerVersion()); + Assertions.assertFalse(model.enableAutomaticUpgrade()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - ExtensionPatchParameters model = new ExtensionPatchParameters().withTypeHandlerVersion("dnhfuk") - .withEnableAutomaticUpgrade(true) - .withSettings("datacswsmystul") - .withProtectedSettings("dataypfcvlerchpqbmf"); + ExtensionPatchParameters model = new ExtensionPatchParameters().withTypeHandlerVersion("grijwaiufanrayb") + .withEnableAutomaticUpgrade(false) + .withSettings("datafrojsydgr") + .withProtectedSettings("datadkygywezski"); model = BinaryData.fromObject(model).toObject(ExtensionPatchParameters.class); - Assertions.assertEquals("dnhfuk", model.typeHandlerVersion()); - Assertions.assertEquals(true, model.enableAutomaticUpgrade()); + Assertions.assertEquals("grijwaiufanrayb", model.typeHandlerVersion()); + Assertions.assertFalse(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..9ab02d4a734f 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\":\"teyxeyguq\",\"enableAutomaticUpgrade\":false,\"settings\":\"dataii\",\"protectedSettings\":\"dataspxlzde\"}}") .toObject(ExtensionPatchProperties.class); - Assertions.assertEquals("wvvb", model.extensionParameters().typeHandlerVersion()); - Assertions.assertEquals(false, model.extensionParameters().enableAutomaticUpgrade()); + Assertions.assertEquals("teyxeyguq", 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("teyxeyguq") .withEnableAutomaticUpgrade(false) - .withSettings("datal") - .withProtectedSettings("datahpodbzev")); + .withSettings("dataii") + .withProtectedSettings("dataspxlzde")); model = BinaryData.fromObject(model).toObject(ExtensionPatchProperties.class); - Assertions.assertEquals("wvvb", model.extensionParameters().typeHandlerVersion()); - Assertions.assertEquals(false, model.extensionParameters().enableAutomaticUpgrade()); + Assertions.assertEquals("teyxeyguq", 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..70555a6c53c4 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\":\"dstyouam\",\"enableAutomaticUpgrade\":true,\"settings\":\"dataesw\",\"protectedSettings\":\"dataweg\"}}}") .toObject(ExtensionPatch.class); - Assertions.assertEquals("sjkmnwqj", model.extensionParameters().typeHandlerVersion()); - Assertions.assertEquals(true, model.extensionParameters().enableAutomaticUpgrade()); + Assertions.assertEquals("dstyouam", model.extensionParameters().typeHandlerVersion()); + Assertions.assertTrue(model.extensionParameters().enableAutomaticUpgrade()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { ExtensionPatch model = new ExtensionPatch() - .withExtensionParameters(new ExtensionPatchParameters().withTypeHandlerVersion("sjkmnwqj") + .withExtensionParameters(new ExtensionPatchParameters().withTypeHandlerVersion("dstyouam") .withEnableAutomaticUpgrade(true) - .withSettings("dataiyhddvi") - .withProtectedSettings("dataegfnmntfpmvmemfn")); + .withSettings("dataesw") + .withProtectedSettings("dataweg")); model = BinaryData.fromObject(model).toObject(ExtensionPatch.class); - Assertions.assertEquals("sjkmnwqj", model.extensionParameters().typeHandlerVersion()); - Assertions.assertEquals(true, model.extensionParameters().enableAutomaticUpgrade()); + Assertions.assertEquals("dstyouam", model.extensionParameters().typeHandlerVersion()); + Assertions.assertTrue(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..69a3544c33a5 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\":\"i\",\"state\":\"Moving\",\"errorDetails\":[{\"exception\":\"sjsz\"},{\"exception\":\"scmnlziji\"}],\"extensionResourceId\":\"ehgmvflnwyv\",\"typeHandlerVersion\":\"xrerlniylylyf\",\"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..30429f2e2807 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\":\"znv\"}").toObject(ExtensionUpgradeParameters.class); + Assertions.assertEquals("znv", model.targetVersion()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - ExtensionUpgradeParameters model = new ExtensionUpgradeParameters().withTargetVersion("babwidfcxss"); + ExtensionUpgradeParameters model = new ExtensionUpgradeParameters().withTargetVersion("znv"); model = BinaryData.fromObject(model).toObject(ExtensionUpgradeParameters.class); - Assertions.assertEquals("babwidfcxss", model.targetVersion()); + Assertions.assertEquals("znv", 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..6367abf357f9 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\":\"xcqsxwclykcru\",\"publisher\":\"kk\",\"type\":\"jrevmptedeuen\",\"typeHandlerVersion\":\"shnfiygpgpkkhp\",\"autoUpgradeMinorVersion\":false,\"settings\":\"dataaqlmihnmtrdlpxi\",\"protectedSettings\":\"datagecpvfpnr\",\"enableAutomaticUpgrade\":false},\"aggregateState\":\"Updating\",\"perNodeExtensionDetails\":[{\"name\":\"eohyfivxdi\",\"extension\":\"wblijhpxukx\",\"typeHandlerVersion\":\"yxontbwdqrxros\",\"state\":\"InProgress\",\"instanceView\":{\"name\":\"dxfu\",\"type\":\"fewxatktwjrppi\",\"typeHandlerVersion\":\"yrqvelrmd\",\"status\":{}}},{\"name\":\"hvksbojkl\",\"extension\":\"pzwyncwksmpyeyzo\",\"typeHandlerVersion\":\"fnflytfxu\",\"state\":\"Failed\",\"instanceView\":{\"name\":\"omiswkqwopwsnli\",\"type\":\"ng\",\"typeHandlerVersion\":\"qzgpdglkfv\",\"status\":{}}}],\"managedBy\":\"User\"},\"id\":\"vtf\",\"name\":\"zsedfmzukryx\",\"type\":\"ijvap\"}"; 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") - .withAutoUpgradeMinorVersion(true) - .withSettings("datawirfljf") - .withProtectedSettings("dataxqou") - .withEnableAutomaticUpgrade(false) + .define("izdnuehx") + .withExistingArcSetting("xtzayqwddig", "blsplzdss", "wwveeozbjkjq") + .withForceUpdateTag("dyw") + .withPublisher("klgerxactsawv") + .withTypePropertiesType("impthj") + .withTypeHandlerVersion("plzmslubnk") + .withAutoUpgradeMinorVersion(false) + .withSettings("dataysj") + .withProtectedSettings("datarrllfswarmybw") + .withEnableAutomaticUpgrade(true) .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("xcqsxwclykcru", response.forceUpdateTag()); + Assertions.assertEquals("kk", response.publisher()); + Assertions.assertEquals("jrevmptedeuen", response.typePropertiesType()); + Assertions.assertEquals("shnfiygpgpkkhp", 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..ea254ad73641 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("wyxjsfmaxcebnbeo", "kemqqerwqx", "jpvemdfkht", "uo", 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..31404ae8bce8 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\":\"PartiallySucceeded\",\"extensionParameters\":{\"forceUpdateTag\":\"kcomeobwkeuzlten\",\"publisher\":\"fxlmxozesnd\",\"type\":\"uomtxj\",\"typeHandlerVersion\":\"ixymckik\",\"autoUpgradeMinorVersion\":true,\"settings\":\"dataurhwishy\",\"protectedSettings\":\"datarzcqfevnkyakckte\",\"enableAutomaticUpgrade\":false},\"aggregateState\":\"Deleted\",\"perNodeExtensionDetails\":[{\"name\":\"kkdede\",\"extension\":\"azogfc\",\"typeHandlerVersion\":\"cx\",\"state\":\"Failed\",\"instanceView\":{\"name\":\"cqxmyvkxixy\",\"type\":\"v\",\"typeHandlerVersion\":\"jczgohv\",\"status\":{}}},{\"name\":\"wichmxczby\",\"extension\":\"ocgmzdcts\",\"typeHandlerVersion\":\"wscrngtwgxrolw\",\"state\":\"Accepted\",\"instanceView\":{\"name\":\"dksutacuctiha\",\"type\":\"shbvjh\",\"typeHandlerVersion\":\"pmqququxl\",\"status\":{}}},{\"name\":\"grxlexoweorocrqi\",\"extension\":\"ymtgbqpfy\",\"typeHandlerVersion\":\"htvij\",\"state\":\"Updating\",\"instanceView\":{\"name\":\"cnzhrplcxfm\",\"type\":\"quuu\",\"typeHandlerVersion\":\"mhbtqyzycgcmbkyg\",\"status\":{}}},{\"name\":\"dqosxzmdzly\",\"extension\":\"fufkekzfk\",\"typeHandlerVersion\":\"xh\",\"state\":\"Connected\",\"instanceView\":{\"name\":\"kgg\",\"type\":\"sryjokvl\",\"typeHandlerVersion\":\"bjsarxsvmfpa\",\"status\":{}}}],\"managedBy\":\"Azure\"},\"id\":\"gfgqpudhgxgiea\",\"name\":\"bfpxxavlozukg\",\"type\":\"nu\"}"; 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("clmdmtfxxepzpx", "xlcqzfxa", "tiqmcjbsmkirp", "n", 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("kcomeobwkeuzlten", response.forceUpdateTag()); + Assertions.assertEquals("fxlmxozesnd", response.publisher()); + Assertions.assertEquals("uomtxj", response.typePropertiesType()); + Assertions.assertEquals("ixymckik", response.typeHandlerVersion()); + Assertions.assertTrue(response.autoUpgradeMinorVersion()); + Assertions.assertFalse(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..8f5ac255e5c1 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\":\"Connected\",\"extensionParameters\":{\"forceUpdateTag\":\"twofxfmhlvy\",\"publisher\":\"sl\",\"type\":\"rml\",\"typeHandlerVersion\":\"iekhjgqq\",\"autoUpgradeMinorVersion\":true,\"settings\":\"dataespscvsm\",\"protectedSettings\":\"datatluwozfvzasupc\",\"enableAutomaticUpgrade\":false},\"aggregateState\":\"Error\",\"perNodeExtensionDetails\":[{\"name\":\"oq\",\"extension\":\"m\",\"typeHandlerVersion\":\"mlmpnvqxuyi\",\"state\":\"Provisioning\",\"instanceView\":{\"name\":\"dqseypdlmajpuy\",\"type\":\"a\",\"typeHandlerVersion\":\"mzgccy\",\"status\":{}}}],\"managedBy\":\"Azure\"},\"id\":\"si\",\"name\":\"hedmm\",\"type\":\"oneeyrxpa\"}]}"; 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); + = manager.extensions().listByArcSetting("r", "zmhytebjkjgee", "wtfma", 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("twofxfmhlvy", response.iterator().next().forceUpdateTag()); + Assertions.assertEquals("sl", response.iterator().next().publisher()); + Assertions.assertEquals("rml", response.iterator().next().typePropertiesType()); + Assertions.assertEquals("iekhjgqq", response.iterator().next().typeHandlerVersion()); + Assertions.assertTrue(response.iterator().next().autoUpgradeMinorVersion()); + Assertions.assertFalse(response.iterator().next().enableAutomaticUpgrade()); } } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/HardwareProfileTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/HardwareProfileTests.java new file mode 100644 index 000000000000..fd8bce3fd172 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/HardwareProfileTests.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.HardwareProfile; + +public final class HardwareProfileTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + HardwareProfile model = BinaryData.fromString( + "{\"cpuCores\":3634793142914290457,\"cpuSockets\":8437755461134993309,\"memoryCapacityInGb\":98528445631252620,\"model\":\"cdocfqpl\",\"manufacturer\":\"o\",\"serialNumber\":\"hxw\",\"processorType\":\"lvzkl\"}") + .toObject(HardwareProfile.class); + } +} 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..8a6a5b49ca04 --- /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-11-17T23:45:40Z\",\"toDate\":\"2021-01-27T11:12:08Z\",\"lastLogGenerated\":\"2021-06-09T21:45:12Z\",\"reportedProperties\":{\"percentComplete\":1357025963,\"validationStatus\":{\"status\":\"bhmfdnbz\",\"steps\":[{\"name\":\"vfcjnaeoisrvhmg\",\"description\":\"ffukiscvw\",\"fullStepIndex\":\"hwplefaxvx\",\"startTimeUtc\":\"cbtgnhnz\",\"endTimeUtc\":\"qxtjjfzqlqhyca\",\"status\":\"dggxdbeesmi\",\"steps\":[{},{},{},{}],\"exception\":[\"ariaawi\"]},{\"name\":\"gy\",\"description\":\"qfby\",\"fullStepIndex\":\"rfgi\",\"startTimeUtc\":\"tcojocqwo\",\"endTimeUtc\":\"nzjvusfzldm\",\"status\":\"uxylfsbtkadpy\",\"steps\":[{}],\"exception\":[\"tgkbugrjqctojc\",\"isofieypefojyqd\",\"cuplcplcwkhih\",\"hlhzdsqtzbsrgno\"]}]},\"deploymentStatus\":{\"status\":\"hfgmvecactxm\",\"steps\":[{\"name\":\"yowc\",\"description\":\"qovekqvgqou\",\"fullStepIndex\":\"fzmpjwyivq\",\"startTimeUtc\":\"f\",\"endTimeUtc\":\"vhrfsphuagrt\",\"status\":\"kteusqczk\",\"steps\":[{},{}],\"exception\":[\"ubyjaffmmf\",\"lcqcuubgqibrt\",\"lmetttwgdslqxi\",\"hrmooi\"]},{\"name\":\"seypxiutcxapz\",\"description\":\"rpetogebjoxsl\",\"fullStepIndex\":\"nhl\",\"startTimeUtc\":\"rqnkkzjcjbtr\",\"endTimeUtc\":\"ehvvib\",\"status\":\"jj\",\"steps\":[{},{},{}],\"exception\":[\"eitpkxztmo\",\"bklftidgfcwqmpim\"]}]},\"logCollectionSessionDetails\":[{\"startTime\":\"hemjy\",\"endTime\":\"hujswtwkozzwcul\",\"timeCollected\":\"awpfajnjwltlwtjj\",\"logSize\":1385863144,\"status\":\"Running\",\"correlationId\":\"hsnvkcdmxzrp\"},{\"startTime\":\"imlnwiaaomylw\",\"endTime\":\"z\",\"timeCollected\":\"cse\",\"logSize\":1208874486,\"status\":\"Running\",\"correlationId\":\"jhlfzswpchwahf\"}]},\"deploymentMode\":\"Deploy\",\"provisioningState\":\"PartiallySucceeded\",\"jobId\":\"epgfew\",\"startTimeUtc\":\"2021-08-03T20:32:07Z\",\"endTimeUtc\":\"2021-01-02T13:19:09Z\",\"status\":\"Succeeded\"}") + .toObject(HciCollectLogJobProperties.class); + Assertions.assertEquals(DeploymentMode.DEPLOY, model.deploymentMode()); + Assertions.assertEquals(OffsetDateTime.parse("2021-11-17T23:45:40Z"), model.fromDate()); + Assertions.assertEquals(OffsetDateTime.parse("2021-01-27T11:12:08Z"), model.toDate()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + HciCollectLogJobProperties model = new HciCollectLogJobProperties().withDeploymentMode(DeploymentMode.DEPLOY) + .withFromDate(OffsetDateTime.parse("2021-11-17T23:45:40Z")) + .withToDate(OffsetDateTime.parse("2021-01-27T11:12:08Z")); + model = BinaryData.fromObject(model).toObject(HciCollectLogJobProperties.class); + Assertions.assertEquals(DeploymentMode.DEPLOY, model.deploymentMode()); + Assertions.assertEquals(OffsetDateTime.parse("2021-11-17T23:45:40Z"), model.fromDate()); + Assertions.assertEquals(OffsetDateTime.parse("2021-01-27T11:12:08Z"), 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..6ac2a825c70a 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; @@ -11,13 +11,7 @@ public final class HciEdgeDeviceAdapterPropertyOverridesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { HciEdgeDeviceAdapterPropertyOverrides model = BinaryData.fromString( - "{\"jumboPacket\":\"etlgydlhqvlnnpx\",\"networkDirect\":\"afiqgeaarbgjekg\",\"networkDirectTechnology\":\"lbyulidwcwvmze\"}") + "{\"jumboPacket\":\"cyzyzjdnrqjbt\",\"networkDirect\":\"eaoqaqbzgyhf\",\"networkDirectTechnology\":\"v\"}") .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..66267e259d7f 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\":\"tgqztwhghmup\",\"state\":\"Canceled\",\"errorDetails\":[{\"exception\":\"dxabbujfta\"},{\"exception\":\"nbbklqpxzucafed\"},{\"exception\":\"wnlzafwxu\"},{\"exception\":\"nhgookrtalvnbw\"}],\"extensionResourceId\":\"bemeluclvd\",\"typeHandlerVersion\":\"ukyrdnqodxahh\",\"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..46f83679daa8 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\":1173531945969968398,\"intentType\":3396422124507291497,\"isComputeIntentSet\":false,\"isStorageIntentSet\":true,\"isOnlyStorage\":true,\"isManagementIntentSet\":false,\"isStretchIntentSet\":false,\"isOnlyStretch\":true,\"isNetworkIntentType\":true,\"intentName\":\"guyxlyk\",\"intentAdapters\":[\"vx\",\"cwxhmpej\",\"lkexaonwivkcqh\"],\"overrideVirtualSwitchConfiguration\":true,\"virtualSwitchConfigurationOverrides\":{\"enableIov\":\"nlccrm\",\"loadBalancingAlgorithm\":\"yupiju\"},\"overrideQosPolicy\":true,\"qosPolicyOverrides\":{\"priorityValue8021Action_Cluster\":\"kakfqfr\",\"priorityValue8021Action_SMB\":\"myildudxjasc\",\"bandwidthPercentage_SMB\":\"vfdjkpdxp\"},\"overrideAdapterProperty\":false,\"adapterPropertyOverrides\":{\"jumboPacket\":\"nmgzvyfijdkzuqnw\",\"networkDirect\":\"thuqolyahluq\",\"networkDirectTechnology\":\"ulsutrjbhxy\"}}],\"storageNetworks\":[{\"name\":\"qezv\",\"networkAdapterName\":\"ugdrftbc\",\"storageVlanId\":\"xreuquowtlj\",\"storageAdapterIPInfo\":[{\"physicalNode\":\"reagkhyxvrqt\",\"ipv4Address\":\"czsulmdggl\",\"subnetMask\":\"pjpfseykgs\"},{\"physicalNode\":\"gpszngafpg\",\"ipv4Address\":\"kvec\",\"subnetMask\":\"jcngoadyed\"},{\"physicalNode\":\"rgjfoknubnoi\",\"ipv4Address\":\"kpztrgd\",\"subnetMask\":\"vcoqraswugyxpqi\"},{\"physicalNode\":\"eialwvskb\",\"ipv4Address\":\"z\",\"subnetMask\":\"aq\"}]},{\"name\":\"ltcoqc\",\"networkAdapterName\":\"pdsxzakuejkm\",\"storageVlanId\":\"iztjof\",\"storageAdapterIPInfo\":[{\"physicalNode\":\"vjufycsjmlbe\",\"ipv4Address\":\"ej\",\"subnetMask\":\"iuxegth\"},{\"physicalNode\":\"tudaw\",\"ipv4Address\":\"jfel\",\"subnetMask\":\"rpptcbgqnzmnhiil\"},{\"physicalNode\":\"lwcjgckbbcccgzpr\",\"ipv4Address\":\"xnyuffatsgftipwc\",\"subnetMask\":\"yubhiqdx\"},{\"physicalNode\":\"rnpnuhzafccnuh\",\"ipv4Address\":\"gbylbuig\",\"subnetMask\":\"vatvcrkd\"}]}],\"storageConnectivitySwitchless\":true,\"enableStorageAutoIp\":true}") .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..38e777ac9a6d 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\":3747178006125455210,\"intentType\":6959312552297094256,\"isComputeIntentSet\":true,\"isStorageIntentSet\":true,\"isOnlyStorage\":false,\"isManagementIntentSet\":true,\"isStretchIntentSet\":false,\"isOnlyStretch\":true,\"isNetworkIntentType\":true,\"intentName\":\"ndsbdw\",\"intentAdapters\":[\"e\",\"zmwntopagt\",\"mvmmagoaqylkjz\"],\"overrideVirtualSwitchConfiguration\":false,\"virtualSwitchConfigurationOverrides\":{\"enableIov\":\"zjcg\",\"loadBalancingAlgorithm\":\"itpfinzcpdl\"},\"overrideQosPolicy\":false,\"qosPolicyOverrides\":{\"priorityValue8021Action_Cluster\":\"jmtbd\",\"priorityValue8021Action_SMB\":\"cqguef\",\"bandwidthPercentage_SMB\":\"ompheqdur\"},\"overrideAdapterProperty\":true,\"adapterPropertyOverrides\":{\"jumboPacket\":\"lf\",\"networkDirect\":\"u\",\"networkDirectTechnology\":\"ckyeclcdigpta\"}}") .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..93437791106a --- /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\":\"Succeeded\",\"jobId\":\"oz\",\"startTimeUtc\":\"2021-03-21T22:40:21Z\",\"endTimeUtc\":\"2021-07-25T12:58:50Z\",\"status\":\"DeploymentSuccess\"}") + .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..48360bac7f00 --- /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\":\"Failed\",\"jobId\":\"cnifm\",\"startTimeUtc\":\"2021-11-20T11:55:53Z\",\"endTimeUtc\":\"2021-10-10T01:13:03Z\",\"status\":\"Paused\"},\"id\":\"nysuxmprafwgckh\",\"name\":\"cxvdfffwafqrouda\",\"type\":\"pavehhr\"}") + .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..3326efdf8e49 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; @@ -12,13 +12,7 @@ public final class HciEdgeDeviceStorageAdapterIpInfoTests { public void testDeserialize() throws Exception { HciEdgeDeviceStorageAdapterIpInfo model = BinaryData .fromString( - "{\"physicalNode\":\"fratqxmbjroumzz\",\"ipv4Address\":\"al\",\"subnetMask\":\"rhuzgfxonjtpu\"}") + "{\"physicalNode\":\"hzlraymezxlsk\",\"ipv4Address\":\"mxrfdsa\",\"subnetMask\":\"ednwyyshtu\"}") .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..e1d504cc753d 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\":\"tbwbqamteuli\",\"networkAdapterName\":\"lpkcvmwfauxxep\",\"storageVlanId\":\"wbormcqmi\",\"storageAdapterIPInfo\":[{\"physicalNode\":\"qpkzfbojxjmcsmy\",\"ipv4Address\":\"ixvcpwnkwywzwo\",\"subnetMask\":\"lickduoi\"},{\"physicalNode\":\"amt\",\"ipv4Address\":\"sknxrwzawnvsbcf\",\"subnetMask\":\"agxnvhycvdimw\"},{\"physicalNode\":\"regzgyufutrwpwer\",\"ipv4Address\":\"kzkdhmeott\",\"subnetMask\":\"jyosxwwh\"},{\"physicalNode\":\"jtfvpndpmiljpn\",\"ipv4Address\":\"nudqllz\",\"subnetMask\":\"uzpjlxeehux\"}]}") .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..12f46c5a7a12 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\":\"rzmq\",\"loadBalancingAlgorithm\":\"cycijoclxiut\"}") .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..6f3f3e7ee3ae --- /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\":\"orpravkjoges\"}").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..c643a0bfa174 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\":\"awmo\",\"interfaceDescription\":\"ancz\",\"componentId\":\"odrrslblxyd\",\"driverVersion\":\"rxvvbxi\",\"ip4Address\":\"g\",\"subnetMask\":\"qljnqkhychoco\",\"defaultGateway\":\"lehu\",\"dnsServers\":[\"rqffaweyurk\",\"hy\"],\"defaultIsolationId\":\"xra\",\"macAddress\":\"uqd\",\"slot\":\"xmrgchbapxkiy\",\"switchName\":\"j\",\"nicType\":\"ajb\",\"vlanId\":\"cgduusio\",\"nicStatus\":\"blevpmcluj\",\"rdmaCapability\":\"Enabled\"},{\"adapterName\":\"xlzgsjgkzzl\",\"interfaceDescription\":\"fhbzffovwmbjlzq\",\"componentId\":\"zpgvdwnapfd\",\"driverVersion\":\"owftptnuwjtks\",\"ip4Address\":\"gcgqyhleseyqrhvy\",\"subnetMask\":\"dotjvdk\",\"defaultGateway\":\"swskuk\",\"dnsServers\":[\"sbvw\",\"spkxkdt\"],\"defaultIsolationId\":\"kndlqvtwknvg\",\"macAddress\":\"bugtywatmqa\",\"slot\":\"ueatgroe\",\"switchName\":\"oygzcbyfqxkfao\",\"nicType\":\"ehqpuvjmvqmt\",\"vlanId\":\"ckygroejnndljdju\",\"nicStatus\":\"br\",\"rdmaCapability\":\"Enabled\"}],\"switchDetails\":[{\"switchName\":\"ceysfaqeg\",\"switchType\":\"wryshwd\",\"extensions\":[{\"switchId\":\"xgkqusybwp\",\"extensionName\":\"acarvvlf\",\"extensionEnabled\":false},{\"switchId\":\"tpo\",\"extensionName\":\"enazerohzrsqals\",\"extensionEnabled\":false},{\"switchId\":\"wqapfgsdp\",\"extensionName\":\"essmzhhku\",\"extensionEnabled\":false}]}],\"hostNetwork\":{\"intents\":[{\"scope\":7926255617970404705,\"intentType\":2628362173408564257,\"isComputeIntentSet\":false,\"isStorageIntentSet\":false,\"isOnlyStorage\":true,\"isManagementIntentSet\":true,\"isStretchIntentSet\":false,\"isOnlyStretch\":false,\"isNetworkIntentType\":false,\"intentName\":\"tae\",\"intentAdapters\":[\"zzy\",\"ev\",\"sxivzrrryvei\"],\"overrideVirtualSwitchConfiguration\":true,\"virtualSwitchConfigurationOverrides\":{\"enableIov\":\"dyzatvfuzka\",\"loadBalancingAlgorithm\":\"jvvruxwigsyei\"},\"overrideQosPolicy\":false,\"qosPolicyOverrides\":{\"priorityValue8021Action_Cluster\":\"jtgrqgdgkkileplk\",\"priorityValue8021Action_SMB\":\"mknhwtbbaedor\",\"bandwidthPercentage_SMB\":\"mqfl\"},\"overrideAdapterProperty\":false,\"adapterPropertyOverrides\":{\"jumboPacket\":\"gwumgxdgdhpa\",\"networkDirect\":\"dexjddvjs\",\"networkDirectTechnology\":\"wotmmwllcolsrsxa\"}}],\"storageNetworks\":[{\"name\":\"hexcgjokj\",\"networkAdapterName\":\"nhvlqjbekp\",\"storageVlanId\":\"ksnbksdqhjv\",\"storageAdapterIPInfo\":[{\"physicalNode\":\"eslk\",\"ipv4Address\":\"ustcpoq\",\"subnetMask\":\"vnwqjwgo\"},{\"physicalNode\":\"lejjjkxy\",\"ipv4Address\":\"fdb\",\"subnetMask\":\"bztensvkzykjtj\"}]}],\"storageConnectivitySwitchless\":true,\"enableStorageAutoIp\":true},\"sdnProperties\":{\"sdnStatus\":\"Disabled\",\"sdnDomainName\":\"cdp\",\"sdnApiAddress\":\"pn\"}}") .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..7ed66b4a9b9d 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\":\"mgjfbpkuwxeoio\",\"interfaceDescription\":\"izfavkjzwf\",\"componentId\":\"yay\",\"driverVersion\":\"mfzsbf\",\"ip4Address\":\"rzx\",\"subnetMask\":\"ewsrsxkrplbjaze\",\"defaultGateway\":\"w\",\"dnsServers\":[\"oypsuhbrnnhj\"],\"defaultIsolationId\":\"qwjhqkbiwetpozyc\",\"macAddress\":\"iqyhgfse\",\"slot\":\"lexbsf\",\"switchName\":\"dynojpziuwfb\",\"nicType\":\"kdtnhqsyclj\",\"vlanId\":\"lpkpbafvafhl\",\"nicStatus\":\"lc\",\"rdmaCapability\":\"Enabled\"}") .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..13f3067458b6 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\":\"mevuafpwzy\",\"assemblyVersion\":\"rkgwltxeqip\"}") + .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..4badcf7e8b73 --- /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\":\"None\",\"expirationTimestamp\":\"2021-04-22T13:11:31Z\",\"type\":\"Revoke\",\"reportedProperties\":{\"percentComplete\":1229612251,\"validationStatus\":{\"status\":\"nzcyjtotp\",\"steps\":[{\"name\":\"pbdbzqgqqi\",\"description\":\"dsvqwt\",\"fullStepIndex\":\"ky\",\"startTimeUtc\":\"cysihs\",\"endTimeUtc\":\"cw\",\"status\":\"ohsdtmcd\",\"steps\":[{},{},{}],\"exception\":[\"ohdxbzlmcmu\",\"pcvhdbevwqqxeys\"]},{\"name\":\"nqzi\",\"description\":\"fkbg\",\"fullStepIndex\":\"bowxe\",\"startTimeUtc\":\"clj\",\"endTimeUtc\":\"gvkzqkjjeokbze\",\"status\":\"zrxcczurt\",\"steps\":[{},{},{},{}],\"exception\":[\"xbkwv\"]},{\"name\":\"nzvdfbzdixzmq\",\"description\":\"odawopqhewjptmcg\",\"fullStepIndex\":\"ostzelndlatu\",\"startTimeUtc\":\"zlbiojlvfhrbbpn\",\"endTimeUtc\":\"vcwwyyurmochppr\",\"status\":\"snmokayzej\",\"steps\":[{},{}],\"exception\":[\"pbzpcpiljhahz\"]},{\"name\":\"chndbnwie\",\"description\":\"lewjwiuubwef\",\"fullStepIndex\":\"fapaqtfer\",\"startTimeUtc\":\"wexjkmfxapjwogq\",\"endTimeUtc\":\"o\",\"status\":\"udcdabtqwpwyawb\",\"steps\":[{},{}],\"exception\":[\"ucljgkyexaoguya\",\"p\",\"dsdaultxijjumf\",\"waz\"]}]},\"deploymentStatus\":{\"status\":\"nm\",\"steps\":[{\"name\":\"zqdqxt\",\"description\":\"wgnyfusfzsvtui\",\"fullStepIndex\":\"hajqglcfh\",\"startTimeUtc\":\"rqryxynqn\",\"endTimeUtc\":\"dpsovwxznptgo\",\"status\":\"ybbabpfhvfsl\",\"steps\":[{},{}],\"exception\":[\"lrigjkskyri\",\"ovzidsx\",\"aabzmif\",\"ygznmmaxrizk\"]}]},\"nodeSettings\":{\"state\":\"gopxlhslnelxie\",\"createdAt\":\"2021-08-02T01:57:55Z\",\"updatedAt\":\"2021-01-24T06:43:27Z\",\"connectionStatus\":\"xecwcro\",\"connectionErrorMessage\":\"hslhca\"},\"sessionDetails\":[{\"sessionId\":\"i\",\"sessionStartTime\":\"2021-07-26T09:33:31Z\",\"sessionEndTime\":\"2021-04-21T19:57:43Z\",\"accessLevel\":\"Diagnostics\",\"transcriptLocation\":\"orq\"}]},\"deploymentMode\":\"Validate\",\"provisioningState\":\"PartiallyConnected\",\"jobId\":\"raglk\",\"startTimeUtc\":\"2021-11-13T06:22:01Z\",\"endTimeUtc\":\"2021-10-03T08:51:50Z\",\"status\":\"ValidationSuccess\"}") + .toObject(HciRemoteSupportJobProperties.class); + Assertions.assertEquals(DeploymentMode.VALIDATE, model.deploymentMode()); + Assertions.assertEquals(RemoteSupportAccessLevel.NONE, model.accessLevel()); + Assertions.assertEquals(OffsetDateTime.parse("2021-04-22T13:11:31Z"), model.expirationTimestamp()); + Assertions.assertEquals(RemoteSupportType.REVOKE, model.type()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + HciRemoteSupportJobProperties model + = new HciRemoteSupportJobProperties().withDeploymentMode(DeploymentMode.VALIDATE) + .withAccessLevel(RemoteSupportAccessLevel.NONE) + .withExpirationTimestamp(OffsetDateTime.parse("2021-04-22T13:11:31Z")) + .withType(RemoteSupportType.REVOKE); + model = BinaryData.fromObject(model).toObject(HciRemoteSupportJobProperties.class); + Assertions.assertEquals(DeploymentMode.VALIDATE, model.deploymentMode()); + Assertions.assertEquals(RemoteSupportAccessLevel.NONE, model.accessLevel()); + Assertions.assertEquals(OffsetDateTime.parse("2021-04-22T13:11:31Z"), model.expirationTimestamp()); + Assertions.assertEquals(RemoteSupportType.REVOKE, 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..2b6ebfd7ad99 --- /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\":7392314179384433223}").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..c982ba7d695b 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\":\"aqnvzoqgyipemchg\"}").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..3ed9513365cc 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,41 @@ 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\":\"kzevdlhewpusds\",\"gateway\":\"wvogvbbejdc\",\"ipPools\":[{\"startingAddress\":\"m\",\"endingAddress\":\"kufgmj\"},{\"startingAddress\":\"wr\",\"endingAddress\":\"rtwaenuuzko\"}],\"dnsServerConfig\":\"UseDnsServer\",\"dnsZones\":[{\"dnsZoneName\":\"fdwoyuhh\",\"dnsForwarder\":[\"iefozbhdmsml\"]},{\"dnsZoneName\":\"qhoftrmaequiah\",\"dnsForwarder\":[\"slfaoqzpiyyl\",\"alnswhccsphk\",\"ivwitqscywugg\",\"oluhczbwemh\"]}],\"dnsServers\":[\"sbrgz\",\"wmsweypqwd\",\"ggicccnxqhue\"],\"useDhcp\":false}") .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("kzevdlhewpusds", model.subnetMask()); + Assertions.assertEquals("wvogvbbejdc", model.gateway()); + Assertions.assertEquals("m", model.ipPools().get(0).startingAddress()); + Assertions.assertEquals("kufgmj", model.ipPools().get(0).endingAddress()); + Assertions.assertEquals(DnsServerConfig.USE_DNS_SERVER, model.dnsServerConfig()); + Assertions.assertEquals("fdwoyuhh", model.dnsZones().get(0).dnsZoneName()); + Assertions.assertEquals("iefozbhdmsml", model.dnsZones().get(0).dnsForwarder().get(0)); + Assertions.assertEquals("sbrgz", model.dnsServers().get(0)); + Assertions.assertFalse(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")) + InfrastructureNetwork model = new InfrastructureNetwork().withSubnetMask("kzevdlhewpusds") + .withGateway("wvogvbbejdc") + .withIpPools(Arrays.asList(new IpPools().withStartingAddress("m").withEndingAddress("kufgmj"), + new IpPools().withStartingAddress("wr").withEndingAddress("rtwaenuuzko"))) + .withDnsServerConfig(DnsServerConfig.USE_DNS_SERVER) + .withDnsZones(Arrays.asList( + new DnsZones().withDnsZoneName("fdwoyuhh").withDnsForwarder(Arrays.asList("iefozbhdmsml")), + new DnsZones().withDnsZoneName("qhoftrmaequiah") + .withDnsForwarder(Arrays.asList("slfaoqzpiyyl", "alnswhccsphk", "ivwitqscywugg", "oluhczbwemh")))) + .withDnsServers(Arrays.asList("sbrgz", "wmsweypqwd", "ggicccnxqhue")) .withUseDhcp(false); 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("kzevdlhewpusds", model.subnetMask()); + Assertions.assertEquals("wvogvbbejdc", model.gateway()); + Assertions.assertEquals("m", model.ipPools().get(0).startingAddress()); + Assertions.assertEquals("kufgmj", model.ipPools().get(0).endingAddress()); + Assertions.assertEquals(DnsServerConfig.USE_DNS_SERVER, model.dnsServerConfig()); + Assertions.assertEquals("fdwoyuhh", model.dnsZones().get(0).dnsZoneName()); + Assertions.assertEquals("iefozbhdmsml", model.dnsZones().get(0).dnsForwarder().get(0)); + Assertions.assertEquals("sbrgz", model.dnsServers().get(0)); + Assertions.assertFalse(model.useDhcp()); } } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/IpAddressRangeTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/IpAddressRangeTests.java new file mode 100644 index 000000000000..9f3a74c602d5 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/IpAddressRangeTests.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.IpAddressRange; +import org.junit.jupiter.api.Assertions; + +public final class IpAddressRangeTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + IpAddressRange model = BinaryData.fromString("{\"startIp\":\"lduyehiiittugyuq\",\"endIp\":\"rldaxurfqa\"}") + .toObject(IpAddressRange.class); + Assertions.assertEquals("lduyehiiittugyuq", model.startIp()); + Assertions.assertEquals("rldaxurfqa", model.endIp()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + IpAddressRange model = new IpAddressRange().withStartIp("lduyehiiittugyuq").withEndIp("rldaxurfqa"); + model = BinaryData.fromObject(model).toObject(IpAddressRange.class); + Assertions.assertEquals("lduyehiiittugyuq", model.startIp()); + Assertions.assertEquals("rldaxurfqa", model.endIp()); + } +} 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..7c4e765a0cd6 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\":\"tlstvlzywem\",\"endingAddress\":\"rncsdtclu\"}") .toObject(IpPools.class); - Assertions.assertEquals("ac", model.startingAddress()); - Assertions.assertEquals("pzfqrhhuaoppp", model.endingAddress()); + Assertions.assertEquals("tlstvlzywem", model.startingAddress()); + Assertions.assertEquals("rncsdtclu", 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("tlstvlzywem").withEndingAddress("rncsdtclu"); model = BinaryData.fromObject(model).toObject(IpPools.class); - Assertions.assertEquals("ac", model.startingAddress()); - Assertions.assertEquals("pzfqrhhuaoppp", model.endingAddress()); + Assertions.assertEquals("tlstvlzywem", model.startingAddress()); + Assertions.assertEquals("rncsdtclu", 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..fd49acfbf7c0 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\":\"npcdpumnzgm\",\"relyingPartyServiceEndpoint\":\"nmabik\",\"attestationServiceEndpoint\":\"orgjhxbldt\"}") .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/KubernetesVersionInnerTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/KubernetesVersionInnerTests.java new file mode 100644 index 000000000000..ef60fb35f88d --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/KubernetesVersionInnerTests.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.fluent.models.KubernetesVersionInner; +import org.junit.jupiter.api.Assertions; + +public final class KubernetesVersionInnerTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + KubernetesVersionInner model = BinaryData.fromString( + "{\"properties\":{\"version\":\"ifsqesaagdfmg\"},\"id\":\"lhjxr\",\"name\":\"f\",\"type\":\"wmrvktsizntocipa\"}") + .toObject(KubernetesVersionInner.class); + Assertions.assertEquals("ifsqesaagdfmg", model.properties().version()); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/KubernetesVersionListResultTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/KubernetesVersionListResultTests.java new file mode 100644 index 000000000000..697524aabe29 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/KubernetesVersionListResultTests.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.implementation.models.KubernetesVersionListResult; +import org.junit.jupiter.api.Assertions; + +public final class KubernetesVersionListResultTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + KubernetesVersionListResult model = BinaryData.fromString( + "{\"value\":[{\"properties\":{\"version\":\"hq\"},\"id\":\"gjxpybczmehmt\",\"name\":\"opb\",\"type\":\"phrupidgsybbejhp\"},{\"properties\":{\"version\":\"ycm\"},\"id\":\"ao\",\"name\":\"hdxbmtqio\",\"type\":\"jzehtb\"},{\"properties\":{\"version\":\"fpownoizhwlr\"},\"id\":\"bqsoqijg\",\"name\":\"dmbpazlobcufpdz\",\"type\":\"rbt\"}],\"nextLink\":\"qjnqglhqgnufoooj\"}") + .toObject(KubernetesVersionListResult.class); + Assertions.assertEquals("hq", model.value().get(0).properties().version()); + Assertions.assertEquals("qjnqglhqgnufoooj", model.nextLink()); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/KubernetesVersionPropertiesTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/KubernetesVersionPropertiesTests.java new file mode 100644 index 000000000000..a3e471f9c7c2 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/KubernetesVersionPropertiesTests.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.KubernetesVersionProperties; +import org.junit.jupiter.api.Assertions; + +public final class KubernetesVersionPropertiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + KubernetesVersionProperties model + = BinaryData.fromString("{\"version\":\"uajpsquc\"}").toObject(KubernetesVersionProperties.class); + Assertions.assertEquals("uajpsquc", model.version()); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/KubernetesVersionsListBySubscriptionLocationResourceMockTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/KubernetesVersionsListBySubscriptionLocationResourceMockTests.java new file mode 100644 index 000000000000..f90f126efd9f --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/KubernetesVersionsListBySubscriptionLocationResourceMockTests.java @@ -0,0 +1,39 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.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.KubernetesVersion; +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 KubernetesVersionsListBySubscriptionLocationResourceMockTests { + @Test + public void testListBySubscriptionLocationResource() throws Exception { + String responseStr + = "{\"value\":[{\"properties\":{\"version\":\"qg\"},\"id\":\"mqmiwxzfvvzu\",\"name\":\"qfgufjnbxw\",\"type\":\"mwdukinhl\"}]}"; + + 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.kubernetesVersions().listBySubscriptionLocationResource("pul", com.azure.core.util.Context.NONE); + + Assertions.assertEquals("qg", response.iterator().next().properties().version()); + } +} 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..b20a7f7eca60 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/LocalAvailabilityZonesTests.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.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\":\"ik\",\"nodes\":[\"gxk\",\"lla\",\"melwuipiccjz\",\"z\"]}") + .toObject(LocalAvailabilityZones.class); + Assertions.assertEquals("ik", model.localAvailabilityZoneName()); + Assertions.assertEquals("gxk", model.nodes().get(0)); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + LocalAvailabilityZones model = new LocalAvailabilityZones().withLocalAvailabilityZoneName("ik") + .withNodes(Arrays.asList("gxk", "lla", "melwuipiccjz", "z")); + model = BinaryData.fromObject(model).toObject(LocalAvailabilityZones.class); + Assertions.assertEquals("ik", model.localAvailabilityZoneName()); + Assertions.assertEquals("gxk", 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..351be20e35b4 --- /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\":\"vmqfoud\",\"endTime\":\"hcgyyprotwyp\",\"timeCollected\":\"d\",\"logSize\":1400929714,\"status\":\"Failed\",\"correlationId\":\"cmjkavlgorbmftpm\"}") + .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..fd80709a7c6d --- /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\":586405587,\"validationStatus\":{\"status\":\"kxhdjhlimmbcx\",\"steps\":[{\"name\":\"po\",\"description\":\"vxcjzhqizxfpxtgq\",\"fullStepIndex\":\"javftjuhdqa\",\"startTimeUtc\":\"mtggu\",\"endTimeUtc\":\"ijr\",\"status\":\"civmmg\",\"steps\":[{\"name\":\"iwrxgkn\",\"description\":\"vyi\",\"fullStepIndex\":\"qodfvp\",\"startTimeUtc\":\"hoxgsgbpf\",\"endTimeUtc\":\"djtxvzflbq\",\"status\":\"aqvlgafcqusr\",\"steps\":[{},{},{}],\"exception\":[\"wsdtutnwl\",\"uycvuzhyrmewip\",\"vekdxukuqgsjjxu\",\"dxgketwzhhzjhfj\"]}],\"exception\":[\"vmuvgpmu\"]},{\"name\":\"qsxvmhf\",\"description\":\"zjyi\",\"fullStepIndex\":\"as\",\"startTimeUtc\":\"udypohyuems\",\"endTimeUtc\":\"nsqyrpfoobrltt\",\"status\":\"sjnygqdnfwqzdzgt\",\"steps\":[{\"name\":\"hnfhqlyvijouwi\",\"description\":\"xoyzunbix\",\"fullStepIndex\":\"ti\",\"startTimeUtc\":\"cpwpg\",\"endTimeUtc\":\"rc\",\"status\":\"tso\",\"steps\":[{},{}],\"exception\":[\"nxpmyyefrpmpdnq\",\"skawaoqvmmb\",\"pqfrtqlkz\"]},{\"name\":\"gnitgvkxlzyq\",\"description\":\"fegcea\",\"fullStepIndex\":\"xwh\",\"startTimeUtc\":\"nsymoyqhlwigd\",\"endTimeUtc\":\"bkbxgomfa\",\"status\":\"wasqvdaeyyg\",\"steps\":[{},{}],\"exception\":[\"sqzhzbezkg\",\"msidxasicddyvv\",\"skgfmocwahpq\"]}],\"exception\":[\"jeaahhvjhh\",\"akz\",\"bbjjidjksyxk\"]},{\"name\":\"vxevblb\",\"description\":\"dnlj\",\"fullStepIndex\":\"geuaulx\",\"startTimeUtc\":\"smjbnkppxyn\",\"endTimeUtc\":\"lsvxeizz\",\"status\":\"klnsrmffey\",\"steps\":[{\"name\":\"tpiymerteea\",\"description\":\"xqiekkkzddrtk\",\"fullStepIndex\":\"ojbmxv\",\"startTimeUtc\":\"refdee\",\"endTimeUtc\":\"ecuijpxtxs\",\"status\":\"prtujwsawdd\",\"steps\":[{},{},{}],\"exception\":[\"xvititvtz\"]}],\"exception\":[\"avoxtfg\"]},{\"name\":\"cd\",\"description\":\"qbw\",\"fullStepIndex\":\"pqtgsfjac\",\"startTimeUtc\":\"lhhxudbxvodhtnsi\",\"endTimeUtc\":\"dhzmmesckdlp\",\"status\":\"zrcxfailcfxwmdbo\",\"steps\":[{\"name\":\"sftufqobrjlna\",\"description\":\"cc\",\"fullStepIndex\":\"nhxk\",\"startTimeUtc\":\"v\",\"endTimeUtc\":\"nrzvuljraaer\",\"status\":\"okqgukkjq\",\"steps\":[{},{}],\"exception\":[\"ylaxxulcdi\",\"dosfjbjsvgjrw\"]},{\"name\":\"yvycytdclxgcckn\",\"description\":\"wmbtmvpdvjdhtt\",\"fullStepIndex\":\"efedxihchrphkm\",\"startTimeUtc\":\"jdqnsdfzpbgt\",\"endTimeUtc\":\"ylkdghrje\",\"status\":\"tl\",\"steps\":[{}],\"exception\":[\"zhokvbwnhh\"]},{\"name\":\"lgehg\",\"description\":\"ipifhpfeoajvg\",\"fullStepIndex\":\"txjcsheafidlt\",\"startTimeUtc\":\"sr\",\"endTimeUtc\":\"mks\",\"status\":\"h\",\"steps\":[{},{}],\"exception\":[\"f\",\"fwegprhptillu\",\"biqtgdq\",\"hm\"]}],\"exception\":[\"ldrizetpwbra\",\"llibphbqzmizak\",\"kan\",\"jpdn\"]}]},\"deploymentStatus\":{\"status\":\"ajoylhjl\",\"steps\":[{\"name\":\"xprimrsop\",\"description\":\"ecj\",\"fullStepIndex\":\"islstv\",\"startTimeUtc\":\"ylw\",\"endTimeUtc\":\"zaum\",\"status\":\"oohgu\",\"steps\":[{\"name\":\"boyjathwt\",\"description\":\"lbaemwmdxmeb\",\"fullStepIndex\":\"scjpahlxv\",\"startTimeUtc\":\"bfqxnmwmqtibxyi\",\"endTimeUtc\":\"dt\",\"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\"]}],\"exception\":[\"cxjmonfdgnwncyp\",\"uwwltvuqjctz\"]},{\"name\":\"keifzzhmkdasv\",\"description\":\"yhbxcudchxgs\",\"fullStepIndex\":\"oldforobw\",\"startTimeUtc\":\"vizbfhfo\",\"endTimeUtc\":\"acqpbtuodxesza\",\"status\":\"elawumu\",\"steps\":[{\"name\":\"kwrrwo\",\"description\":\"qucwyhahnom\",\"fullStepIndex\":\"kywuhpsvfuu\",\"startTimeUtc\":\"tlwexxwlalniexz\",\"endTimeUtc\":\"zpgepqty\",\"status\":\"wwpgdakchzyvlixq\",\"steps\":[{}],\"exception\":[\"kjibnxmysuxswqrn\",\"vl\",\"ijpstte\"]},{\"name\":\"qqpwcyyuf\",\"description\":\"runcuwmqspkcd\",\"fullStepIndex\":\"hlctddunqn\",\"startTimeUtc\":\"fpch\",\"endTimeUtc\":\"bnjj\",\"status\":\"gegydcwboxjum\",\"steps\":[{}],\"exception\":[\"ihrraiouaub\",\"jtlo\",\"xfuojrn\",\"iflrzpasccbiu\"]},{\"name\":\"zdlyjdfqw\",\"description\":\"yoqufdvruz\",\"fullStepIndex\":\"zojhpctfnmd\",\"startTimeUtc\":\"tngfdgugeyzihgr\",\"endTimeUtc\":\"ui\",\"status\":\"bsnmfpph\",\"steps\":[{}],\"exception\":[\"yhyhsgzfczb\",\"omfgbeglqgleohib\",\"tnluankrr\"]}],\"exception\":[\"eebtijvacvb\",\"qzbqqxlajrnwxa\",\"evehjkuyxoaf\"]}]},\"logCollectionSessionDetails\":[{\"startTime\":\"lt\",\"endTime\":\"eyl\",\"timeCollected\":\"mfgvxirpghriypo\",\"logSize\":1656883941,\"status\":\"Running\",\"correlationId\":\"h\"},{\"startTime\":\"prlpy\",\"endTime\":\"uciqdsme\",\"timeCollected\":\"itdfuxtyasiib\",\"logSize\":2086565224,\"status\":\"Canceled\",\"correlationId\":\"ustgnljhnmgixhc\"}]}") + .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..16ddceab88be 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-03-24T00:12:01Z\",\"toDate\":\"2021-08-02T01:55:50Z\"}") .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-03-24T00:12:01Z"), model.fromDate()); + Assertions.assertEquals(OffsetDateTime.parse("2021-08-02T01:55:50Z"), 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-03-24T00:12:01Z")) + .withToDate(OffsetDateTime.parse("2021-08-02T01:55:50Z")); 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-03-24T00:12:01Z"), model.fromDate()); + Assertions.assertEquals(OffsetDateTime.parse("2021-08-02T01:55:50Z"), 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..7fa5f3a79d30 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-03-28T14:55:38Z\",\"toDate\":\"2021-05-14T08:26:24Z\"}}") .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-03-28T14:55:38Z"), model.properties().fromDate()); + Assertions.assertEquals(OffsetDateTime.parse("2021-05-14T08:26:24Z"), 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-03-28T14:55:38Z")) + .withToDate(OffsetDateTime.parse("2021-05-14T08:26:24Z"))); 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-03-28T14:55:38Z"), model.properties().fromDate()); + Assertions.assertEquals(OffsetDateTime.parse("2021-05-14T08:26:24Z"), 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..03f6c428b87b 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,19 +16,18 @@ 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\":\"gvvcnayrhyr\",\"tenantId\":\"xmueed\",\"type\":\"None\",\"userAssignedIdentities\":{\"dvwvgpio\":{\"principalId\":\"stkwqqtch\",\"clientId\":\"lmfmtdaay\"},\"gvr\":{\"principalId\":\"wxrt\",\"clientId\":\"dxepxgyq\"}}}") .toObject(ManagedServiceIdentity.class); - Assertions.assertEquals(ManagedServiceIdentityType.SYSTEM_ASSIGNED_USER_ASSIGNED, model.type()); + Assertions.assertEquals(ManagedServiceIdentityType.NONE, model.type()); } @org.junit.jupiter.api.Test 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())); + ManagedServiceIdentity model = new ManagedServiceIdentity().withType(ManagedServiceIdentityType.NONE) + .withUserAssignedIdentities( + mapOf("dvwvgpio", new UserAssignedIdentity(), "gvr", new UserAssignedIdentity())); model = BinaryData.fromObject(model).toObject(ManagedServiceIdentity.class); - Assertions.assertEquals(ManagedServiceIdentityType.SYSTEM_ASSIGNED_USER_ASSIGNED, model.type()); + Assertions.assertEquals(ManagedServiceIdentityType.NONE, model.type()); } // Use "Map.of" if available diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/NetworkAdapterTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/NetworkAdapterTests.java new file mode 100644 index 000000000000..5e8d9fd02d45 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/NetworkAdapterTests.java @@ -0,0 +1,55 @@ +// 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.IpAddressRange; +import com.azure.resourcemanager.azurestackhci.models.IpAssignmentType; +import com.azure.resourcemanager.azurestackhci.models.NetworkAdapter; +import java.util.Arrays; +import org.junit.jupiter.api.Assertions; + +public final class NetworkAdapterTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + NetworkAdapter model = BinaryData.fromString( + "{\"ipAssignmentType\":\"Manual\",\"ipAddress\":\"udgjtfb\",\"adapterName\":\"akkuc\",\"macAddress\":\"wnhczbutou\",\"ipAddressRange\":{\"startIp\":\"jtirjwayhicqq\",\"endIp\":\"wvgwkslvli\"},\"gateway\":\"dvbiabvnsrg\",\"subnetMask\":\"zyqxadyfhbmwkh\",\"dnsAddressArray\":[\"ttbspvkh\",\"laqjsgyzstujrzx\",\"kn\"],\"vlanId\":\"d\"}") + .toObject(NetworkAdapter.class); + Assertions.assertEquals(IpAssignmentType.MANUAL, model.ipAssignmentType()); + Assertions.assertEquals("udgjtfb", model.ipAddress()); + Assertions.assertEquals("akkuc", model.adapterName()); + Assertions.assertEquals("wnhczbutou", model.macAddress()); + Assertions.assertEquals("jtirjwayhicqq", model.ipAddressRange().startIp()); + Assertions.assertEquals("wvgwkslvli", model.ipAddressRange().endIp()); + Assertions.assertEquals("dvbiabvnsrg", model.gateway()); + Assertions.assertEquals("zyqxadyfhbmwkh", model.subnetMask()); + Assertions.assertEquals("ttbspvkh", model.dnsAddressArray().get(0)); + Assertions.assertEquals("d", model.vlanId()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + NetworkAdapter model = new NetworkAdapter().withIpAssignmentType(IpAssignmentType.MANUAL) + .withIpAddress("udgjtfb") + .withAdapterName("akkuc") + .withMacAddress("wnhczbutou") + .withIpAddressRange(new IpAddressRange().withStartIp("jtirjwayhicqq").withEndIp("wvgwkslvli")) + .withGateway("dvbiabvnsrg") + .withSubnetMask("zyqxadyfhbmwkh") + .withDnsAddressArray(Arrays.asList("ttbspvkh", "laqjsgyzstujrzx", "kn")) + .withVlanId("d"); + model = BinaryData.fromObject(model).toObject(NetworkAdapter.class); + Assertions.assertEquals(IpAssignmentType.MANUAL, model.ipAssignmentType()); + Assertions.assertEquals("udgjtfb", model.ipAddress()); + Assertions.assertEquals("akkuc", model.adapterName()); + Assertions.assertEquals("wnhczbutou", model.macAddress()); + Assertions.assertEquals("jtirjwayhicqq", model.ipAddressRange().startIp()); + Assertions.assertEquals("wvgwkslvli", model.ipAddressRange().endIp()); + Assertions.assertEquals("dvbiabvnsrg", model.gateway()); + Assertions.assertEquals("zyqxadyfhbmwkh", model.subnetMask()); + Assertions.assertEquals("ttbspvkh", model.dnsAddressArray().get(0)); + Assertions.assertEquals("d", model.vlanId()); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/NetworkConfigurationTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/NetworkConfigurationTests.java new file mode 100644 index 000000000000..4214d2bf540d --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/NetworkConfigurationTests.java @@ -0,0 +1,75 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.azurestackhci.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.azurestackhci.models.IpAddressRange; +import com.azure.resourcemanager.azurestackhci.models.IpAssignmentType; +import com.azure.resourcemanager.azurestackhci.models.NetworkAdapter; +import com.azure.resourcemanager.azurestackhci.models.NetworkConfiguration; +import java.util.Arrays; +import org.junit.jupiter.api.Assertions; + +public final class NetworkConfigurationTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + NetworkConfiguration model = BinaryData.fromString( + "{\"networkAdapters\":[{\"ipAssignmentType\":\"Automatic\",\"ipAddress\":\"ngygnhrko\",\"adapterName\":\"cdtajdopggorw\",\"macAddress\":\"qtrotpvclp\",\"ipAddressRange\":{\"startIp\":\"yrlmwkptsk\",\"endIp\":\"xjgvh\"},\"gateway\":\"cbmkakmkookbp\",\"subnetMask\":\"mgvmuy\",\"dnsAddressArray\":[\"lwk\",\"fowzkroyr\"],\"vlanId\":\"r\"},{\"ipAssignmentType\":\"Manual\",\"ipAddress\":\"zqjim\",\"adapterName\":\"tgz\",\"macAddress\":\"xlfejlzuqloiwya\",\"ipAddressRange\":{\"startIp\":\"zivrmit\",\"endIp\":\"dql\"},\"gateway\":\"hwhrktj\",\"subnetMask\":\"ifibfiplhxfns\",\"dnsAddressArray\":[\"jow\",\"yeyzm\",\"dsqcmhnxl\"],\"vlanId\":\"uwod\"},{\"ipAssignmentType\":\"Automatic\",\"ipAddress\":\"hbkvn\",\"adapterName\":\"bjrmvgo\",\"macAddress\":\"lehmum\",\"ipAddressRange\":{\"startIp\":\"dllc\",\"endIp\":\"dpr\"},\"gateway\":\"hkgqggoxsst\",\"subnetMask\":\"vrak\",\"dnsAddressArray\":[\"ynjcwmhlymgnukxr\"],\"vlanId\":\"mjpequlr\"}]}") + .toObject(NetworkConfiguration.class); + Assertions.assertEquals(IpAssignmentType.AUTOMATIC, model.networkAdapters().get(0).ipAssignmentType()); + Assertions.assertEquals("ngygnhrko", model.networkAdapters().get(0).ipAddress()); + Assertions.assertEquals("cdtajdopggorw", model.networkAdapters().get(0).adapterName()); + Assertions.assertEquals("qtrotpvclp", model.networkAdapters().get(0).macAddress()); + Assertions.assertEquals("yrlmwkptsk", model.networkAdapters().get(0).ipAddressRange().startIp()); + Assertions.assertEquals("xjgvh", model.networkAdapters().get(0).ipAddressRange().endIp()); + Assertions.assertEquals("cbmkakmkookbp", model.networkAdapters().get(0).gateway()); + Assertions.assertEquals("mgvmuy", model.networkAdapters().get(0).subnetMask()); + Assertions.assertEquals("lwk", model.networkAdapters().get(0).dnsAddressArray().get(0)); + Assertions.assertEquals("r", model.networkAdapters().get(0).vlanId()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + NetworkConfiguration model = new NetworkConfiguration().withNetworkAdapters(Arrays.asList( + new NetworkAdapter().withIpAssignmentType(IpAssignmentType.AUTOMATIC) + .withIpAddress("ngygnhrko") + .withAdapterName("cdtajdopggorw") + .withMacAddress("qtrotpvclp") + .withIpAddressRange(new IpAddressRange().withStartIp("yrlmwkptsk").withEndIp("xjgvh")) + .withGateway("cbmkakmkookbp") + .withSubnetMask("mgvmuy") + .withDnsAddressArray(Arrays.asList("lwk", "fowzkroyr")) + .withVlanId("r"), + new NetworkAdapter().withIpAssignmentType(IpAssignmentType.MANUAL) + .withIpAddress("zqjim") + .withAdapterName("tgz") + .withMacAddress("xlfejlzuqloiwya") + .withIpAddressRange(new IpAddressRange().withStartIp("zivrmit").withEndIp("dql")) + .withGateway("hwhrktj") + .withSubnetMask("ifibfiplhxfns") + .withDnsAddressArray(Arrays.asList("jow", "yeyzm", "dsqcmhnxl")) + .withVlanId("uwod"), + new NetworkAdapter().withIpAssignmentType(IpAssignmentType.AUTOMATIC) + .withIpAddress("hbkvn") + .withAdapterName("bjrmvgo") + .withMacAddress("lehmum") + .withIpAddressRange(new IpAddressRange().withStartIp("dllc").withEndIp("dpr")) + .withGateway("hkgqggoxsst") + .withSubnetMask("vrak") + .withDnsAddressArray(Arrays.asList("ynjcwmhlymgnukxr")) + .withVlanId("mjpequlr"))); + model = BinaryData.fromObject(model).toObject(NetworkConfiguration.class); + Assertions.assertEquals(IpAssignmentType.AUTOMATIC, model.networkAdapters().get(0).ipAssignmentType()); + Assertions.assertEquals("ngygnhrko", model.networkAdapters().get(0).ipAddress()); + Assertions.assertEquals("cdtajdopggorw", model.networkAdapters().get(0).adapterName()); + Assertions.assertEquals("qtrotpvclp", model.networkAdapters().get(0).macAddress()); + Assertions.assertEquals("yrlmwkptsk", model.networkAdapters().get(0).ipAddressRange().startIp()); + Assertions.assertEquals("xjgvh", model.networkAdapters().get(0).ipAddressRange().endIp()); + Assertions.assertEquals("cbmkakmkookbp", model.networkAdapters().get(0).gateway()); + Assertions.assertEquals("mgvmuy", model.networkAdapters().get(0).subnetMask()); + Assertions.assertEquals("lwk", model.networkAdapters().get(0).dnsAddressArray().get(0)); + Assertions.assertEquals("r", model.networkAdapters().get(0).vlanId()); + } +} 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..bb2e8008b6c4 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\":\"hftwesgog\",\"macAddressPoolStop\":\"honnxkrlgnyhmos\",\"networkVirtualizationEnabled\":false}") .toObject(NetworkController.class); - Assertions.assertEquals("fv", model.macAddressPoolStart()); - Assertions.assertEquals("fy", model.macAddressPoolStop()); - Assertions.assertEquals(false, model.networkVirtualizationEnabled()); + Assertions.assertEquals("hftwesgog", model.macAddressPoolStart()); + Assertions.assertEquals("honnxkrlgnyhmos", 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("hftwesgog") + .withMacAddressPoolStop("honnxkrlgnyhmos") .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("hftwesgog", model.macAddressPoolStart()); + Assertions.assertEquals("honnxkrlgnyhmos", 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..8eb958abb3a1 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\":\"rrueqthwmg\",\"interfaceDescription\":\"b\",\"componentId\":\"bbxi\",\"driverVersion\":\"hxiidlopedb\",\"ip4Address\":\"pyqy\",\"subnetMask\":\"xubmdnafcbqw\",\"defaultGateway\":\"mjel\",\"dnsServers\":[\"cigeleohdbvqvw\",\"kjopwbeon\"],\"defaultIsolationId\":\"kwzdqybxcea\"}") .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("rrueqthwmg", model.adapterName()); + Assertions.assertEquals("b", model.interfaceDescription()); + Assertions.assertEquals("bbxi", model.componentId()); + Assertions.assertEquals("hxiidlopedb", model.driverVersion()); + Assertions.assertEquals("pyqy", model.ip4Address()); + Assertions.assertEquals("xubmdnafcbqw", model.subnetMask()); + Assertions.assertEquals("mjel", model.defaultGateway()); + Assertions.assertEquals("cigeleohdbvqvw", model.dnsServers().get(0)); + Assertions.assertEquals("kwzdqybxcea", 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("rrueqthwmg") + .withInterfaceDescription("b") + .withComponentId("bbxi") + .withDriverVersion("hxiidlopedb") + .withIp4Address("pyqy") + .withSubnetMask("xubmdnafcbqw") + .withDefaultGateway("mjel") + .withDnsServers(Arrays.asList("cigeleohdbvqvw", "kjopwbeon")) + .withDefaultIsolationId("kwzdqybxcea"); 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("rrueqthwmg", model.adapterName()); + Assertions.assertEquals("b", model.interfaceDescription()); + Assertions.assertEquals("bbxi", model.componentId()); + Assertions.assertEquals("hxiidlopedb", model.driverVersion()); + Assertions.assertEquals("pyqy", model.ip4Address()); + Assertions.assertEquals("xubmdnafcbqw", model.subnetMask()); + Assertions.assertEquals("mjel", model.defaultGateway()); + Assertions.assertEquals("cigeleohdbvqvw", model.dnsServers().get(0)); + Assertions.assertEquals("kwzdqybxcea", 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..580c2704e2fc 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\":true,\"euLocation\":false,\"episodicDataUpload\":false}") .toObject(Observability.class); - Assertions.assertEquals(false, model.streamingDataClient()); - Assertions.assertEquals(true, model.euLocation()); - Assertions.assertEquals(true, model.episodicDataUpload()); + Assertions.assertTrue(model.streamingDataClient()); + Assertions.assertFalse(model.euLocation()); + Assertions.assertFalse(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(true).withEuLocation(false).withEpisodicDataUpload(false); model = BinaryData.fromObject(model).toObject(Observability.class); - Assertions.assertEquals(false, model.streamingDataClient()); - Assertions.assertEquals(true, model.euLocation()); - Assertions.assertEquals(true, model.episodicDataUpload()); + Assertions.assertTrue(model.streamingDataClient()); + Assertions.assertFalse(model.euLocation()); + Assertions.assertFalse(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..2b793c2d0dee 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\":\"btn\",\"publisherId\":\"iebwwaloayqcgwrt\",\"content\":\"uzgwyzmhtx\",\"contentVersion\":\"gmtsavjcbpwxqpsr\",\"skuMappings\":[{\"catalogPlanId\":\"guvriuhprwmd\",\"marketplaceSkuId\":\"xqtayriwwro\",\"marketplaceSkuVersions\":[\"exrmcqibycnojvk\",\"mefqsgzvahapjyzh\"]},{\"catalogPlanId\":\"gqzcjr\",\"marketplaceSkuId\":\"djzlmwlx\",\"marketplaceSkuVersions\":[\"gfhzovawjvzunlut\"]}]},\"id\":\"n\",\"name\":\"rnxipei\",\"type\":\"pjzu\"}") .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("iebwwaloayqcgwrt", model.publisherId()); + Assertions.assertEquals("uzgwyzmhtx", model.content()); + Assertions.assertEquals("gmtsavjcbpwxqpsr", model.contentVersion()); + Assertions.assertEquals("guvriuhprwmd", model.skuMappings().get(0).catalogPlanId()); + Assertions.assertEquals("xqtayriwwro", model.skuMappings().get(0).marketplaceSkuId()); + Assertions.assertEquals("exrmcqibycnojvk", 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..696e15a6c5c7 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\":\"ztfolhbnxk\",\"publisherId\":\"laulppg\",\"content\":\"tpnapnyiropuhpig\",\"contentVersion\":\"gylgqgitxmedjvcs\",\"skuMappings\":[{\"catalogPlanId\":\"wwncwzzhxgk\",\"marketplaceSkuId\":\"mgucna\",\"marketplaceSkuVersions\":[\"eoellwptfdygp\"]}]},\"id\":\"b\",\"name\":\"ac\",\"type\":\"op\"},{\"properties\":{\"provisioningState\":\"rhhuaopppcqeqx\",\"publisherId\":\"z\",\"content\":\"hzxct\",\"contentVersion\":\"gbkdmoizpos\",\"skuMappings\":[{\"catalogPlanId\":\"cfbu\",\"marketplaceSkuId\":\"mfqjhhkxbp\",\"marketplaceSkuVersions\":[\"mjh\",\"xjyngudivk\",\"tswb\",\"qzvszjf\"]},{\"catalogPlanId\":\"vjfdx\",\"marketplaceSkuId\":\"vetvt\",\"marketplaceSkuVersions\":[\"qtdo\",\"mcbxvwvxysl\",\"bhsfxob\"]}]},\"id\":\"tkblmpewww\",\"name\":\"bkrvrnsvshqj\",\"type\":\"hxcr\"}],\"nextLink\":\"fovasr\"}") .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("laulppg", model.value().get(0).publisherId()); + Assertions.assertEquals("tpnapnyiropuhpig", model.value().get(0).content()); + Assertions.assertEquals("gylgqgitxmedjvcs", model.value().get(0).contentVersion()); + Assertions.assertEquals("wwncwzzhxgk", model.value().get(0).skuMappings().get(0).catalogPlanId()); + Assertions.assertEquals("mgucna", model.value().get(0).skuMappings().get(0).marketplaceSkuId()); + Assertions.assertEquals("eoellwptfdygp", + model.value().get(0).skuMappings().get(0).marketplaceSkuVersions().get(0)); + Assertions.assertEquals("fovasr", 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..b838f7ed0941 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\":\"jxdultskzbbtdzu\",\"publisherId\":\"e\",\"content\":\"gpw\",\"contentVersion\":\"uh\",\"skuMappings\":[{\"catalogPlanId\":\"sjyofdx\",\"marketplaceSkuId\":\"us\",\"marketplaceSkuVersions\":[\"ouwaboekqvkeln\",\"mvb\",\"wyjsflhhcaalnjix\"]}]}") .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("e", model.publisherId()); + Assertions.assertEquals("gpw", model.content()); + Assertions.assertEquals("uh", model.contentVersion()); + Assertions.assertEquals("sjyofdx", model.skuMappings().get(0).catalogPlanId()); + Assertions.assertEquals("us", model.skuMappings().get(0).marketplaceSkuId()); + Assertions.assertEquals("ouwaboekqvkeln", 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..9729328d0df9 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\":\"njtqbg\",\"publisherId\":\"ibt\",\"content\":\"vxw\",\"contentVersion\":\"qtcbjd\",\"skuMappings\":[{\"catalogPlanId\":\"hkxunsaujqgbb\",\"marketplaceSkuId\":\"ovoawhgjs\",\"marketplaceSkuVersions\":[\"sloygsa\",\"d\",\"d\"]}]},\"id\":\"ronsdunr\",\"name\":\"zvzuat\",\"type\":\"hgzuyxtrvf\"}"; 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("wbekmu", "nfpkyvnhiys", "horkslhraqk", "wlwkfflaqwmwqog", "flteatnegef", 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("ibt", response.publisherId()); + Assertions.assertEquals("vxw", response.content()); + Assertions.assertEquals("qtcbjd", response.contentVersion()); + Assertions.assertEquals("hkxunsaujqgbb", response.skuMappings().get(0).catalogPlanId()); + Assertions.assertEquals("ovoawhgjs", response.skuMappings().get(0).marketplaceSkuId()); + Assertions.assertEquals("sloygsa", 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..c5d445f14bac 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\":\"swhpcek\",\"publisherId\":\"vmfnnbbxn\",\"content\":\"fkk\",\"contentVersion\":\"eetxtpwcv\",\"skuMappings\":[{\"catalogPlanId\":\"sunjzijaciwmm\",\"marketplaceSkuId\":\"tqdonbzzs\",\"marketplaceSkuVersions\":[\"yviiws\",\"anzhwsy\"]},{\"catalogPlanId\":\"fk\",\"marketplaceSkuId\":\"qhbtfloil\",\"marketplaceSkuVersions\":[\"beoiip\"]},{\"catalogPlanId\":\"ngvyvuoik\",\"marketplaceSkuId\":\"psxntugfwi\",\"marketplaceSkuVersions\":[\"ryclo\"]},{\"catalogPlanId\":\"mvswxvjeleif\",\"marketplaceSkuId\":\"d\",\"marketplaceSkuVersions\":[\"wulkr\",\"bpaevy\",\"byjecrq\",\"wakkchsfo\"]}]},\"id\":\"borcx\",\"name\":\"ibsdqbdyblpe\",\"type\":\"t\"}]}"; 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); + = manager.offers().listByCluster("bgcjoyutehlkar", "tipquks", "iknsgo", 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("vmfnnbbxn", response.iterator().next().publisherId()); + Assertions.assertEquals("fkk", response.iterator().next().content()); + Assertions.assertEquals("eetxtpwcv", response.iterator().next().contentVersion()); + Assertions.assertEquals("sunjzijaciwmm", response.iterator().next().skuMappings().get(0).catalogPlanId()); + Assertions.assertEquals("tqdonbzzs", response.iterator().next().skuMappings().get(0).marketplaceSkuId()); + Assertions.assertEquals("yviiws", 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..6e9aea240584 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,24 @@ 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\":\"tmggcpdrmegajr\",\"publisherId\":\"twymzs\",\"content\":\"qkkge\",\"contentVersion\":\"iphgli\",\"skuMappings\":[{\"catalogPlanId\":\"coobkjlcaxsqcomj\",\"marketplaceSkuId\":\"i\",\"marketplaceSkuVersions\":[\"evxxkdevpximzii\",\"meqmduvtvodqxxpq\",\"ml\",\"ibtblmcvrjazno\"]}]},\"id\":\"ofqvpbqsdq\",\"name\":\"psbqsbbmitaftaz\",\"type\":\"cxsvqlcqufylamxo\"}]}"; 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("bqskgqjbvitptpvs", "favdhpiwrm", "wkgjwb", "fdwfbwxy", 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", + Assertions.assertEquals("twymzs", response.iterator().next().publisherId()); + Assertions.assertEquals("qkkge", response.iterator().next().content()); + Assertions.assertEquals("iphgli", response.iterator().next().contentVersion()); + Assertions.assertEquals("coobkjlcaxsqcomj", response.iterator().next().skuMappings().get(0).catalogPlanId()); + Assertions.assertEquals("i", response.iterator().next().skuMappings().get(0).marketplaceSkuId()); + Assertions.assertEquals("evxxkdevpximzii", 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/OnboardingConfigurationTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/OnboardingConfigurationTests.java new file mode 100644 index 000000000000..87fa08650d3d --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/OnboardingConfigurationTests.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.OnboardingConfiguration; +import com.azure.resourcemanager.azurestackhci.models.OnboardingResourceType; +import org.junit.jupiter.api.Assertions; + +public final class OnboardingConfigurationTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + OnboardingConfiguration model = BinaryData.fromString( + "{\"type\":\"HybridComputeMachine\",\"resourceId\":\"gusxxhdod\",\"location\":\"wyblv\",\"tenantId\":\"d\",\"arcVirtualMachineId\":\"sbyidaelqpv\"}") + .toObject(OnboardingConfiguration.class); + Assertions.assertEquals(OnboardingResourceType.HYBRID_COMPUTE_MACHINE, model.type()); + Assertions.assertEquals("gusxxhdod", model.resourceId()); + Assertions.assertEquals("wyblv", model.location()); + Assertions.assertEquals("d", model.tenantId()); + Assertions.assertEquals("sbyidaelqpv", model.arcVirtualMachineId()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + OnboardingConfiguration model + = new OnboardingConfiguration().withType(OnboardingResourceType.HYBRID_COMPUTE_MACHINE) + .withResourceId("gusxxhdod") + .withLocation("wyblv") + .withTenantId("d") + .withArcVirtualMachineId("sbyidaelqpv"); + model = BinaryData.fromObject(model).toObject(OnboardingConfiguration.class); + Assertions.assertEquals(OnboardingResourceType.HYBRID_COMPUTE_MACHINE, model.type()); + Assertions.assertEquals("gusxxhdod", model.resourceId()); + Assertions.assertEquals("wyblv", model.location()); + Assertions.assertEquals("d", model.tenantId()); + Assertions.assertEquals("sbyidaelqpv", model.arcVirtualMachineId()); + } +} 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..f262d03cc235 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; @@ -10,14 +10,9 @@ 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\"}") + OperationDisplay model = BinaryData + .fromString( + "{\"provider\":\"tttxfvjrb\",\"resource\":\"phxepcyvahf\",\"operation\":\"jky\",\"description\":\"j\"}") .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..e00930aa7575 --- /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\":\"zpwv\",\"isDataAction\":true,\"display\":{\"provider\":\"biqylihkaet\",\"resource\":\"tvfcivfsn\",\"operation\":\"m\",\"description\":\"tqhjfbebrjcx\"},\"origin\":\"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..2eef05d42fcd --- /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\":\"rywn\",\"isDataAction\":true,\"display\":{\"provider\":\"tiyqzrnkcqv\",\"resource\":\"lwh\",\"operation\":\"sicohoqqnwvlry\",\"description\":\"w\"},\"origin\":\"system\",\"actionType\":\"Internal\"},{\"name\":\"mqhgyxzkonocuk\",\"isDataAction\":false,\"display\":{\"provider\":\"xuconu\",\"resource\":\"zf\",\"operation\":\"eyp\",\"description\":\"rmjmwvvjektc\"},\"origin\":\"user\",\"actionType\":\"Internal\"}],\"nextLink\":\"lrsf\"}") + .toObject(OperationListResult.class); + Assertions.assertEquals("lrsf", 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/OperationsListMockTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/OperationsListMockTests.java new file mode 100644 index 000000000000..7ee495754abc --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/OperationsListMockTests.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.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.Operation; +import java.nio.charset.StandardCharsets; +import java.time.OffsetDateTime; +import org.junit.jupiter.api.Test; +import reactor.core.publisher.Mono; + +public final class OperationsListMockTests { + @Test + public void testList() throws Exception { + String responseStr + = "{\"value\":[{\"name\":\"cr\",\"isDataAction\":false,\"display\":{\"provider\":\"trnighm\",\"resource\":\"uwqxungrobgw\",\"operation\":\"sxjwdy\",\"description\":\"xmvzjow\"},\"origin\":\"user,system\",\"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("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); + + 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..b19f8299ced5 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; @@ -11,15 +11,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()); + OptionalServices model = BinaryData.fromString("{\"customLocation\":\"cx\"}").toObject(OptionalServices.class); + Assertions.assertEquals("cx", model.customLocation()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - OptionalServices model = new OptionalServices().withCustomLocation("fouyf"); + OptionalServices model = new OptionalServices().withCustomLocation("cx"); model = BinaryData.fromObject(model).toObject(OptionalServices.class); - Assertions.assertEquals("fouyf", model.customLocation()); + Assertions.assertEquals("cx", model.customLocation()); } } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/OsImageInnerTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/OsImageInnerTests.java new file mode 100644 index 000000000000..cabd9a1a1af8 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/OsImageInnerTests.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.fluent.models.OsImageInner; +import org.junit.jupiter.api.Assertions; + +public final class OsImageInnerTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + OsImageInner model = BinaryData.fromString( + "{\"properties\":{\"validatedSolutionRecipeVersion\":\"fqpte\",\"composedImageVersion\":\"zzvypyqrimzinp\",\"composedImageIsoUrl\":\"wjdk\",\"composedImageIsoHash\":\"soodqxhcrmnoh\"},\"id\":\"ckwhds\",\"name\":\"ifiyipjxsqwpgrj\",\"type\":\"znorcj\"}") + .toObject(OsImageInner.class); + Assertions.assertEquals("fqpte", model.properties().validatedSolutionRecipeVersion()); + Assertions.assertEquals("zzvypyqrimzinp", model.properties().composedImageVersion()); + Assertions.assertEquals("wjdk", model.properties().composedImageIsoUrl()); + Assertions.assertEquals("soodqxhcrmnoh", model.properties().composedImageIsoHash()); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/OsImageListResultTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/OsImageListResultTests.java new file mode 100644 index 000000000000..e1762c9841c7 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/OsImageListResultTests.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.implementation.models.OsImageListResult; +import org.junit.jupiter.api.Assertions; + +public final class OsImageListResultTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + OsImageListResult model = BinaryData.fromString( + "{\"value\":[{\"properties\":{\"validatedSolutionRecipeVersion\":\"pbtoqcjmkl\",\"composedImageVersion\":\"vbqid\",\"composedImageIsoUrl\":\"ajzyul\",\"composedImageIsoHash\":\"u\"},\"id\":\"krlkhbzhfepg\",\"name\":\"gqexzlocxs\",\"type\":\"paierh\"},{\"properties\":{\"validatedSolutionRecipeVersion\":\"sglumma\",\"composedImageVersion\":\"j\",\"composedImageIsoUrl\":\"dxob\",\"composedImageIsoHash\":\"dxkqpx\"},\"id\":\"ajionpimexgstxg\",\"name\":\"po\",\"type\":\"gmaajrm\"}],\"nextLink\":\"jwzrl\"}") + .toObject(OsImageListResult.class); + Assertions.assertEquals("pbtoqcjmkl", model.value().get(0).properties().validatedSolutionRecipeVersion()); + Assertions.assertEquals("vbqid", model.value().get(0).properties().composedImageVersion()); + Assertions.assertEquals("ajzyul", model.value().get(0).properties().composedImageIsoUrl()); + Assertions.assertEquals("u", model.value().get(0).properties().composedImageIsoHash()); + Assertions.assertEquals("jwzrl", model.nextLink()); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/OsImagePropertiesTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/OsImagePropertiesTests.java new file mode 100644 index 000000000000..7769a69f2f8a --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/OsImagePropertiesTests.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.OsImageProperties; +import org.junit.jupiter.api.Assertions; + +public final class OsImagePropertiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + OsImageProperties model = BinaryData.fromString( + "{\"validatedSolutionRecipeVersion\":\"snb\",\"composedImageVersion\":\"qabnmoc\",\"composedImageIsoUrl\":\"ysh\",\"composedImageIsoHash\":\"zafb\"}") + .toObject(OsImageProperties.class); + Assertions.assertEquals("snb", model.validatedSolutionRecipeVersion()); + Assertions.assertEquals("qabnmoc", model.composedImageVersion()); + Assertions.assertEquals("ysh", model.composedImageIsoUrl()); + Assertions.assertEquals("zafb", model.composedImageIsoHash()); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/OsImagesGetWithResponseMockTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/OsImagesGetWithResponseMockTests.java new file mode 100644 index 000000000000..29855d4b9895 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/OsImagesGetWithResponseMockTests.java @@ -0,0 +1,41 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.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.OsImage; +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 OsImagesGetWithResponseMockTests { + @Test + public void testGetWithResponse() throws Exception { + String responseStr + = "{\"properties\":{\"validatedSolutionRecipeVersion\":\"vjztaflvsmfj\",\"composedImageVersion\":\"vfjcqrttjfuqm\",\"composedImageIsoUrl\":\"j\",\"composedImageIsoHash\":\"feqb\"},\"id\":\"dostwygufmwe\",\"name\":\"vxgwz\",\"type\":\"kwdtlcj\"}"; + + 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)); + + OsImage response + = manager.osImages().getWithResponse("on", "zpghlrdtbgblxbu", com.azure.core.util.Context.NONE).getValue(); + + Assertions.assertEquals("vjztaflvsmfj", response.properties().validatedSolutionRecipeVersion()); + Assertions.assertEquals("vfjcqrttjfuqm", response.properties().composedImageVersion()); + Assertions.assertEquals("j", response.properties().composedImageIsoUrl()); + Assertions.assertEquals("feqb", response.properties().composedImageIsoHash()); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/OsImagesListBySubscriptionLocationResourceMockTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/OsImagesListBySubscriptionLocationResourceMockTests.java new file mode 100644 index 000000000000..6414c37e7e86 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/OsImagesListBySubscriptionLocationResourceMockTests.java @@ -0,0 +1,43 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.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.OsImage; +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 OsImagesListBySubscriptionLocationResourceMockTests { + @Test + public void testListBySubscriptionLocationResource() throws Exception { + String responseStr + = "{\"value\":[{\"properties\":{\"validatedSolutionRecipeVersion\":\"zvzrbvgwxhlx\",\"composedImageVersion\":\"xvmdr\",\"composedImageIsoUrl\":\"n\",\"composedImageIsoHash\":\"ovazoymdvhhpl\"},\"id\":\"wwd\",\"name\":\"atveqm\",\"type\":\"k\"}]}"; + + 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.osImages().listBySubscriptionLocationResource("p", com.azure.core.util.Context.NONE); + + Assertions.assertEquals("zvzrbvgwxhlx", + response.iterator().next().properties().validatedSolutionRecipeVersion()); + Assertions.assertEquals("xvmdr", response.iterator().next().properties().composedImageVersion()); + Assertions.assertEquals("n", response.iterator().next().properties().composedImageIsoUrl()); + Assertions.assertEquals("ovazoymdvhhpl", response.iterator().next().properties().composedImageIsoHash()); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/OsProfileTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/OsProfileTests.java new file mode 100644 index 000000000000..df9141280562 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/OsProfileTests.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.OsProfile; + +public final class OsProfileTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + OsProfile model = BinaryData.fromString( + "{\"bootType\":\"etamfddrvlkpzwb\",\"assemblyVersion\":\"recchdidrmu\",\"osType\":\"ahmjedbiu\",\"osSku\":\"khhwmj\",\"osVersion\":\"bweunxc\",\"buildNumber\":\"rihufoihppiybxv\",\"baseImageVersion\":\"zuzpbgkzcs\",\"imageVersion\":\"iuzvkunhdimju\"}") + .toObject(OsProfile.class); + } +} 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..e16213b7b0db 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\":\"aohoqkpjtnq\",\"version\":\"l\",\"lastUpdated\":\"2021-10-27T13:45:12Z\"}") .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("aohoqkpjtnq", model.packageType()); + Assertions.assertEquals("l", model.version()); + Assertions.assertEquals(OffsetDateTime.parse("2021-10-27T13:45:12Z"), 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("aohoqkpjtnq") + .withVersion("l") + .withLastUpdated(OffsetDateTime.parse("2021-10-27T13:45:12Z")); 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("aohoqkpjtnq", model.packageType()); + Assertions.assertEquals("l", model.version()); + Assertions.assertEquals(OffsetDateTime.parse("2021-10-27T13:45:12Z"), 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..5bdc413cc226 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-09-16T02:36:36Z\",\"sessionEndTime\":\"2021-05-07T21:32:32Z\",\"nodeName\":\"edgfbcvkcvq\",\"duration\":6395460850482092633,\"accessLevel\":\"Diagnostics\"}") .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..faebad85de6a 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\":\"es\",\"arcInstance\":\"vlopwiyighx\",\"arcNodeServicePrincipalObjectId\":\"dwzbaiue\",\"state\":\"Updating\"}") .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..6f12e81180f4 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; @@ -11,17 +11,17 @@ 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()); + PhysicalNodes model = BinaryData.fromString("{\"name\":\"gfpelolppvksrpqv\",\"ipv4Address\":\"zraehtwd\"}") + .toObject(PhysicalNodes.class); + Assertions.assertEquals("gfpelolppvksrpqv", model.name()); + Assertions.assertEquals("zraehtwd", 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("gfpelolppvksrpqv").withIpv4Address("zraehtwd"); model = BinaryData.fromObject(model).toObject(PhysicalNodes.class); - Assertions.assertEquals("eqx", model.name()); - Assertions.assertEquals("z", model.ipv4Address()); + Assertions.assertEquals("gfpelolppvksrpqv", model.name()); + Assertions.assertEquals("zraehtwd", model.ipv4Address()); } } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/PlatformPayloadTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/PlatformPayloadTests.java new file mode 100644 index 000000000000..3255e675cf0c --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/PlatformPayloadTests.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.PlatformPayload; +import org.junit.jupiter.api.Assertions; + +public final class PlatformPayloadTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + PlatformPayload model = BinaryData.fromString( + "{\"payloadUrl\":\"tduqktapspwgcuer\",\"payloadHash\":\"mkdo\",\"payloadPackageSizeInBytes\":\"qw\",\"payloadIdentifier\":\"mdgbbjfdd\"}") + .toObject(PlatformPayload.class); + Assertions.assertEquals("tduqktapspwgcuer", model.payloadUrl()); + Assertions.assertEquals("mkdo", model.payloadHash()); + Assertions.assertEquals("qw", model.payloadPackageSizeInBytes()); + Assertions.assertEquals("mdgbbjfdd", model.payloadIdentifier()); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/PlatformUpdateDetailsTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/PlatformUpdateDetailsTests.java new file mode 100644 index 000000000000..2e242dd90e48 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/PlatformUpdateDetailsTests.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.models.PlatformUpdateDetails; +import org.junit.jupiter.api.Assertions; + +public final class PlatformUpdateDetailsTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + PlatformUpdateDetails model = BinaryData.fromString( + "{\"validatedSolutionRecipeVersion\":\"gfgibm\",\"platformVersion\":\"gakeqsr\",\"platformPayloads\":[{\"payloadUrl\":\"zqqedq\",\"payloadHash\":\"bciqfouflm\",\"payloadPackageSizeInBytes\":\"kzsmodm\",\"payloadIdentifier\":\"ougpbkwt\"}]}") + .toObject(PlatformUpdateDetails.class); + Assertions.assertEquals("gfgibm", model.validatedSolutionRecipeVersion()); + Assertions.assertEquals("gakeqsr", model.platformVersion()); + Assertions.assertEquals("zqqedq", model.platformPayloads().get(0).payloadUrl()); + Assertions.assertEquals("bciqfouflm", model.platformPayloads().get(0).payloadHash()); + Assertions.assertEquals("kzsmodm", model.platformPayloads().get(0).payloadPackageSizeInBytes()); + Assertions.assertEquals("ougpbkwt", model.platformPayloads().get(0).payloadIdentifier()); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/PlatformUpdateInnerTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/PlatformUpdateInnerTests.java new file mode 100644 index 000000000000..1b6a9ec25174 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/PlatformUpdateInnerTests.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.fluent.models.PlatformUpdateInner; +import org.junit.jupiter.api.Assertions; + +public final class PlatformUpdateInnerTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + PlatformUpdateInner model = BinaryData.fromString( + "{\"properties\":{\"platformUpdateDetails\":[{\"validatedSolutionRecipeVersion\":\"fdkfogk\",\"platformVersion\":\"gjofjd\",\"platformPayloads\":[{\"payloadUrl\":\"s\",\"payloadHash\":\"eupewnwreitjz\",\"payloadPackageSizeInBytes\":\"lusarh\",\"payloadIdentifier\":\"fcqhsmyurkd\"},{\"payloadUrl\":\"lx\",\"payloadHash\":\"kuksjtxukcdm\",\"payloadPackageSizeInBytes\":\"rcryuanzwuxzdxta\",\"payloadIdentifier\":\"lhmwhfpmrqobm\"},{\"payloadUrl\":\"kknryrtihf\",\"payloadHash\":\"ijbpzvgnwzsymgl\",\"payloadPackageSizeInBytes\":\"fcyzkohdbihanufh\",\"payloadIdentifier\":\"bj\"},{\"payloadUrl\":\"a\",\"payloadHash\":\"th\",\"payloadPackageSizeInBytes\":\"hab\",\"payloadIdentifier\":\"pikxwczbyscnpqxu\"}]}]},\"id\":\"vyq\",\"name\":\"iwbybrkxvdumjg\",\"type\":\"tfwvukxgaudc\"}") + .toObject(PlatformUpdateInner.class); + Assertions.assertEquals("fdkfogk", + model.properties().platformUpdateDetails().get(0).validatedSolutionRecipeVersion()); + Assertions.assertEquals("gjofjd", model.properties().platformUpdateDetails().get(0).platformVersion()); + Assertions.assertEquals("s", + model.properties().platformUpdateDetails().get(0).platformPayloads().get(0).payloadUrl()); + Assertions.assertEquals("eupewnwreitjz", + model.properties().platformUpdateDetails().get(0).platformPayloads().get(0).payloadHash()); + Assertions.assertEquals("lusarh", + model.properties().platformUpdateDetails().get(0).platformPayloads().get(0).payloadPackageSizeInBytes()); + Assertions.assertEquals("fcqhsmyurkd", + model.properties().platformUpdateDetails().get(0).platformPayloads().get(0).payloadIdentifier()); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/PlatformUpdateListResultTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/PlatformUpdateListResultTests.java new file mode 100644 index 000000000000..d2ff95130fda --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/PlatformUpdateListResultTests.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.implementation.models.PlatformUpdateListResult; +import org.junit.jupiter.api.Assertions; + +public final class PlatformUpdateListResultTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + PlatformUpdateListResult model = BinaryData.fromString( + "{\"value\":[{\"properties\":{\"platformUpdateDetails\":[{\"validatedSolutionRecipeVersion\":\"ex\",\"platformVersion\":\"bhtqqrolfpfpsa\",\"platformPayloads\":[{},{}]}]},\"id\":\"qux\",\"name\":\"gjyjgzjaoyfhrtxi\",\"type\":\"n\"},{\"properties\":{\"platformUpdateDetails\":[{\"validatedSolutionRecipeVersion\":\"jysvl\",\"platformVersion\":\"uvfqawrlyxwj\",\"platformPayloads\":[{}]},{\"validatedSolutionRecipeVersion\":\"rbnwbxgjvtbvpy\",\"platformVersion\":\"zdn\",\"platformPayloads\":[{}]},{\"validatedSolutionRecipeVersion\":\"qguhmuo\",\"platformVersion\":\"f\",\"platformPayloads\":[{},{}]},{\"validatedSolutionRecipeVersion\":\"zw\",\"platformVersion\":\"g\",\"platformPayloads\":[{},{},{},{}]}]},\"id\":\"nwui\",\"name\":\"gazxuf\",\"type\":\"zuckyfi\"},{\"properties\":{\"platformUpdateDetails\":[{\"validatedSolutionRecipeVersion\":\"dfvzwdzuhty\",\"platformVersion\":\"isdkfthwxmnteiw\",\"platformPayloads\":[{},{},{}]},{\"validatedSolutionRecipeVersion\":\"vkmijcmmxdcuf\",\"platformVersion\":\"srp\",\"platformPayloads\":[{},{},{}]}]},\"id\":\"idnsezcxtb\",\"name\":\"sgfyccsnew\",\"type\":\"dwzjeiach\"}],\"nextLink\":\"osfln\"}") + .toObject(PlatformUpdateListResult.class); + Assertions.assertEquals("ex", + model.value().get(0).properties().platformUpdateDetails().get(0).validatedSolutionRecipeVersion()); + Assertions.assertEquals("bhtqqrolfpfpsa", + model.value().get(0).properties().platformUpdateDetails().get(0).platformVersion()); + Assertions.assertEquals("osfln", model.nextLink()); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/PlatformUpdatePropertiesTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/PlatformUpdatePropertiesTests.java new file mode 100644 index 000000000000..e11974532514 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/PlatformUpdatePropertiesTests.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.PlatformUpdateProperties; +import org.junit.jupiter.api.Assertions; + +public final class PlatformUpdatePropertiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + PlatformUpdateProperties model = BinaryData.fromString( + "{\"platformUpdateDetails\":[{\"validatedSolutionRecipeVersion\":\"h\",\"platformVersion\":\"cnyejhkryhtnapcz\",\"platformPayloads\":[{\"payloadUrl\":\"kjyemkk\",\"payloadHash\":\"ipjoxzjnchgejs\",\"payloadPackageSizeInBytes\":\"dmailzydehojw\",\"payloadIdentifier\":\"huxinpmqnj\"},{\"payloadUrl\":\"wixjsprozvcp\",\"payloadHash\":\"eg\",\"payloadPackageSizeInBytes\":\"wmfdatscmdvpjhul\",\"payloadIdentifier\":\"uvm\"},{\"payloadUrl\":\"ozkrwfndiodjpslw\",\"payloadHash\":\"dpvwryoqpsoaccta\",\"payloadPackageSizeInBytes\":\"kljla\",\"payloadIdentifier\":\"cr\"}]},{\"validatedSolutionRecipeVersion\":\"fdfdosygexpa\",\"platformVersion\":\"akhmsbzjhcrz\",\"platformPayloads\":[{\"payloadUrl\":\"phlxa\",\"payloadHash\":\"thqt\",\"payloadPackageSizeInBytes\":\"qjbpfzfsin\",\"payloadIdentifier\":\"v\"},{\"payloadUrl\":\"jrwzox\",\"payloadHash\":\"tfell\",\"payloadPackageSizeInBytes\":\"fziton\",\"payloadIdentifier\":\"qfpjk\"},{\"payloadUrl\":\"xofpdvhpfxxypi\",\"payloadHash\":\"nmayhuybb\",\"payloadPackageSizeInBytes\":\"odepoogin\",\"payloadIdentifier\":\"amiheognarxz\"},{\"payloadUrl\":\"heotusiv\",\"payloadHash\":\"v\",\"payloadPackageSizeInBytes\":\"iqihn\",\"payloadIdentifier\":\"ngbwjz\"}]},{\"validatedSolutionRecipeVersion\":\"fygxgispemvtzfk\",\"platformVersion\":\"ubljofxqe\",\"platformPayloads\":[{\"payloadUrl\":\"aeqjhqjbasvms\",\"payloadHash\":\"qulngsntnbybkzgc\",\"payloadPackageSizeInBytes\":\"wclxxwrl\",\"payloadIdentifier\":\"ouskcqvkocrc\"},{\"payloadUrl\":\"kwt\",\"payloadHash\":\"xbnjbiksq\",\"payloadPackageSizeInBytes\":\"lssai\",\"payloadIdentifier\":\"p\"}]},{\"validatedSolutionRecipeVersion\":\"nzl\",\"platformVersion\":\"fmppe\",\"platformPayloads\":[{\"payloadUrl\":\"mgxsab\",\"payloadHash\":\"qduujitcjczdz\",\"payloadPackageSizeInBytes\":\"ndhkrw\",\"payloadIdentifier\":\"appd\"},{\"payloadUrl\":\"dkvwrwjfe\",\"payloadHash\":\"nhutjeltmrldhugj\",\"payloadPackageSizeInBytes\":\"datqxhocdgeabl\",\"payloadIdentifier\":\"huticndvkao\"},{\"payloadUrl\":\"yiftyhxhuro\",\"payloadHash\":\"tyxolniwpwc\",\"payloadPackageSizeInBytes\":\"jfkgiawxk\",\"payloadIdentifier\":\"ypl\"},{\"payloadUrl\":\"kbasyypn\",\"payloadHash\":\"hsgcbacphejkot\",\"payloadPackageSizeInBytes\":\"qgoulznd\",\"payloadIdentifier\":\"kwy\"}]}]}") + .toObject(PlatformUpdateProperties.class); + Assertions.assertEquals("h", model.platformUpdateDetails().get(0).validatedSolutionRecipeVersion()); + Assertions.assertEquals("cnyejhkryhtnapcz", model.platformUpdateDetails().get(0).platformVersion()); + Assertions.assertEquals("kjyemkk", model.platformUpdateDetails().get(0).platformPayloads().get(0).payloadUrl()); + Assertions.assertEquals("ipjoxzjnchgejs", + model.platformUpdateDetails().get(0).platformPayloads().get(0).payloadHash()); + Assertions.assertEquals("dmailzydehojw", + model.platformUpdateDetails().get(0).platformPayloads().get(0).payloadPackageSizeInBytes()); + Assertions.assertEquals("huxinpmqnj", + model.platformUpdateDetails().get(0).platformPayloads().get(0).payloadIdentifier()); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/PlatformUpdatesGetWithResponseMockTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/PlatformUpdatesGetWithResponseMockTests.java new file mode 100644 index 000000000000..ddcd33a52d20 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/PlatformUpdatesGetWithResponseMockTests.java @@ -0,0 +1,41 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.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.PlatformUpdate; +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 PlatformUpdatesGetWithResponseMockTests { + @Test + public void testGetWithResponse() throws Exception { + String responseStr + = "{\"properties\":{\"platformUpdateDetails\":[{\"validatedSolutionRecipeVersion\":\"gldohgcandxfhh\",\"platformVersion\":\"e\",\"platformPayloads\":[{},{},{},{}]},{\"validatedSolutionRecipeVersion\":\"qtdn\",\"platformVersion\":\"kkpljdsh\",\"platformPayloads\":[{},{},{}]},{\"validatedSolutionRecipeVersion\":\"k\",\"platformVersion\":\"ccyijjimhi\",\"platformPayloads\":[{},{}]},{\"validatedSolutionRecipeVersion\":\"qnjxmv\",\"platformVersion\":\"duydwnwgru\",\"platformPayloads\":[{}]}]},\"id\":\"ldrdymnswx\",\"name\":\"exqwqnghxnimvy\",\"type\":\"jrxgunnq\"}"; + + 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)); + + PlatformUpdate response = manager.platformUpdates() + .getWithResponse("hg", "ekekzouyvewwpz", com.azure.core.util.Context.NONE) + .getValue(); + + Assertions.assertEquals("gldohgcandxfhh", + response.properties().platformUpdateDetails().get(0).validatedSolutionRecipeVersion()); + Assertions.assertEquals("e", response.properties().platformUpdateDetails().get(0).platformVersion()); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/PlatformUpdatesListMockTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/PlatformUpdatesListMockTests.java new file mode 100644 index 000000000000..cfc1953f9147 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/PlatformUpdatesListMockTests.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.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.PlatformUpdate; +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 PlatformUpdatesListMockTests { + @Test + public void testList() throws Exception { + String responseStr + = "{\"value\":[{\"properties\":{\"platformUpdateDetails\":[{\"validatedSolutionRecipeVersion\":\"lque\",\"platformVersion\":\"mvyumgmmuebsnzn\",\"platformPayloads\":[{},{},{}]}]},\"id\":\"qufmjxcyoseq\",\"name\":\"azisvbr\",\"type\":\"gcyjpgawepk\"}]}"; + + 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.platformUpdates().list("ypu", com.azure.core.util.Context.NONE); + + Assertions.assertEquals("lque", + response.iterator().next().properties().platformUpdateDetails().get(0).validatedSolutionRecipeVersion()); + Assertions.assertEquals("mvyumgmmuebsnzn", + response.iterator().next().properties().platformUpdateDetails().get(0).platformVersion()); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ProvisionOsReportedPropertiesTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ProvisionOsReportedPropertiesTests.java new file mode 100644 index 000000000000..d30f6ba34970 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ProvisionOsReportedPropertiesTests.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.ProvisionOsReportedProperties; + +public final class ProvisionOsReportedPropertiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ProvisionOsReportedProperties model = BinaryData.fromString( + "{\"percentComplete\":932903430,\"validationStatus\":{\"status\":\"kuumnqdurhzzfo\",\"steps\":[{\"name\":\"qusvwlujopwnib\",\"description\":\"toztjd\",\"fullStepIndex\":\"mqvfm\",\"startTimeUtc\":\"ad\",\"endTimeUtc\":\"gctxegtvgwyur\",\"status\":\"lfnzzryizwbxg\",\"steps\":[{\"name\":\"layunomirhpfabe\",\"description\":\"lamwmgewa\",\"fullStepIndex\":\"f\",\"startTimeUtc\":\"bcpjstbhem\",\"endTimeUtc\":\"u\",\"status\":\"qsnxfbxufeapdr\",\"steps\":[{},{}],\"exception\":[\"su\",\"dulpodkaxpfobk\",\"hmhjd\",\"lt\"]},{\"name\":\"luqrojadhfztlray\",\"description\":\"kg\",\"fullStepIndex\":\"yh\",\"startTimeUtc\":\"bkuwpzqxlc\",\"endTimeUtc\":\"akfe\",\"status\":\"vxfaqufqizj\",\"steps\":[{},{},{}],\"exception\":[\"oajeyyjmjjxizx\",\"xhnzlslekcttgzkj\",\"yqpdwadeghztld\"]},{\"name\":\"czdjiahuqymjzucw\",\"description\":\"ejjqhddw\",\"fullStepIndex\":\"qx\",\"startTimeUtc\":\"ookyfoz\",\"endTimeUtc\":\"nzxbyp\",\"status\":\"pgaixwrgrkkderf\",\"steps\":[{},{},{},{}],\"exception\":[\"kwepwo\",\"ggicwnxhtfmcqbs\",\"d\",\"pgchzpgfqum\"]},{\"name\":\"jxhzghgo\",\"description\":\"ynrceqavfdbdf\",\"fullStepIndex\":\"xjdnajuo\",\"startTimeUtc\":\"y\",\"endTimeUtc\":\"mk\",\"status\":\"hvcw\",\"steps\":[{}],\"exception\":[\"jk\",\"uxxrwzobuzms\"]}],\"exception\":[\"mtdtkwppthuzd\"]}]},\"deploymentStatus\":{\"status\":\"imrljdp\",\"steps\":[{\"name\":\"yemhkftba\",\"description\":\"htecloa\",\"fullStepIndex\":\"mxtllfl\",\"startTimeUtc\":\"mq\",\"endTimeUtc\":\"rrfijhgg\",\"status\":\"qbgamkli\",\"steps\":[{\"name\":\"d\",\"description\":\"fhsdpzouhkt\",\"fullStepIndex\":\"xqwqnjxr\",\"startTimeUtc\":\"ddtullygta\",\"endTimeUtc\":\"zcxdfweapyfmlxrl\",\"status\":\"h\",\"steps\":[{}],\"exception\":[\"fleimixlmd\",\"gicehfgsmdr\",\"uq\"]},{\"name\":\"xtokljmtz\",\"description\":\"axwfqtyyqip\",\"fullStepIndex\":\"ltungbsolj\",\"startTimeUtc\":\"miigzb\",\"endTimeUtc\":\"ckgk\",\"status\":\"ksw\",\"steps\":[{},{}],\"exception\":[\"cqikclsm\"]},{\"name\":\"nsswoyk\",\"description\":\"onaaxwmgzrujlqc\",\"fullStepIndex\":\"ynlleiqbcbgvsbts\",\"startTimeUtc\":\"toxadhxuvjhxmnr\",\"endTimeUtc\":\"tjc\",\"status\":\"twmlg\",\"steps\":[{},{}],\"exception\":[\"vvdhgjn\"]},{\"name\":\"yqipslzmvcdsvm\",\"description\":\"itekdtfobvfiyb\",\"fullStepIndex\":\"ich\",\"startTimeUtc\":\"bfzdqekiv\",\"endTimeUtc\":\"p\",\"status\":\"vdizulrqtbh\",\"steps\":[{}],\"exception\":[\"zlp\"]}],\"exception\":[\"mxmdutzfkgilnou\"]},{\"name\":\"cgndjgdp\",\"description\":\"ggqqyeqfcb\",\"fullStepIndex\":\"lpyuflqjf\",\"startTimeUtc\":\"tujcyoh\",\"endTimeUtc\":\"imwdcsklkqnqvki\",\"status\":\"mbzmecuy\",\"steps\":[{\"name\":\"mbzayspzvrietv\",\"description\":\"hmdzxplgtpvdvat\",\"fullStepIndex\":\"mgschnzrsbkk\",\"startTimeUtc\":\"vlzdmnfm\",\"endTimeUtc\":\"sx\",\"status\":\"ofuworimmovzwde\",\"steps\":[{},{}],\"exception\":[\"hzfova\"]},{\"name\":\"rvaprtgelgwe\",\"description\":\"kfyaqandmymnq\",\"fullStepIndex\":\"j\",\"startTimeUtc\":\"ovsfb\",\"endTimeUtc\":\"vzopaxmfmvsm\",\"status\":\"oxfaxdtn\",\"steps\":[{},{}],\"exception\":[\"atroiaue\",\"ugmocpc\"]},{\"name\":\"cboe\",\"description\":\"gttwfldsi\",\"fullStepIndex\":\"rinikced\",\"startTimeUtc\":\"sriwmmtmqrxrz\",\"endTimeUtc\":\"vyczyayubt\",\"status\":\"bxiqahragpxmibpl\",\"steps\":[{},{},{},{}],\"exception\":[\"ryefqmw\",\"vyztxlno\"]}],\"exception\":[\"bjceeg\",\"yieztkutnjil\",\"ukkrehyh\"]},{\"name\":\"joduifvulxfaryrv\",\"description\":\"gdezvjqwahoy\",\"fullStepIndex\":\"axqvjweiwtczkddn\",\"startTimeUtc\":\"vbooqbmdqrxy\",\"endTimeUtc\":\"ae\",\"status\":\"cflwtjdtlr\",\"steps\":[{\"name\":\"oyycuxdtz\",\"description\":\"ipsdudgcozzomehx\",\"fullStepIndex\":\"ntolamlb\",\"startTimeUtc\":\"uxkqllczipvwdt\",\"endTimeUtc\":\"kzdqiqdlratrkwxo\",\"status\":\"wxsuy\",\"steps\":[{},{},{}],\"exception\":[\"fgslglhpryjfz\",\"huioaeoc\",\"ajtfey\"]}],\"exception\":[\"dgddkr\",\"dccxbeuuqu\"]},{\"name\":\"zwtjwwguzytijc\",\"description\":\"nondegjdyd\",\"fullStepIndex\":\"kkkbjuckcatuqbh\",\"startTimeUtc\":\"wcnxtpzdlyseid\",\"endTimeUtc\":\"akatprytg\",\"status\":\"zbqfdpfawrptvcsh\",\"steps\":[{\"name\":\"zcttbqgdirdam\",\"description\":\"zjgcfjfx\",\"fullStepIndex\":\"wjjirmu\",\"startTimeUtc\":\"gftt\",\"endTimeUtc\":\"ofgeoagf\",\"status\":\"ftnxodwxmdajwiy\",\"steps\":[{},{}],\"exception\":[\"vmdmzenlr\",\"tgfczljdncidtjva\"]},{\"name\":\"yznm\",\"description\":\"cdo\",\"fullStepIndex\":\"v\",\"startTimeUtc\":\"gytoxuwhtt\",\"endTimeUtc\":\"qsaqmebgszplu\",\"status\":\"ekpdzzmssg\",\"steps\":[{},{},{},{}],\"exception\":[\"yejidbdqzsqun\",\"cwztlvvws\",\"mrkkyjtr\"]},{\"name\":\"wpwfkcaux\",\"description\":\"avcpfpdofuckclbt\",\"fullStepIndex\":\"ue\",\"startTimeUtc\":\"ol\",\"endTimeUtc\":\"ilfngo\",\"status\":\"sqeb\",\"steps\":[{},{}],\"exception\":[\"hfxfjwpdkktpmb\",\"x\",\"mbrwg\"]},{\"name\":\"xljbkhxsd\",\"description\":\"au\",\"fullStepIndex\":\"dmhweqjfyxydgto\",\"startTimeUtc\":\"qbvwglgw\",\"endTimeUtc\":\"vxakglh\",\"status\":\"esrfgamqiydvx\",\"steps\":[{}],\"exception\":[\"hgoqgsoyqyxyj\",\"cbqp\"]}],\"exception\":[\"pglqjo\",\"tdahneaoovtyjzti\"]}]}}") + .toObject(ProvisionOsReportedProperties.class); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + ProvisionOsReportedProperties model = new ProvisionOsReportedProperties(); + model = BinaryData.fromObject(model).toObject(ProvisionOsReportedProperties.class); + } +} 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 index 43f7932806a9..ce711f465c23 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under 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 PublisherInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { PublisherInner model = BinaryData.fromString( - "{\"properties\":{\"provisioningState\":\"ijr\"},\"id\":\"civmmg\",\"name\":\"f\",\"type\":\"fiwrxgkn\"}") + "{\"properties\":{\"provisioningState\":\"jrhuzgf\"},\"id\":\"njt\",\"name\":\"usllywpvtiotz\",\"type\":\"pdbollg\"}") .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 index 77c4e3fdb0ac..9eb6c23e5b52 100644 --- 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 @@ -1,23 +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.models.PublisherList; +import com.azure.resourcemanager.azurestackhci.implementation.models.PublisherList; +import org.junit.jupiter.api.Assertions; 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\"}") + "{\"value\":[{\"properties\":{\"provisioningState\":\"rowsocnequy\"},\"id\":\"jboq\",\"name\":\"rmtqjkqevadr\",\"type\":\"mwiuawvcm\"},{\"properties\":{\"provisioningState\":\"xiid\"},\"id\":\"czskoswoqiqazu\",\"name\":\"am\",\"type\":\"zkrrcoiisba\"},{\"properties\":{\"provisioningState\":\"pccekuztdsbezaxy\"},\"id\":\"kzxuiz\",\"name\":\"y\",\"type\":\"nepk\"},{\"properties\":{\"provisioningState\":\"iarxqiubxdukec\"},\"id\":\"dazvdhctm\",\"name\":\"koszu\",\"type\":\"blnsntrpcaqk\"}],\"nextLink\":\"f\"}") .toObject(PublisherList.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - PublisherList model = new PublisherList(); - model = BinaryData.fromObject(model).toObject(PublisherList.class); + Assertions.assertEquals("f", model.nextLink()); } } 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 index 59549ca25729..cf4bdf4ae27f 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under 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 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); + = BinaryData.fromString("{\"provisioningState\":\"fqiu\"}").toObject(PublisherProperties.class); } } 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/PublishersGetWithResponseMockTests.java index 5bb05e38d574..edcce8e02660 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/PublishersGetWithResponseMockTests.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.Publisher; @@ -20,17 +20,17 @@ public final class PublishersGetWithResponseMockTests { @Test public void testGetWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"provisioningState\":\"pfuofixcnpcfykkp\"},\"id\":\"cpawmp\",\"name\":\"prdpwrpc\",\"type\":\"pcf\"}"; + = "{\"properties\":{\"provisioningState\":\"rgqmndkrww\"},\"id\":\"rhvifqeqf\",\"name\":\"rnacki\",\"type\":\"lwgebylpzjeldaqw\"}"; 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) + .getWithResponse("akfdmcedlik", "x", "yoddoqkanqtrkicw", 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/PublishersListByClusterMockTests.java index 743726d7c9f7..826b87a3d78a 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/PublishersListByClusterMockTests.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.Publisher; @@ -21,17 +21,17 @@ public final class PublishersListByClusterMockTests { @Test public void testListByCluster() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"provisioningState\":\"jew\"},\"id\":\"hwkxjjmztnl\",\"name\":\"soodtmvecdhdy\",\"type\":\"wcrpt\"}]}"; + = "{\"value\":[{\"properties\":{\"provisioningState\":\"rdsypotnp\"},\"id\":\"vzpkodngvnq\",\"name\":\"jgsbtwgnld\",\"type\":\"u\"}]}"; 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); + = manager.publishers().listByCluster("unilni", "h", com.azure.core.util.Context.NONE); } } 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..a556edeb7283 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\":\"ncyg\",\"priorityValue8021Action_SMB\":\"kvi\",\"bandwidthPercentage_SMB\":\"dscwxqupevzhf\"}") .toObject(QosPolicyOverrides.class); - Assertions.assertEquals("ohdneuel", model.priorityValue8021ActionCluster()); - Assertions.assertEquals("hsd", model.priorityValue8021ActionSmb()); - Assertions.assertEquals("t", model.bandwidthPercentageSmb()); + Assertions.assertEquals("ncyg", model.priorityValue8021ActionCluster()); + Assertions.assertEquals("kvi", model.priorityValue8021ActionSmb()); + Assertions.assertEquals("dscwxqupevzhf", 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("ncyg") + .withPriorityValue8021ActionSmb("kvi") + .withBandwidthPercentageSmb("dscwxqupevzhf"); model = BinaryData.fromObject(model).toObject(QosPolicyOverrides.class); - Assertions.assertEquals("ohdneuel", model.priorityValue8021ActionCluster()); - Assertions.assertEquals("hsd", model.priorityValue8021ActionSmb()); - Assertions.assertEquals("t", model.bandwidthPercentageSmb()); + Assertions.assertEquals("ncyg", model.priorityValue8021ActionCluster()); + Assertions.assertEquals("kvi", model.priorityValue8021ActionSmb()); + Assertions.assertEquals("dscwxqupevzhf", 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..21c03826f68a 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,15 @@ 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\":[\"ncckw\"]}").toObject(RawCertificateData.class); + Assertions.assertEquals("ncckw", 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("ncckw")); model = BinaryData.fromObject(model).toObject(RawCertificateData.class); - Assertions.assertEquals("qhakauhashsf", model.certificates().get(0)); + Assertions.assertEquals("ncckw", 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..a050962df840 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ReconcileArcSettingsRequestPropertiesTests.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.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\":[\"wxzvlvqhjkb\"]}") + .toObject(ReconcileArcSettingsRequestProperties.class); + Assertions.assertEquals("wxzvlvqhjkb", model.clusterNodes().get(0)); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + ReconcileArcSettingsRequestProperties model + = new ReconcileArcSettingsRequestProperties().withClusterNodes(Arrays.asList("wxzvlvqhjkb")); + model = BinaryData.fromObject(model).toObject(ReconcileArcSettingsRequestProperties.class); + Assertions.assertEquals("wxzvlvqhjkb", 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..2fdce3e070aa --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ReconcileArcSettingsRequestTests.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.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\":[\"xobbcswsrt\",\"riplrbpbewtg\",\"fgb\"]}}") + .toObject(ReconcileArcSettingsRequest.class); + Assertions.assertEquals("xobbcswsrt", 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("xobbcswsrt", "riplrbpbewtg", "fgb"))); + model = BinaryData.fromObject(model).toObject(ReconcileArcSettingsRequest.class); + Assertions.assertEquals("xobbcswsrt", 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..bd125b0ba1e4 --- /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\":\"jnhgwydyyn\",\"createdAt\":\"2021-09-15T22:09:06Z\",\"updatedAt\":\"2021-07-13T21:11:26Z\",\"connectionStatus\":\"bvqt\",\"connectionErrorMessage\":\"arfdlpukhpyrnei\"}") + .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..a54fa9a0fdf0 --- /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\":1111132453,\"validationStatus\":{\"status\":\"ckpzvcpopmxeln\",\"steps\":[{\"name\":\"yjede\",\"description\":\"mlfmkqs\",\"fullStepIndex\":\"zuawxtzxpuamwa\",\"startTimeUtc\":\"xrvxcushsphai\",\"endTimeUtc\":\"xyasflvgsgzw\",\"status\":\"akoi\",\"steps\":[{\"name\":\"mjblmljhlny\",\"description\":\"otqyry\",\"fullStepIndex\":\"cbm\",\"startTimeUtc\":\"vxmvw\",\"endTimeUtc\":\"tayx\",\"status\":\"supe\",\"steps\":[{},{}],\"exception\":[\"nh\",\"vsqltnzoibgsxg\",\"xfyqonmpqoxwdo\",\"dbxiqx\"]},{\"name\":\"iqbi\",\"description\":\"tmwwi\",\"fullStepIndex\":\"ehfqpofvwbc\",\"startTimeUtc\":\"embnkbw\",\"endTimeUtc\":\"vxkdivqihebwtswb\",\"status\":\"wfmdurage\",\"steps\":[{},{},{},{}],\"exception\":[\"jfelisdjubggbqig\",\"xkbsazgakgac\",\"rcmjdmspofapvuh\",\"ylnio\"]}],\"exception\":[\"gbzjedmstkv\"]},{\"name\":\"v\",\"description\":\"c\",\"fullStepIndex\":\"iznk\",\"startTimeUtc\":\"f\",\"endTimeUtc\":\"snvpdibmi\",\"status\":\"stbz\",\"steps\":[{\"name\":\"buqny\",\"description\":\"hzfylsgcrpfbc\",\"fullStepIndex\":\"ezzcez\",\"startTimeUtc\":\"fwyfwlwxjwet\",\"endTimeUtc\":\"sihclafzvaylp\",\"status\":\"sqqw\",\"steps\":[{},{},{}],\"exception\":[\"qkc\"]},{\"name\":\"xwaxfewzjkj\",\"description\":\"fdeqvhpsyl\",\"fullStepIndex\":\"shk\",\"startTimeUtc\":\"f\",\"endTimeUtc\":\"mxzjrgywwpgjx\",\"status\":\"ptfujgicgaaoept\",\"steps\":[{},{},{}],\"exception\":[\"dewemxswv\",\"uun\",\"zjgehkfkim\",\"tixo\"]}],\"exception\":[\"qyinl\",\"qepqwhixmon\",\"tshi\"]},{\"name\":\"gvelfc\",\"description\":\"uccbirdsvuw\",\"fullStepIndex\":\"b\",\"startTimeUtc\":\"gstmninwjizciln\",\"endTimeUtc\":\"gshejjtbxqmulux\",\"status\":\"qzvnersbycucr\",\"steps\":[{\"name\":\"ikzebr\",\"description\":\"smswziqgfuh\",\"fullStepIndex\":\"zruswh\",\"startTimeUtc\":\"czznvfbycjsxj\",\"endTimeUtc\":\"i\",\"status\":\"vumwmxqh\",\"steps\":[{},{},{}],\"exception\":[\"amldseh\",\"ohdjhhflzok\"]},{\"name\":\"ox\",\"description\":\"lnjetaglt\",\"fullStepIndex\":\"oatftgzpnpbswvef\",\"startTimeUtc\":\"ccsrmozihmipgaw\",\"endTimeUtc\":\"xp\",\"status\":\"jcxcjxgrytfmpcyc\",\"steps\":[{},{}],\"exception\":[\"aykggnoxu\",\"t\",\"ksxwpnd\"]},{\"name\":\"pfnznthjtwkj\",\"description\":\"srxuzvoam\",\"fullStepIndex\":\"cqiosmgbza\",\"startTimeUtc\":\"xqdlyrtltlapr\",\"endTimeUtc\":\"zkatb\",\"status\":\"mznnbsoqeqalarvl\",\"steps\":[{}],\"exception\":[\"tgfebwln\",\"mhyreeudz\"]}],\"exception\":[\"bpdqmjxlyy\",\"glgou\",\"tlmj\",\"yuojqtobaxk\"]},{\"name\":\"ytunlbfjkwr\",\"description\":\"nkqbhsyrq\",\"fullStepIndex\":\"jqhden\",\"startTimeUtc\":\"ulkpakd\",\"endTimeUtc\":\"fmjnnawtqa\",\"status\":\"xuckpggqoweyir\",\"steps\":[{\"name\":\"sn\",\"description\":\"fl\",\"fullStepIndex\":\"mpizru\",\"startTimeUtc\":\"pqxpx\",\"endTimeUtc\":\"fcngjsa\",\"status\":\"iixtmkzj\",\"steps\":[{},{},{}],\"exception\":[\"rhgfgrwsdpgrat\",\"vzbglbyvi\",\"tctbrxkjzwrgxffm\"]}],\"exception\":[\"wfbkgozxwo\",\"dby\"]}]},\"deploymentStatus\":{\"status\":\"zqaclna\",\"steps\":[{\"name\":\"yg\",\"description\":\"gjkn\",\"fullStepIndex\":\"mfcttux\",\"startTimeUtc\":\"yilflqoiquvrehmr\",\"endTimeUtc\":\"hvsujztc\",\"status\":\"tqjtwhauu\",\"steps\":[{\"name\":\"njle\",\"description\":\"xsmrpddouifamow\",\"fullStepIndex\":\"iynknlq\",\"startTimeUtc\":\"dvpiwh\",\"endTimeUtc\":\"szdtmaajquh\",\"status\":\"ylr\",\"steps\":[{}],\"exception\":[\"g\",\"bmzyospsps\",\"c\",\"fkyjpmspbpssdfpp\"]},{\"name\":\"gt\",\"description\":\"yujtvczkcnyx\",\"fullStepIndex\":\"munjdxvglnkvx\",\"startTimeUtc\":\"paglqivbgk\",\"endTimeUtc\":\"khpzvuqdflv\",\"status\":\"iypfp\",\"steps\":[{},{},{}],\"exception\":[\"g\"]},{\"name\":\"tivhjknidibgqjx\",\"description\":\"n\",\"fullStepIndex\":\"govfgpikqmhhaow\",\"startTimeUtc\":\"mzvupor\",\"endTimeUtc\":\"dfuyd\",\"status\":\"kfvxcnq\",\"steps\":[{},{},{},{}],\"exception\":[\"wokmvkhlggd\",\"bemzqkzszuwi\"]}],\"exception\":[\"lxxhljfp\",\"picrmnzhrgmqgjsx\",\"pqcbfrmbodthsq\",\"gvriibakclac\"]},{\"name\":\"rnxousxauzlwvsg\",\"description\":\"ohqfzizv\",\"fullStepIndex\":\"mmkjsvthnwpztek\",\"startTimeUtc\":\"mribiat\",\"endTimeUtc\":\"plucfotangcfhnyk\",\"status\":\"ugswvx\",\"steps\":[{\"name\":\"qwm\",\"description\":\"xnjmxm\",\"fullStepIndex\":\"qudtcvclx\",\"startTimeUtc\":\"pdkvg\",\"endTimeUtc\":\"buiyji\",\"status\":\"zphdugneiknp\",\"steps\":[{},{}],\"exception\":[\"iuqhibtozipqwj\",\"d\",\"urrxxgewpktv\"]},{\"name\":\"lkm\",\"description\":\"zoyhlfbcgwg\",\"fullStepIndex\":\"oxoebqi\",\"startTimeUtc\":\"ipnwj\",\"endTimeUtc\":\"jqlafcbahhpzp\",\"status\":\"o\",\"steps\":[{},{}],\"exception\":[\"filkmkkholv\"]},{\"name\":\"dviauogp\",\"description\":\"artvti\",\"fullStepIndex\":\"yefchnm\",\"startTimeUtc\":\"hmnxhkxjqi\",\"endTimeUtc\":\"rweooxffifhx\",\"status\":\"snewmozqvbub\",\"steps\":[{},{},{},{}],\"exception\":[\"sycxhxzgaz\",\"taboidvmf\",\"hppubowsepdfgkmt\"]},{\"name\":\"erngbtcjuahokqto\",\"description\":\"auxofshfph\",\"fullStepIndex\":\"nulaiywzejywhsl\",\"startTimeUtc\":\"ojpllndnpdwrpqaf\",\"endTimeUtc\":\"ug\",\"status\":\"n\",\"steps\":[{},{}],\"exception\":[\"efy\",\"oc\",\"ctfjgtixr\",\"vzuyturmlmu\"]}],\"exception\":[\"lbau\",\"ropions\",\"onwpnga\"]},{\"name\":\"n\",\"description\":\"xjawrt\",\"fullStepIndex\":\"fjmyccxlzhco\",\"startTimeUtc\":\"vnekhenlusfnrdtj\",\"endTimeUtc\":\"xrdcqtj\",\"status\":\"dt\",\"steps\":[{\"name\":\"uslvyjtcvuwkasi\",\"description\":\"esfuught\",\"fullStepIndex\":\"fecjxeygtuhx\",\"startTimeUtc\":\"cbuewmrswnjlxuz\",\"endTimeUtc\":\"wpusxjbaqehg\",\"status\":\"ohzjqatucoigeb\",\"steps\":[{},{},{},{}],\"exception\":[\"fepbnwgfmxjgc\",\"bjb\",\"dlfgtdysnaq\"]}],\"exception\":[\"qbctqha\",\"zjrwdkqze\",\"yjleziunjx\",\"fza\"]},{\"name\":\"kwcegyamlbn\",\"description\":\"qa\",\"fullStepIndex\":\"jvpilguooqja\",\"startTimeUtc\":\"d\",\"endTimeUtc\":\"gueiookjbsahrtdt\",\"status\":\"elqacslmot\",\"steps\":[{\"name\":\"fxof\",\"description\":\"jkgd\",\"fullStepIndex\":\"azftxejwabmdujtm\",\"startTimeUtc\":\"op\",\"endTimeUtc\":\"c\",\"status\":\"urbuhhlkyqltq\",\"steps\":[{}],\"exception\":[\"uwkffdjktsysid\",\"vclglxnfuij\"]},{\"name\":\"busqogsfi\",\"description\":\"yi\",\"fullStepIndex\":\"sharujtj\",\"startTimeUtc\":\"xfz\",\"endTimeUtc\":\"qttv\",\"status\":\"pqhjpenuygbqeqq\",\"steps\":[{},{},{}],\"exception\":[\"n\",\"vcdlg\"]}],\"exception\":[\"cmfdjwnlax\",\"un\"]}]},\"nodeSettings\":{\"state\":\"kczvvita\",\"createdAt\":\"2021-05-17T09:24:22Z\",\"updatedAt\":\"2021-08-06T19:39:44Z\",\"connectionStatus\":\"sserxhtvsoxhlwn\",\"connectionErrorMessage\":\"j\"},\"sessionDetails\":[{\"sessionId\":\"xypruuuy\",\"sessionStartTime\":\"2021-11-07T10:50:59Z\",\"sessionEndTime\":\"2021-04-25T10:28:09Z\",\"accessLevel\":\"None\",\"transcriptLocation\":\"zoyuelyetndnbf\"},{\"sessionId\":\"ggagfln\",\"sessionStartTime\":\"2021-10-24T16:53:26Z\",\"sessionEndTime\":\"2021-10-03T03:17:29Z\",\"accessLevel\":\"DiagnosticsAndRepair\",\"transcriptLocation\":\"zjmucftbyrplroh\"},{\"sessionId\":\"igqfusuc\",\"sessionStartTime\":\"2021-03-02T01:15:53Z\",\"sessionEndTime\":\"2020-12-22T17:52:04Z\",\"accessLevel\":\"Diagnostics\",\"transcriptLocation\":\"noxaxmqeqal\"}]}") + .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..2bf1d36692e6 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\":\"wacf\",\"state\":\"dkzzewkfvhqcrail\",\"createdAt\":\"2021-02-08T12:34:09Z\",\"updatedAt\":\"2021-04-20T03:42:41Z\",\"connectionStatus\":\"uflrwd\",\"connectionErrorMessage\":\"dlxyjrxs\",\"transcriptLocation\":\"afcnih\"}") .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..92d4f23163b3 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-08-02T11:50:30Z\",\"remoteSupportType\":\"Enable\",\"remoteSupportNodeSettings\":[{\"arcResourceId\":\"q\",\"state\":\"ltmuwlauwzizx\",\"createdAt\":\"2021-03-14T00:48:06Z\",\"updatedAt\":\"2021-06-20T04:01:26Z\",\"connectionStatus\":\"efuzmuvpbttd\",\"connectionErrorMessage\":\"orppxebmnzbtb\",\"transcriptLocation\":\"pglkf\"}],\"remoteSupportSessionDetails\":[{\"sessionStartTime\":\"2021-08-25T15:11:39Z\",\"sessionEndTime\":\"2021-02-11T17:39:16Z\",\"nodeName\":\"lfphsdyhtozfikd\",\"duration\":2120097512911222232,\"accessLevel\":\"DiagnosticsAndRepair\"},{\"sessionStartTime\":\"2021-10-21T16:11:01Z\",\"sessionEndTime\":\"2021-05-15T23:08:57Z\",\"nodeName\":\"lvithhqzonosgg\",\"duration\":940273513332449344,\"accessLevel\":\"Diagnostics\"},{\"sessionStartTime\":\"2021-03-24T14:38:58Z\",\"sessionEndTime\":\"2021-07-05T18:15:58Z\",\"nodeName\":\"ka\",\"duration\":923632264277516469,\"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..d21274f63f3e 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-03-29T08:59:37Z\",\"remoteSupportType\":\"Enable\"}") .toObject(RemoteSupportRequestProperties.class); - Assertions.assertEquals(OffsetDateTime.parse("2021-09-05T17:35:53Z"), model.expirationTimestamp()); + Assertions.assertEquals(OffsetDateTime.parse("2021-03-29T08:59:37Z"), 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-03-29T08:59:37Z")) .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-03-29T08:59:37Z"), 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..a993d1364c8b 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-04-03T17:36:18Z\",\"remoteSupportType\":\"Enable\"}}") .toObject(RemoteSupportRequest.class); - Assertions.assertEquals(OffsetDateTime.parse("2021-03-18T15:51:25Z"), model.properties().expirationTimestamp()); + Assertions.assertEquals(OffsetDateTime.parse("2021-04-03T17:36:18Z"), model.properties().expirationTimestamp()); Assertions.assertEquals(RemoteSupportType.ENABLE, 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")) + new RemoteSupportRequestProperties().withExpirationTimestamp(OffsetDateTime.parse("2021-04-03T17:36:18Z")) .withRemoteSupportType(RemoteSupportType.ENABLE)); model = BinaryData.fromObject(model).toObject(RemoteSupportRequest.class); - Assertions.assertEquals(OffsetDateTime.parse("2021-03-18T15:51:25Z"), model.properties().expirationTimestamp()); + Assertions.assertEquals(OffsetDateTime.parse("2021-04-03T17:36:18Z"), model.properties().expirationTimestamp()); Assertions.assertEquals(RemoteSupportType.ENABLE, 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..f07cc1627fc1 --- /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\":\"cpeogkhnmgbrou\",\"sessionStartTime\":\"2021-02-15T01:41:05Z\",\"sessionEndTime\":\"2021-06-26T21:21:05Z\",\"accessLevel\":\"Diagnostics\",\"transcriptLocation\":\"fpazjzoywjxhpd\"}") + .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 deleted file mode 100644 index 46db0d0bc1ad..000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ReportedPropertiesTests.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.ReportedProperties; - -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\"}]}}") - .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..1d3ff8040866 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\":\"vlmfwdgzxulucv\",\"family\":\"mrsreuzvxurisjnh\",\"publisher\":\"txifqj\",\"sbeManifestSource\":\"xmrhu\",\"sbeManifestCreationDate\":\"2021-07-06T09:24:09Z\"}") .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("vlmfwdgzxulucv", model.version()); + Assertions.assertEquals("mrsreuzvxurisjnh", model.family()); + Assertions.assertEquals("txifqj", model.publisher()); + Assertions.assertEquals("xmrhu", model.sbeManifestSource()); + Assertions.assertEquals(OffsetDateTime.parse("2021-07-06T09:24:09Z"), 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("vlmfwdgzxulucv") + .withFamily("mrsreuzvxurisjnh") + .withPublisher("txifqj") + .withSbeManifestSource("xmrhu") + .withSbeManifestCreationDate(OffsetDateTime.parse("2021-07-06T09:24:09Z")); 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("vlmfwdgzxulucv", model.version()); + Assertions.assertEquals("mrsreuzvxurisjnh", model.family()); + Assertions.assertEquals("txifqj", model.publisher()); + Assertions.assertEquals("xmrhu", model.sbeManifestSource()); + Assertions.assertEquals(OffsetDateTime.parse("2021-07-06T09:24:09Z"), 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..6d17e2f412b4 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,17 @@ public final class SbePartnerPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - SbePartnerProperties model = BinaryData.fromString("{\"name\":\"yvoqa\",\"value\":\"iexpbtgiwbwo\"}") + SbePartnerProperties model = BinaryData.fromString("{\"name\":\"cesutrgjupauut\",\"value\":\"oqh\"}") .toObject(SbePartnerProperties.class); - Assertions.assertEquals("yvoqa", model.name()); - Assertions.assertEquals("iexpbtgiwbwo", model.value()); + Assertions.assertEquals("cesutrgjupauut", model.name()); + Assertions.assertEquals("oqh", 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("cesutrgjupauut").withValue("oqh"); model = BinaryData.fromObject(model).toObject(SbePartnerProperties.class); - Assertions.assertEquals("yvoqa", model.name()); - Assertions.assertEquals("iexpbtgiwbwo", model.value()); + Assertions.assertEquals("cesutrgjupauut", model.name()); + Assertions.assertEquals("oqh", 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..c358d153c7e4 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\":\"ratiz\",\"macAddressPoolStop\":\"onasxifto\",\"networkVirtualizationEnabled\":true}}") .toObject(SdnIntegration.class); - Assertions.assertEquals("hjwniyqsluic", model.networkController().macAddressPoolStart()); - Assertions.assertEquals("ggkzzlvmbmpa", model.networkController().macAddressPoolStop()); - Assertions.assertEquals(true, model.networkController().networkVirtualizationEnabled()); + Assertions.assertEquals("ratiz", model.networkController().macAddressPoolStart()); + Assertions.assertEquals("onasxifto", model.networkController().macAddressPoolStop()); + Assertions.assertTrue(model.networkController().networkVirtualizationEnabled()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { SdnIntegration model - = new SdnIntegration().withNetworkController(new NetworkController().withMacAddressPoolStart("hjwniyqsluic") - .withMacAddressPoolStop("ggkzzlvmbmpa") + = new SdnIntegration().withNetworkController(new NetworkController().withMacAddressPoolStart("ratiz") + .withMacAddressPoolStop("onasxifto") .withNetworkVirtualizationEnabled(true)); 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("ratiz", model.networkController().macAddressPoolStart()); + Assertions.assertEquals("onasxifto", model.networkController().macAddressPoolStop()); + Assertions.assertTrue(model.networkController().networkVirtualizationEnabled()); } } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/SdnPropertiesTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/SdnPropertiesTests.java new file mode 100644 index 000000000000..7bf4c08658b5 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/SdnPropertiesTests.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.SdnProperties; + +public final class SdnPropertiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + SdnProperties model = BinaryData + .fromString("{\"sdnStatus\":\"Enabled\",\"sdnDomainName\":\"vcikhnvpamqgx\",\"sdnApiAddress\":\"u\"}") + .toObject(SdnProperties.class); + } +} 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..732ed40de212 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\":\"NonCompliant\",\"wdacCompliance\":\"NonCompliant\",\"dataAtRestEncrypted\":\"Pending\",\"dataInTransitProtected\":\"Compliant\",\"lastUpdated\":\"2021-06-10T03:56:34Z\"}") .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..46f9a32c81ce 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,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.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\":\"Audit\",\"wdacComplianceAssignment\":\"Audit\",\"smbEncryptionForIntraClusterTrafficComplianceAssignment\":\"ApplyAndAutoCorrect\",\"securityComplianceStatus\":{\"securedCoreCompliance\":\"NonCompliant\",\"wdacCompliance\":\"NonCompliant\",\"dataAtRestEncrypted\":\"Pending\",\"dataInTransitProtected\":\"Pending\",\"lastUpdated\":\"2021-12-02T10:20:51Z\"},\"provisioningState\":\"Provisioning\"}") .toObject(SecurityProperties.class); Assertions.assertEquals(ComplianceAssignmentType.AUDIT, model.securedCoreComplianceAssignment()); - Assertions.assertEquals(ComplianceAssignmentType.APPLY_AND_AUTO_CORRECT, model.wdacComplianceAssignment()); - Assertions.assertEquals(ComplianceAssignmentType.AUDIT, + Assertions.assertEquals(ComplianceAssignmentType.AUDIT, model.wdacComplianceAssignment()); + 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); + .withWdacComplianceAssignment(ComplianceAssignmentType.AUDIT) + .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.wdacComplianceAssignment()); - Assertions.assertEquals(ComplianceAssignmentType.AUDIT, + Assertions.assertEquals(ComplianceAssignmentType.AUDIT, model.wdacComplianceAssignment()); + 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..77cd51b1c41b 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,40 +1,38 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under 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\":\"ApplyAndAutoCorrect\",\"wdacComplianceAssignment\":\"ApplyAndAutoCorrect\",\"smbEncryptionForIntraClusterTrafficComplianceAssignment\":\"Audit\",\"securityComplianceStatus\":{\"securedCoreCompliance\":\"NonCompliant\",\"wdacCompliance\":\"Pending\",\"dataAtRestEncrypted\":\"NonCompliant\",\"dataInTransitProtected\":\"Compliant\",\"lastUpdated\":\"2021-05-24T15:33:53Z\"},\"provisioningState\":\"Accepted\"},\"id\":\"u\",\"name\":\"usqxutrpbrr\",\"type\":\"yuuatvlmbjwcolbm\"}") .toObject(SecuritySettingInner.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, model.smbEncryptionForIntraClusterTrafficComplianceAssignment()); - Assertions.assertEquals(ProvisioningState.ACCEPTED, model.provisioningState()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - SecuritySettingInner model - = new SecuritySettingInner().withSecuredCoreComplianceAssignment(ComplianceAssignmentType.AUDIT) - .withWdacComplianceAssignment(ComplianceAssignmentType.APPLY_AND_AUTO_CORRECT) - .withSmbEncryptionForIntraClusterTrafficComplianceAssignment(ComplianceAssignmentType.AUDIT) - .withProvisioningState(ProvisioningState.ACCEPTED); + SecuritySettingInner model = new SecuritySettingInner() + .withSecuredCoreComplianceAssignment(ComplianceAssignmentType.APPLY_AND_AUTO_CORRECT) + .withWdacComplianceAssignment(ComplianceAssignmentType.APPLY_AND_AUTO_CORRECT) + .withSmbEncryptionForIntraClusterTrafficComplianceAssignment(ComplianceAssignmentType.AUDIT); model = BinaryData.fromObject(model).toObject(SecuritySettingInner.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, 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..3c36419fe287 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\":\"Compliant\",\"wdacCompliance\":\"Pending\",\"dataAtRestEncrypted\":\"NonCompliant\",\"dataInTransitProtected\":\"NonCompliant\",\"lastUpdated\":\"2021-02-13T15:58:39Z\"},\"provisioningState\":\"Connected\"},\"id\":\"did\",\"name\":\"hepfwwtjfdoes\",\"type\":\"xhmw\"},{\"properties\":{\"securedCoreComplianceAssignment\":\"Audit\",\"wdacComplianceAssignment\":\"Audit\",\"smbEncryptionForIntraClusterTrafficComplianceAssignment\":\"ApplyAndAutoCorrect\",\"securityComplianceStatus\":{\"securedCoreCompliance\":\"Pending\",\"wdacCompliance\":\"NonCompliant\",\"dataAtRestEncrypted\":\"Compliant\",\"dataInTransitProtected\":\"Pending\",\"lastUpdated\":\"2021-05-29T05:45:19Z\"},\"provisioningState\":\"Accepted\"},\"id\":\"h\",\"name\":\"me\",\"type\":\"lvukaobrlb\"},{\"properties\":{\"securedCoreComplianceAssignment\":\"Audit\",\"wdacComplianceAssignment\":\"ApplyAndAutoCorrect\",\"smbEncryptionForIntraClusterTrafficComplianceAssignment\":\"ApplyAndAutoCorrect\",\"securityComplianceStatus\":{\"securedCoreCompliance\":\"Compliant\",\"wdacCompliance\":\"NonCompliant\",\"dataAtRestEncrypted\":\"Pending\",\"dataInTransitProtected\":\"NonCompliant\",\"lastUpdated\":\"2021-09-28T09:11:32Z\"},\"provisioningState\":\"NotSpecified\"},\"id\":\"a\",\"name\":\"hjym\",\"type\":\"cgqtag\"}],\"nextLink\":\"clssoljomevtfyc\"}") .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("clssoljomevtfyc", 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..b2c58b7120ed 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,30 +22,28 @@ 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\":\"ApplyAndAutoCorrect\",\"smbEncryptionForIntraClusterTrafficComplianceAssignment\":\"Audit\",\"securityComplianceStatus\":{\"securedCoreCompliance\":\"NonCompliant\",\"wdacCompliance\":\"Compliant\",\"dataAtRestEncrypted\":\"Compliant\",\"dataInTransitProtected\":\"Pending\",\"lastUpdated\":\"2021-10-24T10:28:13Z\"},\"provisioningState\":\"Succeeded\"},\"id\":\"uklfqfxspxgogy\",\"name\":\"bztgaex\",\"type\":\"nskvctvuz\"}"; 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") + .define("eozlibcbn") + .withExistingCluster("inzkefkzlxvc", "zcg") .withSecuredCoreComplianceAssignment(ComplianceAssignmentType.AUDIT) - .withWdacComplianceAssignment(ComplianceAssignmentType.APPLY_AND_AUTO_CORRECT) + .withWdacComplianceAssignment(ComplianceAssignmentType.AUDIT) .withSmbEncryptionForIntraClusterTrafficComplianceAssignment( ComplianceAssignmentType.APPLY_AND_AUTO_CORRECT) - .withProvisioningState(ProvisioningState.CREATING) .create(); Assertions.assertEquals(ComplianceAssignmentType.APPLY_AND_AUTO_CORRECT, response.securedCoreComplianceAssignment()); - Assertions.assertEquals(ComplianceAssignmentType.AUDIT, response.wdacComplianceAssignment()); - Assertions.assertEquals(ComplianceAssignmentType.APPLY_AND_AUTO_CORRECT, + Assertions.assertEquals(ComplianceAssignmentType.APPLY_AND_AUTO_CORRECT, response.wdacComplianceAssignment()); + Assertions.assertEquals(ComplianceAssignmentType.AUDIT, 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..1673c47f217e 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\":\"Pending\",\"dataAtRestEncrypted\":\"NonCompliant\",\"dataInTransitProtected\":\"Compliant\",\"lastUpdated\":\"2021-05-31T17:35:28Z\"},\"provisioningState\":\"NotSpecified\"},\"id\":\"jmaih\",\"name\":\"nnlb\",\"type\":\"xjppcbqetfzfppv\"}"; 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("zlhvbqycz", "rirpi", "uvcqoqkqwucqsdgb", 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..da2d3e908d4f 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,22 @@ 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\":\"Audit\",\"smbEncryptionForIntraClusterTrafficComplianceAssignment\":\"Audit\",\"securityComplianceStatus\":{\"securedCoreCompliance\":\"Compliant\",\"wdacCompliance\":\"Pending\",\"dataAtRestEncrypted\":\"Compliant\",\"dataInTransitProtected\":\"Pending\",\"lastUpdated\":\"2021-06-20T19:14:50Z\"},\"provisioningState\":\"Updating\"},\"id\":\"nczepdpcymgbfmdq\",\"name\":\"yyaescjxna\",\"type\":\"pyxqbkxdtbfkih\"}]}"; 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("lzayjwdun", "hmprkla", com.azure.core.util.Context.NONE); - Assertions.assertEquals(ComplianceAssignmentType.APPLY_AND_AUTO_CORRECT, + Assertions.assertEquals(ComplianceAssignmentType.AUDIT, response.iterator().next().securedCoreComplianceAssignment()); Assertions.assertEquals(ComplianceAssignmentType.AUDIT, response.iterator().next().wdacComplianceAssignment()); Assertions.assertEquals(ComplianceAssignmentType.AUDIT, 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..e9d81a274d40 --- /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\":7090482226070156086}") + .toObject(ServiceConfiguration.class); + Assertions.assertEquals(ServiceName.WAC, model.serviceName()); + Assertions.assertEquals(7090482226070156086L, model.port()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + ServiceConfiguration model + = new ServiceConfiguration().withServiceName(ServiceName.WAC).withPort(7090482226070156086L); + model = BinaryData.fromObject(model).toObject(ServiceConfiguration.class); + Assertions.assertEquals(ServiceName.WAC, model.serviceName()); + Assertions.assertEquals(7090482226070156086L, model.port()); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/SiteDetailsTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/SiteDetailsTests.java new file mode 100644 index 000000000000..2969b14371fa --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/SiteDetailsTests.java @@ -0,0 +1,71 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.azurestackhci.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.azurestackhci.models.DeviceConfiguration; +import com.azure.resourcemanager.azurestackhci.models.NicDetail; +import com.azure.resourcemanager.azurestackhci.models.SiteDetails; +import java.util.Arrays; +import org.junit.jupiter.api.Assertions; + +public final class SiteDetailsTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + SiteDetails model = BinaryData.fromString( + "{\"siteResourceId\":\"ekewnazeaj\",\"deviceConfiguration\":{\"nicDetails\":[{\"adapterName\":\"cyizy\",\"interfaceDescription\":\"cvxodkrvfsxxby\",\"componentId\":\"sqlv\",\"driverVersion\":\"cpwgoljtzxnmxsd\",\"ip4Address\":\"ygoogxqapjxva\",\"subnetMask\":\"jfucsaodjnosdkv\",\"defaultGateway\":\"fasgm\",\"dnsServers\":[\"nzpducdaaktu\",\"ktz\",\"oimyfpqd\"],\"defaultIsolationId\":\"kpp\"},{\"adapterName\":\"yytfvpct\",\"interfaceDescription\":\"ikff\",\"componentId\":\"g\",\"driverVersion\":\"hznwhvuldbkk\",\"ip4Address\":\"jkjigawgaz\",\"subnetMask\":\"jqifhujjsbcml\",\"defaultGateway\":\"ahz\",\"dnsServers\":[\"roolkolir\",\"hmojusuzg\",\"jzc\",\"aaxoialahfxwcc\"],\"defaultIsolationId\":\"dxku\"}],\"deviceMetadata\":\"kczynuhhoqeqsh\"}}") + .toObject(SiteDetails.class); + Assertions.assertEquals("ekewnazeaj", model.siteResourceId()); + Assertions.assertEquals("cyizy", model.deviceConfiguration().nicDetails().get(0).adapterName()); + Assertions.assertEquals("cvxodkrvfsxxby", + model.deviceConfiguration().nicDetails().get(0).interfaceDescription()); + Assertions.assertEquals("sqlv", model.deviceConfiguration().nicDetails().get(0).componentId()); + Assertions.assertEquals("cpwgoljtzxnmxsd", model.deviceConfiguration().nicDetails().get(0).driverVersion()); + Assertions.assertEquals("ygoogxqapjxva", model.deviceConfiguration().nicDetails().get(0).ip4Address()); + Assertions.assertEquals("jfucsaodjnosdkv", model.deviceConfiguration().nicDetails().get(0).subnetMask()); + Assertions.assertEquals("fasgm", model.deviceConfiguration().nicDetails().get(0).defaultGateway()); + Assertions.assertEquals("nzpducdaaktu", model.deviceConfiguration().nicDetails().get(0).dnsServers().get(0)); + Assertions.assertEquals("kpp", model.deviceConfiguration().nicDetails().get(0).defaultIsolationId()); + Assertions.assertEquals("kczynuhhoqeqsh", model.deviceConfiguration().deviceMetadata()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + SiteDetails model = new SiteDetails().withSiteResourceId("ekewnazeaj") + .withDeviceConfiguration(new DeviceConfiguration().withNicDetails(Arrays.asList( + new NicDetail().withAdapterName("cyizy") + .withInterfaceDescription("cvxodkrvfsxxby") + .withComponentId("sqlv") + .withDriverVersion("cpwgoljtzxnmxsd") + .withIp4Address("ygoogxqapjxva") + .withSubnetMask("jfucsaodjnosdkv") + .withDefaultGateway("fasgm") + .withDnsServers(Arrays.asList("nzpducdaaktu", "ktz", "oimyfpqd")) + .withDefaultIsolationId("kpp"), + new NicDetail().withAdapterName("yytfvpct") + .withInterfaceDescription("ikff") + .withComponentId("g") + .withDriverVersion("hznwhvuldbkk") + .withIp4Address("jkjigawgaz") + .withSubnetMask("jqifhujjsbcml") + .withDefaultGateway("ahz") + .withDnsServers(Arrays.asList("roolkolir", "hmojusuzg", "jzc", "aaxoialahfxwcc")) + .withDefaultIsolationId("dxku"))) + .withDeviceMetadata("kczynuhhoqeqsh")); + model = BinaryData.fromObject(model).toObject(SiteDetails.class); + Assertions.assertEquals("ekewnazeaj", model.siteResourceId()); + Assertions.assertEquals("cyizy", model.deviceConfiguration().nicDetails().get(0).adapterName()); + Assertions.assertEquals("cvxodkrvfsxxby", + model.deviceConfiguration().nicDetails().get(0).interfaceDescription()); + Assertions.assertEquals("sqlv", model.deviceConfiguration().nicDetails().get(0).componentId()); + Assertions.assertEquals("cpwgoljtzxnmxsd", model.deviceConfiguration().nicDetails().get(0).driverVersion()); + Assertions.assertEquals("ygoogxqapjxva", model.deviceConfiguration().nicDetails().get(0).ip4Address()); + Assertions.assertEquals("jfucsaodjnosdkv", model.deviceConfiguration().nicDetails().get(0).subnetMask()); + Assertions.assertEquals("fasgm", model.deviceConfiguration().nicDetails().get(0).defaultGateway()); + Assertions.assertEquals("nzpducdaaktu", model.deviceConfiguration().nicDetails().get(0).dnsServers().get(0)); + Assertions.assertEquals("kpp", model.deviceConfiguration().nicDetails().get(0).defaultIsolationId()); + Assertions.assertEquals("kczynuhhoqeqsh", model.deviceConfiguration().deviceMetadata()); + } +} 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..50bdc61b07c5 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\":\"vgjcodkkg\",\"publisherId\":\"iytssikizbc\",\"offerId\":\"q\",\"content\":\"ntnrgmqsorh\",\"contentVersion\":\"kxgnlykmxcpwzvmd\",\"skuMappings\":[{\"catalogPlanId\":\"dt\",\"marketplaceSkuId\":\"lwxlboncqbazq\",\"marketplaceSkuVersions\":[\"chygtvxbyjane\",\"ubdpkxyqvgxi\"]},{\"catalogPlanId\":\"detv\",\"marketplaceSkuId\":\"kxdxuwsaifmcwn\",\"marketplaceSkuVersions\":[\"zlehgcvkbcknjolg\",\"y\"]},{\"catalogPlanId\":\"pvelszerqze\",\"marketplaceSkuId\":\"o\",\"marketplaceSkuVersions\":[\"ntxwaljglzob\",\"qwaafrqulhm\"]},{\"catalogPlanId\":\"qb\",\"marketplaceSkuId\":\"vafjrqpjiyrqj\",\"marketplaceSkuVersions\":[\"a\",\"wmzwdfkbnrzorpdl\",\"bqc\",\"qjf\"]}]},\"id\":\"xsaetg\",\"name\":\"dgvpyig\",\"type\":\"aqqilzdcduwjoed\"}") .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("iytssikizbc", model.publisherId()); + Assertions.assertEquals("q", model.offerId()); + Assertions.assertEquals("ntnrgmqsorh", model.content()); + Assertions.assertEquals("kxgnlykmxcpwzvmd", model.contentVersion()); + Assertions.assertEquals("dt", model.skuMappings().get(0).catalogPlanId()); + Assertions.assertEquals("lwxlboncqbazq", model.skuMappings().get(0).marketplaceSkuId()); + Assertions.assertEquals("chygtvxbyjane", 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..7ebc22554227 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\":\"jmfczlfsyqkf\",\"publisherId\":\"zgowox\",\"offerId\":\"je\",\"content\":\"cxn\",\"contentVersion\":\"gxhlusr\",\"skuMappings\":[{\"catalogPlanId\":\"i\",\"marketplaceSkuId\":\"ceagbjqvlsumywz\",\"marketplaceSkuVersions\":[\"xgo\",\"oyjfqipu\",\"yznclkfkee\"]}]},\"id\":\"vop\",\"name\":\"m\",\"type\":\"uoqujlyeg\"},{\"properties\":{\"provisioningState\":\"nigflqqbtnyj\",\"publisherId\":\"lxdbfvabmvms\",\"offerId\":\"aevwjcnkot\",\"content\":\"wuhvaj\",\"contentVersion\":\"ilfemjj\",\"skuMappings\":[{\"catalogPlanId\":\"wjiqullqxb\",\"marketplaceSkuId\":\"vr\",\"marketplaceSkuVersions\":[\"qern\",\"brnyeofltfnnx\"]},{\"catalogPlanId\":\"adj\",\"marketplaceSkuId\":\"n\",\"marketplaceSkuVersions\":[\"ui\"]},{\"catalogPlanId\":\"ri\",\"marketplaceSkuId\":\"ohykfkxbbcbrw\",\"marketplaceSkuVersions\":[\"tgnjizbeewoiymrv\"]}]},\"id\":\"juyrsrziuctixg\",\"name\":\"d\",\"type\":\"uifr\"}],\"nextLink\":\"kaapezkiswqjmdg\"}") .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("zgowox", model.value().get(0).publisherId()); + Assertions.assertEquals("je", model.value().get(0).offerId()); + Assertions.assertEquals("cxn", model.value().get(0).content()); + Assertions.assertEquals("gxhlusr", model.value().get(0).contentVersion()); + Assertions.assertEquals("i", model.value().get(0).skuMappings().get(0).catalogPlanId()); + Assertions.assertEquals("ceagbjqvlsumywz", model.value().get(0).skuMappings().get(0).marketplaceSkuId()); + Assertions.assertEquals("xgo", model.value().get(0).skuMappings().get(0).marketplaceSkuVersions().get(0)); + Assertions.assertEquals("kaapezkiswqjmdg", 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..cefb26aed7d1 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\":\"xyawj\",\"marketplaceSkuId\":\"aq\",\"marketplaceSkuVersions\":[\"yjpkiidzyexz\",\"eli\"]}") .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("xyawj", model.catalogPlanId()); + Assertions.assertEquals("aq", model.marketplaceSkuId()); + Assertions.assertEquals("yjpkiidzyexz", 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..043e2355a0d9 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\":\"gucaif\",\"publisherId\":\"urwwgilfjq\",\"offerId\":\"cdmkxwxdcvjw\",\"content\":\"z\",\"contentVersion\":\"keciqchxrtuicd\",\"skuMappings\":[{\"catalogPlanId\":\"fmmp\",\"marketplaceSkuId\":\"zzwvywrgyng\",\"marketplaceSkuVersions\":[\"rpxncaki\",\"aondjrkclamgg\",\"vlmfej\",\"oqeykglt\"]},{\"catalogPlanId\":\"xhqf\",\"marketplaceSkuId\":\"ka\",\"marketplaceSkuVersions\":[\"sxtlg\",\"lwfgziiu\",\"ijjcea\",\"lijjjrtvam\"]},{\"catalogPlanId\":\"szknxkvccxe\",\"marketplaceSkuId\":\"vkunmign\",\"marketplaceSkuVersions\":[\"k\",\"gqogjwpindedva\"]},{\"catalogPlanId\":\"xbhmed\",\"marketplaceSkuId\":\"lbjywfcfxzirzzih\",\"marketplaceSkuVersions\":[\"pusuv\",\"slczwciidjsllf\",\"yvdmvx\",\"dqacfrgnawbabgf\"]}]}") .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("urwwgilfjq", model.publisherId()); + Assertions.assertEquals("cdmkxwxdcvjw", model.offerId()); + Assertions.assertEquals("z", model.content()); + Assertions.assertEquals("keciqchxrtuicd", model.contentVersion()); + Assertions.assertEquals("fmmp", model.skuMappings().get(0).catalogPlanId()); + Assertions.assertEquals("zzwvywrgyng", model.skuMappings().get(0).marketplaceSkuId()); + Assertions.assertEquals("rpxncaki", 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..a990e2111233 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,25 @@ 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\":\"fiqiid\",\"publisherId\":\"orjvudyhgtrtt\",\"offerId\":\"ayiq\",\"content\":\"nkmm\",\"contentVersion\":\"ifbqgqexowqzrtgq\",\"skuMappings\":[{\"catalogPlanId\":\"vfygkuobpwain\",\"marketplaceSkuId\":\"obothx\",\"marketplaceSkuVersions\":[\"hpnyjtuqgzyvex\",\"ch\"]},{\"catalogPlanId\":\"r\",\"marketplaceSkuId\":\"dowuwhdlri\",\"marketplaceSkuVersions\":[\"zttcbiich\",\"kudsozodwjc\",\"qoyxr\"]},{\"catalogPlanId\":\"ycymzrlcfgdwzauz\",\"marketplaceSkuId\":\"h\",\"marketplaceSkuVersions\":[\"nyci\",\"zkil\"]},{\"catalogPlanId\":\"qadfgesv\",\"marketplaceSkuId\":\"habb\",\"marketplaceSkuVersions\":[\"madjrsbga\",\"ljqovqmxqsxo\",\"xqnkiuokg\"]}]},\"id\":\"sxooiobhiebruptl\",\"name\":\"rvqz\",\"type\":\"aqsos\"}"; 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("mb", "ttmhlvr", "cyxrn", "ukfaj", "pdwzjggkwdep", "mz", 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("orjvudyhgtrtt", response.publisherId()); + Assertions.assertEquals("ayiq", response.offerId()); + Assertions.assertEquals("nkmm", response.content()); + Assertions.assertEquals("ifbqgqexowqzrtgq", response.contentVersion()); + Assertions.assertEquals("vfygkuobpwain", response.skuMappings().get(0).catalogPlanId()); + Assertions.assertEquals("obothx", response.skuMappings().get(0).marketplaceSkuId()); + Assertions.assertEquals("hpnyjtuqgzyvex", 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..d6496edac749 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\":\"xoxvimdvetqh\",\"publisherId\":\"itqsbyuj\",\"offerId\":\"omr\",\"content\":\"u\",\"contentVersion\":\"rmsdbvqxgfyg\",\"skuMappings\":[{\"catalogPlanId\":\"bdpbcehwbdp\",\"marketplaceSkuId\":\"sboynpytporr\",\"marketplaceSkuVersions\":[\"tfctanetinqxd\",\"npjnezjighdumltp\",\"rzwvwetqff\",\"xvfhuqhn\"]},{\"catalogPlanId\":\"qx\",\"marketplaceSkuId\":\"sot\",\"marketplaceSkuVersions\":[\"mrttujyd\"]},{\"catalogPlanId\":\"twxpxbxedhxbboc\",\"marketplaceSkuId\":\"sramqc\",\"marketplaceSkuVersions\":[\"gfnlvvkswurxd\",\"hvhauimnntfkqp\",\"qcnbnwivlqcwyzh\",\"dqkzstzpzecdl\"]},{\"catalogPlanId\":\"irtahtu\",\"marketplaceSkuId\":\"imt\",\"marketplaceSkuVersions\":[\"mviudzpsjqrmluj\",\"tunlofwuzebfqvm\",\"jbhzyenf\",\"petxeudwkh\"]}]},\"id\":\"ckdoxo\",\"name\":\"jcdevzpfreor\",\"type\":\"wwyjmgvrlhfxmr\"}]}"; 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("njlvgrghnh", "oxrqhjninpeswv", "hq", "gebzqzmcsviujo", "zdvmsnao", + 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("itqsbyuj", response.iterator().next().publisherId()); + Assertions.assertEquals("omr", response.iterator().next().offerId()); + Assertions.assertEquals("u", response.iterator().next().content()); + Assertions.assertEquals("rmsdbvqxgfyg", response.iterator().next().contentVersion()); + Assertions.assertEquals("bdpbcehwbdp", response.iterator().next().skuMappings().get(0).catalogPlanId()); + Assertions.assertEquals("sboynpytporr", response.iterator().next().skuMappings().get(0).marketplaceSkuId()); + Assertions.assertEquals("tfctanetinqxd", 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..86c067306dd7 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; 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..1e373f3ea65f 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,16 +13,16 @@ 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\":\"Enable\",\"lastUpdated\":\"2021-05-06T06:04:09Z\"}") .toObject(SoftwareAssuranceProperties.class); - Assertions.assertEquals(SoftwareAssuranceIntent.DISABLE, model.softwareAssuranceIntent()); + Assertions.assertEquals(SoftwareAssuranceIntent.ENABLE, model.softwareAssuranceIntent()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { SoftwareAssuranceProperties model - = new SoftwareAssuranceProperties().withSoftwareAssuranceIntent(SoftwareAssuranceIntent.DISABLE); + = new SoftwareAssuranceProperties().withSoftwareAssuranceIntent(SoftwareAssuranceIntent.ENABLE); model = BinaryData.fromObject(model).toObject(SoftwareAssuranceProperties.class); - Assertions.assertEquals(SoftwareAssuranceIntent.DISABLE, model.softwareAssuranceIntent()); + Assertions.assertEquals(SoftwareAssuranceIntent.ENABLE, 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..f0811849530f 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,215 @@ 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\":\"qid\",\"description\":\"toqxjh\",\"errorMessage\":\"csqhtkbtnqlrng\",\"status\":\"mbiipsnawwlqk\",\"startTimeUtc\":\"2021-09-21T19:49:31Z\",\"endTimeUtc\":\"2021-09-07T00:04:37Z\",\"lastUpdatedTimeUtc\":\"2021-08-18T01:23:09Z\",\"expectedExecutionTime\":\"ricctkwmuqqoa\",\"steps\":[{\"name\":\"y\",\"description\":\"esrw\",\"errorMessage\":\"exh\",\"status\":\"trceqnkbrupob\",\"startTimeUtc\":\"2021-06-25T01:16:41Z\",\"endTimeUtc\":\"2021-04-28T12:28:12Z\",\"lastUpdatedTimeUtc\":\"2021-09-16T05:32:49Z\",\"expectedExecutionTime\":\"cvumepjpbi\",\"steps\":[{\"name\":\"phepifexleqirc\",\"description\":\"cly\",\"errorMessage\":\"gxvrpjl\",\"status\":\"zuodacpun\",\"startTimeUtc\":\"2021-10-01T04:32:07Z\",\"endTimeUtc\":\"2021-03-12T01:38:44Z\",\"lastUpdatedTimeUtc\":\"2020-12-26T14:54:55Z\",\"expectedExecutionTime\":\"qeskoynui\",\"steps\":[{},{}]},{\"name\":\"kaews\",\"description\":\"vesk\",\"errorMessage\":\"egqphrgfnzhctm\",\"status\":\"sghpbcbcpzarpze\",\"startTimeUtc\":\"2021-03-02T16:09:54Z\",\"endTimeUtc\":\"2021-04-19T17:58:25Z\",\"lastUpdatedTimeUtc\":\"2021-11-23T13:37:27Z\",\"expectedExecutionTime\":\"mpypefcpczshnuq\",\"steps\":[{}]}]},{\"name\":\"zupfkhuytuszxhm\",\"description\":\"tvegwqiukvzwy\",\"errorMessage\":\"tthaokgkskj\",\"status\":\"bs\",\"startTimeUtc\":\"2021-04-27T17:28:03Z\",\"endTimeUtc\":\"2021-11-08T07:40:01Z\",\"lastUpdatedTimeUtc\":\"2021-12-03T18:12:27Z\",\"expectedExecutionTime\":\"peexpgeumilhwuit\",\"steps\":[{\"name\":\"yion\",\"description\":\"ninbdbzsxcwqqrs\",\"errorMessage\":\"cbbprtugav\",\"status\":\"bcyksivmfogd\",\"startTimeUtc\":\"2021-02-26T16:38:51Z\",\"endTimeUtc\":\"2021-01-23T13:12:53Z\",\"lastUpdatedTimeUtc\":\"2021-04-06T07:24:28Z\",\"expectedExecutionTime\":\"ftsjcwj\",\"steps\":[{},{},{}]},{\"name\":\"mb\",\"description\":\"vifdxkecifhocjx\",\"errorMessage\":\"loozrvt\",\"status\":\"cmufunlcpxxv\",\"startTimeUtc\":\"2021-07-14T19:01:31Z\",\"endTimeUtc\":\"2021-11-24T19:24:24Z\",\"lastUpdatedTimeUtc\":\"2021-06-22T13:26:43Z\",\"expectedExecutionTime\":\"g\",\"steps\":[{}]},{\"name\":\"vpygglp\",\"description\":\"rdcueljtiahx\",\"errorMessage\":\"q\",\"status\":\"arvsx\",\"startTimeUtc\":\"2021-11-03T23:15:14Z\",\"endTimeUtc\":\"2021-04-04T06:26:30Z\",\"lastUpdatedTimeUtc\":\"2021-09-17T07:35:06Z\",\"expectedExecutionTime\":\"ayspthzo\",\"steps\":[{}]},{\"name\":\"lmjtg\",\"description\":\"ioskkfmkmfdjxyxg\",\"errorMessage\":\"kqvjcteoedlr\",\"status\":\"skkzpxvjnzdpvo\",\"startTimeUtc\":\"2021-07-24T03:49:24Z\",\"endTimeUtc\":\"2021-09-13T16:10:41Z\",\"lastUpdatedTimeUtc\":\"2021-04-03T01:27:30Z\",\"expectedExecutionTime\":\"bxzfs\",\"steps\":[{}]}]},{\"name\":\"texvzilmhivzk\",\"description\":\"wncknr\",\"errorMessage\":\"ajlskzptj\",\"status\":\"lwe\",\"startTimeUtc\":\"2021-05-14T02:23:30Z\",\"endTimeUtc\":\"2021-05-11T12:28:31Z\",\"lastUpdatedTimeUtc\":\"2021-08-27T01:30:25Z\",\"expectedExecutionTime\":\"lehmcgcjeinueho\",\"steps\":[{\"name\":\"fejvqn\",\"description\":\"mbqdabzfivfo\",\"errorMessage\":\"ysthhza\",\"status\":\"fwy\",\"startTimeUtc\":\"2021-05-24T08:08:37Z\",\"endTimeUtc\":\"2021-10-24T07:37:47Z\",\"lastUpdatedTimeUtc\":\"2021-03-22T15:27:04Z\",\"expectedExecutionTime\":\"zejgvkv\",\"steps\":[{},{},{}]},{\"name\":\"szllrzlsmmdqgmi\",\"description\":\"pimcqrhn\",\"errorMessage\":\"minkl\",\"status\":\"xsvtzarhzvqnsqk\",\"startTimeUtc\":\"2021-05-01T17:12:36Z\",\"endTimeUtc\":\"2021-07-25T06:56:19Z\",\"lastUpdatedTimeUtc\":\"2021-01-02T05:49:16Z\",\"expectedExecutionTime\":\"oslpky\",\"steps\":[{},{},{}]},{\"name\":\"wkzpga\",\"description\":\"qjcemqbmf\",\"errorMessage\":\"qarwzxuqreblu\",\"status\":\"mbwxsfg\",\"startTimeUtc\":\"2021-07-18T07:19:19Z\",\"endTimeUtc\":\"2021-09-26T12:41:41Z\",\"lastUpdatedTimeUtc\":\"2021-06-03T15:52:13Z\",\"expectedExecutionTime\":\"raokqkbudb\",\"steps\":[{},{},{},{}]},{\"name\":\"kbavlyt\",\"description\":\"aknwfrkebsmh\",\"errorMessage\":\"ujd\",\"status\":\"atolekscbc\",\"startTimeUtc\":\"2021-08-04T03:24:07Z\",\"endTimeUtc\":\"2021-10-07T05:31:13Z\",\"lastUpdatedTimeUtc\":\"2021-09-06T01:43:14Z\",\"expectedExecutionTime\":\"bzxpdcld\",\"steps\":[{},{},{}]}]},{\"name\":\"n\",\"description\":\"laimouxwk\",\"errorMessage\":\"mud\",\"status\":\"coibicziuswswjrk\",\"startTimeUtc\":\"2021-09-07T17:58:52Z\",\"endTimeUtc\":\"2021-02-02T15:31:39Z\",\"lastUpdatedTimeUtc\":\"2021-03-09T17:41:31Z\",\"expectedExecutionTime\":\"q\",\"steps\":[{\"name\":\"cyrfwbivqvog\",\"description\":\"yzwvbhlimbyqec\",\"errorMessage\":\"odlikcdrdaasax\",\"status\":\"bsmfkwiyjvz\",\"startTimeUtc\":\"2021-06-28T05:15:16Z\",\"endTimeUtc\":\"2021-10-16T04:32:04Z\",\"lastUpdatedTimeUtc\":\"2021-08-01T13:51:45Z\",\"expectedExecutionTime\":\"nvzmlnkoywsx\",\"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("qid", model.name()); + Assertions.assertEquals("toqxjh", model.description()); + Assertions.assertEquals("csqhtkbtnqlrng", model.errorMessage()); + Assertions.assertEquals("mbiipsnawwlqk", model.status()); + Assertions.assertEquals(OffsetDateTime.parse("2021-09-21T19:49:31Z"), model.startTimeUtc()); + Assertions.assertEquals(OffsetDateTime.parse("2021-09-07T00:04:37Z"), model.endTimeUtc()); + Assertions.assertEquals(OffsetDateTime.parse("2021-08-18T01:23:09Z"), model.lastUpdatedTimeUtc()); + Assertions.assertEquals("ricctkwmuqqoa", model.expectedExecutionTime()); + Assertions.assertEquals("y", model.steps().get(0).name()); + Assertions.assertEquals("esrw", model.steps().get(0).description()); + Assertions.assertEquals("exh", model.steps().get(0).errorMessage()); + Assertions.assertEquals("trceqnkbrupob", model.steps().get(0).status()); + Assertions.assertEquals(OffsetDateTime.parse("2021-06-25T01:16:41Z"), model.steps().get(0).startTimeUtc()); + Assertions.assertEquals(OffsetDateTime.parse("2021-04-28T12:28:12Z"), model.steps().get(0).endTimeUtc()); + Assertions.assertEquals(OffsetDateTime.parse("2021-09-16T05:32:49Z"), 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("cvumepjpbi", model.steps().get(0).expectedExecutionTime()); + Assertions.assertEquals("phepifexleqirc", model.steps().get(0).steps().get(0).name()); + Assertions.assertEquals("cly", model.steps().get(0).steps().get(0).description()); + Assertions.assertEquals("gxvrpjl", model.steps().get(0).steps().get(0).errorMessage()); + Assertions.assertEquals("zuodacpun", model.steps().get(0).steps().get(0).status()); + Assertions.assertEquals(OffsetDateTime.parse("2021-10-01T04:32:07Z"), model.steps().get(0).steps().get(0).startTimeUtc()); - Assertions.assertEquals(OffsetDateTime.parse("2021-11-19T16:29:04Z"), + Assertions.assertEquals(OffsetDateTime.parse("2021-03-12T01:38:44Z"), model.steps().get(0).steps().get(0).endTimeUtc()); - Assertions.assertEquals(OffsetDateTime.parse("2021-04-15T16:55:23Z"), + Assertions.assertEquals(OffsetDateTime.parse("2020-12-26T14:54:55Z"), model.steps().get(0).steps().get(0).lastUpdatedTimeUtc()); - Assertions.assertEquals("aqtferr", model.steps().get(0).steps().get(0).expectedExecutionTime()); + Assertions.assertEquals("qeskoynui", 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") - .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") + = new Step().withName("qid") + .withDescription("toqxjh") + .withErrorMessage("csqhtkbtnqlrng") + .withStatus("mbiipsnawwlqk") + .withStartTimeUtc(OffsetDateTime.parse("2021-09-21T19:49:31Z")) + .withEndTimeUtc(OffsetDateTime.parse("2021-09-07T00:04:37Z")) + .withLastUpdatedTimeUtc(OffsetDateTime.parse("2021-08-18T01:23:09Z")) + .withExpectedExecutionTime("ricctkwmuqqoa") + .withSteps( + Arrays + .asList( + new Step().withName("y") + .withDescription("esrw") + .withErrorMessage("exh") + .withStatus("trceqnkbrupob") + .withStartTimeUtc(OffsetDateTime.parse("2021-06-25T01:16:41Z")) + .withEndTimeUtc(OffsetDateTime.parse("2021-04-28T12:28:12Z")) + .withLastUpdatedTimeUtc(OffsetDateTime.parse("2021-09-16T05:32:49Z")) + .withExpectedExecutionTime("cvumepjpbi") + .withSteps(Arrays.asList( + new Step().withName("phepifexleqirc") + .withDescription("cly") + .withErrorMessage("gxvrpjl") + .withStatus("zuodacpun") + .withStartTimeUtc(OffsetDateTime.parse("2021-10-01T04:32:07Z")) + .withEndTimeUtc(OffsetDateTime.parse("2021-03-12T01:38:44Z")) + .withLastUpdatedTimeUtc(OffsetDateTime.parse("2020-12-26T14:54:55Z")) + .withExpectedExecutionTime("qeskoynui") .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") + new Step().withName("kaews") + .withDescription("vesk") + .withErrorMessage("egqphrgfnzhctm") + .withStatus("sghpbcbcpzarpze") + .withStartTimeUtc(OffsetDateTime.parse("2021-03-02T16:09:54Z")) + .withEndTimeUtc(OffsetDateTime.parse("2021-04-19T17:58:25Z")) + .withLastUpdatedTimeUtc(OffsetDateTime.parse("2021-11-23T13:37:27Z")) + .withExpectedExecutionTime("mpypefcpczshnuq") + .withSteps(Arrays.asList(new Step())))), + new Step().withName("zupfkhuytuszxhm") + .withDescription("tvegwqiukvzwy") + .withErrorMessage("tthaokgkskj") + .withStatus("bs") + .withStartTimeUtc(OffsetDateTime.parse("2021-04-27T17:28:03Z")) + .withEndTimeUtc(OffsetDateTime.parse("2021-11-08T07:40:01Z")) + .withLastUpdatedTimeUtc(OffsetDateTime.parse("2021-12-03T18:12:27Z")) + .withExpectedExecutionTime("peexpgeumilhwuit") + .withSteps( + Arrays.asList( + new Step().withName("yion") + .withDescription("ninbdbzsxcwqqrs") + .withErrorMessage("cbbprtugav") + .withStatus("bcyksivmfogd") + .withStartTimeUtc(OffsetDateTime.parse("2021-02-26T16:38:51Z")) + .withEndTimeUtc(OffsetDateTime.parse("2021-01-23T13:12:53Z")) + .withLastUpdatedTimeUtc(OffsetDateTime.parse("2021-04-06T07:24:28Z")) + .withExpectedExecutionTime("ftsjcwj") + .withSteps(Arrays.asList(new Step(), new Step(), new Step())), + new Step().withName("mb") + .withDescription("vifdxkecifhocjx") + .withErrorMessage("loozrvt") + .withStatus("cmufunlcpxxv") + .withStartTimeUtc(OffsetDateTime.parse("2021-07-14T19:01:31Z")) + .withEndTimeUtc(OffsetDateTime.parse("2021-11-24T19:24:24Z")) + .withLastUpdatedTimeUtc(OffsetDateTime.parse("2021-06-22T13:26:43Z")) + .withExpectedExecutionTime("g") + .withSteps(Arrays.asList(new Step())), + new Step().withName("vpygglp") + .withDescription("rdcueljtiahx") + .withErrorMessage("q") + .withStatus("arvsx") + .withStartTimeUtc(OffsetDateTime.parse("2021-11-03T23:15:14Z")) + .withEndTimeUtc(OffsetDateTime.parse("2021-04-04T06:26:30Z")) + .withLastUpdatedTimeUtc(OffsetDateTime.parse("2021-09-17T07:35:06Z")) + .withExpectedExecutionTime("ayspthzo") + .withSteps(Arrays.asList(new Step())), + new Step().withName("lmjtg") + .withDescription("ioskkfmkmfdjxyxg") + .withErrorMessage("kqvjcteoedlr") + .withStatus("skkzpxvjnzdpvo") + .withStartTimeUtc(OffsetDateTime.parse("2021-07-24T03:49:24Z")) + .withEndTimeUtc(OffsetDateTime.parse("2021-09-13T16:10:41Z")) + .withLastUpdatedTimeUtc(OffsetDateTime.parse("2021-04-03T01:27:30Z")) + .withExpectedExecutionTime("bxzfs") + .withSteps(Arrays.asList(new Step())))), + new Step().withName("texvzilmhivzk") + .withDescription("wncknr") + .withErrorMessage("ajlskzptj") + .withStatus("lwe") + .withStartTimeUtc(OffsetDateTime.parse("2021-05-14T02:23:30Z")) + .withEndTimeUtc(OffsetDateTime.parse("2021-05-11T12:28:31Z")) + .withLastUpdatedTimeUtc(OffsetDateTime.parse("2021-08-27T01:30:25Z")) + .withExpectedExecutionTime("lehmcgcjeinueho") + .withSteps(Arrays.asList( + new Step().withName("fejvqn") + .withDescription("mbqdabzfivfo") + .withErrorMessage("ysthhza") + .withStatus("fwy") + .withStartTimeUtc(OffsetDateTime.parse("2021-05-24T08:08:37Z")) + .withEndTimeUtc(OffsetDateTime.parse("2021-10-24T07:37:47Z")) + .withLastUpdatedTimeUtc(OffsetDateTime.parse("2021-03-22T15:27:04Z")) + .withExpectedExecutionTime("zejgvkv") + .withSteps(Arrays.asList(new Step(), new Step(), new Step())), + new Step().withName("szllrzlsmmdqgmi") + .withDescription("pimcqrhn") + .withErrorMessage("minkl") + .withStatus("xsvtzarhzvqnsqk") + .withStartTimeUtc(OffsetDateTime.parse("2021-05-01T17:12:36Z")) + .withEndTimeUtc(OffsetDateTime.parse("2021-07-25T06:56:19Z")) + .withLastUpdatedTimeUtc(OffsetDateTime.parse("2021-01-02T05:49:16Z")) + .withExpectedExecutionTime("oslpky") + .withSteps(Arrays.asList(new Step(), new Step(), new Step())), + new Step().withName("wkzpga") + .withDescription("qjcemqbmf") + .withErrorMessage("qarwzxuqreblu") + .withStatus("mbwxsfg") + .withStartTimeUtc(OffsetDateTime.parse("2021-07-18T07:19:19Z")) + .withEndTimeUtc(OffsetDateTime.parse("2021-09-26T12:41:41Z")) + .withLastUpdatedTimeUtc(OffsetDateTime.parse("2021-06-03T15:52:13Z")) + .withExpectedExecutionTime("raokqkbudb") .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") + new Step().withName("kbavlyt") + .withDescription("aknwfrkebsmh") + .withErrorMessage("ujd") + .withStatus("atolekscbc") + .withStartTimeUtc(OffsetDateTime.parse("2021-08-04T03:24:07Z")) + .withEndTimeUtc(OffsetDateTime.parse("2021-10-07T05:31:13Z")) + .withLastUpdatedTimeUtc(OffsetDateTime.parse("2021-09-06T01:43:14Z")) + .withExpectedExecutionTime("bzxpdcld") .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("n") + .withDescription("laimouxwk") + .withErrorMessage("mud") + .withStatus("coibicziuswswjrk") + .withStartTimeUtc(OffsetDateTime.parse("2021-09-07T17:58:52Z")) + .withEndTimeUtc(OffsetDateTime.parse("2021-02-02T15:31:39Z")) + .withLastUpdatedTimeUtc(OffsetDateTime.parse("2021-03-09T17:41:31Z")) + .withExpectedExecutionTime("q") + .withSteps(Arrays.asList(new Step().withName("cyrfwbivqvog") + .withDescription("yzwvbhlimbyqec") + .withErrorMessage("odlikcdrdaasax") + .withStatus("bsmfkwiyjvz") + .withStartTimeUtc(OffsetDateTime.parse("2021-06-28T05:15:16Z")) + .withEndTimeUtc(OffsetDateTime.parse("2021-10-16T04:32:04Z")) + .withLastUpdatedTimeUtc(OffsetDateTime.parse("2021-08-01T13:51:45Z")) + .withExpectedExecutionTime("nvzmlnkoywsx") + .withSteps(Arrays.asList(new Step(), new Step(), 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("qid", model.name()); + Assertions.assertEquals("toqxjh", model.description()); + Assertions.assertEquals("csqhtkbtnqlrng", model.errorMessage()); + Assertions.assertEquals("mbiipsnawwlqk", model.status()); + Assertions.assertEquals(OffsetDateTime.parse("2021-09-21T19:49:31Z"), model.startTimeUtc()); + Assertions.assertEquals(OffsetDateTime.parse("2021-09-07T00:04:37Z"), model.endTimeUtc()); + Assertions.assertEquals(OffsetDateTime.parse("2021-08-18T01:23:09Z"), model.lastUpdatedTimeUtc()); + Assertions.assertEquals("ricctkwmuqqoa", model.expectedExecutionTime()); + Assertions.assertEquals("y", model.steps().get(0).name()); + Assertions.assertEquals("esrw", model.steps().get(0).description()); + Assertions.assertEquals("exh", model.steps().get(0).errorMessage()); + Assertions.assertEquals("trceqnkbrupob", model.steps().get(0).status()); + Assertions.assertEquals(OffsetDateTime.parse("2021-06-25T01:16:41Z"), model.steps().get(0).startTimeUtc()); + Assertions.assertEquals(OffsetDateTime.parse("2021-04-28T12:28:12Z"), model.steps().get(0).endTimeUtc()); + Assertions.assertEquals(OffsetDateTime.parse("2021-09-16T05:32:49Z"), 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("cvumepjpbi", model.steps().get(0).expectedExecutionTime()); + Assertions.assertEquals("phepifexleqirc", model.steps().get(0).steps().get(0).name()); + Assertions.assertEquals("cly", model.steps().get(0).steps().get(0).description()); + Assertions.assertEquals("gxvrpjl", model.steps().get(0).steps().get(0).errorMessage()); + Assertions.assertEquals("zuodacpun", model.steps().get(0).steps().get(0).status()); + Assertions.assertEquals(OffsetDateTime.parse("2021-10-01T04:32:07Z"), model.steps().get(0).steps().get(0).startTimeUtc()); - Assertions.assertEquals(OffsetDateTime.parse("2021-11-19T16:29:04Z"), + Assertions.assertEquals(OffsetDateTime.parse("2021-03-12T01:38:44Z"), model.steps().get(0).steps().get(0).endTimeUtc()); - Assertions.assertEquals(OffsetDateTime.parse("2021-04-15T16:55:23Z"), + Assertions.assertEquals(OffsetDateTime.parse("2020-12-26T14:54:55Z"), model.steps().get(0).steps().get(0).lastUpdatedTimeUtc()); - Assertions.assertEquals("aqtferr", model.steps().get(0).steps().get(0).expectedExecutionTime()); + Assertions.assertEquals("qeskoynui", model.steps().get(0).steps().get(0).expectedExecutionTime()); } } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/StorageConfigurationTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/StorageConfigurationTests.java new file mode 100644 index 000000000000..d1273fe8af0d --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/StorageConfigurationTests.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; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.azurestackhci.models.StorageConfiguration; +import org.junit.jupiter.api.Assertions; + +public final class StorageConfigurationTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + StorageConfiguration model + = BinaryData.fromString("{\"partitionSize\":\"jyrkwfug\"}").toObject(StorageConfiguration.class); + Assertions.assertEquals("jyrkwfug", model.partitionSize()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + StorageConfiguration model = new StorageConfiguration().withPartitionSize("jyrkwfug"); + model = BinaryData.fromObject(model).toObject(StorageConfiguration.class); + Assertions.assertEquals("jyrkwfug", model.partitionSize()); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/StorageProfileTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/StorageProfileTests.java new file mode 100644 index 000000000000..b37864c04174 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/StorageProfileTests.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.StorageProfile; + +public final class StorageProfileTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + StorageProfile model + = BinaryData.fromString("{\"poolableDisksCount\":6499757878767405026}").toObject(StorageProfile.class); + } +} 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..c7a428d91d82 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\":\"dsnfdsdoakgtdl\"}").toObject(Storage.class); + Assertions.assertEquals("dsnfdsdoakgtdl", model.configurationMode()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - Storage model = new Storage().withConfigurationMode("laulppg"); + Storage model = new Storage().withConfigurationMode("dsnfdsdoakgtdl"); model = BinaryData.fromObject(model).toObject(Storage.class); - Assertions.assertEquals("laulppg", model.configurationMode()); + Assertions.assertEquals("dsnfdsdoakgtdl", 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..afd2b6952117 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\":\"xrhyzdfwrsofplt\",\"switchType\":\"mairrh\",\"extensions\":[{\"switchId\":\"ra\",\"extensionName\":\"npq\",\"extensionEnabled\":false},{\"switchId\":\"ujwouhdawsi\",\"extensionName\":\"bjb\",\"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..e59883b93d47 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\":\"bvitvqkjya\",\"extensionName\":\"umtggmuwdchozfn\",\"extensionEnabled\":true}") + .toObject(SwitchExtension.class); } } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/TargetDeviceConfigurationTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/TargetDeviceConfigurationTests.java new file mode 100644 index 000000000000..7a030a9006c3 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/TargetDeviceConfigurationTests.java @@ -0,0 +1,116 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.azurestackhci.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.azurestackhci.models.IpAddressRange; +import com.azure.resourcemanager.azurestackhci.models.IpAssignmentType; +import com.azure.resourcemanager.azurestackhci.models.NetworkAdapter; +import com.azure.resourcemanager.azurestackhci.models.NetworkConfiguration; +import com.azure.resourcemanager.azurestackhci.models.StorageConfiguration; +import com.azure.resourcemanager.azurestackhci.models.TargetDeviceConfiguration; +import com.azure.resourcemanager.azurestackhci.models.TimeConfiguration; +import com.azure.resourcemanager.azurestackhci.models.WebProxyConfiguration; +import java.util.Arrays; +import org.junit.jupiter.api.Assertions; + +public final class TargetDeviceConfigurationTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + TargetDeviceConfiguration model = BinaryData.fromString( + "{\"network\":{\"networkAdapters\":[{\"ipAssignmentType\":\"Manual\",\"ipAddress\":\"fbotloggdusxurs\",\"adapterName\":\"v\",\"macAddress\":\"cjkcoqwczsyiqri\",\"ipAddressRange\":{\"startIp\":\"wihvaangqtnh\",\"endIp\":\"rfdmfdvbbaexx\"},\"gateway\":\"wtgdfkkaui\",\"subnetMask\":\"muafmczfedyuepsv\",\"dnsAddressArray\":[\"ida\",\"jvyweo\",\"fkumcfjxoky\",\"lsyasv\"],\"vlanId\":\"k\"},{\"ipAssignmentType\":\"Automatic\",\"ipAddress\":\"gjjekrkn\",\"adapterName\":\"rugjqyckgtx\",\"macAddress\":\"dtu\",\"ipAddressRange\":{\"startIp\":\"r\",\"endIp\":\"jdkl\"},\"gateway\":\"csubmzoonsvobc\",\"subnetMask\":\"xfpwhd\",\"dnsAddressArray\":[\"bklg\"],\"vlanId\":\"nn\"},{\"ipAssignmentType\":\"Manual\",\"ipAddress\":\"ayqshwyqxridttbs\",\"adapterName\":\"jmkgxqwqueuuylzt\",\"macAddress\":\"iizevjykofvez\",\"ipAddressRange\":{\"startIp\":\"k\",\"endIp\":\"kqtwqlepjjzkcasf\"},\"gateway\":\"c\",\"subnetMask\":\"o\",\"dnsAddressArray\":[\"jwajnrtw\",\"vaqkifmxawost\"],\"vlanId\":\"knhrkmjqncf\"},{\"ipAssignmentType\":\"Manual\",\"ipAddress\":\"cnhemvwfnq\",\"adapterName\":\"ypvndrw\",\"macAddress\":\"od\",\"ipAddressRange\":{\"startIp\":\"grssgw\",\"endIp\":\"fk\"},\"gateway\":\"njm\",\"subnetMask\":\"mvecvztscbgmusai\",\"dnsAddressArray\":[\"scnkzzohnrd\",\"clzeq\"],\"vlanId\":\"rehlbzqixbnj\"}]},\"hostName\":\"vzyue\",\"webProxy\":{\"connectionUri\":\"onynpa\",\"port\":\"udpabcreuwzos\",\"bypassList\":[\"xvcvasormrexz\",\"dubewgzy\"]},\"time\":{\"primaryTimeServer\":\"duvec\",\"secondaryTimeServer\":\"sdqhzr\",\"timeZone\":\"bakrli\"},\"storage\":{\"partitionSize\":\"vppkeqsi\"}}") + .toObject(TargetDeviceConfiguration.class); + Assertions.assertEquals(IpAssignmentType.MANUAL, model.network().networkAdapters().get(0).ipAssignmentType()); + Assertions.assertEquals("fbotloggdusxurs", model.network().networkAdapters().get(0).ipAddress()); + Assertions.assertEquals("v", model.network().networkAdapters().get(0).adapterName()); + Assertions.assertEquals("cjkcoqwczsyiqri", model.network().networkAdapters().get(0).macAddress()); + Assertions.assertEquals("wihvaangqtnh", model.network().networkAdapters().get(0).ipAddressRange().startIp()); + Assertions.assertEquals("rfdmfdvbbaexx", model.network().networkAdapters().get(0).ipAddressRange().endIp()); + Assertions.assertEquals("wtgdfkkaui", model.network().networkAdapters().get(0).gateway()); + Assertions.assertEquals("muafmczfedyuepsv", model.network().networkAdapters().get(0).subnetMask()); + Assertions.assertEquals("ida", model.network().networkAdapters().get(0).dnsAddressArray().get(0)); + Assertions.assertEquals("k", model.network().networkAdapters().get(0).vlanId()); + Assertions.assertEquals("vzyue", model.hostName()); + Assertions.assertEquals("onynpa", model.webProxy().connectionUri()); + Assertions.assertEquals("udpabcreuwzos", model.webProxy().port()); + Assertions.assertEquals("xvcvasormrexz", model.webProxy().bypassList().get(0)); + Assertions.assertEquals("duvec", model.time().primaryTimeServer()); + Assertions.assertEquals("sdqhzr", model.time().secondaryTimeServer()); + Assertions.assertEquals("bakrli", model.time().timeZone()); + Assertions.assertEquals("vppkeqsi", model.storage().partitionSize()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + TargetDeviceConfiguration model + = new TargetDeviceConfiguration() + .withNetwork( + new NetworkConfiguration().withNetworkAdapters(Arrays.asList( + new NetworkAdapter().withIpAssignmentType(IpAssignmentType.MANUAL) + .withIpAddress("fbotloggdusxurs") + .withAdapterName("v") + .withMacAddress("cjkcoqwczsyiqri") + .withIpAddressRange( + new IpAddressRange().withStartIp("wihvaangqtnh").withEndIp("rfdmfdvbbaexx")) + .withGateway("wtgdfkkaui") + .withSubnetMask("muafmczfedyuepsv") + .withDnsAddressArray(Arrays.asList("ida", "jvyweo", "fkumcfjxoky", "lsyasv")) + .withVlanId("k"), + new NetworkAdapter().withIpAssignmentType(IpAssignmentType.AUTOMATIC) + .withIpAddress("gjjekrkn") + .withAdapterName("rugjqyckgtx") + .withMacAddress("dtu") + .withIpAddressRange(new IpAddressRange().withStartIp("r").withEndIp("jdkl")) + .withGateway("csubmzoonsvobc") + .withSubnetMask("xfpwhd") + .withDnsAddressArray(Arrays.asList("bklg")) + .withVlanId("nn"), + new NetworkAdapter().withIpAssignmentType(IpAssignmentType.MANUAL) + .withIpAddress("ayqshwyqxridttbs") + .withAdapterName("jmkgxqwqueuuylzt") + .withMacAddress("iizevjykofvez") + .withIpAddressRange(new IpAddressRange().withStartIp("k").withEndIp("kqtwqlepjjzkcasf")) + .withGateway("c") + .withSubnetMask("o") + .withDnsAddressArray(Arrays.asList("jwajnrtw", "vaqkifmxawost")) + .withVlanId("knhrkmjqncf"), + new NetworkAdapter().withIpAssignmentType(IpAssignmentType.MANUAL) + .withIpAddress("cnhemvwfnq") + .withAdapterName("ypvndrw") + .withMacAddress("od") + .withIpAddressRange(new IpAddressRange().withStartIp("grssgw").withEndIp("fk")) + .withGateway("njm") + .withSubnetMask("mvecvztscbgmusai") + .withDnsAddressArray(Arrays.asList("scnkzzohnrd", "clzeq")) + .withVlanId("rehlbzqixbnj")))) + .withHostName("vzyue") + .withWebProxy(new WebProxyConfiguration().withConnectionUri("onynpa") + .withPort("udpabcreuwzos") + .withBypassList(Arrays.asList("xvcvasormrexz", "dubewgzy"))) + .withTime(new TimeConfiguration().withPrimaryTimeServer("duvec") + .withSecondaryTimeServer("sdqhzr") + .withTimeZone("bakrli")) + .withStorage(new StorageConfiguration().withPartitionSize("vppkeqsi")); + model = BinaryData.fromObject(model).toObject(TargetDeviceConfiguration.class); + Assertions.assertEquals(IpAssignmentType.MANUAL, model.network().networkAdapters().get(0).ipAssignmentType()); + Assertions.assertEquals("fbotloggdusxurs", model.network().networkAdapters().get(0).ipAddress()); + Assertions.assertEquals("v", model.network().networkAdapters().get(0).adapterName()); + Assertions.assertEquals("cjkcoqwczsyiqri", model.network().networkAdapters().get(0).macAddress()); + Assertions.assertEquals("wihvaangqtnh", model.network().networkAdapters().get(0).ipAddressRange().startIp()); + Assertions.assertEquals("rfdmfdvbbaexx", model.network().networkAdapters().get(0).ipAddressRange().endIp()); + Assertions.assertEquals("wtgdfkkaui", model.network().networkAdapters().get(0).gateway()); + Assertions.assertEquals("muafmczfedyuepsv", model.network().networkAdapters().get(0).subnetMask()); + Assertions.assertEquals("ida", model.network().networkAdapters().get(0).dnsAddressArray().get(0)); + Assertions.assertEquals("k", model.network().networkAdapters().get(0).vlanId()); + Assertions.assertEquals("vzyue", model.hostName()); + Assertions.assertEquals("onynpa", model.webProxy().connectionUri()); + Assertions.assertEquals("udpabcreuwzos", model.webProxy().port()); + Assertions.assertEquals("xvcvasormrexz", model.webProxy().bypassList().get(0)); + Assertions.assertEquals("duvec", model.time().primaryTimeServer()); + Assertions.assertEquals("sdqhzr", model.time().secondaryTimeServer()); + Assertions.assertEquals("bakrli", model.time().timeZone()); + Assertions.assertEquals("vppkeqsi", model.storage().partitionSize()); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/TimeConfigurationTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/TimeConfigurationTests.java new file mode 100644 index 000000000000..85139b351277 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/TimeConfigurationTests.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.core.util.BinaryData; +import com.azure.resourcemanager.azurestackhci.models.TimeConfiguration; +import org.junit.jupiter.api.Assertions; + +public final class TimeConfigurationTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + TimeConfiguration model = BinaryData + .fromString( + "{\"primaryTimeServer\":\"bdoeysf\",\"secondaryTimeServer\":\"imtwuuhau\",\"timeZone\":\"nkwmnfeub\"}") + .toObject(TimeConfiguration.class); + Assertions.assertEquals("bdoeysf", model.primaryTimeServer()); + Assertions.assertEquals("imtwuuhau", model.secondaryTimeServer()); + Assertions.assertEquals("nkwmnfeub", model.timeZone()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + TimeConfiguration model = new TimeConfiguration().withPrimaryTimeServer("bdoeysf") + .withSecondaryTimeServer("imtwuuhau") + .withTimeZone("nkwmnfeub"); + model = BinaryData.fromObject(model).toObject(TimeConfiguration.class); + Assertions.assertEquals("bdoeysf", model.primaryTimeServer()); + Assertions.assertEquals("imtwuuhau", model.secondaryTimeServer()); + Assertions.assertEquals("nkwmnfeub", model.timeZone()); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/UpdateContentInnerTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/UpdateContentInnerTests.java new file mode 100644 index 000000000000..32355169d05f --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/UpdateContentInnerTests.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; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.azurestackhci.fluent.models.UpdateContentInner; +import org.junit.jupiter.api.Assertions; + +public final class UpdateContentInnerTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + UpdateContentInner model = BinaryData.fromString( + "{\"properties\":{\"updatePayloads\":[{\"url\":\"lwhijcoejctbzaq\",\"hash\":\"sycbkbfk\",\"hashAlgorithm\":\"kdkexxp\",\"identifier\":\"fmxa\",\"packageSizeInBytes\":\"fjpgddtocjjxhvp\",\"group\":\"uexhdzx\",\"fileName\":\"qeojnxqbzvddntw\"}]},\"id\":\"eic\",\"name\":\"twnpzaoqvuhrhcf\",\"type\":\"cyddglmjthjqk\"}") + .toObject(UpdateContentInner.class); + Assertions.assertEquals("lwhijcoejctbzaq", model.properties().updatePayloads().get(0).url()); + Assertions.assertEquals("sycbkbfk", model.properties().updatePayloads().get(0).hash()); + Assertions.assertEquals("kdkexxp", model.properties().updatePayloads().get(0).hashAlgorithm()); + Assertions.assertEquals("fmxa", model.properties().updatePayloads().get(0).identifier()); + Assertions.assertEquals("fjpgddtocjjxhvp", model.properties().updatePayloads().get(0).packageSizeInBytes()); + Assertions.assertEquals("uexhdzx", model.properties().updatePayloads().get(0).group()); + Assertions.assertEquals("qeojnxqbzvddntw", model.properties().updatePayloads().get(0).fileName()); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/UpdateContentListResultTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/UpdateContentListResultTests.java new file mode 100644 index 000000000000..0d92265c6f4d --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/UpdateContentListResultTests.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; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.azurestackhci.implementation.models.UpdateContentListResult; +import org.junit.jupiter.api.Assertions; + +public final class UpdateContentListResultTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + UpdateContentListResult model = BinaryData.fromString( + "{\"value\":[{\"properties\":{\"updatePayloads\":[{\"url\":\"zxdpnqbqqw\",\"hash\":\"jfeallnwsub\",\"hashAlgorithm\":\"njampm\",\"identifier\":\"nzscxa\",\"packageSizeInBytes\":\"ooch\",\"group\":\"onq\",\"fileName\":\"kvlrxnj\"},{\"url\":\"seiphe\",\"hash\":\"lokeyy\",\"hashAlgorithm\":\"nj\",\"identifier\":\"lwtgrhpdj\",\"packageSizeInBytes\":\"umasxazjpq\",\"group\":\"gual\",\"fileName\":\"xxhejjzzvd\"}]},\"id\":\"gwdslfhotwm\",\"name\":\"ynpwlbj\",\"type\":\"pgacftadehxnlty\"},{\"properties\":{\"updatePayloads\":[{\"url\":\"pusuesn\",\"hash\":\"dejbavo\",\"hashAlgorithm\":\"zdmohctbqvu\",\"identifier\":\"xdn\",\"packageSizeInBytes\":\"vo\",\"group\":\"ujjugwdkcglh\",\"fileName\":\"azjdyggd\"},{\"url\":\"ixhbkuofqweykhm\",\"hash\":\"evfyexfwhybcib\",\"hashAlgorithm\":\"vdcsitynn\",\"identifier\":\"mdectehfiqscjey\",\"packageSizeInBytes\":\"hezrkgq\",\"group\":\"jrefovgmkqsle\",\"fileName\":\"vxyqjpkcattpngjc\"},{\"url\":\"czsqpjhvm\",\"hash\":\"jvnysounqe\",\"hashAlgorithm\":\"noae\",\"identifier\":\"fhyhltrpmopjmcma\",\"packageSizeInBytes\":\"okth\",\"group\":\"iuaod\",\"fileName\":\"cpkvxodp\"}]},\"id\":\"zmyzydagf\",\"name\":\"axbezyiuo\",\"type\":\"ktwh\"},{\"properties\":{\"updatePayloads\":[{\"url\":\"zywqsmbsu\",\"hash\":\"xim\",\"hashAlgorithm\":\"yocf\",\"identifier\":\"ksymd\",\"packageSizeInBytes\":\"stkiiuxhqyud\",\"group\":\"rrqnbpoczvyifqrv\",\"fileName\":\"vjsllrmvvdfw\"}]},\"id\":\"kpnpulexxbczwtr\",\"name\":\"wiqzbqjvsovmyo\",\"type\":\"acspkwl\"},{\"properties\":{\"updatePayloads\":[{\"url\":\"bpxjmfl\",\"hash\":\"vnchrkcci\",\"hashAlgorithm\":\"zjuqkhrsaj\",\"identifier\":\"ku\",\"packageSizeInBytes\":\"oskg\",\"group\":\"auu\",\"fileName\":\"jmvxie\"},{\"url\":\"ugidyjrr\",\"hash\":\"y\",\"hashAlgorithm\":\"svexcsonpclhoco\",\"identifier\":\"lkevle\",\"packageSizeInBytes\":\"zfbuhf\",\"group\":\"faxkffeii\",\"fileName\":\"lvmezyvshxmzsbbz\"},{\"url\":\"gigr\",\"hash\":\"burvjxxjnspy\",\"hashAlgorithm\":\"tko\",\"identifier\":\"kouknvudwtiu\",\"packageSizeInBytes\":\"ldngkpoci\",\"group\":\"z\",\"fileName\":\"o\"},{\"url\":\"ukgjnpiucgygevq\",\"hash\":\"typmrbpizcdrqjsd\",\"hashAlgorithm\":\"dnfyhxdeoejzicwi\",\"identifier\":\"jttgzf\",\"packageSizeInBytes\":\"shcbkhajdeyeamdp\",\"group\":\"g\",\"fileName\":\"pbuxwgipwhon\"}]},\"id\":\"kgshwa\",\"name\":\"kix\",\"type\":\"bin\"}],\"nextLink\":\"pu\"}") + .toObject(UpdateContentListResult.class); + Assertions.assertEquals("zxdpnqbqqw", model.value().get(0).properties().updatePayloads().get(0).url()); + Assertions.assertEquals("jfeallnwsub", model.value().get(0).properties().updatePayloads().get(0).hash()); + Assertions.assertEquals("njampm", model.value().get(0).properties().updatePayloads().get(0).hashAlgorithm()); + Assertions.assertEquals("nzscxa", model.value().get(0).properties().updatePayloads().get(0).identifier()); + Assertions.assertEquals("ooch", model.value().get(0).properties().updatePayloads().get(0).packageSizeInBytes()); + Assertions.assertEquals("onq", model.value().get(0).properties().updatePayloads().get(0).group()); + Assertions.assertEquals("kvlrxnj", model.value().get(0).properties().updatePayloads().get(0).fileName()); + Assertions.assertEquals("pu", model.nextLink()); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/UpdateContentPropertiesTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/UpdateContentPropertiesTests.java new file mode 100644 index 000000000000..6669df3657f0 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/UpdateContentPropertiesTests.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; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.azurestackhci.models.UpdateContentProperties; +import org.junit.jupiter.api.Assertions; + +public final class UpdateContentPropertiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + UpdateContentProperties model = BinaryData.fromString( + "{\"updatePayloads\":[{\"url\":\"eicxmqciwqvhkhi\",\"hash\":\"igdtopbob\",\"hashAlgorithm\":\"ghmewuam\",\"identifier\":\"hrzayvvtpgvdf\",\"packageSizeInBytes\":\"otkftutqxlngx\",\"group\":\"fgugnxkrxdqmid\",\"fileName\":\"hzrvqd\"},{\"url\":\"bhj\",\"hash\":\"igeho\",\"hashAlgorithm\":\"bowsk\",\"identifier\":\"yktz\",\"packageSizeInBytes\":\"u\",\"group\":\"wgqyw\",\"fileName\":\"drvyn\"}]}") + .toObject(UpdateContentProperties.class); + Assertions.assertEquals("eicxmqciwqvhkhi", model.updatePayloads().get(0).url()); + Assertions.assertEquals("igdtopbob", model.updatePayloads().get(0).hash()); + Assertions.assertEquals("ghmewuam", model.updatePayloads().get(0).hashAlgorithm()); + Assertions.assertEquals("hrzayvvtpgvdf", model.updatePayloads().get(0).identifier()); + Assertions.assertEquals("otkftutqxlngx", model.updatePayloads().get(0).packageSizeInBytes()); + Assertions.assertEquals("fgugnxkrxdqmid", model.updatePayloads().get(0).group()); + Assertions.assertEquals("hzrvqd", model.updatePayloads().get(0).fileName()); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/UpdateContentsGetWithResponseMockTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/UpdateContentsGetWithResponseMockTests.java new file mode 100644 index 000000000000..353b8342cb48 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/UpdateContentsGetWithResponseMockTests.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.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.UpdateContent; +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 UpdateContentsGetWithResponseMockTests { + @Test + public void testGetWithResponse() throws Exception { + String responseStr + = "{\"properties\":{\"updatePayloads\":[{\"url\":\"sgtlvhqpoilosja\",\"hash\":\"cez\",\"hashAlgorithm\":\"ft\",\"identifier\":\"l\",\"packageSizeInBytes\":\"okjyghzt\",\"group\":\"miwtpcflcez\",\"fileName\":\"wvwiftdjtvbfpfh\"},{\"url\":\"ptsyqcjnqswxdo\",\"hash\":\"mxqukrcdio\",\"hashAlgorithm\":\"lqddnhfknebwedd\",\"identifier\":\"yzcwy\",\"packageSizeInBytes\":\"mkaqldqabnwvpaq\",\"group\":\"xf\",\"fileName\":\"igcfddofxnf\"},{\"url\":\"jyyrqaedw\",\"hash\":\"ocytjgoeayokrw\",\"hashAlgorithm\":\"ihwpadhedbfobd\",\"identifier\":\"vothmkhjaoz\",\"packageSizeInBytes\":\"wfcn\",\"group\":\"bpoelhscmyhrhjv\",\"fileName\":\"fqbokndwp\"}]},\"id\":\"qwojoev\",\"name\":\"zufy\",\"type\":\"dxmlynzlyvapbkr\"}"; + + 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)); + + UpdateContent response = manager.updateContents() + .getWithResponse("swzeyxry", "armhpwbuklv", com.azure.core.util.Context.NONE) + .getValue(); + + Assertions.assertEquals("sgtlvhqpoilosja", response.properties().updatePayloads().get(0).url()); + Assertions.assertEquals("cez", response.properties().updatePayloads().get(0).hash()); + Assertions.assertEquals("ft", response.properties().updatePayloads().get(0).hashAlgorithm()); + Assertions.assertEquals("l", response.properties().updatePayloads().get(0).identifier()); + Assertions.assertEquals("okjyghzt", response.properties().updatePayloads().get(0).packageSizeInBytes()); + Assertions.assertEquals("miwtpcflcez", response.properties().updatePayloads().get(0).group()); + Assertions.assertEquals("wvwiftdjtvbfpfh", response.properties().updatePayloads().get(0).fileName()); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/UpdateContentsListMockTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/UpdateContentsListMockTests.java new file mode 100644 index 000000000000..df84fa7510e5 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/UpdateContentsListMockTests.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.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.UpdateContent; +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 UpdateContentsListMockTests { + @Test + public void testList() throws Exception { + String responseStr + = "{\"value\":[{\"properties\":{\"updatePayloads\":[{\"url\":\"tlcuhaizijvayl\",\"hash\":\"ohlpsftqkr\",\"hashAlgorithm\":\"hvbvvcpwtqsus\",\"identifier\":\"hmz\",\"packageSizeInBytes\":\"ffetevrnt\",\"group\":\"nwacycsy\",\"fileName\":\"ctkhfh\"},{\"url\":\"atvcsxr\",\"hash\":\"nmizhv\",\"hashAlgorithm\":\"hqqwcubl\",\"identifier\":\"hk\",\"packageSizeInBytes\":\"obzgott\",\"group\":\"sadzighmmtb\",\"fileName\":\"vucfvvraab\"}]},\"id\":\"rdeewl\",\"name\":\"uxpcbwkdwj\",\"type\":\"jiznioroofmftas\"}]}"; + + 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.updateContents().list("uog", com.azure.core.util.Context.NONE); + + Assertions.assertEquals("tlcuhaizijvayl", + response.iterator().next().properties().updatePayloads().get(0).url()); + Assertions.assertEquals("ohlpsftqkr", response.iterator().next().properties().updatePayloads().get(0).hash()); + Assertions.assertEquals("hvbvvcpwtqsus", + response.iterator().next().properties().updatePayloads().get(0).hashAlgorithm()); + Assertions.assertEquals("hmz", response.iterator().next().properties().updatePayloads().get(0).identifier()); + Assertions.assertEquals("ffetevrnt", + response.iterator().next().properties().updatePayloads().get(0).packageSizeInBytes()); + Assertions.assertEquals("nwacycsy", response.iterator().next().properties().updatePayloads().get(0).group()); + Assertions.assertEquals("ctkhfh", response.iterator().next().properties().updatePayloads().get(0).fileName()); + } +} 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..270002b99817 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\":\"DisableInProgress\",\"installedDate\":\"2021-04-10T21:27:38Z\",\"description\":\"tiekoifuvnyttz\",\"minSbeVersionRequired\":\"xgyrihlgmgbehlqt\",\"state\":\"HealthCheckFailed\",\"prerequisites\":[{\"updateType\":\"ndrndpgf\",\"version\":\"dhdaqotwfhipx\",\"packageName\":\"sabvcip\"},{\"updateType\":\"zafczuumljci\",\"version\":\"pefyc\",\"packageName\":\"ei\"},{\"updateType\":\"tjnsx\",\"version\":\"jlnsj\",\"packageName\":\"ju\"},{\"updateType\":\"xbxq\",\"version\":\"vuaytuad\",\"packageName\":\"xeqbwp\"}],\"componentVersions\":[{\"packageType\":\"yksarcdrnxsluvlz\",\"version\":\"dltxkpbq\",\"lastUpdated\":\"2021-01-18T08:20:17Z\"},{\"packageType\":\"qqjwkrh\",\"version\":\"dano\",\"lastUpdated\":\"2021-01-04T20:07:40Z\"},{\"packageType\":\"glmvoka\",\"version\":\"ztjctibpvbkae\",\"lastUpdated\":\"2021-10-23T18:31:15Z\"},{\"packageType\":\"zygdfwa\",\"version\":\"seivmakxhysow\",\"lastUpdated\":\"2021-06-07T14:14:17Z\"}],\"rebootRequired\":\"Unknown\",\"healthState\":\"Unknown\",\"healthCheckResult\":[{\"name\":\"vtfjmsk\",\"displayName\":\"hmaiubavlzwpvg\",\"tags\":{},\"healthCheckTags\":\"datalkzazmgok\",\"title\":\"gjqafkmkrokzr\",\"status\":\"ConnectedRecently\",\"severity\":\"Warning\",\"description\":\"pqrtvaoznqni\",\"remediation\":\"ezeagmceituuge\",\"targetResourceID\":\"fpjstlzmb\",\"targetResourceName\":\"yjdeolctaebfs\",\"targetResourceType\":\"ledjcustbvtqigd\",\"timestamp\":\"2021-10-28T02:30:07Z\",\"additionalData\":\"geafgfosehxlzsxe\",\"healthCheckSource\":\"p\"},{\"name\":\"waaeskyfjl\",\"displayName\":\"eqtoyrpl\",\"tags\":{},\"healthCheckTags\":\"dataaj\",\"title\":\"lpquevhamfow\",\"status\":\"ValidationFailed\",\"severity\":\"Hidden\",\"description\":\"ekxpkzwaqxofqo\",\"remediation\":\"hiq\",\"targetResourceID\":\"lvfidusztekxbyjg\",\"targetResourceName\":\"fepxyihpqadag\",\"targetResourceType\":\"rdi\",\"timestamp\":\"2021-09-03T03:17:25Z\",\"additionalData\":\"y\",\"healthCheckSource\":\"owxwyovcxjsgbip\"}],\"healthCheckDate\":\"2021-10-17T21:22Z\",\"packagePath\":\"veksbuhoduchvl\",\"packageSizeInMb\":43.40370156323805,\"displayName\":\"ib\",\"version\":\"yjdusspysze\",\"publisher\":\"hwlkaaggkrehb\",\"releaseLink\":\"n\",\"availabilityType\":\"Online\",\"packageType\":\"fljfiimreoagsqt\",\"additionalProperties\":\"dusr\",\"updateStateProperties\":{\"progressPercentage\":3.6069958227398224,\"notifyMessage\":\"sqwudohzilfmnli\"}},\"location\":\"simsfeypofqpmb\",\"id\":\"qgsdr\",\"name\":\"mttjxophgerh\",\"type\":\"mvgohtwz\"},{\"properties\":{\"provisioningState\":\"Provisioning\",\"installedDate\":\"2021-11-25T07:26:15Z\",\"description\":\"ysfn\",\"minSbeVersionRequired\":\"sqywwwmhkru\",\"state\":\"NotApplicableBecauseAnotherUpdateIsInProgress\",\"prerequisites\":[{\"updateType\":\"mpmlqoin\",\"version\":\"duewihapfj\",\"packageName\":\"knjdiqfliejhp\"},{\"updateType\":\"bi\",\"version\":\"fsbw\",\"packageName\":\"ivbvzi\"}],\"componentVersions\":[{\"packageType\":\"goooxz\",\"version\":\"admskx\",\"lastUpdated\":\"2021-02-19T10:01:31Z\"},{\"packageType\":\"gzigjsugswhgsaod\",\"version\":\"wnbaf\",\"lastUpdated\":\"2021-02-18T04:23:38Z\"},{\"packageType\":\"hzhaquvwsxb\",\"version\":\"vkervqchoadhrsxq\",\"lastUpdated\":\"2021-08-11T00:23:47Z\"}],\"rebootRequired\":\"Unknown\",\"healthState\":\"Failure\",\"healthCheckResult\":[{\"name\":\"gfajglzrsubklr\",\"displayName\":\"jnltcetjdvqydi\",\"tags\":{},\"healthCheckTags\":\"datakw\",\"title\":\"uwdxvqzxoebwgj\",\"status\":\"DeploymentInProgress\",\"severity\":\"Critical\",\"description\":\"baupw\",\"remediation\":\"vpaklozkxbz\",\"targetResourceID\":\"ejpl\",\"targetResourceName\":\"anbtttkgsu\",\"targetResourceType\":\"nrswgkpjhboyik\",\"timestamp\":\"2020-12-21T22:30:17Z\",\"additionalData\":\"hkslgwlokhueoij\",\"healthCheckSource\":\"cqypz\"}],\"healthCheckDate\":\"2021-10-03T18:10:33Z\",\"packagePath\":\"gsyfejyvdwt\",\"packageSizeInMb\":57.31968154808269,\"displayName\":\"qayamk\",\"version\":\"fgybmxs\",\"publisher\":\"ocuullojkpoyhgww\",\"releaseLink\":\"uxdbdljzgdyrcvuq\",\"availabilityType\":\"Notify\",\"packageType\":\"lr\",\"additionalProperties\":\"bjnqogdxwbsf\",\"updateStateProperties\":{\"progressPercentage\":2.277325970861943,\"notifyMessage\":\"lflec\"}},\"location\":\"inxojjlux\",\"id\":\"hilzzdzzq\",\"name\":\"mueza\",\"type\":\"ovribq\"}],\"nextLink\":\"tokhtvwtaznkcqw\"}") .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("simsfeypofqpmb", model.value().get(0).location()); + Assertions.assertEquals(OffsetDateTime.parse("2021-04-10T21:27:38Z"), model.value().get(0).installedDate()); + Assertions.assertEquals("tiekoifuvnyttz", model.value().get(0).description()); + Assertions.assertEquals("xgyrihlgmgbehlqt", model.value().get(0).minSbeVersionRequired()); + Assertions.assertEquals(State.HEALTH_CHECK_FAILED, model.value().get(0).state()); + Assertions.assertEquals("ndrndpgf", model.value().get(0).prerequisites().get(0).updateType()); + Assertions.assertEquals("dhdaqotwfhipx", model.value().get(0).prerequisites().get(0).version()); + Assertions.assertEquals("sabvcip", model.value().get(0).prerequisites().get(0).packageName()); + Assertions.assertEquals("yksarcdrnxsluvlz", model.value().get(0).componentVersions().get(0).packageType()); + Assertions.assertEquals("dltxkpbq", model.value().get(0).componentVersions().get(0).version()); + Assertions.assertEquals(OffsetDateTime.parse("2021-01-18T08:20:17Z"), 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.UNKNOWN, model.value().get(0).healthState()); + Assertions.assertEquals("vtfjmsk", model.value().get(0).healthCheckResult().get(0).name()); + Assertions.assertEquals("hmaiubavlzwpvg", model.value().get(0).healthCheckResult().get(0).displayName()); + Assertions.assertEquals("gjqafkmkrokzr", model.value().get(0).healthCheckResult().get(0).title()); + Assertions.assertEquals(Status.CONNECTED_RECENTLY, model.value().get(0).healthCheckResult().get(0).status()); + Assertions.assertEquals(Severity.WARNING, model.value().get(0).healthCheckResult().get(0).severity()); + Assertions.assertEquals("pqrtvaoznqni", model.value().get(0).healthCheckResult().get(0).description()); + Assertions.assertEquals("ezeagmceituuge", model.value().get(0).healthCheckResult().get(0).remediation()); + Assertions.assertEquals("fpjstlzmb", model.value().get(0).healthCheckResult().get(0).targetResourceId()); + Assertions.assertEquals("yjdeolctaebfs", model.value().get(0).healthCheckResult().get(0).targetResourceName()); + Assertions.assertEquals("ledjcustbvtqigd", + model.value().get(0).healthCheckResult().get(0).targetResourceType()); + Assertions.assertEquals(OffsetDateTime.parse("2021-10-28T02:30:07Z"), 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("geafgfosehxlzsxe", model.value().get(0).healthCheckResult().get(0).additionalData()); + Assertions.assertEquals("p", model.value().get(0).healthCheckResult().get(0).healthCheckSource()); + Assertions.assertEquals(OffsetDateTime.parse("2021-10-17T21:22Z"), model.value().get(0).healthCheckDate()); + Assertions.assertEquals("veksbuhoduchvl", model.value().get(0).packagePath()); + Assertions.assertEquals(43.40370156323805D, model.value().get(0).packageSizeInMb()); + Assertions.assertEquals("ib", model.value().get(0).displayName()); + Assertions.assertEquals("yjdusspysze", model.value().get(0).version()); + Assertions.assertEquals("hwlkaaggkrehb", model.value().get(0).publisher()); + Assertions.assertEquals("n", 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("fljfiimreoagsqt", model.value().get(0).packageType()); + Assertions.assertEquals("dusr", model.value().get(0).additionalProperties()); + Assertions.assertEquals(3.6069958227398224D, model.value().get(0).progressPercentage()); + Assertions.assertEquals("sqwudohzilfmnli", model.value().get(0).notifyMessage()); + Assertions.assertEquals("tokhtvwtaznkcqw", 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..89559a2b9e3e 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; @@ -12,20 +12,20 @@ public final class UpdatePrerequisiteTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { UpdatePrerequisite model - = BinaryData.fromString("{\"updateType\":\"wvnph\",\"version\":\"zqtpjhmq\",\"packageName\":\"v\"}") + = BinaryData.fromString("{\"updateType\":\"mzqmzjqrb\",\"version\":\"vnmdyfoeboj\",\"packageName\":\"pp\"}") .toObject(UpdatePrerequisite.class); - Assertions.assertEquals("wvnph", model.updateType()); - Assertions.assertEquals("zqtpjhmq", model.version()); - Assertions.assertEquals("v", model.packageName()); + Assertions.assertEquals("mzqmzjqrb", model.updateType()); + Assertions.assertEquals("vnmdyfoeboj", model.version()); + Assertions.assertEquals("pp", 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("mzqmzjqrb").withVersion("vnmdyfoeboj").withPackageName("pp"); model = BinaryData.fromObject(model).toObject(UpdatePrerequisite.class); - Assertions.assertEquals("wvnph", model.updateType()); - Assertions.assertEquals("zqtpjhmq", model.version()); - Assertions.assertEquals("v", model.packageName()); + Assertions.assertEquals("mzqmzjqrb", model.updateType()); + Assertions.assertEquals("vnmdyfoeboj", model.version()); + Assertions.assertEquals("pp", 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..f3371d436b05 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,88 @@ 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\":\"Creating\",\"timeStarted\":\"2021-01-23T20:40:04Z\",\"lastUpdatedTime\":\"2021-10-18T22:36:06Z\",\"duration\":\"ufptb\",\"state\":\"Unknown\",\"progress\":{\"name\":\"ciuiyqvldaswv\",\"description\":\"i\",\"errorMessage\":\"qzlgcndhzxrrfcfs\",\"status\":\"khgsnxuwwkpphefs\",\"startTimeUtc\":\"2021-05-20T14:04:27Z\",\"endTimeUtc\":\"2021-08-22T01:26:11Z\",\"lastUpdatedTimeUtc\":\"2021-03-10T20:23:31Z\",\"expectedExecutionTime\":\"meikj\",\"steps\":[{\"name\":\"acnmwpfsuqtaaz\",\"description\":\"bxyxoy\",\"errorMessage\":\"uqqiqezxlhd\",\"status\":\"qdcadwvps\",\"startTimeUtc\":\"2021-08-19T10:15:45Z\",\"endTimeUtc\":\"2021-08-02T17:21:46Z\",\"lastUpdatedTimeUtc\":\"2021-10-26T21:25:35Z\",\"expectedExecutionTime\":\"iybmrzoep\",\"steps\":[{},{},{},{}]},{\"name\":\"v\",\"description\":\"jkgv\",\"errorMessage\":\"mxaursqftibtyi\",\"status\":\"yvp\",\"startTimeUtc\":\"2021-02-03T04:51:25Z\",\"endTimeUtc\":\"2021-09-27T16:43:18Z\",\"lastUpdatedTimeUtc\":\"2021-01-06T10:29:15Z\",\"expectedExecutionTime\":\"noow\",\"steps\":[{},{},{},{}]}]}},\"location\":\"e\",\"id\":\"exkxbhx\",\"name\":\"ucnulgmnh\",\"type\":\"evdyz\"}") .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(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("e", model.location()); + Assertions.assertEquals(OffsetDateTime.parse("2021-01-23T20:40:04Z"), model.timeStarted()); + Assertions.assertEquals(OffsetDateTime.parse("2021-10-18T22:36:06Z"), model.lastUpdatedTime()); + Assertions.assertEquals("ufptb", model.duration()); + Assertions.assertEquals(UpdateRunPropertiesState.UNKNOWN, model.state()); + Assertions.assertEquals("ciuiyqvldaswv", model.namePropertiesName()); + Assertions.assertEquals("i", model.description()); + Assertions.assertEquals("qzlgcndhzxrrfcfs", model.errorMessage()); + Assertions.assertEquals("khgsnxuwwkpphefs", model.status()); + Assertions.assertEquals(OffsetDateTime.parse("2021-05-20T14:04:27Z"), model.startTimeUtc()); + Assertions.assertEquals(OffsetDateTime.parse("2021-08-22T01:26:11Z"), model.endTimeUtc()); + Assertions.assertEquals(OffsetDateTime.parse("2021-03-10T20:23:31Z"), model.lastUpdatedTimeUtc()); + Assertions.assertEquals("meikj", model.expectedExecutionTime()); + Assertions.assertEquals("acnmwpfsuqtaaz", model.steps().get(0).name()); + Assertions.assertEquals("bxyxoy", model.steps().get(0).description()); + Assertions.assertEquals("uqqiqezxlhd", model.steps().get(0).errorMessage()); + Assertions.assertEquals("qdcadwvps", model.steps().get(0).status()); + Assertions.assertEquals(OffsetDateTime.parse("2021-08-19T10:15:45Z"), model.steps().get(0).startTimeUtc()); + Assertions.assertEquals(OffsetDateTime.parse("2021-08-02T17:21:46Z"), model.steps().get(0).endTimeUtc()); + Assertions.assertEquals(OffsetDateTime.parse("2021-10-26T21:25:35Z"), model.steps().get(0).lastUpdatedTimeUtc()); - Assertions.assertEquals("vreljea", model.steps().get(0).expectedExecutionTime()); + Assertions.assertEquals("iybmrzoep", 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") - .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") + UpdateRunInner model = new UpdateRunInner().withLocation("e") + .withTimeStarted(OffsetDateTime.parse("2021-01-23T20:40:04Z")) + .withLastUpdatedTime(OffsetDateTime.parse("2021-10-18T22:36:06Z")) + .withDuration("ufptb") + .withState(UpdateRunPropertiesState.UNKNOWN) + .withNamePropertiesName("ciuiyqvldaswv") + .withDescription("i") + .withErrorMessage("qzlgcndhzxrrfcfs") + .withStatus("khgsnxuwwkpphefs") + .withStartTimeUtc(OffsetDateTime.parse("2021-05-20T14:04:27Z")) + .withEndTimeUtc(OffsetDateTime.parse("2021-08-22T01:26:11Z")) + .withLastUpdatedTimeUtc(OffsetDateTime.parse("2021-03-10T20:23:31Z")) + .withExpectedExecutionTime("meikj") .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") + new Step().withName("acnmwpfsuqtaaz") + .withDescription("bxyxoy") + .withErrorMessage("uqqiqezxlhd") + .withStatus("qdcadwvps") + .withStartTimeUtc(OffsetDateTime.parse("2021-08-19T10:15:45Z")) + .withEndTimeUtc(OffsetDateTime.parse("2021-08-02T17:21:46Z")) + .withLastUpdatedTimeUtc(OffsetDateTime.parse("2021-10-26T21:25:35Z")) + .withExpectedExecutionTime("iybmrzoep") .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())))); + new Step().withName("v") + .withDescription("jkgv") + .withErrorMessage("mxaursqftibtyi") + .withStatus("yvp") + .withStartTimeUtc(OffsetDateTime.parse("2021-02-03T04:51:25Z")) + .withEndTimeUtc(OffsetDateTime.parse("2021-09-27T16:43:18Z")) + .withLastUpdatedTimeUtc(OffsetDateTime.parse("2021-01-06T10:29:15Z")) + .withExpectedExecutionTime("noow") + .withSteps(Arrays.asList(new Step(), new Step(), new Step(), 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(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("e", model.location()); + Assertions.assertEquals(OffsetDateTime.parse("2021-01-23T20:40:04Z"), model.timeStarted()); + Assertions.assertEquals(OffsetDateTime.parse("2021-10-18T22:36:06Z"), model.lastUpdatedTime()); + Assertions.assertEquals("ufptb", model.duration()); + Assertions.assertEquals(UpdateRunPropertiesState.UNKNOWN, model.state()); + Assertions.assertEquals("ciuiyqvldaswv", model.namePropertiesName()); + Assertions.assertEquals("i", model.description()); + Assertions.assertEquals("qzlgcndhzxrrfcfs", model.errorMessage()); + Assertions.assertEquals("khgsnxuwwkpphefs", model.status()); + Assertions.assertEquals(OffsetDateTime.parse("2021-05-20T14:04:27Z"), model.startTimeUtc()); + Assertions.assertEquals(OffsetDateTime.parse("2021-08-22T01:26:11Z"), model.endTimeUtc()); + Assertions.assertEquals(OffsetDateTime.parse("2021-03-10T20:23:31Z"), model.lastUpdatedTimeUtc()); + Assertions.assertEquals("meikj", model.expectedExecutionTime()); + Assertions.assertEquals("acnmwpfsuqtaaz", model.steps().get(0).name()); + Assertions.assertEquals("bxyxoy", model.steps().get(0).description()); + Assertions.assertEquals("uqqiqezxlhd", model.steps().get(0).errorMessage()); + Assertions.assertEquals("qdcadwvps", model.steps().get(0).status()); + Assertions.assertEquals(OffsetDateTime.parse("2021-08-19T10:15:45Z"), model.steps().get(0).startTimeUtc()); + Assertions.assertEquals(OffsetDateTime.parse("2021-08-02T17:21:46Z"), model.steps().get(0).endTimeUtc()); + Assertions.assertEquals(OffsetDateTime.parse("2021-10-26T21:25:35Z"), model.steps().get(0).lastUpdatedTimeUtc()); - Assertions.assertEquals("vreljea", model.steps().get(0).expectedExecutionTime()); + Assertions.assertEquals("iybmrzoep", 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..f16898fc9fc2 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-20T05:12:58Z\",\"lastUpdatedTime\":\"2021-06-29T23:21:50Z\",\"duration\":\"y\",\"state\":\"Unknown\",\"progress\":{\"name\":\"ndoabhjxwxqweuip\",\"description\":\"vk\",\"errorMessage\":\"itnsqxtltc\",\"status\":\"rdpqgfhy\",\"startTimeUtc\":\"2021-09-03T10:13:51Z\",\"endTimeUtc\":\"2021-03-01T17:13:50Z\",\"lastUpdatedTimeUtc\":\"2021-06-23T06:31:16Z\",\"expectedExecutionTime\":\"grcwfcmfcnrjajq\",\"steps\":[{},{},{}]}},\"location\":\"jti\",\"id\":\"nzqgxxgfbbmtlpq\",\"name\":\"gynoiprnzcali\",\"type\":\"cryqxzx\"},{\"properties\":{\"provisioningState\":\"Accepted\",\"timeStarted\":\"2021-08-21T14:53:03Z\",\"lastUpdatedTime\":\"2021-12-05T15:28:12Z\",\"duration\":\"iymqr\",\"state\":\"Succeeded\",\"progress\":{\"name\":\"fupetasvv\",\"description\":\"sbpkf\",\"errorMessage\":\"nfkgxsyaowuzowpu\",\"status\":\"dkcprg\",\"startTimeUtc\":\"2020-12-23T10:33:06Z\",\"endTimeUtc\":\"2021-11-18T03:49:15Z\",\"lastUpdatedTimeUtc\":\"2021-07-04T14:27:35Z\",\"expectedExecutionTime\":\"chlutixmqru\",\"steps\":[{},{},{},{}]}},\"location\":\"cbfzmc\",\"id\":\"nfhiucnmfbcp\",\"name\":\"qktkrumzuedkyzbf\",\"type\":\"xo\"},{\"properties\":{\"provisioningState\":\"Deleting\",\"timeStarted\":\"2021-08-30T20:47:20Z\",\"lastUpdatedTime\":\"2021-01-01T11:01:05Z\",\"duration\":\"gvqrnhyhlwcj\",\"state\":\"Unknown\",\"progress\":{\"name\":\"hffbxrq\",\"description\":\"ijpeuql\",\"errorMessage\":\"x\",\"status\":\"ztv\",\"startTimeUtc\":\"2021-03-08T07:39:56Z\",\"endTimeUtc\":\"2021-11-12T12:22:06Z\",\"lastUpdatedTimeUtc\":\"2021-06-13T11:40:06Z\",\"expectedExecutionTime\":\"wenawwam\",\"steps\":[{},{},{}]}},\"location\":\"qioulndhzyoeojht\",\"id\":\"lhsvidmytzlnglxp\",\"name\":\"ovyoanf\",\"type\":\"cswqa\"},{\"properties\":{\"provisioningState\":\"PartiallySucceeded\",\"timeStarted\":\"2021-10-08T16:02:09Z\",\"lastUpdatedTime\":\"2021-05-20T23:48:50Z\",\"duration\":\"jrktpgaeukya\",\"state\":\"InProgress\",\"progress\":{\"name\":\"w\",\"description\":\"nucsk\",\"errorMessage\":\"sidsjtd\",\"status\":\"bninjgazlsvbzfc\",\"startTimeUtc\":\"2021-07-30T20:08:48Z\",\"endTimeUtc\":\"2021-01-02T17:21:12Z\",\"lastUpdatedTimeUtc\":\"2021-04-16T03:06:45Z\",\"expectedExecutionTime\":\"cciklhs\",\"steps\":[{},{}]}},\"location\":\"drenxol\",\"id\":\"yehqbeivdlhydwb\",\"name\":\"bfgrlpunytjlkes\",\"type\":\"mpathubtah\"}],\"nextLink\":\"an\"}") .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("jti", model.value().get(0).location()); + Assertions.assertEquals(OffsetDateTime.parse("2021-08-20T05:12:58Z"), model.value().get(0).timeStarted()); + Assertions.assertEquals(OffsetDateTime.parse("2021-06-29T23:21:50Z"), model.value().get(0).lastUpdatedTime()); + Assertions.assertEquals("y", model.value().get(0).duration()); + Assertions.assertEquals(UpdateRunPropertiesState.UNKNOWN, model.value().get(0).state()); + Assertions.assertEquals("ndoabhjxwxqweuip", model.value().get(0).namePropertiesName()); + Assertions.assertEquals("vk", model.value().get(0).description()); + Assertions.assertEquals("itnsqxtltc", model.value().get(0).errorMessage()); + Assertions.assertEquals("rdpqgfhy", model.value().get(0).status()); + Assertions.assertEquals(OffsetDateTime.parse("2021-09-03T10:13:51Z"), model.value().get(0).startTimeUtc()); + Assertions.assertEquals(OffsetDateTime.parse("2021-03-01T17:13:50Z"), model.value().get(0).endTimeUtc()); + Assertions.assertEquals(OffsetDateTime.parse("2021-06-23T06:31:16Z"), 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("grcwfcmfcnrjajq", model.value().get(0).expectedExecutionTime()); + Assertions.assertEquals("an", 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..959fb111ad2f 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,162 @@ 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\":\"Connected\",\"timeStarted\":\"2021-08-18T04:35:35Z\",\"lastUpdatedTime\":\"2021-09-06T11:00:25Z\",\"duration\":\"kmq\",\"state\":\"Failed\",\"progress\":{\"name\":\"vyhjrl\",\"description\":\"zji\",\"errorMessage\":\"qfhefkwabsol\",\"status\":\"nqqlmgnl\",\"startTimeUtc\":\"2021-02-08T02:13:29Z\",\"endTimeUtc\":\"2021-05-11T06:42:49Z\",\"lastUpdatedTimeUtc\":\"2021-05-02T15:04:35Z\",\"expectedExecutionTime\":\"exhvuqbozoolz\",\"steps\":[{\"name\":\"rkuz\",\"description\":\"cnn\",\"errorMessage\":\"snxawqyt\",\"status\":\"hd\",\"startTimeUtc\":\"2021-09-28T01:05:07Z\",\"endTimeUtc\":\"2021-08-20T08:41:46Z\",\"lastUpdatedTimeUtc\":\"2021-12-07T05:46:12Z\",\"expectedExecutionTime\":\"xnx\",\"steps\":[{\"name\":\"ywymxgaabj\",\"description\":\"tfohf\",\"errorMessage\":\"gzvkiwrsiwdyj\",\"status\":\"rykcrraueekcsue\",\"startTimeUtc\":\"2021-08-30T14:29:50Z\",\"endTimeUtc\":\"2021-06-18T15:14:05Z\",\"lastUpdatedTimeUtc\":\"2021-03-11T17:26:18Z\",\"expectedExecutionTime\":\"cbgydlqi\",\"steps\":[{},{},{},{}]},{\"name\":\"hmptyrilkfbn\",\"description\":\"qxvztpbnfnqtxjt\",\"errorMessage\":\"alswbnfd\",\"status\":\"pld\",\"startTimeUtc\":\"2021-08-21T18:37:30Z\",\"endTimeUtc\":\"2020-12-25T11:31:23Z\",\"lastUpdatedTimeUtc\":\"2021-09-30T19:59:55Z\",\"expectedExecutionTime\":\"gl\",\"steps\":[{}]},{\"name\":\"hvmywhsbrcarycs\",\"description\":\"zyvoaqa\",\"errorMessage\":\"vehzp\",\"status\":\"mk\",\"startTimeUtc\":\"2021-09-10T08:42:55Z\",\"endTimeUtc\":\"2021-09-17T17:40:03Z\",\"lastUpdatedTimeUtc\":\"2021-02-11T23:14:31Z\",\"expectedExecutionTime\":\"lubefgybpmfbfu\",\"steps\":[{},{}]}]},{\"name\":\"pzkrvfy\",\"description\":\"kdschlzvfictnkjj\",\"errorMessage\":\"cwnphbkgfyrtogm\",\"status\":\"j\",\"startTimeUtc\":\"2021-07-27T17:10:23Z\",\"endTimeUtc\":\"2021-04-22T21:24:54Z\",\"lastUpdatedTimeUtc\":\"2021-07-25T22:10:09Z\",\"expectedExecutionTime\":\"qwtygevgwmseharx\",\"steps\":[{\"name\":\"n\",\"description\":\"tmbpjp\",\"errorMessage\":\"vwjhrsidqpxlbt\",\"status\":\"kft\",\"startTimeUtc\":\"2021-09-28T23:29:24Z\",\"endTimeUtc\":\"2021-11-10T10:42:35Z\",\"lastUpdatedTimeUtc\":\"2021-10-26T05:57:20Z\",\"expectedExecutionTime\":\"yutrymd\",\"steps\":[{}]},{\"name\":\"hpycvjqdvdwkq\",\"description\":\"drlefgnaavuag\",\"errorMessage\":\"etaoutnpdc\",\"status\":\"hspfefyihd\",\"startTimeUtc\":\"2021-10-11T01:12:22Z\",\"endTimeUtc\":\"2021-01-11T04:51:08Z\",\"lastUpdatedTimeUtc\":\"2021-05-15T05:26:21Z\",\"expectedExecutionTime\":\"hmtybkcgsuthhll\",\"steps\":[{},{}]},{\"name\":\"nefxexlfciatx\",\"description\":\"rrlkmdskjhhx\",\"errorMessage\":\"ajfoxc\",\"status\":\"cvslxlhuavkrmukm\",\"startTimeUtc\":\"2021-12-07T17:26:55Z\",\"endTimeUtc\":\"2021-02-14T00:38:10Z\",\"lastUpdatedTimeUtc\":\"2021-02-04T20:44:14Z\",\"expectedExecutionTime\":\"csl\",\"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-08-18T04:35:35Z"), model.timeStarted()); + Assertions.assertEquals(OffsetDateTime.parse("2021-09-06T11:00:25Z"), model.lastUpdatedTime()); + Assertions.assertEquals("kmq", model.duration()); + Assertions.assertEquals(UpdateRunPropertiesState.FAILED, model.state()); + Assertions.assertEquals("vyhjrl", model.name()); + Assertions.assertEquals("zji", model.description()); + Assertions.assertEquals("qfhefkwabsol", model.errorMessage()); + Assertions.assertEquals("nqqlmgnl", model.status()); + Assertions.assertEquals(OffsetDateTime.parse("2021-02-08T02:13:29Z"), model.startTimeUtc()); + Assertions.assertEquals(OffsetDateTime.parse("2021-05-11T06:42:49Z"), model.endTimeUtc()); + Assertions.assertEquals(OffsetDateTime.parse("2021-05-02T15:04:35Z"), model.lastUpdatedTimeUtc()); + Assertions.assertEquals("exhvuqbozoolz", model.expectedExecutionTime()); + Assertions.assertEquals("rkuz", model.steps().get(0).name()); + Assertions.assertEquals("cnn", model.steps().get(0).description()); + Assertions.assertEquals("snxawqyt", model.steps().get(0).errorMessage()); + Assertions.assertEquals("hd", model.steps().get(0).status()); + Assertions.assertEquals(OffsetDateTime.parse("2021-09-28T01:05:07Z"), model.steps().get(0).startTimeUtc()); + Assertions.assertEquals(OffsetDateTime.parse("2021-08-20T08:41:46Z"), model.steps().get(0).endTimeUtc()); + Assertions.assertEquals(OffsetDateTime.parse("2021-12-07T05:46:12Z"), 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("xnx", model.steps().get(0).expectedExecutionTime()); + Assertions.assertEquals("ywymxgaabj", model.steps().get(0).steps().get(0).name()); + Assertions.assertEquals("tfohf", model.steps().get(0).steps().get(0).description()); + Assertions.assertEquals("gzvkiwrsiwdyj", model.steps().get(0).steps().get(0).errorMessage()); + Assertions.assertEquals("rykcrraueekcsue", model.steps().get(0).steps().get(0).status()); + Assertions.assertEquals(OffsetDateTime.parse("2021-08-30T14:29:50Z"), model.steps().get(0).steps().get(0).startTimeUtc()); - Assertions.assertEquals(OffsetDateTime.parse("2021-04-15T06:18:59Z"), + Assertions.assertEquals(OffsetDateTime.parse("2021-06-18T15:14:05Z"), model.steps().get(0).steps().get(0).endTimeUtc()); - Assertions.assertEquals(OffsetDateTime.parse("2021-07-08T06:56:22Z"), + Assertions.assertEquals(OffsetDateTime.parse("2021-03-11T17:26:18Z"), model.steps().get(0).steps().get(0).lastUpdatedTimeUtc()); - Assertions.assertEquals("nmdxotngfd", model.steps().get(0).steps().get(0).expectedExecutionTime()); + Assertions.assertEquals("cbgydlqi", 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-08-18T04:35:35Z")) + .withLastUpdatedTime(OffsetDateTime.parse("2021-09-06T11:00:25Z")) + .withDuration("kmq") + .withState(UpdateRunPropertiesState.FAILED) + .withName("vyhjrl") + .withDescription("zji") + .withErrorMessage("qfhefkwabsol") + .withStatus("nqqlmgnl") + .withStartTimeUtc(OffsetDateTime.parse("2021-02-08T02:13:29Z")) + .withEndTimeUtc(OffsetDateTime.parse("2021-05-11T06:42:49Z")) + .withLastUpdatedTimeUtc(OffsetDateTime.parse("2021-05-02T15:04:35Z")) + .withExpectedExecutionTime("exhvuqbozoolz") + .withSteps(Arrays.asList( + new Step().withName("rkuz") + .withDescription("cnn") + .withErrorMessage("snxawqyt") + .withStatus("hd") + .withStartTimeUtc(OffsetDateTime.parse("2021-09-28T01:05:07Z")) + .withEndTimeUtc(OffsetDateTime.parse("2021-08-20T08:41:46Z")) + .withLastUpdatedTimeUtc(OffsetDateTime.parse("2021-12-07T05:46:12Z")) + .withExpectedExecutionTime("xnx") + .withSteps(Arrays.asList( + new Step().withName("ywymxgaabj") + .withDescription("tfohf") + .withErrorMessage("gzvkiwrsiwdyj") + .withStatus("rykcrraueekcsue") + .withStartTimeUtc(OffsetDateTime.parse("2021-08-30T14:29:50Z")) + .withEndTimeUtc(OffsetDateTime.parse("2021-06-18T15:14:05Z")) + .withLastUpdatedTimeUtc(OffsetDateTime.parse("2021-03-11T17:26:18Z")) + .withExpectedExecutionTime("cbgydlqi") + .withSteps(Arrays.asList(new Step(), new Step(), new Step(), new Step())), + new Step().withName("hmptyrilkfbn") + .withDescription("qxvztpbnfnqtxjt") + .withErrorMessage("alswbnfd") + .withStatus("pld") + .withStartTimeUtc(OffsetDateTime.parse("2021-08-21T18:37:30Z")) + .withEndTimeUtc(OffsetDateTime.parse("2020-12-25T11:31:23Z")) + .withLastUpdatedTimeUtc(OffsetDateTime.parse("2021-09-30T19:59:55Z")) + .withExpectedExecutionTime("gl") + .withSteps(Arrays.asList(new Step())), + new Step().withName("hvmywhsbrcarycs") + .withDescription("zyvoaqa") + .withErrorMessage("vehzp") + .withStatus("mk") + .withStartTimeUtc(OffsetDateTime.parse("2021-09-10T08:42:55Z")) + .withEndTimeUtc(OffsetDateTime.parse("2021-09-17T17:40:03Z")) + .withLastUpdatedTimeUtc(OffsetDateTime.parse("2021-02-11T23:14:31Z")) + .withExpectedExecutionTime("lubefgybpmfbfu") + .withSteps(Arrays.asList(new Step(), new Step())))), + new Step().withName("pzkrvfy") + .withDescription("kdschlzvfictnkjj") + .withErrorMessage("cwnphbkgfyrtogm") + .withStatus("j") + .withStartTimeUtc(OffsetDateTime.parse("2021-07-27T17:10:23Z")) + .withEndTimeUtc(OffsetDateTime.parse("2021-04-22T21:24:54Z")) + .withLastUpdatedTimeUtc(OffsetDateTime.parse("2021-07-25T22:10:09Z")) + .withExpectedExecutionTime("qwtygevgwmseharx") + .withSteps(Arrays.asList( + new Step().withName("n") + .withDescription("tmbpjp") + .withErrorMessage("vwjhrsidqpxlbt") + .withStatus("kft") + .withStartTimeUtc(OffsetDateTime.parse("2021-09-28T23:29:24Z")) + .withEndTimeUtc(OffsetDateTime.parse("2021-11-10T10:42:35Z")) + .withLastUpdatedTimeUtc(OffsetDateTime.parse("2021-10-26T05:57:20Z")) + .withExpectedExecutionTime("yutrymd") + .withSteps(Arrays.asList(new Step())), + new Step().withName("hpycvjqdvdwkq") + .withDescription("drlefgnaavuag") + .withErrorMessage("etaoutnpdc") + .withStatus("hspfefyihd") + .withStartTimeUtc(OffsetDateTime.parse("2021-10-11T01:12:22Z")) + .withEndTimeUtc(OffsetDateTime.parse("2021-01-11T04:51:08Z")) + .withLastUpdatedTimeUtc(OffsetDateTime.parse("2021-05-15T05:26:21Z")) + .withExpectedExecutionTime("hmtybkcgsuthhll") + .withSteps(Arrays.asList(new Step(), new Step())), + new Step().withName("nefxexlfciatx") + .withDescription("rrlkmdskjhhx") + .withErrorMessage("ajfoxc") + .withStatus("cvslxlhuavkrmukm") + .withStartTimeUtc(OffsetDateTime.parse("2021-12-07T17:26:55Z")) + .withEndTimeUtc(OffsetDateTime.parse("2021-02-14T00:38:10Z")) + .withLastUpdatedTimeUtc(OffsetDateTime.parse("2021-02-04T20:44:14Z")) + .withExpectedExecutionTime("csl") + .withSteps(Arrays.asList(new Step(), new Step(), new Step(), 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-08-18T04:35:35Z"), model.timeStarted()); + Assertions.assertEquals(OffsetDateTime.parse("2021-09-06T11:00:25Z"), model.lastUpdatedTime()); + Assertions.assertEquals("kmq", model.duration()); + Assertions.assertEquals(UpdateRunPropertiesState.FAILED, model.state()); + Assertions.assertEquals("vyhjrl", model.name()); + Assertions.assertEquals("zji", model.description()); + Assertions.assertEquals("qfhefkwabsol", model.errorMessage()); + Assertions.assertEquals("nqqlmgnl", model.status()); + Assertions.assertEquals(OffsetDateTime.parse("2021-02-08T02:13:29Z"), model.startTimeUtc()); + Assertions.assertEquals(OffsetDateTime.parse("2021-05-11T06:42:49Z"), model.endTimeUtc()); + Assertions.assertEquals(OffsetDateTime.parse("2021-05-02T15:04:35Z"), model.lastUpdatedTimeUtc()); + Assertions.assertEquals("exhvuqbozoolz", model.expectedExecutionTime()); + Assertions.assertEquals("rkuz", model.steps().get(0).name()); + Assertions.assertEquals("cnn", model.steps().get(0).description()); + Assertions.assertEquals("snxawqyt", model.steps().get(0).errorMessage()); + Assertions.assertEquals("hd", model.steps().get(0).status()); + Assertions.assertEquals(OffsetDateTime.parse("2021-09-28T01:05:07Z"), model.steps().get(0).startTimeUtc()); + Assertions.assertEquals(OffsetDateTime.parse("2021-08-20T08:41:46Z"), model.steps().get(0).endTimeUtc()); + Assertions.assertEquals(OffsetDateTime.parse("2021-12-07T05:46:12Z"), 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("xnx", model.steps().get(0).expectedExecutionTime()); + Assertions.assertEquals("ywymxgaabj", model.steps().get(0).steps().get(0).name()); + Assertions.assertEquals("tfohf", model.steps().get(0).steps().get(0).description()); + Assertions.assertEquals("gzvkiwrsiwdyj", model.steps().get(0).steps().get(0).errorMessage()); + Assertions.assertEquals("rykcrraueekcsue", model.steps().get(0).steps().get(0).status()); + Assertions.assertEquals(OffsetDateTime.parse("2021-08-30T14:29:50Z"), model.steps().get(0).steps().get(0).startTimeUtc()); - Assertions.assertEquals(OffsetDateTime.parse("2021-04-15T06:18:59Z"), + Assertions.assertEquals(OffsetDateTime.parse("2021-06-18T15:14:05Z"), model.steps().get(0).steps().get(0).endTimeUtc()); - Assertions.assertEquals(OffsetDateTime.parse("2021-07-08T06:56:22Z"), + Assertions.assertEquals(OffsetDateTime.parse("2021-03-11T17:26:18Z"), model.steps().get(0).steps().get(0).lastUpdatedTimeUtc()); - Assertions.assertEquals("nmdxotngfd", model.steps().get(0).steps().get(0).expectedExecutionTime()); + Assertions.assertEquals("cbgydlqi", 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..505144431b20 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,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.updateRuns().delete("ptqmawzjdrpiz", "ulgyctsdbtqgku", "dsooxr", "w", com.azure.core.util.Context.NONE); + manager.updateRuns() + .delete("fpffbuqxknv", "cgmbg", "yojfchicpare", "zoksgqhb", 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..49e67b2c78a7 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,41 @@ 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\":\"Error\",\"timeStarted\":\"2021-07-14T23:05:27Z\",\"lastUpdatedTime\":\"2021-07-04T17:43:49Z\",\"duration\":\"jnyuv\",\"state\":\"Succeeded\",\"progress\":{\"name\":\"jcgjtjkntomnl\",\"description\":\"hcdb\",\"errorMessage\":\"sb\",\"status\":\"rxeyvidcowlrmb\",\"startTimeUtc\":\"2021-04-10T08:35:34Z\",\"endTimeUtc\":\"2021-11-18T22:02:26Z\",\"lastUpdatedTimeUtc\":\"2021-05-08T06:02:18Z\",\"expectedExecutionTime\":\"joezvw\",\"steps\":[{\"name\":\"gavplndmdfiek\",\"description\":\"skyy\",\"errorMessage\":\"ek\",\"status\":\"ffyshdawjlmlcu\",\"startTimeUtc\":\"2021-03-10T12:39:39Z\",\"endTimeUtc\":\"2021-05-28T21:04:41Z\",\"lastUpdatedTimeUtc\":\"2021-10-27T10:05:03Z\",\"expectedExecutionTime\":\"fhoajjylsyqyjn\",\"steps\":[{},{},{}]},{\"name\":\"lq\",\"description\":\"yhbceevogir\",\"errorMessage\":\"w\",\"status\":\"tvuxeu\",\"startTimeUtc\":\"2021-09-17T10:27:08Z\",\"endTimeUtc\":\"2021-07-14T22:09:36Z\",\"lastUpdatedTimeUtc\":\"2021-06-10T16:29:52Z\",\"expectedExecutionTime\":\"axxfdlypkcpw\",\"steps\":[{},{},{}]},{\"name\":\"nmj\",\"description\":\"dtlxc\",\"errorMessage\":\"jhbcycgqakcsihx\",\"status\":\"acww\",\"startTimeUtc\":\"2021-09-12T09:21:46Z\",\"endTimeUtc\":\"2021-08-24T14:46:23Z\",\"lastUpdatedTimeUtc\":\"2021-01-04T09:43:03Z\",\"expectedExecutionTime\":\"nsbubwhzqqgugwlu\",\"steps\":[{}]}]}},\"location\":\"qmmkdhwqcqwebag\",\"id\":\"pkephujeucosvkke\",\"name\":\"rgvypa\",\"type\":\"pjpyillgnuee\"}"; 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", + .getWithResponse("jnnhbcjywkdywks", "avuafanefic", "ptplkossjbzv", "pzwdqzuhfgti", 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("qmmkdhwqcqwebag", response.location()); + Assertions.assertEquals(OffsetDateTime.parse("2021-07-14T23:05:27Z"), response.timeStarted()); + Assertions.assertEquals(OffsetDateTime.parse("2021-07-04T17:43:49Z"), response.lastUpdatedTime()); + Assertions.assertEquals("jnyuv", 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("jcgjtjkntomnl", response.namePropertiesName()); + Assertions.assertEquals("hcdb", response.description()); + Assertions.assertEquals("sb", response.errorMessage()); + Assertions.assertEquals("rxeyvidcowlrmb", response.status()); + Assertions.assertEquals(OffsetDateTime.parse("2021-04-10T08:35:34Z"), response.startTimeUtc()); + Assertions.assertEquals(OffsetDateTime.parse("2021-11-18T22:02:26Z"), response.endTimeUtc()); + Assertions.assertEquals(OffsetDateTime.parse("2021-05-08T06:02:18Z"), response.lastUpdatedTimeUtc()); + Assertions.assertEquals("joezvw", response.expectedExecutionTime()); + Assertions.assertEquals("gavplndmdfiek", response.steps().get(0).name()); + Assertions.assertEquals("skyy", response.steps().get(0).description()); + Assertions.assertEquals("ek", response.steps().get(0).errorMessage()); + Assertions.assertEquals("ffyshdawjlmlcu", response.steps().get(0).status()); + Assertions.assertEquals(OffsetDateTime.parse("2021-03-10T12:39:39Z"), response.steps().get(0).startTimeUtc()); + Assertions.assertEquals(OffsetDateTime.parse("2021-05-28T21:04:41Z"), response.steps().get(0).endTimeUtc()); + Assertions.assertEquals(OffsetDateTime.parse("2021-10-27T10:05:03Z"), response.steps().get(0).lastUpdatedTimeUtc()); - Assertions.assertEquals("i", response.steps().get(0).expectedExecutionTime()); + Assertions.assertEquals("fhoajjylsyqyjn", 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..3a243bed82e3 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\":\"Updating\",\"timeStarted\":\"2021-11-06T12:18:30Z\",\"lastUpdatedTime\":\"2021-07-25T20:00:35Z\",\"duration\":\"umbmwgftshfg\",\"state\":\"Unknown\",\"progress\":{\"name\":\"iagskoikuqir\",\"description\":\"kxpaowkgvnlfue\",\"errorMessage\":\"fzib\",\"status\":\"rjugcfeb\",\"startTimeUtc\":\"2021-03-04T01:50:34Z\",\"endTimeUtc\":\"2021-11-08T10:09:28Z\",\"lastUpdatedTimeUtc\":\"2021-08-31T07:05:45Z\",\"expectedExecutionTime\":\"rllld\",\"steps\":[{\"name\":\"dzwilsxryi\",\"description\":\"zlwrduxntpfxxgj\",\"errorMessage\":\"yxfwfctq\",\"status\":\"yfbkqynlzx\",\"startTimeUtc\":\"2021-02-06T03:35:14Z\",\"endTimeUtc\":\"2021-05-03T03:54:41Z\",\"lastUpdatedTimeUtc\":\"2021-11-22T18:54:33Z\",\"expectedExecutionTime\":\"kiehdmv\",\"steps\":[{},{},{}]},{\"name\":\"xxxffgmcuanszee\",\"description\":\"gcgcsapvbcq\",\"errorMessage\":\"usekijhm\",\"status\":\"enkbiv\",\"startTimeUtc\":\"2021-02-26T02:54:30Z\",\"endTimeUtc\":\"2021-10-13T18:31:18Z\",\"lastUpdatedTimeUtc\":\"2021-04-08T05:17:40Z\",\"expectedExecutionTime\":\"fqmljewynb\",\"steps\":[{},{},{},{}]}]}},\"location\":\"wv\",\"id\":\"kmjufav\",\"name\":\"lnpbsotmynkln\",\"type\":\"rznmtvrkkfcwxi\"}]}"; 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("ojuxil", "zblkc", "fldfljwt", 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("wv", response.iterator().next().location()); + Assertions.assertEquals(OffsetDateTime.parse("2021-11-06T12:18:30Z"), response.iterator().next().timeStarted()); + Assertions.assertEquals(OffsetDateTime.parse("2021-07-25T20:00:35Z"), response.iterator().next().lastUpdatedTime()); - Assertions.assertEquals("jzmhkdclacroczfm", 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("umbmwgftshfg", response.iterator().next().duration()); + Assertions.assertEquals(UpdateRunPropertiesState.UNKNOWN, response.iterator().next().state()); + Assertions.assertEquals("iagskoikuqir", response.iterator().next().namePropertiesName()); + Assertions.assertEquals("kxpaowkgvnlfue", response.iterator().next().description()); + Assertions.assertEquals("fzib", response.iterator().next().errorMessage()); + Assertions.assertEquals("rjugcfeb", response.iterator().next().status()); + Assertions.assertEquals(OffsetDateTime.parse("2021-03-04T01:50:34Z"), + response.iterator().next().startTimeUtc()); + Assertions.assertEquals(OffsetDateTime.parse("2021-11-08T10:09:28Z"), response.iterator().next().endTimeUtc()); + Assertions.assertEquals(OffsetDateTime.parse("2021-08-31T07:05:45Z"), 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("rllld", response.iterator().next().expectedExecutionTime()); + Assertions.assertEquals("dzwilsxryi", response.iterator().next().steps().get(0).name()); + Assertions.assertEquals("zlwrduxntpfxxgj", response.iterator().next().steps().get(0).description()); + Assertions.assertEquals("yxfwfctq", response.iterator().next().steps().get(0).errorMessage()); + Assertions.assertEquals("yfbkqynlzx", response.iterator().next().steps().get(0).status()); + Assertions.assertEquals(OffsetDateTime.parse("2021-02-06T03:35:14Z"), response.iterator().next().steps().get(0).startTimeUtc()); - Assertions.assertEquals(OffsetDateTime.parse("2021-03-26T14:45:23Z"), + Assertions.assertEquals(OffsetDateTime.parse("2021-05-03T03:54:41Z"), response.iterator().next().steps().get(0).endTimeUtc()); - Assertions.assertEquals(OffsetDateTime.parse("2021-07-23T09:45:28Z"), + Assertions.assertEquals(OffsetDateTime.parse("2021-11-22T18:54:33Z"), response.iterator().next().steps().get(0).lastUpdatedTimeUtc()); - Assertions.assertEquals("kpxkqejtpjfoj", response.iterator().next().steps().get(0).expectedExecutionTime()); + Assertions.assertEquals("kiehdmv", 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..1fedd13e8358 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,82 @@ 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\":\"NotSpecified\",\"timeStarted\":\"2021-11-21T14:51:33Z\",\"lastUpdatedTime\":\"2021-04-01T05:12:11Z\",\"duration\":\"ekdesbpj\",\"state\":\"InProgress\",\"progress\":{\"name\":\"h\",\"description\":\"pduibsr\",\"errorMessage\":\"qnneqrypyurvs\",\"status\":\"ovtuer\",\"startTimeUtc\":\"2021-10-03T09:45:57Z\",\"endTimeUtc\":\"2021-04-12T06:55:31Z\",\"lastUpdatedTimeUtc\":\"2021-01-19T04:32:04Z\",\"expectedExecutionTime\":\"yb\",\"steps\":[{\"name\":\"cxhaoe\",\"description\":\"zgpljbnwczsrazc\",\"errorMessage\":\"bicqhxhjpuapasi\",\"status\":\"fmugykwuycuo\",\"startTimeUtc\":\"2021-05-11T21:16:08Z\",\"endTimeUtc\":\"2021-04-24T09:32:53Z\",\"lastUpdatedTimeUtc\":\"2021-07-21T14:03:51Z\",\"expectedExecutionTime\":\"hdzitjzffpherw\",\"steps\":[{},{},{}]},{\"name\":\"wtwona\",\"description\":\"zmzxvfybxmmrvnu\",\"errorMessage\":\"krrs\",\"status\":\"o\",\"startTimeUtc\":\"2021-07-31T14:10:14Z\",\"endTimeUtc\":\"2021-07-01T23:51:31Z\",\"lastUpdatedTimeUtc\":\"2021-05-07T21:43:42Z\",\"expectedExecutionTime\":\"yabensjflwp\",\"steps\":[{},{}]},{\"name\":\"qtmvi\",\"description\":\"cv\",\"errorMessage\":\"mal\",\"status\":\"t\",\"startTimeUtc\":\"2021-08-18T08:08:36Z\",\"endTimeUtc\":\"2021-03-09T06:37:48Z\",\"lastUpdatedTimeUtc\":\"2021-06-05T13:48:44Z\",\"expectedExecutionTime\":\"ajpt\",\"steps\":[{},{}]}]}},\"location\":\"zxaoxlhmvjcnnls\",\"id\":\"ucqxhpaqoqb\",\"name\":\"ejoysoxovlznk\",\"type\":\"eldkqdlqqhn\"}"; 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") + .define("xtvsayyaeiivjq") + .withExistingUpdate("kst", "neykeipxutcbvriu", "nfa") + .withRegion("pwewpmiolea") + .withTimeStarted(OffsetDateTime.parse("2021-07-20T18:42:46Z")) + .withLastUpdatedTime(OffsetDateTime.parse("2021-05-21T21:01:11Z")) + .withDuration("ojoqfxqetxtdqi") .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") + .withNamePropertiesName("zljvgjijzqjhljsa") + .withDescription("jsisfqqhcmec") + .withErrorMessage("sbfe") + .withStatus("rpnjygllfkchhgsj") + .withStartTimeUtc(OffsetDateTime.parse("2021-03-18T06:42:49Z")) + .withEndTimeUtc(OffsetDateTime.parse("2021-06-23T11:15:32Z")) + .withLastUpdatedTimeUtc(OffsetDateTime.parse("2021-03-03T12:26:53Z")) + .withExpectedExecutionTime("mqcycabaamkkhd") .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") + new Step().withName("xdujkxpuqzdy") + .withDescription("yws") + .withErrorMessage("rpzhr") + .withStatus("ezxiz") + .withStartTimeUtc(OffsetDateTime.parse("2021-10-19T20:09:56Z")) + .withEndTimeUtc(OffsetDateTime.parse("2021-02-27T20:43:17Z")) + .withLastUpdatedTimeUtc(OffsetDateTime.parse("2021-07-31T00:09:07Z")) + .withExpectedExecutionTime("lbuaz") .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") + new Step().withName("hwivkd") + .withDescription("jsk") + .withErrorMessage("bxzepirtv") + .withStatus("i") + .withStartTimeUtc(OffsetDateTime.parse("2021-10-26T23:35:47Z")) + .withEndTimeUtc(OffsetDateTime.parse("2021-10-15T03:58:39Z")) + .withLastUpdatedTimeUtc(OffsetDateTime.parse("2021-10-13T21:33:57Z")) + .withExpectedExecutionTime("ol") .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") + new Step().withName("pvhcbtza") + .withDescription("jxcontickfk") + .withErrorMessage("h") + .withStatus("oc") + .withStartTimeUtc(OffsetDateTime.parse("2021-06-23T15:46Z")) + .withEndTimeUtc(OffsetDateTime.parse("2021-05-17T13:12:12Z")) + .withLastUpdatedTimeUtc(OffsetDateTime.parse("2021-09-06T11:43:55Z")) + .withExpectedExecutionTime("jwv") .withSteps(Arrays.asList(new Step(), new Step(), new Step(), 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("zxaoxlhmvjcnnls", response.location()); + Assertions.assertEquals(OffsetDateTime.parse("2021-11-21T14:51:33Z"), response.timeStarted()); + Assertions.assertEquals(OffsetDateTime.parse("2021-04-01T05:12:11Z"), response.lastUpdatedTime()); + Assertions.assertEquals("ekdesbpj", response.duration()); + Assertions.assertEquals(UpdateRunPropertiesState.IN_PROGRESS, response.state()); + Assertions.assertEquals("h", response.namePropertiesName()); + Assertions.assertEquals("pduibsr", response.description()); + Assertions.assertEquals("qnneqrypyurvs", response.errorMessage()); + Assertions.assertEquals("ovtuer", response.status()); + Assertions.assertEquals(OffsetDateTime.parse("2021-10-03T09:45:57Z"), response.startTimeUtc()); + Assertions.assertEquals(OffsetDateTime.parse("2021-04-12T06:55:31Z"), response.endTimeUtc()); + Assertions.assertEquals(OffsetDateTime.parse("2021-01-19T04:32:04Z"), response.lastUpdatedTimeUtc()); + Assertions.assertEquals("yb", response.expectedExecutionTime()); + Assertions.assertEquals("cxhaoe", response.steps().get(0).name()); + Assertions.assertEquals("zgpljbnwczsrazc", response.steps().get(0).description()); + Assertions.assertEquals("bicqhxhjpuapasi", response.steps().get(0).errorMessage()); + Assertions.assertEquals("fmugykwuycuo", response.steps().get(0).status()); + Assertions.assertEquals(OffsetDateTime.parse("2021-05-11T21:16:08Z"), response.steps().get(0).startTimeUtc()); + Assertions.assertEquals(OffsetDateTime.parse("2021-04-24T09:32:53Z"), response.steps().get(0).endTimeUtc()); + Assertions.assertEquals(OffsetDateTime.parse("2021-07-21T14:03:51Z"), response.steps().get(0).lastUpdatedTimeUtc()); - Assertions.assertEquals("fbhwbdqufvc", response.steps().get(0).expectedExecutionTime()); + Assertions.assertEquals("hdzitjzffpherw", 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..a6661ab6d5ba 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\":52.717240582095684,\"notifyMessage\":\"ocrdzgczeunt\"}") .toObject(UpdateStateProperties.class); - Assertions.assertEquals(75.61018F, model.progressPercentage()); - Assertions.assertEquals("iwdcxsmlzzhzd", model.notifyMessage()); + Assertions.assertEquals(52.717240582095684D, model.progressPercentage()); + Assertions.assertEquals("ocrdzgczeunt", model.notifyMessage()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { UpdateStateProperties model - = new UpdateStateProperties().withProgressPercentage(75.61018F).withNotifyMessage("iwdcxsmlzzhzd"); + = new UpdateStateProperties().withProgressPercentage(52.717240582095684D).withNotifyMessage("ocrdzgczeunt"); model = BinaryData.fromObject(model).toObject(UpdateStateProperties.class); - Assertions.assertEquals(75.61018F, model.progressPercentage()); - Assertions.assertEquals("iwdcxsmlzzhzd", model.notifyMessage()); + Assertions.assertEquals(52.717240582095684D, model.progressPercentage()); + Assertions.assertEquals("ocrdzgczeunt", 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..b16ed6de1ebb 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,54 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.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\":\"Connected\",\"oemFamily\":\"kfkgenjqn\",\"currentOemVersion\":\"jwkosnyxigf\",\"hardwareModel\":\"jjcxgdq\",\"packageVersions\":[{\"packageType\":\"n\",\"version\":\"wopswnyinxuprrx\",\"lastUpdated\":\"2021-06-09T04:54:03Z\"},{\"packageType\":\"ezbfqployuek\",\"version\":\"pv\",\"lastUpdated\":\"2021-06-05T03:04:39Z\"}],\"currentVersion\":\"svjmnsvujnjk\",\"currentSbeVersion\":\"olefcjisepkdbxo\",\"lastUpdated\":\"2021-10-21T21:06:41Z\",\"lastChecked\":\"2021-01-17T05:16:15Z\",\"healthState\":\"Failure\",\"healthCheckResult\":[{\"name\":\"lannmxynlsuqbw\",\"displayName\":\"trkt\",\"tags\":{},\"healthCheckTags\":\"dataatr\",\"title\":\"jktfinf\",\"status\":\"ValidationInProgress\",\"severity\":\"Warning\",\"description\":\"culwkqic\",\"remediation\":\"ook\",\"targetResourceID\":\"flsgaoj\",\"targetResourceName\":\"qpqsdoctpzpuj\",\"targetResourceType\":\"lmcds\",\"timestamp\":\"2021-07-30T03:04:43Z\",\"additionalData\":\"lujiswlluunxhfw\",\"healthCheckSource\":\"xzfwugeupcknec\"},{\"name\":\"kgrvfpsjd\",\"displayName\":\"gsytqpdzfyxcn\",\"tags\":{},\"healthCheckTags\":\"dataoxcgz\",\"title\":\"jqfbifop\",\"status\":\"ConnectedRecently\",\"severity\":\"Warning\",\"description\":\"rp\",\"remediation\":\"q\",\"targetResourceID\":\"rfm\",\"targetResourceName\":\"otfcuuugtjigpg\",\"targetResourceType\":\"iawohfmhn\",\"timestamp\":\"2021-01-10T07:21:33Z\",\"additionalData\":\"cjjkmqenh\",\"healthCheckSource\":\"dzrpvsgl\"},{\"name\":\"ovslvivqsuvwtenb\",\"displayName\":\"i\",\"tags\":{},\"healthCheckTags\":\"datahcyoaqxukuicjuft\",\"title\":\"iooanduewfhv\",\"status\":\"ConnectedRecently\",\"severity\":\"Hidden\",\"description\":\"ub\",\"remediation\":\"zabbwzgv\",\"targetResourceID\":\"aix\",\"targetResourceName\":\"ckixsps\",\"targetResourceType\":\"gavkmv\",\"timestamp\":\"2021-11-22T12:37:57Z\",\"additionalData\":\"rejrkpzjby\",\"healthCheckSource\":\"jxryoptae\"},{\"name\":\"whlbecgihzbpem\",\"displayName\":\"rab\",\"tags\":{},\"healthCheckTags\":\"datawwxywpjhspboxhi\",\"title\":\"pskpeswyhhmif\",\"status\":\"NotYetRegistered\",\"severity\":\"Informational\",\"description\":\"wvcmmpeglyuq\",\"remediation\":\"m\",\"targetResourceID\":\"exbzbqufpnezsjza\",\"targetResourceName\":\"ldrorhyogzmsimeh\",\"targetResourceType\":\"uuwdhtq\",\"timestamp\":\"2021-08-11T19:47:31Z\",\"additionalData\":\"nim\",\"healthCheckSource\":\"nsugisn\"}],\"healthCheckDate\":\"2021-04-06T09:29:50Z\",\"state\":\"UpdateInProgress\"},\"location\":\"ghojovkeyym\",\"id\":\"jixxfsfpcrtn\",\"name\":\"guefxxijtebdvey\",\"type\":\"etkrhlolmcnwepf\"},{\"properties\":{\"provisioningState\":\"Error\",\"oemFamily\":\"vaqdljnpetl\",\"currentOemVersion\":\"rdetawevxehuekdx\",\"hardwareModel\":\"zvdov\",\"packageVersions\":[{\"packageType\":\"erlpr\",\"version\":\"qccddcbny\",\"lastUpdated\":\"2021-05-17T11:57:15Z\"},{\"packageType\":\"cxwbp\",\"version\":\"ykdigqzlrznda\",\"lastUpdated\":\"2021-04-22T22:48:01Z\"}],\"currentVersion\":\"dmjqmvy\",\"currentSbeVersion\":\"kiqlarhqtwvcaze\",\"lastUpdated\":\"2021-05-25T13:10:19Z\",\"lastChecked\":\"2021-08-27T17:36:43Z\",\"healthState\":\"Success\",\"healthCheckResult\":[{\"name\":\"ztsmpchggr\",\"displayName\":\"lgf\",\"tags\":{},\"healthCheckTags\":\"dataigfgfrrkdkncz\",\"title\":\"rywnvo\",\"status\":\"Disconnected\",\"severity\":\"Hidden\",\"description\":\"vdlhqvbkar\",\"remediation\":\"yhssrlvkpkpkocm\",\"targetResourceID\":\"cebxx\",\"targetResourceName\":\"yicyvspeslhwy\",\"targetResourceType\":\"gvrccpu\",\"timestamp\":\"2021-03-21T20:41:47Z\",\"additionalData\":\"gajkrdyddtpfcud\",\"healthCheckSource\":\"fnbfbq\"},{\"name\":\"nqnxhgkordwzej\",\"displayName\":\"cwzvc\",\"tags\":{},\"healthCheckTags\":\"datawdlu\",\"title\":\"ypr\",\"status\":\"DeploymentSuccess\",\"severity\":\"Critical\",\"description\":\"tf\",\"remediation\":\"vtzldzchubagwn\",\"targetResourceID\":\"uvigv\",\"targetResourceName\":\"hfrbzakpjt\",\"targetResourceType\":\"raqp\",\"timestamp\":\"2021-07-18T05:14:23Z\",\"additionalData\":\"ucmxi\",\"healthCheckSource\":\"wqxynqjgsatkyvsc\"},{\"name\":\"ngcrusxhircpgcvs\",\"displayName\":\"kjbjolpyoklkvuz\",\"tags\":{},\"healthCheckTags\":\"datavhmlieoi\",\"title\":\"wxxbht\",\"status\":\"NotConnectedRecently\",\"severity\":\"Warning\",\"description\":\"emqwtq\",\"remediation\":\"zgyk\",\"targetResourceID\":\"kawanvm\",\"targetResourceName\":\"vg\",\"targetResourceType\":\"crbkompnbnfgywe\",\"timestamp\":\"2021-10-01T05:48:15Z\",\"additionalData\":\"pgcmahiwfr\",\"healthCheckSource\":\"w\"},{\"name\":\"hkapitsks\",\"displayName\":\"yfttibjepzwhju\",\"tags\":{},\"healthCheckTags\":\"datagbggcjx\",\"title\":\"blivw\",\"status\":\"ConnectedRecently\",\"severity\":\"Critical\",\"description\":\"mymbhdosmbng\",\"remediation\":\"lgxz\",\"targetResourceID\":\"vxd\",\"targetResourceName\":\"exatmdmnrsen\",\"targetResourceType\":\"irxyddmiploisj\",\"timestamp\":\"2021-10-21T11:23:17Z\",\"additionalData\":\"xznntwgkvyohp\",\"healthCheckSource\":\"pzupzwwy\"}],\"healthCheckDate\":\"2021-05-11T02:06:15Z\",\"state\":\"NeedsAttention\"},\"location\":\"hximkgfmxpq\",\"id\":\"npyriwn\",\"name\":\"ot\",\"type\":\"xmmqmt\"},{\"properties\":{\"provisioningState\":\"Succeeded\",\"oemFamily\":\"rexw\",\"currentOemVersion\":\"nbexfted\",\"hardwareModel\":\"bheeggzgrnqt\",\"packageVersions\":[{\"packageType\":\"uumrt\",\"version\":\"qgacantnsyxzxjmk\",\"lastUpdated\":\"2021-09-11T22:30:05Z\"},{\"packageType\":\"lazof\",\"version\":\"xvtemaspm\",\"lastUpdated\":\"2021-09-23T04:45:23Z\"}],\"currentVersion\":\"scd\",\"currentSbeVersion\":\"w\",\"lastUpdated\":\"2021-03-29T15:57:05Z\",\"lastChecked\":\"2021-10-29T16:32:41Z\",\"healthState\":\"Success\",\"healthCheckResult\":[{\"name\":\"ntof\",\"displayName\":\"fh\",\"tags\":{},\"healthCheckTags\":\"dataxo\",\"title\":\"kzdfiv\",\"status\":\"NotConnectedRecently\",\"severity\":\"Informational\",\"description\":\"rw\",\"remediation\":\"mr\",\"targetResourceID\":\"xdhmfp\",\"targetResourceName\":\"nmgikesmkw\",\"targetResourceType\":\"gfragjhxerxlobkd\",\"timestamp\":\"2021-10-17T16:42:23Z\",\"additionalData\":\"vmmnii\",\"healthCheckSource\":\"ho\"},{\"name\":\"jn\",\"displayName\":\"bggicnqwlctmw\",\"tags\":{},\"healthCheckTags\":\"dataxkrkqgvxrktj\",\"title\":\"igcwtspanbqxase\",\"status\":\"NotYetRegistered\",\"severity\":\"Critical\",\"description\":\"geedyy\",\"remediation\":\"uholaemwcgimmri\",\"targetResourceID\":\"absqqlon\",\"targetResourceName\":\"aowcahdkm\",\"targetResourceType\":\"smihrijezbfsjwfc\",\"timestamp\":\"2021-10-12T22:25:16Z\",\"additionalData\":\"vbgukbs\",\"healthCheckSource\":\"wyo\"},{\"name\":\"gnbknhj\",\"displayName\":\"lxa\",\"tags\":{},\"healthCheckTags\":\"dataffaspsdzkucsz\",\"title\":\"doaqipmnxclfrsb\",\"status\":\"Disconnected\",\"severity\":\"Critical\",\"description\":\"wvpu\",\"remediation\":\"ddtbfmekjcnginxd\",\"targetResourceID\":\"aoy\",\"targetResourceName\":\"fvgyxzmxynofxl\",\"targetResourceType\":\"xoqxtdnzujsj\",\"timestamp\":\"2021-10-29T23:59:47Z\",\"additionalData\":\"pskcjhmm\",\"healthCheckSource\":\"bnivdqtkykp\"},{\"name\":\"nlsfgnyscac\",\"displayName\":\"tbzetxyg\",\"tags\":{},\"healthCheckTags\":\"dataceecvjwyu\",\"title\":\"oxmpzzwahdrdvha\",\"status\":\"DeploymentInProgress\",\"severity\":\"Informational\",\"description\":\"vz\",\"remediation\":\"xmbrygmwibiosiq\",\"targetResourceID\":\"kqfdqwdrtx\",\"targetResourceName\":\"daglmrcok\",\"targetResourceType\":\"ert\",\"timestamp\":\"2021-02-26T13:48:08Z\",\"additionalData\":\"zsi\",\"healthCheckSource\":\"hubymfp\"}],\"healthCheckDate\":\"2021-06-20T19:03:39Z\",\"state\":\"PreparationFailed\"},\"location\":\"b\",\"id\":\"nfywtkq\",\"name\":\"w\",\"type\":\"dlkhczygpm\"},{\"properties\":{\"provisioningState\":\"Moving\",\"oemFamily\":\"lojhhyl\",\"currentOemVersion\":\"evfiyymotu\",\"hardwareModel\":\"ybwjmtftc\",\"packageVersions\":[{\"packageType\":\"irupkqnstpaqpi\",\"version\":\"gbv\",\"lastUpdated\":\"2021-04-13T21:48:24Z\"},{\"packageType\":\"hfxrt\",\"version\":\"bmsennqfabqcama\",\"lastUpdated\":\"2021-03-28T20:52:44Z\"}],\"currentVersion\":\"cxs\",\"currentSbeVersion\":\"bzdxmsynb\",\"lastUpdated\":\"2021-02-16T01:29:17Z\",\"lastChecked\":\"2021-09-08T03:16:15Z\",\"healthState\":\"Error\",\"healthCheckResult\":[{\"name\":\"msvzyqrbrnxhjtlx\",\"displayName\":\"kjkxaravww\",\"tags\":{},\"healthCheckTags\":\"datanje\",\"title\":\"htrxbozp\",\"status\":\"ValidationSuccess\",\"severity\":\"Critical\",\"description\":\"zb\",\"remediation\":\"lxrnwvdsvo\",\"targetResourceID\":\"zawwsdsorgf\",\"targetResourceName\":\"xsawooauff\",\"targetResourceType\":\"fqkmwz\",\"timestamp\":\"2021-11-04T18:45:37Z\",\"additionalData\":\"oybmrno\",\"healthCheckSource\":\"cjnzdaiovrbh\"},{\"name\":\"qphkv\",\"displayName\":\"zadcrxyla\",\"tags\":{},\"healthCheckTags\":\"datatyzvelffohu\",\"title\":\"wh\",\"status\":\"ConnectedRecently\",\"severity\":\"Warning\",\"description\":\"sshrmnkcclpc\",\"remediation\":\"ogkscxj\",\"targetResourceID\":\"gmos\",\"targetResourceName\":\"ebnxsqcows\",\"targetResourceType\":\"yfqla\",\"timestamp\":\"2021-02-02T09:25:47Z\",\"additionalData\":\"hsujk\",\"healthCheckSource\":\"uzp\"},{\"name\":\"qpwnikxkcajgr\",\"displayName\":\"ct\",\"tags\":{},\"healthCheckTags\":\"dataoocqsazmzlpc\",\"title\":\"tm\",\"status\":\"ConnectedRecently\",\"severity\":\"Warning\",\"description\":\"cf\",\"remediation\":\"vwjdthkvpy\",\"targetResourceID\":\"oafi\",\"targetResourceName\":\"p\",\"targetResourceType\":\"updkjrzfwkyl\",\"timestamp\":\"2021-10-22T21:02:06Z\",\"additionalData\":\"xwhqdcclc\",\"healthCheckSource\":\"srupayl\"}],\"healthCheckDate\":\"2021-01-04T11:18:43Z\",\"state\":\"PreparationFailed\"},\"location\":\"fxl\",\"id\":\"mfj\",\"name\":\"lpiywqnpfydrfbg\",\"type\":\"nyxbyxmk\"}],\"nextLink\":\"qyncgaullfstyygj\"}") .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("ghojovkeyym", model.value().get(0).location()); + Assertions.assertEquals("kfkgenjqn", model.value().get(0).oemFamily()); + Assertions.assertEquals("jwkosnyxigf", model.value().get(0).currentOemVersion()); + Assertions.assertEquals("jjcxgdq", model.value().get(0).hardwareModel()); + Assertions.assertEquals("n", model.value().get(0).packageVersions().get(0).packageType()); + Assertions.assertEquals("wopswnyinxuprrx", model.value().get(0).packageVersions().get(0).version()); + Assertions.assertEquals(OffsetDateTime.parse("2021-06-09T04:54:03Z"), 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("svjmnsvujnjk", model.value().get(0).currentVersion()); + Assertions.assertEquals("olefcjisepkdbxo", model.value().get(0).currentSbeVersion()); + Assertions.assertEquals(OffsetDateTime.parse("2021-10-21T21:06:41Z"), model.value().get(0).lastUpdated()); + Assertions.assertEquals(OffsetDateTime.parse("2021-01-17T05:16:15Z"), model.value().get(0).lastChecked()); + Assertions.assertEquals(HealthState.FAILURE, model.value().get(0).healthState()); + Assertions.assertEquals("lannmxynlsuqbw", model.value().get(0).healthCheckResult().get(0).name()); + Assertions.assertEquals("trkt", model.value().get(0).healthCheckResult().get(0).displayName()); + Assertions.assertEquals("jktfinf", model.value().get(0).healthCheckResult().get(0).title()); + Assertions.assertEquals(Status.VALIDATION_IN_PROGRESS, + model.value().get(0).healthCheckResult().get(0).status()); + Assertions.assertEquals(Severity.WARNING, model.value().get(0).healthCheckResult().get(0).severity()); + Assertions.assertEquals("culwkqic", model.value().get(0).healthCheckResult().get(0).description()); + Assertions.assertEquals("ook", model.value().get(0).healthCheckResult().get(0).remediation()); + Assertions.assertEquals("flsgaoj", model.value().get(0).healthCheckResult().get(0).targetResourceId()); + Assertions.assertEquals("qpqsdoctpzpuj", model.value().get(0).healthCheckResult().get(0).targetResourceName()); + Assertions.assertEquals("lmcds", model.value().get(0).healthCheckResult().get(0).targetResourceType()); + Assertions.assertEquals(OffsetDateTime.parse("2021-07-30T03:04:43Z"), 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("lujiswlluunxhfw", model.value().get(0).healthCheckResult().get(0).additionalData()); + Assertions.assertEquals("xzfwugeupcknec", model.value().get(0).healthCheckResult().get(0).healthCheckSource()); + Assertions.assertEquals(OffsetDateTime.parse("2021-04-06T09:29:50Z"), model.value().get(0).healthCheckDate()); + Assertions.assertEquals(UpdateSummariesPropertiesState.UPDATE_IN_PROGRESS, model.value().get(0).state()); + Assertions.assertEquals("qyncgaullfstyygj", 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..e2b00f0dc43f 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("rrhyjxcqcaczzvwa", "ztt", 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..6a9031786b15 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("jeeyv", "xbfckmoal", "axvwxtxuzh", 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..9ebd815f335e 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("lhuhdkubgyw", "drklpdyehjrwc", "lvxboc", 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..424110d5ab62 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; @@ -13,17 +13,17 @@ public final class UploadCertificateRequestTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - UploadCertificateRequest model - = BinaryData.fromString("{\"properties\":{\"certificates\":[\"isgwbnbbeldawkz\",\"ali\"]}}") - .toObject(UploadCertificateRequest.class); - Assertions.assertEquals("isgwbnbbeldawkz", model.properties().certificates().get(0)); + UploadCertificateRequest model = BinaryData + .fromString("{\"properties\":{\"certificates\":[\"vinvkj\",\"xdxr\",\"uukzclewyhmlw\",\"aztz\"]}}") + .toObject(UploadCertificateRequest.class); + Assertions.assertEquals("vinvkj", 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"))); + UploadCertificateRequest model = new UploadCertificateRequest().withProperties( + new RawCertificateData().withCertificates(Arrays.asList("vinvkj", "xdxr", "uukzclewyhmlw", "aztz"))); model = BinaryData.fromObject(model).toObject(UploadCertificateRequest.class); - Assertions.assertEquals("isgwbnbbeldawkz", model.properties().certificates().get(0)); + Assertions.assertEquals("vinvkj", 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..30499bcec996 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,9 +10,9 @@ 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\"}") - .toObject(UserAssignedIdentity.class); + UserAssignedIdentity model + = BinaryData.fromString("{\"principalId\":\"npkukghimdblx\",\"clientId\":\"imfnjhfjx\"}") + .toObject(UserAssignedIdentity.class); } @org.junit.jupiter.api.Test 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..e309014b5057 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,19 @@ 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\":[\"upxvpifd\",\"aifyzyzeyuubeids\"],\"additionalInfo\":\"fytoi\"}") .toObject(ValidateRequest.class); - Assertions.assertEquals("xtqmieoxor", model.edgeDeviceIds().get(0)); - Assertions.assertEquals("ovjzhpjbibgjmfx", model.additionalInfo()); + Assertions.assertEquals("upxvpifd", model.edgeDeviceIds().get(0)); + Assertions.assertEquals("fytoi", model.additionalInfo()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - ValidateRequest model - = new ValidateRequest().withEdgeDeviceIds(Arrays.asList("xtqmieoxor", "gufhyaomtbg", "havgrvk")) - .withAdditionalInfo("ovjzhpjbibgjmfx"); + ValidateRequest model = new ValidateRequest().withEdgeDeviceIds(Arrays.asList("upxvpifd", "aifyzyzeyuubeids")) + .withAdditionalInfo("fytoi"); model = BinaryData.fromObject(model).toObject(ValidateRequest.class); - Assertions.assertEquals("xtqmieoxor", model.edgeDeviceIds().get(0)); - Assertions.assertEquals("ovjzhpjbibgjmfx", model.additionalInfo()); + Assertions.assertEquals("upxvpifd", model.edgeDeviceIds().get(0)); + Assertions.assertEquals("fytoi", 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..1a5d30f0db70 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\":\"gygvfltgvdiho\"}").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..541b73eef7ec --- /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\":\"wqwoqsratjhdhzyb\"}],\"nodeCapabilities\":[{\"capabilityName\":\"ijh\"},{\"capabilityName\":\"rzgdkkagvw\"},{\"capabilityName\":\"khsusmmorf\"}]}") + .toObject(ValidatedSolutionRecipeCapabilities.class); + Assertions.assertEquals("wqwoqsratjhdhzyb", model.clusterCapabilities().get(0).capabilityName()); + Assertions.assertEquals("ijh", 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..48ba4eddeb81 --- /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\":\"zhwilzzh\"}") + .toObject(ValidatedSolutionRecipeCapability.class); + Assertions.assertEquals("zhwilzzh", 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..99f5fd324338 --- /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\":\"dq\",\"publisher\":\"nbzrtfte\",\"enableAutomaticUpgrade\":true,\"lcmUpdate\":true,\"catalog\":\"tvgj\",\"ring\":\"mt\",\"releaseTrain\":\"jvavdpwwo\",\"link\":\"d\",\"name\":\"titsf\",\"expectedHash\":\"fwanm\",\"previewSource\":\"scauwazcgwdfr\"}") + .toObject(ValidatedSolutionRecipeComponentMetadata.class); + Assertions.assertEquals("dq", model.extensionType()); + Assertions.assertEquals("nbzrtfte", model.publisher()); + Assertions.assertTrue(model.enableAutomaticUpgrade()); + Assertions.assertTrue(model.lcmUpdate()); + Assertions.assertEquals("tvgj", model.catalog()); + Assertions.assertEquals("mt", model.ring()); + Assertions.assertEquals("jvavdpwwo", model.releaseTrain()); + Assertions.assertEquals("d", model.link()); + Assertions.assertEquals("titsf", model.name()); + Assertions.assertEquals("fwanm", model.expectedHash()); + Assertions.assertEquals("scauwazcgwdfr", 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..b3717e133b39 --- /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\":\"usrf\",\"hash\":\"bdxzfxnxmlbmu\",\"fileName\":\"swkjmdihdcyyyz\",\"url\":\"whbwzjnufzrf\"}") + .toObject(ValidatedSolutionRecipeComponentPayload.class); + Assertions.assertEquals("usrf", model.identifier()); + Assertions.assertEquals("bdxzfxnxmlbmu", model.hash()); + Assertions.assertEquals("swkjmdihdcyyyz", model.fileName()); + Assertions.assertEquals("whbwzjnufzrf", 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..8f1253bda7a7 --- /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\":\"ijmri\",\"type\":\"r\",\"requiredVersion\":\"dneyttlr\",\"installOrder\":6892686571867716129,\"tags\":[\"bkut\",\"umltwjflu\"],\"payloads\":[{\"identifier\":\"bpvzlqywau\",\"hash\":\"qnjckhmocg\",\"fileName\":\"shgouarhwvix\",\"url\":\"qggljkybs\"},{\"identifier\":\"rcl\",\"hash\":\"vtzqnrbctbhp\",\"fileName\":\"hxpcvrdnyeita\",\"url\":\"eq\"}],\"metadata\":{\"extensionType\":\"nzjahwriuomzczf\",\"publisher\":\"ceevsa\",\"enableAutomaticUpgrade\":true,\"lcmUpdate\":false,\"catalog\":\"axikhfjqebglcxk\",\"ring\":\"zzromvygysemtmes\",\"releaseTrain\":\"svpinkzpatqt\",\"link\":\"swxspvckojaz\",\"name\":\"gspftesu\",\"expectedHash\":\"pvpvd\",\"previewSource\":\"ytcovqs\"}}") + .toObject(ValidatedSolutionRecipeComponent.class); + Assertions.assertEquals("ijmri", model.name()); + Assertions.assertEquals("r", model.type()); + Assertions.assertEquals("dneyttlr", model.requiredVersion()); + Assertions.assertEquals(6892686571867716129L, model.installOrder()); + Assertions.assertEquals("bkut", model.tags().get(0)); + Assertions.assertEquals("bpvzlqywau", model.payloads().get(0).identifier()); + Assertions.assertEquals("qnjckhmocg", model.payloads().get(0).hash()); + Assertions.assertEquals("shgouarhwvix", model.payloads().get(0).fileName()); + Assertions.assertEquals("qggljkybs", model.payloads().get(0).url()); + Assertions.assertEquals("nzjahwriuomzczf", model.metadata().extensionType()); + Assertions.assertEquals("ceevsa", model.metadata().publisher()); + Assertions.assertTrue(model.metadata().enableAutomaticUpgrade()); + Assertions.assertFalse(model.metadata().lcmUpdate()); + Assertions.assertEquals("axikhfjqebglcxk", model.metadata().catalog()); + Assertions.assertEquals("zzromvygysemtmes", model.metadata().ring()); + Assertions.assertEquals("svpinkzpatqt", model.metadata().releaseTrain()); + Assertions.assertEquals("swxspvckojaz", model.metadata().link()); + Assertions.assertEquals("gspftesu", model.metadata().name()); + Assertions.assertEquals("pvpvd", model.metadata().expectedHash()); + Assertions.assertEquals("ytcovqs", 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..3351c70ff926 --- /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\":\"h\",\"version\":\"rmexznlwkb\"},\"capabilities\":{\"clusterCapabilities\":[{\"capabilityName\":\"xkhupzeruf\"},{\"capabilityName\":\"jblcdrmyfcemftz\"},{\"capabilityName\":\"yykyalu\"},{\"capabilityName\":\"ekdfqnhttwd\"}],\"nodeCapabilities\":[{\"capabilityName\":\"rczfjjnnuxxr\"},{\"capabilityName\":\"kmhmnulwempdc\"},{\"capabilityName\":\"frhjulrsulwzp\"},{\"capabilityName\":\"lusnawmhhgzotfr\"}]},\"components\":[{\"name\":\"rgkoekvzwxxyx\",\"type\":\"ighctxbxmo\",\"requiredVersion\":\"cqydey\",\"installOrder\":6067534501926868900,\"tags\":[\"cz\"],\"payloads\":[{\"identifier\":\"jei\",\"hash\":\"ikgqaboohxbms\",\"fileName\":\"ycqsxr\",\"url\":\"d\"},{\"identifier\":\"ewuyqa\",\"hash\":\"ohpjhgejkbv\",\"fileName\":\"hdaurghooxaexb\",\"url\":\"hxjxjoezlqxrkdkn\"}],\"metadata\":{\"extensionType\":\"ektm\",\"publisher\":\"z\",\"enableAutomaticUpgrade\":true,\"lcmUpdate\":true,\"catalog\":\"icbigwcdgzse\",\"ring\":\"uxk\",\"releaseTrain\":\"ai\",\"link\":\"abmdlqj\",\"name\":\"dp\",\"expectedHash\":\"xlhupmomihzbdnp\",\"previewSource\":\"kcdpreyxelyi\"}},{\"name\":\"ghflrufssjyghsf\",\"type\":\"rkbhammgmqfm\",\"requiredVersion\":\"gvqcpdwj\",\"installOrder\":3733956438322511657,\"tags\":[\"eysl\",\"ndk\",\"cdjhunhg\",\"cgawnrrnquo\"],\"payloads\":[{\"identifier\":\"tireimse\",\"hash\":\"bfsx\",\"fileName\":\"tcyilbvz\",\"url\":\"mxcjzlquzexokjx\"},{\"identifier\":\"bjvbzinzab\",\"hash\":\"mvoglj\",\"fileName\":\"v\",\"url\":\"pgidnw\"}],\"metadata\":{\"extensionType\":\"aqidoyzltgiomqo\",\"publisher\":\"epiaeapfsergd\",\"enableAutomaticUpgrade\":false,\"lcmUpdate\":true,\"catalog\":\"cyheqwbpqqncj\",\"ring\":\"khjoz\",\"releaseTrain\":\"mcwmbup\",\"link\":\"qyvliqiipsejbsvs\",\"name\":\"ieswhddzydisn\",\"expectedHash\":\"pywyjlnld\",\"previewSource\":\"ottdiiaocqibzj\"}}]}") + .toObject(ValidatedSolutionRecipeContent.class); + Assertions.assertEquals("h", model.info().solutionType()); + Assertions.assertEquals("rmexznlwkb", model.info().version()); + Assertions.assertEquals("xkhupzeruf", model.capabilities().clusterCapabilities().get(0).capabilityName()); + Assertions.assertEquals("rczfjjnnuxxr", model.capabilities().nodeCapabilities().get(0).capabilityName()); + Assertions.assertEquals("rgkoekvzwxxyx", model.components().get(0).name()); + Assertions.assertEquals("ighctxbxmo", model.components().get(0).type()); + Assertions.assertEquals("cqydey", model.components().get(0).requiredVersion()); + Assertions.assertEquals(6067534501926868900L, model.components().get(0).installOrder()); + Assertions.assertEquals("cz", model.components().get(0).tags().get(0)); + Assertions.assertEquals("jei", model.components().get(0).payloads().get(0).identifier()); + Assertions.assertEquals("ikgqaboohxbms", model.components().get(0).payloads().get(0).hash()); + Assertions.assertEquals("ycqsxr", model.components().get(0).payloads().get(0).fileName()); + Assertions.assertEquals("d", model.components().get(0).payloads().get(0).url()); + Assertions.assertEquals("ektm", model.components().get(0).metadata().extensionType()); + Assertions.assertEquals("z", model.components().get(0).metadata().publisher()); + Assertions.assertTrue(model.components().get(0).metadata().enableAutomaticUpgrade()); + Assertions.assertTrue(model.components().get(0).metadata().lcmUpdate()); + Assertions.assertEquals("icbigwcdgzse", model.components().get(0).metadata().catalog()); + Assertions.assertEquals("uxk", model.components().get(0).metadata().ring()); + Assertions.assertEquals("ai", model.components().get(0).metadata().releaseTrain()); + Assertions.assertEquals("abmdlqj", model.components().get(0).metadata().link()); + Assertions.assertEquals("dp", model.components().get(0).metadata().name()); + Assertions.assertEquals("xlhupmomihzbdnp", model.components().get(0).metadata().expectedHash()); + Assertions.assertEquals("kcdpreyxelyi", 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..06e879225604 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ValidatedSolutionRecipeInfoTests.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.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\":\"hweebiph\",\"version\":\"yv\"}") + .toObject(ValidatedSolutionRecipeInfo.class); + Assertions.assertEquals("hweebiph", model.solutionType()); + Assertions.assertEquals("yv", 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..07a577169eab --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ValidatedSolutionRecipeInnerTests.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.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\":\"wjyofgwhnkbtl\",\"version\":\"ljssm\"},\"capabilities\":{\"clusterCapabilities\":[{\"capabilityName\":\"nldkp\"}],\"nodeCapabilities\":[{\"capabilityName\":\"lgisubxbteogf\"},{\"capabilityName\":\"fiijrykwlefksxqc\"}]},\"components\":[{\"name\":\"zfpxgnmqvzvluy\",\"type\":\"qa\",\"requiredVersion\":\"ssscyvai\",\"installOrder\":394207420174772839,\"tags\":[\"cvfyeowpsfxtjdhs\",\"ymh\",\"v\"],\"payloads\":[{\"identifier\":\"ftteh\",\"hash\":\"pboujs\",\"fileName\":\"kfvvdshxcde\",\"url\":\"suenyg\"},{\"identifier\":\"xcgjtf\",\"hash\":\"nquktrfnslnlrxs\",\"fileName\":\"ylt\",\"url\":\"wntfmtbgwjdxwna\"},{\"identifier\":\"kurrdreyzjwh\",\"hash\":\"etw\",\"fileName\":\"jwzzqseuzu\",\"url\":\"kykcyqhyqqzz\"},{\"identifier\":\"c\",\"hash\":\"keys\",\"fileName\":\"ewfopazdazg\",\"url\":\"sqgpewqcfu\"}],\"metadata\":{\"extensionType\":\"pvozglqjbknlzc\",\"publisher\":\"tzeyowmndcovd\",\"enableAutomaticUpgrade\":false,\"lcmUpdate\":false,\"catalog\":\"zanhmkvfru\",\"ring\":\"udrbcpftxudqyem\",\"releaseTrain\":\"unaucm\",\"link\":\"rtneemmja\",\"name\":\"cgxefnohaitraniz\",\"expectedHash\":\"wgudasmxu\",\"previewSource\":\"fbngfcocef\"}},{\"name\":\"priylfmp\",\"type\":\"trauds\",\"requiredVersion\":\"lcdculregpq\",\"installOrder\":5890778681321235352,\"tags\":[\"vr\",\"tnvgyshqrdgrt\"],\"payloads\":[{\"identifier\":\"wjzl\",\"hash\":\"ykcfazz\",\"fileName\":\"jcayerzrransyby\",\"url\":\"polwzrghsrlei\"},{\"identifier\":\"kfscjfncjwv\",\"hash\":\"ag\",\"fileName\":\"qwtltngvmreupt\",\"url\":\"klzmijajw\"}],\"metadata\":{\"extensionType\":\"fsvagh\",\"publisher\":\"ynwlslrcigtzjcv\",\"enableAutomaticUpgrade\":true,\"lcmUpdate\":false,\"catalog\":\"snsso\",\"ring\":\"xpavid\",\"releaseTrain\":\"ev\",\"link\":\"fcvvy\",\"name\":\"slpuxgcbdsva\",\"expectedHash\":\"nptw\",\"previewSource\":\"kx\"}},{\"name\":\"pazwug\",\"type\":\"yqvnjobfe\",\"requiredVersion\":\"ldiuhzzgqlm\",\"installOrder\":6982317269679463668,\"tags\":[\"giudjpxpq\"],\"payloads\":[{\"identifier\":\"qhnmhk\",\"hash\":\"ezsdsuxheq\",\"fileName\":\"gcruxspinym\",\"url\":\"qgwokmikp\"}],\"metadata\":{\"extensionType\":\"bmjxuvjipf\",\"publisher\":\"haxd\",\"enableAutomaticUpgrade\":true,\"lcmUpdate\":true,\"catalog\":\"pphthdklmvetatla\",\"ring\":\"q\",\"releaseTrain\":\"xwgiks\",\"link\":\"vtooxrpo\",\"name\":\"phchgjtnhtukfaci\",\"expectedHash\":\"bfntumeezbxvq\",\"previewSource\":\"nuvwcgasgomtmjzw\"}},{\"name\":\"uqgovsxpwwztjfm\",\"type\":\"khtgfredmlscgrll\",\"requiredVersion\":\"na\",\"installOrder\":151368059587540950,\"tags\":[\"azhpabacoml\",\"otgkwsxnsrqorcg\",\"nmvceb\"],\"payloads\":[{\"identifier\":\"tqujxcxxqndcqjk\",\"hash\":\"dwqu\",\"fileName\":\"cgojmrv\",\"url\":\"xwjongzse\"},{\"identifier\":\"qqrsil\",\"hash\":\"chskxxka\",\"fileName\":\"sbvr\",\"url\":\"aqgvto\"},{\"identifier\":\"rulfuct\",\"hash\":\"jrthcfjzhx\",\"fileName\":\"yubqjr\",\"url\":\"stvrjeqmt\"}],\"metadata\":{\"extensionType\":\"eqrztrxalxrdh\",\"publisher\":\"srwrsnrhpqati\",\"enableAutomaticUpgrade\":true,\"lcmUpdate\":true,\"catalog\":\"nxkvvcsemsv\",\"ring\":\"djkqxetqmm\",\"releaseTrain\":\"vrjjxnw\",\"link\":\"chp\",\"name\":\"xlehzlxpgfquwzp\",\"expectedHash\":\"ibelwcerwkw\",\"previewSource\":\"jxljtxbusq\"}}]},\"signature\":\"xxniuisdzhgbd\"},\"id\":\"pagsecnad\",\"name\":\"u\",\"type\":\"qrgxf\"}") + .toObject(ValidatedSolutionRecipeInner.class); + Assertions.assertEquals("wjyofgwhnkbtl", model.properties().recipeContent().info().solutionType()); + Assertions.assertEquals("ljssm", model.properties().recipeContent().info().version()); + Assertions.assertEquals("nldkp", + model.properties().recipeContent().capabilities().clusterCapabilities().get(0).capabilityName()); + Assertions.assertEquals("lgisubxbteogf", + model.properties().recipeContent().capabilities().nodeCapabilities().get(0).capabilityName()); + Assertions.assertEquals("zfpxgnmqvzvluy", model.properties().recipeContent().components().get(0).name()); + Assertions.assertEquals("qa", model.properties().recipeContent().components().get(0).type()); + Assertions.assertEquals("ssscyvai", model.properties().recipeContent().components().get(0).requiredVersion()); + Assertions.assertEquals(394207420174772839L, + model.properties().recipeContent().components().get(0).installOrder()); + Assertions.assertEquals("cvfyeowpsfxtjdhs", + model.properties().recipeContent().components().get(0).tags().get(0)); + Assertions.assertEquals("ftteh", + model.properties().recipeContent().components().get(0).payloads().get(0).identifier()); + Assertions.assertEquals("pboujs", + model.properties().recipeContent().components().get(0).payloads().get(0).hash()); + Assertions.assertEquals("kfvvdshxcde", + model.properties().recipeContent().components().get(0).payloads().get(0).fileName()); + Assertions.assertEquals("suenyg", + model.properties().recipeContent().components().get(0).payloads().get(0).url()); + Assertions.assertEquals("pvozglqjbknlzc", + model.properties().recipeContent().components().get(0).metadata().extensionType()); + Assertions.assertEquals("tzeyowmndcovd", + model.properties().recipeContent().components().get(0).metadata().publisher()); + Assertions + .assertFalse(model.properties().recipeContent().components().get(0).metadata().enableAutomaticUpgrade()); + Assertions.assertFalse(model.properties().recipeContent().components().get(0).metadata().lcmUpdate()); + Assertions.assertEquals("zanhmkvfru", + model.properties().recipeContent().components().get(0).metadata().catalog()); + Assertions.assertEquals("udrbcpftxudqyem", + model.properties().recipeContent().components().get(0).metadata().ring()); + Assertions.assertEquals("unaucm", + model.properties().recipeContent().components().get(0).metadata().releaseTrain()); + Assertions.assertEquals("rtneemmja", model.properties().recipeContent().components().get(0).metadata().link()); + Assertions.assertEquals("cgxefnohaitraniz", + model.properties().recipeContent().components().get(0).metadata().name()); + Assertions.assertEquals("wgudasmxu", + model.properties().recipeContent().components().get(0).metadata().expectedHash()); + Assertions.assertEquals("fbngfcocef", + model.properties().recipeContent().components().get(0).metadata().previewSource()); + Assertions.assertEquals("xxniuisdzhgbd", 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..6dbf2c931749 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ValidatedSolutionRecipeListResultTests.java @@ -0,0 +1,43 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.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\":\"ybjpozoks\",\"version\":\"vgllixdgby\"},\"capabilities\":{\"clusterCapabilities\":[{\"capabilityName\":\"ewqkjvxprwpxs\"},{\"capabilityName\":\"ohutxlcsk\"}],\"nodeCapabilities\":[{\"capabilityName\":\"e\"},{\"capabilityName\":\"uugggzlfbgrd\"}]},\"components\":[{\"name\":\"ubsrtmdylperpilt\",\"type\":\"jzgc\",\"tags\":[]},{\"name\":\"fcm\",\"type\":\"pfb\",\"tags\":[]},{\"name\":\"detres\",\"type\":\"gvtshu\",\"tags\":[]}]},\"signature\":\"t\"},\"id\":\"ivmuqkevzgjyp\",\"name\":\"nhxmpdxxze\",\"type\":\"wwzjwotnxlkfhglh\"},{\"properties\":{\"recipeContent\":{\"info\":{\"solutionType\":\"oxqwecrsnhpcse\",\"version\":\"qxovppqibukk\"},\"capabilities\":{\"clusterCapabilities\":[{\"capabilityName\":\"rl\"},{\"capabilityName\":\"mlccmetjscz\"},{\"capabilityName\":\"vfqbqna\"},{\"capabilityName\":\"dsyenzsieuscpl\"}],\"nodeCapabilities\":[{\"capabilityName\":\"vdgxly\"},{\"capabilityName\":\"kxitds\"},{\"capabilityName\":\"ezsvkolrupjov\"}]},\"components\":[{\"name\":\"zsayebrazw\",\"type\":\"lpzbtzuykykipf\",\"tags\":[]},{\"name\":\"dyepfno\",\"type\":\"mbezacfpztg\",\"tags\":[]}]},\"signature\":\"wyqejgaao\"},\"id\":\"tgkppgkqzkcyzmff\",\"name\":\"gdyfcixrhlcqvhoe\",\"type\":\"goiutgw\"}],\"nextLink\":\"kahpqhazynta\"}") + .toObject(ValidatedSolutionRecipeListResult.class); + Assertions.assertEquals("ybjpozoks", model.value().get(0).properties().recipeContent().info().solutionType()); + Assertions.assertEquals("vgllixdgby", model.value().get(0).properties().recipeContent().info().version()); + Assertions.assertEquals("ewqkjvxprwpxs", + model.value() + .get(0) + .properties() + .recipeContent() + .capabilities() + .clusterCapabilities() + .get(0) + .capabilityName()); + Assertions.assertEquals("e", + model.value() + .get(0) + .properties() + .recipeContent() + .capabilities() + .nodeCapabilities() + .get(0) + .capabilityName()); + Assertions.assertEquals("ubsrtmdylperpilt", + model.value().get(0).properties().recipeContent().components().get(0).name()); + Assertions.assertEquals("jzgc", model.value().get(0).properties().recipeContent().components().get(0).type()); + Assertions.assertEquals("t", model.value().get(0).properties().signature()); + Assertions.assertEquals("kahpqhazynta", 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..cd9d3db0c046 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ValidatedSolutionRecipePropertiesTests.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.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\":\"lmqiynezoel\",\"version\":\"nkkiiwvmtumxpy\"},\"capabilities\":{\"clusterCapabilities\":[{\"capabilityName\":\"fua\"},{\"capabilityName\":\"roqvqpilrgu\"},{\"capabilityName\":\"canlduwzorxs\"},{\"capabilityName\":\"mxaqklxym\"}],\"nodeCapabilities\":[{\"capabilityName\":\"qvfqepdxc\"}]},\"components\":[{\"name\":\"uubwyvpjb\",\"type\":\"wcpjqduqgi\",\"requiredVersion\":\"xkydfbwlja\",\"installOrder\":1995520517118068801,\"tags\":[\"k\"],\"payloads\":[{\"identifier\":\"vrg\",\"hash\":\"iegftc\",\"fileName\":\"biiftksdwgdnk\",\"url\":\"fgmwd\"},{\"identifier\":\"c\",\"hash\":\"buvczldbglzoutb\",\"fileName\":\"aqgzekajclyzgs\",\"url\":\"orbjg\"},{\"identifier\":\"nzjotvmr\",\"hash\":\"khlobvvjbhvhdi\",\"fileName\":\"ayfluiyuosnu\",\"url\":\"dtelvhyibdrqrs\"},{\"identifier\":\"hbuubpy\",\"hash\":\"owtjo\",\"fileName\":\"ztfwfqchvcz\",\"url\":\"vjnn\"}],\"metadata\":{\"extensionType\":\"gfyvrtpqpe\",\"publisher\":\"z\",\"enableAutomaticUpgrade\":true,\"lcmUpdate\":true,\"catalog\":\"dqhqyhwqwemv\",\"ring\":\"abckmzeoxinhgre\",\"releaseTrain\":\"twhlpuzjpce\",\"link\":\"nzangprbfaxy\",\"name\":\"lbciphmsexro\",\"expectedHash\":\"ndktxfv\",\"previewSource\":\"feeqgpkrietbgnix\"}},{\"name\":\"owwzkyfwnwpi\",\"type\":\"xe\",\"requiredVersion\":\"crmpepk\",\"installOrder\":9106636058325377252,\"tags\":[\"xijvskwsdgkjgyac\"],\"payloads\":[{\"identifier\":\"sekwefc\",\"hash\":\"o\",\"fileName\":\"nwoqartwy\",\"url\":\"qicladv\"},{\"identifier\":\"tdavuqmcbymsfobj\",\"hash\":\"quvjez\",\"fileName\":\"j\",\"url\":\"mvpsimioyo\"},{\"identifier\":\"glkmiqwnnr\",\"hash\":\"clibbfqpsp\",\"fileName\":\"ladydgnhautwu\",\"url\":\"exzgpmnmabedd\"},{\"identifier\":\"ilwgdfpfqfpcvstc\",\"hash\":\"gq\",\"fileName\":\"vwerfwxbsmtb\",\"url\":\"jj\"}],\"metadata\":{\"extensionType\":\"ci\",\"publisher\":\"wdv\",\"enableAutomaticUpgrade\":true,\"lcmUpdate\":false,\"catalog\":\"qhs\",\"ring\":\"tfpwpqbyejuw\",\"releaseTrain\":\"wdqi\",\"link\":\"ghg\",\"name\":\"z\",\"expectedHash\":\"lujkhn\",\"previewSource\":\"mrnkfmkhcqtwml\"}},{\"name\":\"hjnqt\",\"type\":\"eahjedv\",\"requiredVersion\":\"gpokddxejhhkvgu\",\"installOrder\":2665818389059895026,\"tags\":[\"bkew\",\"qynspgbvoffb\",\"kwvdxa\"],\"payloads\":[{\"identifier\":\"okmyr\",\"hash\":\"jialz\",\"fileName\":\"nobrqlpb\",\"url\":\"jtrpzuyud\"},{\"identifier\":\"vbxnhsqeaeonqe\",\"hash\":\"wgdhu\",\"fileName\":\"uzytz\",\"url\":\"rogatmolj\"},{\"identifier\":\"ywmpinmzvfkneer\",\"hash\":\"ztrknsj\",\"fileName\":\"lugdybnhrxlelf\",\"url\":\"hkeizcp\"}],\"metadata\":{\"extensionType\":\"dmiwjekpty\",\"publisher\":\"ydbjzcqymlcf\",\"enableAutomaticUpgrade\":true,\"lcmUpdate\":false,\"catalog\":\"urlgwqkpmmzps\",\"ring\":\"u\",\"releaseTrain\":\"awi\",\"link\":\"momsgvvj\",\"name\":\"vlrlohewjjmajn\",\"expectedHash\":\"flqio\",\"previewSource\":\"waeqkzfzqxjosho\"}}]},\"signature\":\"otryegp\"}") + .toObject(ValidatedSolutionRecipeProperties.class); + Assertions.assertEquals("lmqiynezoel", model.recipeContent().info().solutionType()); + Assertions.assertEquals("nkkiiwvmtumxpy", model.recipeContent().info().version()); + Assertions.assertEquals("fua", + model.recipeContent().capabilities().clusterCapabilities().get(0).capabilityName()); + Assertions.assertEquals("qvfqepdxc", + model.recipeContent().capabilities().nodeCapabilities().get(0).capabilityName()); + Assertions.assertEquals("uubwyvpjb", model.recipeContent().components().get(0).name()); + Assertions.assertEquals("wcpjqduqgi", model.recipeContent().components().get(0).type()); + Assertions.assertEquals("xkydfbwlja", model.recipeContent().components().get(0).requiredVersion()); + Assertions.assertEquals(1995520517118068801L, model.recipeContent().components().get(0).installOrder()); + Assertions.assertEquals("k", model.recipeContent().components().get(0).tags().get(0)); + Assertions.assertEquals("vrg", model.recipeContent().components().get(0).payloads().get(0).identifier()); + Assertions.assertEquals("iegftc", model.recipeContent().components().get(0).payloads().get(0).hash()); + Assertions.assertEquals("biiftksdwgdnk", + model.recipeContent().components().get(0).payloads().get(0).fileName()); + Assertions.assertEquals("fgmwd", model.recipeContent().components().get(0).payloads().get(0).url()); + Assertions.assertEquals("gfyvrtpqpe", model.recipeContent().components().get(0).metadata().extensionType()); + Assertions.assertEquals("z", 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("dqhqyhwqwemv", model.recipeContent().components().get(0).metadata().catalog()); + Assertions.assertEquals("abckmzeoxinhgre", model.recipeContent().components().get(0).metadata().ring()); + Assertions.assertEquals("twhlpuzjpce", model.recipeContent().components().get(0).metadata().releaseTrain()); + Assertions.assertEquals("nzangprbfaxy", model.recipeContent().components().get(0).metadata().link()); + Assertions.assertEquals("lbciphmsexro", model.recipeContent().components().get(0).metadata().name()); + Assertions.assertEquals("ndktxfv", model.recipeContent().components().get(0).metadata().expectedHash()); + Assertions.assertEquals("feeqgpkrietbgnix", + model.recipeContent().components().get(0).metadata().previewSource()); + Assertions.assertEquals("otryegp", 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..8a1c9c4995a0 --- /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\":\"ukxtuytgcp\",\"version\":\"ctxp\"},\"capabilities\":{\"clusterCapabilities\":[{\"capabilityName\":\"yckmemfvr\"},{\"capabilityName\":\"clclf\"}],\"nodeCapabilities\":[{\"capabilityName\":\"vyjommw\"},{\"capabilityName\":\"vpoip\"}]},\"components\":[{\"name\":\"lx\",\"type\":\"ebvsewfzvvpay\",\"requiredVersion\":\"whzdcyan\",\"installOrder\":4653274371655119499,\"tags\":[\"ntcv\",\"vd\"],\"payloads\":[{\"identifier\":\"qqctfv\",\"hash\":\"u\",\"fileName\":\"sqpffapjpjmsbzz\",\"url\":\"snyfowyjzuak\"},{\"identifier\":\"iubeqk\",\"hash\":\"ttlrglhxs\",\"fileName\":\"anguhbnhogse\",\"url\":\"reneggpdtyz\"}],\"metadata\":{}},{\"name\":\"litw\",\"type\":\"ejm\",\"requiredVersion\":\"mudupehskvsdfv\",\"installOrder\":253564281681711217,\"tags\":[\"zammpk\"],\"payloads\":[{\"identifier\":\"npeukgnmfakeqnit\",\"hash\":\"omlcsvkt\",\"fileName\":\"psrowshvf\",\"url\":\"jtxlawmvdyqabjro\"},{\"identifier\":\"xfqdmllznyjyuwq\",\"hash\":\"zwgdpvhwiril\",\"fileName\":\"mqtr\",\"url\":\"qdoxdegacded\"},{\"identifier\":\"kw\",\"hash\":\"to\",\"fileName\":\"pgdcidp\",\"url\":\"aqermnddlir\"}],\"metadata\":{}},{\"name\":\"clsaqifepdu\",\"type\":\"eevivkig\",\"requiredVersion\":\"oklsuffpxesw\",\"installOrder\":9186526536521724798,\"tags\":[\"tbltytvnpbgcesfd\",\"fclmowur\"],\"payloads\":[{\"identifier\":\"fkbcjzzwweobl\",\"hash\":\"tdqzhixccnkfso\",\"fileName\":\"vyoxmy\",\"url\":\"zyqe\"},{\"identifier\":\"gbbzdsl\",\"hash\":\"okcevoxdddpwmg\",\"fileName\":\"xwukfjvqglaxseis\",\"url\":\"vvgyphheo\"},{\"identifier\":\"ejk\",\"hash\":\"aleczt\",\"fileName\":\"thrtzpuv\",\"url\":\"s\"}],\"metadata\":{}}]},\"signature\":\"rqefnquollouurm\"},\"id\":\"embqqiehdhjofy\",\"name\":\"wnaxoxl\",\"type\":\"rx\"}"; + + 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("zzkvfc", "ozvqxsphtraitr", com.azure.core.util.Context.NONE) + .getValue(); + + Assertions.assertEquals("ukxtuytgcp", response.properties().recipeContent().info().solutionType()); + Assertions.assertEquals("ctxp", response.properties().recipeContent().info().version()); + Assertions.assertEquals("yckmemfvr", + response.properties().recipeContent().capabilities().clusterCapabilities().get(0).capabilityName()); + Assertions.assertEquals("vyjommw", + response.properties().recipeContent().capabilities().nodeCapabilities().get(0).capabilityName()); + Assertions.assertEquals("lx", response.properties().recipeContent().components().get(0).name()); + Assertions.assertEquals("ebvsewfzvvpay", response.properties().recipeContent().components().get(0).type()); + Assertions.assertEquals("whzdcyan", + response.properties().recipeContent().components().get(0).requiredVersion()); + Assertions.assertEquals(4653274371655119499L, + response.properties().recipeContent().components().get(0).installOrder()); + Assertions.assertEquals("ntcv", response.properties().recipeContent().components().get(0).tags().get(0)); + Assertions.assertEquals("qqctfv", + response.properties().recipeContent().components().get(0).payloads().get(0).identifier()); + Assertions.assertEquals("u", + response.properties().recipeContent().components().get(0).payloads().get(0).hash()); + Assertions.assertEquals("sqpffapjpjmsbzz", + response.properties().recipeContent().components().get(0).payloads().get(0).fileName()); + Assertions.assertEquals("snyfowyjzuak", + response.properties().recipeContent().components().get(0).payloads().get(0).url()); + Assertions.assertEquals("rqefnquollouurm", 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..b112d2db9813 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ValidatedSolutionRecipesListBySubscriptionLocationResourceMockTests.java @@ -0,0 +1,78 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.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\":\"glyyhrgmabspmlu\",\"version\":\"yju\"},\"capabilities\":{\"clusterCapabilities\":[{\"capabilityName\":\"dputo\"},{\"capabilityName\":\"rbfgqi\"},{\"capabilityName\":\"mdrgcuzjmvkrwrjc\"}],\"nodeCapabilities\":[{\"capabilityName\":\"gcmlj\"},{\"capabilityName\":\"ksqimybq\"},{\"capabilityName\":\"vfiomhc\"}]},\"components\":[{\"name\":\"pvhszopeu\",\"type\":\"uf\",\"requiredVersion\":\"wbsskgqjemo\",\"installOrder\":3866572365102158661,\"tags\":[\"jbpwjwzqgipdz\",\"mzkhxfpzcu\",\"dq\",\"adxjvvlyibw\"],\"payloads\":[{\"identifier\":\"u\",\"hash\":\"txlz\",\"fileName\":\"coqxtvytzqlyldj\",\"url\":\"zmxyrazzstjvcs\"},{\"identifier\":\"bdbrl\",\"hash\":\"ozl\",\"fileName\":\"yolacbibtkeie\",\"url\":\"upmwxdsokrlnrpey\"},{\"identifier\":\"fiiulddg\",\"hash\":\"qlnh\",\"fileName\":\"xwwwvunknsgvxhx\",\"url\":\"meatrtcqyfjvifb\"}],\"metadata\":{}},{\"name\":\"j\",\"type\":\"ehqyoytrcoufk\",\"requiredVersion\":\"bhukdfpknv\",\"installOrder\":1686472806367557435,\"tags\":[\"jezchmeo\"],\"payloads\":[{\"identifier\":\"jl\",\"hash\":\"knckkfxmuqeqkw\",\"fileName\":\"phfvsftsstwlpxca\",\"url\":\"hdtezgfctu\"},{\"identifier\":\"z\",\"hash\":\"wqrzvuxnxauohsh\",\"fileName\":\"u\",\"url\":\"tdbvmj\"}],\"metadata\":{}},{\"name\":\"ypngocbd\",\"type\":\"vrivptbczsuzgrz\",\"requiredVersion\":\"ekytkzvtv\",\"installOrder\":2592976986686593408,\"tags\":[\"ogpycei\",\"harhbdxsbyp\",\"s\",\"hwfjudapbqpsezsg\"],\"payloads\":[{\"identifier\":\"ftfcbrtsrdplqdy\",\"hash\":\"aciasfzrgu\",\"fileName\":\"liyvsbf\",\"url\":\"inv\"},{\"identifier\":\"bdj\",\"hash\":\"ljgxot\",\"fileName\":\"dam\",\"url\":\"i\"}],\"metadata\":{}},{\"name\":\"osthulzugifg\",\"type\":\"pxldlnocs\",\"requiredVersion\":\"gimizlukj\",\"installOrder\":8631769414783473916,\"tags\":[\"srlmsp\"],\"payloads\":[{\"identifier\":\"eszthjtryjs\",\"hash\":\"diylgzzuqixp\",\"fileName\":\"ybqowgvmxwbohxdh\",\"url\":\"oexb\"},{\"identifier\":\"h\",\"hash\":\"nakaj\",\"fileName\":\"scmne\",\"url\":\"vlumqeumz\"},{\"identifier\":\"yhmgq\",\"hash\":\"eivjqutxr\",\"fileName\":\"gbzgfhzdzahktxv\",\"url\":\"bicfecthotbkjwhz\"},{\"identifier\":\"pxjvtwk\",\"hash\":\"jdpayx\",\"fileName\":\"pqiwuzr\",\"url\":\"qztjfkgb\"}],\"metadata\":{}}]},\"signature\":\"jobsynn\"},\"id\":\"ion\",\"name\":\"q\",\"type\":\"dheos\"}]}"; + + 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("slqcxuthv", com.azure.core.util.Context.NONE); + + Assertions.assertEquals("glyyhrgmabspmlu", + response.iterator().next().properties().recipeContent().info().solutionType()); + Assertions.assertEquals("yju", response.iterator().next().properties().recipeContent().info().version()); + Assertions.assertEquals("dputo", + response.iterator() + .next() + .properties() + .recipeContent() + .capabilities() + .clusterCapabilities() + .get(0) + .capabilityName()); + Assertions.assertEquals("gcmlj", + response.iterator() + .next() + .properties() + .recipeContent() + .capabilities() + .nodeCapabilities() + .get(0) + .capabilityName()); + Assertions.assertEquals("pvhszopeu", + response.iterator().next().properties().recipeContent().components().get(0).name()); + Assertions.assertEquals("uf", + response.iterator().next().properties().recipeContent().components().get(0).type()); + Assertions.assertEquals("wbsskgqjemo", + response.iterator().next().properties().recipeContent().components().get(0).requiredVersion()); + Assertions.assertEquals(3866572365102158661L, + response.iterator().next().properties().recipeContent().components().get(0).installOrder()); + Assertions.assertEquals("jbpwjwzqgipdz", + response.iterator().next().properties().recipeContent().components().get(0).tags().get(0)); + Assertions.assertEquals("u", + response.iterator().next().properties().recipeContent().components().get(0).payloads().get(0).identifier()); + Assertions.assertEquals("txlz", + response.iterator().next().properties().recipeContent().components().get(0).payloads().get(0).hash()); + Assertions.assertEquals("coqxtvytzqlyldj", + response.iterator().next().properties().recipeContent().components().get(0).payloads().get(0).fileName()); + Assertions.assertEquals("zmxyrazzstjvcs", + response.iterator().next().properties().recipeContent().components().get(0).payloads().get(0).url()); + Assertions.assertEquals("jobsynn", response.iterator().next().properties().signature()); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/WebProxyConfigurationTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/WebProxyConfigurationTests.java new file mode 100644 index 000000000000..07eb9af832ad --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/WebProxyConfigurationTests.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.WebProxyConfiguration; +import java.util.Arrays; +import org.junit.jupiter.api.Assertions; + +public final class WebProxyConfigurationTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + WebProxyConfiguration model = BinaryData + .fromString( + "{\"connectionUri\":\"sozjvxdzciggbnv\",\"port\":\"o\",\"bypassList\":[\"lzy\",\"whoea\",\"o\"]}") + .toObject(WebProxyConfiguration.class); + Assertions.assertEquals("sozjvxdzciggbnv", model.connectionUri()); + Assertions.assertEquals("o", model.port()); + Assertions.assertEquals("lzy", model.bypassList().get(0)); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + WebProxyConfiguration model = new WebProxyConfiguration().withConnectionUri("sozjvxdzciggbnv") + .withPort("o") + .withBypassList(Arrays.asList("lzy", "whoea", "o")); + model = BinaryData.fromObject(model).toObject(WebProxyConfiguration.class); + Assertions.assertEquals("sozjvxdzciggbnv", model.connectionUri()); + Assertions.assertEquals("o", model.port()); + Assertions.assertEquals("lzy", model.bypassList().get(0)); + } +} 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..b79dbc460818 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/tsp-location.yaml @@ -0,0 +1,4 @@ +directory: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/StackHCI +commit: 9564453c2af68fd5b29dd4bfc31d547f4e6e7cd1 +repo: Azure/azure-rest-api-specs +additionalDirectories: